summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2017-10-05 09:46:18 +0000
committerintrigeri <intrigeri@boum.org>2017-10-05 09:46:18 +0000
commit91ace567b91ebb388dc05be19f29d5832fc805c4 (patch)
treeec132333b58b0682165b3c3d6c1e66c853b3170c
parentb711f20fe97fb21d864daa017982a2a67fb9fbfa (diff)
Abort the ISO build when DKMS modules were not built (refs: #14789).
-rwxr-xr-xconfig/chroot_local-hooks/50-dkms13
1 files changed, 13 insertions, 0 deletions
diff --git a/config/chroot_local-hooks/50-dkms b/config/chroot_local-hooks/50-dkms
index 1757e2b..41cf956 100755
--- a/config/chroot_local-hooks/50-dkms
+++ b/config/chroot_local-hooks/50-dkms
@@ -28,6 +28,19 @@ dkms install \
# clean the build directory
# rm -r /var/lib/dkms/virtualbox-guest/
+# Ensure the modules were actually built and installed: when
+# dkms.conf for a DKMS module includes a BUILD_EXCLUSIVE directive
+# which does not match our kernel version, the modules won't be built
+# and then we should abort the build.
+for module in aufs vboxguest vboxsf vboxvideo ; do
+ for modules_dir in /lib/modules/*/updates/dkms ; do
+ if [ ! -f "${modules_dir}/${module}.ko" ]; then
+ echo "Can not find ${module} module in '${modules_dir}" >&2
+ exit 1
+ fi
+ done
+done
+
# virtualbox-guest-dkms's postrm script deletes any previously
# built binary module; let's delete it before the package gets purged.
rm /var/lib/dpkg/info/aufs-dkms.prerm