linuxPackages.virtualbox: enable module signing during install

The bundled Makefile-footer.gmk passes
"CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL=" to the kernel's modules_install, so
the modules were installed unsigned and without the per-module certificate that
the kmod aggregator expects next to every external module since PR #571181.

Set VBOX_ALLOW_MODULE_SIGNING=1 and propagate kernelModuleMakeFlags (which
routes the signing rule to the deterministic kmodigest), so modinst
signs the modules and emits vboxdrv.ko.cer and friends alongside them.

Assisted-by: Kilo Code (GLM-5.3-Flash)
This commit is contained in:
Fabian Möller
2026-10-17 21:50:01 +02:00
parent 6b7faa6779
commit 7bd4fa646a

View File

@@ -2,6 +2,7 @@
stdenv,
virtualbox,
kernel,
kernelModuleMakeFlags,
}:
stdenv.mkDerivation {
@@ -18,7 +19,10 @@ stdenv.mkDerivation {
env.KERN_DIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
makeFlags = [ "INSTALL_MOD_PATH=$(out)" ];
makeFlags = kernelModuleMakeFlags ++ [
"INSTALL_MOD_PATH=$(out)"
"VBOX_ALLOW_MODULE_SIGNING=1"
];
installTargets = [ "install" ];
enableParallelBuilding = true;