dkms invokes the PRE_BUILD command from the wrong working directory

Bug #702638 reported by Darik Horn on 2011-01-13
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dkms (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: dkms

If a PRE_BUILD command is defined in a dkms.conf file, then it is invoked as $dkms_tree/$module/$module_version/source/$pre_build in the current working directory. This is incorrect behavior because PRE_BUILD could modify or generate source files. Also note that $dkms_tree/$module/$module_version/source/ is linked to /usr/src/$module-$module_version/ and should be therefore be read-only regardless.

Expected behavior is that PRE_BUILD be always invoked from the $dkms_tree/$module/$module_version/build/ temporary area.

The attached patch results in the expected behavior. I noticed this glitch because I'm working on a DKMS package for the ZFS filesystem; the SPL module uses a configure script to create some things in the build area.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: dkms 2.1.1.2-3ubuntu1.1 [modified: usr/sbin/dkms]
ProcVersionSignature: Ubuntu 2.6.35-24.42-generic 2.6.35.8
Uname: Linux 2.6.35-24-generic x86_64
NonfreeKernelModules: zfs zcommon znvpair zavl zunicode nvidia
Architecture: amd64
Date: Thu Jan 13 15:47:34 2011
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: dkms

Related branches

Darik Horn (dajhorn) wrote :
Mario Limonciello (superm1) wrote :

Looks good to me. Thanks.

commit 7dff4a08397bcaab9ea478129cc4ea2523e387dc
Author: Mario Limonciello <email address hidden>
Date: Thu Jan 13 17:01:10 2011 -0600

    If a PRE_BUILD command is defined in a dkms.conf file, then it is
    invoked as $dkms_tree/$module/$module_version/source/$pre_build in the
    current working directory. This is incorrect behavior because PRE_BUILD
    could modify or generate source files. Also note that
    $dkms_tree/$module/$module_version/source/ is linked to
    /usr/src/$module-$module_version/ and should be therefore be read-only
    regardless.

    Expected behavior is that PRE_BUILD be always invoked from the
    $dkms_tree/$module/$module_version/build/ temporary area.

    Thanks Darik Horn.

Changed in dkms (Ubuntu):
status: New → Fix Committed
tags: added: patch

silid has confirmed this in Lucid (https://answers.launchpad.net/ubuntu/+source/dkms/+question/163792). Can this be nominated for fixing in Lucid (since it is a serious stability/usability bug)?

tags: added: lucid
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dkms - 2.2.0.1-0ubuntu1

---------------
dkms (2.2.0.1-0ubuntu1) oneiric; urgency=low

  * New upstream version. Bugs fixed in Ubuntu:
  * Apport hook:
    - Only generate reports about supported kernel version (LP: #766150)
    - Include fglrx make file (LP: #792444)
    - Crashes in get_source() (LP: #532496)
    - Apport script fails (LP: #798498)
  * Openafs modules leaving empty make.log (LP: #593509)
  * '_' in module name causes mkdeb to fail (LP: #511619)
  * PRE_BUILD command invoked from wrong directory. (LP: #702638)
  * Speed up for large amounts of modules (LP: #786672)
  * Leaves temp files in /tmp (LP: #810134)
  * Generate .changes file for LP: upload (LP: #582668)
  * Don't change access rights of upstream source (LP: #582670)
  * common.postinst fails on failed build (LP: #595968)
  * Using a hyphen as part of PACKAGE_VERSION causes failures (LP: #599983)
  * dkms shouldn't source all the variables in dkms.conf (LP: #599985)
 -- Mario Limonciello <email address hidden> Thu, 14 Jul 2011 13:18:56 -0500

Changed in dkms (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions