dkms can destroy auto generated headers in some environments

Bug #599971 reported by Peter Petrakis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DKMS
New
Undecided
Unassigned

Bug Description

I find that sometimes when I build in a chroot as root on lucid, that dkms has a tendency
to descend into the system's header files and run 'make mrproper'. dkms is assuming that
the sourcecode is there, in an attempt to sanitize the build environment before beginning
the build. This can never complete because on a normal ubuntu system/chroot, the kernel
sources aren't normally present, you only need the headers to compile external modules.

While this step is well intentioned, dkms can never really assume the purpose of
any kernel source tree it's presented. It doesn't know that perhaps there's some active
development going on that tree. It's safer for the system as a whole to not perform this
step at all, or the "clean sources after build" step with the perspective being that should
the dkms build fail for any reason, at least the system is in no worse state than when it
started.

In these interests, I would ask that --no-prepare-kernel --no-clean-kernel be the default
behavior of dkms.

Revision history for this message
Jerone Young (jerone) wrote :

Does this only happen with chroot enviroment?

Revision history for this message
Peter Petrakis (peter-petrakis) wrote : Re: [Bug 599971] Re: dkms can destroy auto generated headers in some environments

Actually no, I found reports of VirtualBox users hitting this issue but
they couldn't figure out why. bounds.h was being deleted which was where
the build was dying. So this can happen in the field though I don't know
what the triggers are.

http://www.virtualbox.org/ticket/1935

Then I found this:
https://lists.linux-foundation.org/pipermail/bugme-janitors/2008-September/011296.html

and realized what had happened.

This is why distros distribute kernel headers only to begin with, so the user
is burdened with the extra disk space and is still able to build external
modules. Unless dkms could verify beyond a shadow of a doubt that what it's
operating on is the full source then it should never do this. Even then it
could be a bad idea because dkms will never know why that source is there
and what it's current state is.

On 06/30/2010 04:35 AM, Jerone Young wrote:
> Does this only happen with chroot enviroment?
>

Revision history for this message
Jerone Young (jerone) wrote :

@Peter
         Don't see use of dkms in your example for virtualbox. The reason I ask is I have never seen this happen & I do everything under virtual box.

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.