[regression] Dkms quits with error if directory contains "build", "kernel" etc

Bug #855635 reported by David Henningsson
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dkms (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

In the Oneiric version of dkms, you cannot run this command:

/usr/sbin/dkms mkdeb --source-only --no-prepare-kernel --no-clean-kernel --dkmstree /tmp/dkms-packaging/buildroot/build --sourcetree /tmp/dkms-packaging/buildroot/src --installtree /tmp/dkms-packaging/buildroot/install -m alsa-hda -v 0.1

This is because the tree path matches "build". Looking at the code, this seems to be added intentionally, but to me it is clearly a regression and I see no reason for putting such restrictions on the code.

E g, if my name was Harp Mason I can't even build anything in my home directory /home/harpmason, because that contains the string "rpm". That does not make sense to me.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: dkms 2.2.0.2-1ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
Date: Wed Sep 21 16:55:30 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110802.1)
PackageArchitecture: all
SourcePackage: dkms
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
David Henningsson (diwic) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dkms (Ubuntu):
status: New → Confirmed
Revision history for this message
Christopher Townsend (townsend) wrote :

This is the commit that added the regex directory name check: http://linux.dell.com/cgi-bin/gitweb/gitweb.cgi?p=dkms.git;a=commitdiff;h=8eed1e0f0b45845c0e5955b3b4d31dd31ea47f6e

It's not clear from the commit message why the regex is needed to be so constraining.

Revision history for this message
David Henningsson (diwic) wrote :

Also, this is even a worse blocker as Launchpad builds things in the /build/buildd/ directory. So this blocks enabling my daily DKMS builds for oneiric. (Well, I guess it can be worked around somehow but it would be better to fix the original issue.)

Revision history for this message
Mario Limonciello (superm1) wrote :

That's not actually the commit that introduced the testing of the tree names. That was however part of the bash rewrite. You can see in that commit that is_module_built had a previous regex test.

There were previously areas of the code that made assumptions on the directory structure and used grep and string comparison to determine the correct action to do.

After the bash rewrite, this might be possible to relax the tests a bit, but i'll need to explore some more. As you can see the regex errs on the side of caution heavily.

Revision history for this message
Mario Limonciello (superm1) wrote :

I've committed 7b4a0463c9cfd6837f034e3fc0435b35218706c8 to remove the reserved tree name test which will fix your problem at hand, but this will require testing to make sure it's not causing regressions.

Revision history for this message
David Henningsson (diwic) wrote :

Thanks Mario!

I've turned your patch into a debdiff that can be uploaded to Ubuntu Oneiric.

Changed in dkms (Ubuntu):
milestone: none → ubuntu-11.10
Revision history for this message
Mario Limonciello (superm1) wrote :

Ok, lets just please hold off on uploading it until we can get a good amount of testing on it, throw the battery of DKMS packages in oneiric at it etc.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Oops, I've already sponsored it but it's held in the queue.

Revision history for this message
David Henningsson (diwic) wrote :

Oh, sorry, I didn't see this last comment until it was too late...I was in a little hurry to get it uploaded due to the FinalFreeze deadline on Thursday.

Changed in dkms (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dkms - 2.2.0.2-1ubuntu3

---------------
dkms (2.2.0.2-1ubuntu3) oneiric; urgency=low

  * Disable the reserved tree name check. Thanks to Mario
    Lemonciello for the patch. (LP: #855635)
 -- David Henningsson <email address hidden> Tue, 27 Sep 2011 07:59:21 +0200

Changed in dkms (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
David Henningsson (diwic) wrote :

For the record, I've tried reinstalling nvidia drivers as well as installing and uninstalling virtualbox here (with the new version), and saw no particular problems.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.