Comment 7 for bug 599985

Revision history for this message
Mario Limonciello (superm1) wrote : Re: [Bug 599985] [NEW] dkms shouldn't source all the variables in dkms.conf

 Peter:

This should behave a lot better with git head. The file should be more safely parsed. Take a look at the new safe_source function.

On 06/29/2010 05:08 PM, Peter Petrakis wrote:
> Public bug reported:
>
> If you've got something like this in your package's dkms.conf
>
> MAKE="make -C .... M=$(pwd) modules"
>
> M becomes the current working directory from where you called dkms, and not the
> working directory of the source code which is what you would expect.
>
> If dkms has actually parsed the config file this could have been avoided, and the needless
> makefile that must accompany this quirk just to satisfy dkms.
>
> The workaround is:
>
> MAKE="make KVER=$kernelver"
> ..
> Makefile
>
>
> all:
> make -C /lib/modules/$(KVER)/build M=$(shell pwd) modules
>
> clean:
> make -C /lib/modules/$(KVER)/build M=$(shell pwd) clean
>
>
> MAKE and CLEAN or anything intended to be executed in the context of the build
> shouldn't be executed until they're necessary.
>
> ** Affects: dkms
> Importance: Undecided
> Status: New
>