Package: virtualbox-dkms
Version: 7.0.20-dfsg-1.2
Severity: serious
Tags: patch
Justification: cannot build modules from -source

Hi,

here I have a few patches for the -dkms and -source packages:

The -source package cannot build modules. Fixed that.
Add an autopkgtest for -source to detect such breakage earlier.

Restrict the -dkms autopkgtest to amd64 (the only architecture where the
-dkms package is built).


Thanks for considering.


Andreas
>From 96f3c3c7dc01d56a87353e8b4d494fea853bf2ff Mon Sep 17 00:00:00 2001
From: Andreas Beckmann <a...@debian.org>
Date: Thu, 20 Feb 2025 14:56:53 +0100
Subject: [PATCH 1/3] Add amd64 autopkgtest for the -source package

---
 debian/tests/control | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 debian/tests/control

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 000000000..93305161a
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,12 @@
+Test-Command: /usr/share/modass/module-assistant-autopkgtest virtualbox-source
+Features: test-name=m-a-autopkgtest
+Architecture: amd64
+Depends:
+ virtualbox-source,
+ module-assistant-autopkgtest,
+ linux-doc,
+Restrictions:
+ superficial,
+ needs-root,
+ breaks-testbed,
+ allow-stderr,
-- 
2.39.5

>From f2ab981e7b0926db480371f7e0f9c7ee3d34abbd Mon Sep 17 00:00:00 2001
From: Andreas Beckmann <a...@debian.org>
Date: Fri, 21 Feb 2025 13:37:21 +0100
Subject: [PATCH 2/3] Fix building modules from the -source package

Do not assume linux-headers-$(uname -r) is available, too, if
module-assistant is building for a different kernel.
---
 debian/virtualbox-source.files/rules | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/debian/virtualbox-source.files/rules 
b/debian/virtualbox-source.files/rules
index 7a18aa90b..d567dc07c 100644
--- a/debian/virtualbox-source.files/rules
+++ b/debian/virtualbox-source.files/rules
@@ -48,9 +48,9 @@ kdist_clean: clean
 #MAKE:=kmk
 
 clean:
-       $(MAKE) -C vboxdrv clean
-       $(MAKE) -C vboxnetflt clean
-       $(MAKE) -C vboxnetadp clean
+       $(MAKE) KERN_VER=$(KVERS) -C vboxdrv clean
+       $(MAKE) KERN_VER=$(KVERS) -C vboxnetflt clean
+       $(MAKE) KERN_VER=$(KVERS) -C vboxnetadp clean
        dh_clean
 
 binary-modules: prep-deb-files
-- 
2.39.5

>From 96191f0294b796e57f9d8f13846c96733eba7fbc Mon Sep 17 00:00:00 2001
From: Andreas Beckmann <a...@debian.org>
Date: Wed, 26 Feb 2025 10:05:14 +0100
Subject: [PATCH 3/3] Restrict autopkgtest-pkg-dkms to amd64

---
 debian/tests/autopkgtest-pkg-dkms.conf | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 debian/tests/autopkgtest-pkg-dkms.conf

diff --git a/debian/tests/autopkgtest-pkg-dkms.conf 
b/debian/tests/autopkgtest-pkg-dkms.conf
new file mode 100644
index 000000000..d4b91baff
--- /dev/null
+++ b/debian/tests/autopkgtest-pkg-dkms.conf
@@ -0,0 +1 @@
+architecture = amd64
-- 
2.39.5

Reply via email to