From: Daan De Meyer Date: Sat, 14 Feb 2026 22:05:52 +0000 (+0100) Subject: mkosi: Remove some packages from the image X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e77671be723d31249e03b27ca9d83b6d17de693;p=thirdparty%2Fsystemd.git mkosi: Remove some packages from the image Let's slim down the image size a bit. None of the removed packages should be required. --- diff --git a/mkosi/mkosi.conf b/mkosi/mkosi.conf index 08019db1190..a2f9784b40d 100644 --- a/mkosi/mkosi.conf +++ b/mkosi/mkosi.conf @@ -106,7 +106,6 @@ Packages= kexec-tools kmod less - llvm lsof lvm2 mdadm @@ -125,7 +124,6 @@ Packages= socat strace tar - tmux tree util-linux valgrind diff --git a/mkosi/mkosi.conf.d/arch/mkosi.conf b/mkosi/mkosi.conf.d/arch/mkosi.conf index f7d9e44c1aa..9bea621fcaa 100644 --- a/mkosi/mkosi.conf.d/arch/mkosi.conf +++ b/mkosi/mkosi.conf.d/arch/mkosi.conf @@ -17,15 +17,12 @@ Packages= bind bpf btrfs-progs - compsize cryptsetup dbus-broker dbus-broker-units dhcp elfutils erofs-utils - f2fs-tools - git gnutls inetutils iproute @@ -44,7 +41,6 @@ Packages= pkgconf polkit procps-ng - psmisc python-pexpect python-psutil qrencode @@ -56,6 +52,5 @@ Packages= stress-ng tgt tpm2-tools - vim # kernel-bootcfg --add-uri= is just too useful virt-firmware diff --git a/mkosi/mkosi.conf.d/centos-fedora/mkosi.conf b/mkosi/mkosi.conf.d/centos-fedora/mkosi.conf index b78706aeb90..fbbc6a90bf9 100644 --- a/mkosi/mkosi.conf.d/centos-fedora/mkosi.conf +++ b/mkosi/mkosi.conf.d/centos-fedora/mkosi.conf @@ -30,7 +30,6 @@ Packages= elfutils-devel elfutils-libs erofs-utils - git-core glibc-langpack-de glibc-langpack-en gnutls-utils diff --git a/mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf b/mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf index fe4eeb04fc2..f024eae204d 100644 --- a/mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf +++ b/mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf @@ -41,9 +41,7 @@ Packages= dbus-user-session dmsetup erofs-utils - f2fs-tools fdisk - git-core gnutls-bin hostname iproute2 @@ -64,7 +62,6 @@ Packages= polkitd pkgconf procps - psmisc python3-pexpect python3-psutil # kernel-bootcfg --add-uri= is just too useful @@ -77,4 +74,3 @@ Packages= tgt tpm2-tools tzdata - xxd diff --git a/mkosi/mkosi.conf.d/fedora/mkosi.conf b/mkosi/mkosi.conf.d/fedora/mkosi.conf index ef222dae504..23e907f9185 100644 --- a/mkosi/mkosi.conf.d/fedora/mkosi.conf +++ b/mkosi/mkosi.conf.d/fedora/mkosi.conf @@ -9,10 +9,8 @@ Release=rawhide [Content] Packages= btrfs-progs - compsize dhcp-server dnf5 - f2fs-tools # Required for systemd-networkd-tests.py (netdevsim and sch_xxx modules) kernel-modules-extra kernel-modules-internal diff --git a/mkosi/mkosi.conf.d/opensuse/mkosi.conf b/mkosi/mkosi.conf.d/opensuse/mkosi.conf index 6f41df5da56..d01c6658c0f 100644 --- a/mkosi/mkosi.conf.d/opensuse/mkosi.conf +++ b/mkosi/mkosi.conf.d/opensuse/mkosi.conf @@ -40,9 +40,7 @@ Packages= dhcp-server docbook-xsl-stylesheets erofs-utils - f2fs-tools gawk - git-core glibc-locale-base gnutls grep @@ -72,7 +70,6 @@ Packages= policycoreutils pkgconf procps4 - psmisc python3-pefile python3-pexpect python3-psutil @@ -91,7 +88,6 @@ Packages= tpm2.0-tools util-linux-systemd veritysetup - vim # kernel-bootcfg --add-uri= is just too useful virt-firmware xz diff --git a/test/units/TEST-17-UDEV.device_is_processing.sh b/test/units/TEST-17-UDEV.device_is_processing.sh index 34fa126d823..2f658c350ed 100755 --- a/test/units/TEST-17-UDEV.device_is_processing.sh +++ b/test/units/TEST-17-UDEV.device_is_processing.sh @@ -15,7 +15,7 @@ at_exit() { systemctl stop testsleep.service rm -f /run/udev/udev.conf.d/timeout.conf rm -f /run/udev/rules.d/99-testsuite.rules - killall --regexp '(|/usr/bin/)sleep' + pkill -f '(/usr/bin/)?sleep' udevadm control --reload ip link del "$IFNAME" } @@ -60,7 +60,7 @@ done grep -q -F 'ID_PROCESSING=1' "/run/udev/data/n${IFINDEX}" # Forcibly kill sleep command invoked by the udev rule to finish processing the add event. -killall --regexp '(|/usr/bin/)sleep' +pkill -f '(/usr/bin/)?sleep' udevadm settle --timeout=30 # Check if ID_PROCESSING flag is unset, and the device units are active. diff --git a/test/units/TEST-17-UDEV.failed-event.sh b/test/units/TEST-17-UDEV.failed-event.sh index 1dcef70a210..d7896c8c2d2 100755 --- a/test/units/TEST-17-UDEV.failed-event.sh +++ b/test/units/TEST-17-UDEV.failed-event.sh @@ -83,7 +83,7 @@ run_test_killed() { for _ in {1..40}; do if [[ -z "$killed" ]]; then if [[ -e /tmp/test-udev-marker ]]; then - killall --signal ABRT --regexp udev-worker + pkill -ABRT udev-worker killed=1 fi elif grep -q 'UDEV_WORKER_FAILED=1' "$TMPDIR"/monitor.txt; then diff --git a/test/units/TEST-70-TPM2.nvpcr.sh b/test/units/TEST-70-TPM2.nvpcr.sh index 1539d056a4d..ce5bdfc651b 100755 --- a/test/units/TEST-70-TPM2.nvpcr.sh +++ b/test/units/TEST-70-TPM2.nvpcr.sh @@ -38,8 +38,8 @@ test -f /run/systemd/nvpcr/test.anchor /usr/lib/systemd/systemd-pcrextend --nvpcr=test schrumpel # To calculate the current value we need the anchor measurement DIGEST_BASE="$(cat /run/systemd/nvpcr/test.anchor)" -DIGEST_MEASURED="$(echo -n "schrumpel" | openssl dgst -sha256 -binary | xxd -p -c200)" -DIGEST_EXPECTED="$(echo "$DIGEST_BASE$DIGEST_MEASURED" | xxd -r -p | openssl dgst -sha256 -binary | xxd -p -c200)" +DIGEST_MEASURED="$(echo -n "schrumpel" | openssl dgst -sha256 -hex -r | cut -d' ' -f1)" +DIGEST_EXPECTED="$(echo "$DIGEST_BASE$DIGEST_MEASURED" | tr '[:lower:]' '[:upper:]' | basenc --base16 -d | openssl dgst -sha256 -hex -r | cut -d' ' -f1)" DIGEST_ACTUAL="$(systemd-analyze nvpcrs test --json=pretty | jq -r '.[] | select(.name=="test") | .value')" test "$DIGEST_ACTUAL" = "$DIGEST_EXPECTED" @@ -49,6 +49,6 @@ DIGEST_ACTUAL2="$(systemd-analyze nvpcrs test --json=pretty | jq -r '.[] | selec test "$DIGEST_ACTUAL2" != "$DIGEST_EXPECTED" # And calculate the new result -DIGEST_MEASURED2="$(echo -n "schnurz" | openssl dgst -sha256 -binary | xxd -p -c200)" -DIGEST_EXPECTED2="$(echo "$DIGEST_EXPECTED$DIGEST_MEASURED2" | xxd -r -p | openssl dgst -sha256 -binary | xxd -p -c200)" +DIGEST_MEASURED2="$(echo -n "schnurz" | openssl dgst -sha256 -hex -r | cut -d' ' -f1)" +DIGEST_EXPECTED2="$(echo "$DIGEST_EXPECTED$DIGEST_MEASURED2" | tr '[:lower:]' '[:upper:]' | basenc --base16 -d | openssl dgst -sha256 -hex -r | cut -d' ' -f1)" test "$DIGEST_ACTUAL2" = "$DIGEST_EXPECTED2"