Created attachment 290499 [details] net-misc/dahdi-2.5.0.1 patch to use KBUILD_OUTPUT net-misc/dahdi-2.5.0.1 fails to compile when KBUILD_OUTPUT doesn't point to /usr/src/linux. Using KSRC="${KBUILD_OUTPUT}" instead of KERNEL_DIR solved the problem for me. A patch for the ebuild is attached.
+*dahdi-2.5.0.2 (26 Oct 2011) + + 26 Oct 2011; Tony Vroon <chainsaw@gentoo.org> -dahdi-2.5.0.1.ebuild, + +dahdi-2.5.0.2.ebuild: + Revised patch to build against stable hardened sources. Now uses Junghanns + 1.13 drivers instead of 1.11. Respect KBUILD_OUTPUT as per Felix Tiede in bug + #388085. Drop 2.5.0.1 from tree as it is unusable with the current stable + hardened kernel.
Immediate regression on the production system: You do not appear to have the sources for the 2.6.39-hardened-r8 kernel installed. make: *** [modules] Error 1 This assumes that you are building against the running kernel on the machine. Some of us like to build a new kernel, prepare our modules and then reboot once instead of twice. This change will be backed out in 2.5.0.1-r1.
+*dahdi-2.5.0.2-r1 (26 Oct 2011) + + 26 Oct 2011; Tony Vroon <chainsaw@gentoo.org> -dahdi-2.5.0.2.ebuild, + +dahdi-2.5.0.2-r1.ebuild: + Back out KERNEL_DIR -> KBUILD_OUTPUT change which is a regression. This would + require a reboot into a new kernel before one can build DAHDI against it.
The change is not backed out.. -r1 still has KBUILD_OUTPUT instead of KERNEL_DIR!
I've tried using KBUILD_OUTPUT with and without a dedicated kernel directory and leaving it blank while using /usr/src/linux to point to the new (compiled) kernel worked for me as well as setting KBUILD_OUTPUT to the new kernel without booting it.
FWIW I fixed it in -r1 (without revbump) to use the KV_OUT_DIR variable instead, should cover all use cases. If not, feel free to re-CC me as well.