]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
opensuse: prevent zypper from pulling busybox in the initrd
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Fri, 18 Oct 2024 09:43:32 +0000 (11:43 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 20 Oct 2024 10:06:34 +0000 (12:06 +0200)
zypper's internal logic selects busybox-package variants of packages that are
required via dependency and not explicitly listed to install, which also causes
busybox to be added to the initrd.

Also, remove the shadow package (the equivalent to the shadow-utils package in
Fedora).

mkosi/resources/mkosi-initrd/mkosi.conf.d/10-opensuse.conf

index 64fae359c062774348e02d615cac0ce979cdaf2a..aa0bf042f9620f0d0e6abb7d6f430dbd959605f5 100644 (file)
@@ -7,6 +7,14 @@ Distribution=opensuse
 Packages=
         patterns-base-minimal_base
 
+        # Various packages added as dependencies. If they are not explicitly installed, the zypper inner
+        # logic picks the busybox-package variant, which adds also busybox in the initrd.
+        diffutils
+        grep
+        gzip
+        which
+        xz
+
         # Various libraries that are dlopen'ed by systemd
         libfido2-1
         libtss2-esys0
@@ -24,6 +32,10 @@ Packages=
 
         util-linux
 
+RemovePackages=
+        # Various packages pull in shadow to create users, we can remove it afterwards
+        shadow
+
 RemoveFiles=
         /usr/share/locale/*
         /usr/etc/services