[Unstable][K][PATCH] UBUNTU: [Packaging] Remove circular dependency between image & modules

Dimitri John Ledkov dimitri.ledkov at canonical.com
Thu Aug 25 22:21:34 UTC 2022


Currently we have circular dependencies between
linux-image-[unsigned]-ABI and linux-modules[-extra] packages.

From 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 <dimitri.ledkov at canonical.com>
---

 PS. I am using thunderbird to send this, for the first time. I am
 really not at all sure if it will go through fine or not.

 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 9fe268b333..2c0bcd194a 100644
--- a/debian.master/control.d/flavour-control.stub
+++ b/debian.master/control.d/flavour-control.stub
@@ -46,13 +46,13 @@ Description: Linux kernel image for version PKGVER on DESC
 
 Package: linux-modules-PKGVER-ABINUM-FLAVOUR
 Build-Profiles: <!stage1>
 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
  packager, and scripts that try to ensure that the system is not left in an
  unbootable state after an update.
  .
@@ -66,13 +66,13 @@ Description: Linux kernel extra modules for version PKGVER on DESC
 
 Package: linux-modules-extra-PKGVER-ABINUM-FLAVOUR
 Build-Profiles: <!stage1>
 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.
  .
  Also includes the corresponding System.map file, the modules built by the
  packager, and scripts that try to ensure that the system is not left in an
-- 
2.34.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20220825/46b1802a/attachment.sig>


More information about the kernel-team mailing list