[Feature request] `make brave` and `make canny` not relying on installed kernel sources.
I have a feature request.
Current annoying situation:
If I want to issue make brave
, to create the Makefile
for the testing variant, and then package it into a distribution DKMS package phc-intel-dkms-testing
, make brave
still needs the kernel headers for the currently running kernel (or KERNELSRC
pointing to some kernel's headers).
This is somewhat illogical to me, since make brave
should only modify the Makefile
but not build the module. It should not need kernel headers.
And it also breaks clean generation of a distribution package:
- Clean generation of a distribution package would be to issue
make brave
to have the testing-makefile, - then package this as a DKMS source package,
- ... so that both a manual run of
make
in the source dir and a DKMS auto build generates the testing variant. - But when the package is generated, not necessarily kernel headers for the running or any specific kernel are present.
- Especially, when using the Arch Linux AUR, packages are built on the local machine. At a system upgrade, when the kernel is updated as well, the currently running kernel's headers are not anymmore present (because new version is installed but no reboot occured), then
phc-intel-dkms-testing
is updated, and it fails becausemake brave
cannot find the kernel headers for the currently running kernel (and there is no easy way to determine the headers of the new kernel).
- Especially, when using the Arch Linux AUR, packages are built on the local machine. At a system upgrade, when the kernel is updated as well, the currently running kernel's headers are not anymmore present (because new version is installed but no reboot occured), then
After installation, DKMS will build the module anyway for the requested or all specified kernels, so there is no need to know anything about a specific kernel when doing make brave
.
Can this be changed so that make brave
(and make canny
) do not need any information about some kernel, but just change the Makefile
?
The error which occurs at make brave
and make canny
is:
Makefile:35: *** Kernel version not found, maybe you need to install appropriate kernel-headers or run make with KERNELSRC parameter, e.g.: make KERNELSRC=/usr/src/linux. Stop.
Current workaround is to use .patch
file that patches the Makefile
, but if the Makefile
includes the functionality within itself it should be clean about that and not require more stuff than needed to change the Makefile
.
Regards!