From 7d308aa3a889722dd44bf0f75b75646dcf974ac6 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Tue, 6 Oct 2026 18:29:06 +0000 Subject: [PATCH] DLPX-99519 don't Depend on linux-main-modules packages we don't build Ubuntu-hwe-7.0-7.0.0-38.38~24.04.4 converts linux-hwe-7.0 to "linux main modules" (lmm, LP: #2165131), which makes linux-modules Depend on linux-main-modules-zfs and linux-main-modules-v4l2loopback. Those packages are built from separate Ubuntu source packages against Ubuntu's kernel ABI, so nothing in our package mirror satisfies them, and appliance-build can't install the generic kernel. We use neither module (we ship our own zfs). Strip every linux-main-modules-* entry from the Depends lines of the generated debian/control in kernel_build(), right after "debian/rules clean" writes it, and fail the build if any reference is left. Nothing after clean regenerates debian/control, so the edit carries through to the built packages. Doing this in linux-pkg covers all of our kernels as they switch to lmm, without carrying a patch in each kernel repo that linux-pkg's auto-update would have to re-apply onto every new Ubuntu tag. Co-Authored-By: Claude Opus 5.5 --- default-package-config.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/default-package-config.sh b/default-package-config.sh index 85759e60..8eb02dce 100644 --- a/default-package-config.sh +++ b/default-package-config.sh @@ -155,6 +155,18 @@ function kernel_build() { # logmust fakeroot debian/rules clean "${debian_rules_args[@]}" + # + # Ubuntu kernels that use "linux-main-modules" (lmm, LP: #2165131) + # make linux-modules Depend on linux-main-modules-* packages (e.g. + # zfs, v4l2loopback). Those are built from separate Ubuntu source + # packages against Ubuntu's kernel ABI, so nothing can satisfy them + # for our kernel, and we don't use those modules (see do_zfs=false + # etc. above). Strip them from the generated control file. This is a + # no-op for kernels that haven't switched to lmm. + # + logmust sed -i -E '/^Depends:/ s/, *linux-main-modules-[^,]*//g' debian/control + logmust test -z "$(grep linux-main-modules debian/control)" + # # Print the environment configuration solely for # debugging purposes.