From bface3ef933137dcc8e8bda3bbdb7d6d54d84d60 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Thu, 25 Aug 2022 23:21:34 +0100 Subject: [PATCH] UBUNTU: [Packaging] Remove circular dependency between image & modules Currently we have circular dependencies between linux-image-[unsigned]-ABI and linux-modules[-extra] packages. Debian policy point of view this is bad and does lead to worse dependency resolution cycles in apt upon kernel installs and upgrades, but mostly harmless as apt has learned to deal with that a long time ago. It is harmful for kernels that have additional types of debs or snaps that deliver vmlinux. In addition to regular linux-image[-unsigned] we produce various FDE linux-images like things with builtin initrds, i.e. linux-fde, linux-uc22, FIT images etc. All of them vendor in vmlinuz, and do not need to have linux-image[-unsigned] installed. They also often do not want to pull in any of the bootloaders listed as recommends by the linux-image-ABI package either, as they use alternative methods to boot (i.e. gadget snap, nullboot, flashkernel, weird cloud firmware provided stuff, etc). Remove linux-modules[-extra] -> linux-image[-unsigned] dependency. Add linux-modules-extra -> linux-modules dependency (because extra modules use symbols from the regular modules package). This will enable us to build clean meta-packages that pull in appropriate image, fde, uc22, FIT kernel image with matching modules, without installing redudant copies of vmlinux or bootloaders. Signed-off-by: Dimitri John Ledkov Signed-off-by: Andrea Righi --- debian.master/control.d/flavour-control.stub | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian.master/control.d/flavour-control.stub b/debian.master/control.d/flavour-control.stub index 9fe268b333d7..2c0bcd194a5c 100644 --- a/debian.master/control.d/flavour-control.stub +++ b/debian.master/control.d/flavour-control.stub @@ -49,7 +49,7 @@ Build-Profiles: Architecture: ARCH Section: kernel Priority: optional -Depends: ${misc:Depends}, ${shlibs:Depends}, linux-image-PKGVER-ABINUM-FLAVOUR | linux-image-unsigned-PKGVER-ABINUM-FLAVOUR +Depends: ${misc:Depends}, ${shlibs:Depends} Built-Using: ${linux:BuiltUsing} Description: Linux kernel extra modules for version PKGVER on DESC Contains the corresponding System.map file, the modules built by the @@ -69,7 +69,7 @@ Build-Profiles: Architecture: ARCH Section: kernel Priority: optional -Depends: ${misc:Depends}, ${shlibs:Depends}, linux-image-PKGVER-ABINUM-FLAVOUR | linux-image-unsigned-PKGVER-ABINUM-FLAVOUR, wireless-regdb +Depends: ${misc:Depends}, ${shlibs:Depends}, linux-modules-PKGVER-ABINUM-FLAVOUR, wireless-regdb Description: Linux kernel extra modules for version PKGVER on DESC This package contains the Linux kernel extra modules for version PKGVER on DESC.