diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-04-08 13:57:48 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-04-09 11:57:16 +0200 |
commit | 1a2374a3f6a4cf18c70a84be1b96893f577c99fb (patch) | |
tree | 827ca7dc848dac416038962c81633d49b7dbe99d /mkosi.images/system | |
parent | mkosi: Install openSUSE-release instead of distribution-release (diff) | |
download | systemd-1a2374a3f6a4cf18c70a84be1b96893f577c99fb.tar.xz systemd-1a2374a3f6a4cf18c70a84be1b96893f577c99fb.zip |
mkosi: Unify initrd post-install scripts
Just like we already have $SYSTEMD_PACKAGES for systemd packages to
re-install in the main image, let's add $INITRD_PACKAGES for all
systemd packages to re-install in the initrd.
Diffstat (limited to 'mkosi.images/system')
-rw-r--r--[-rwxr-xr-x] | mkosi.images/system/initrd/mkosi.postinst (renamed from mkosi.images/system/mkosi.conf.d/10-opensuse/initrd/mkosi.postinst) | 7 | ||||
-rw-r--r-- | mkosi.images/system/mkosi.conf | 3 | ||||
-rwxr-xr-x | mkosi.images/system/mkosi.conf.d/10-arch/initrd/mkosi.postinst | 5 | ||||
-rw-r--r-- | mkosi.images/system/mkosi.conf.d/10-arch/mkosi.conf | 4 | ||||
-rwxr-xr-x | mkosi.images/system/mkosi.conf.d/10-centos-fedora/initrd/mkosi.postinst | 5 | ||||
-rw-r--r-- | mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.conf | 5 | ||||
-rwxr-xr-x | mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/initrd/mkosi.postinst | 5 | ||||
-rw-r--r-- | mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf | 4 | ||||
-rw-r--r-- | mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.conf | 4 |
9 files changed, 12 insertions, 30 deletions
diff --git a/mkosi.images/system/mkosi.conf.d/10-opensuse/initrd/mkosi.postinst b/mkosi.images/system/initrd/mkosi.postinst index 562bebe08e..b92bb8ae29 100755..100644 --- a/mkosi.images/system/mkosi.conf.d/10-opensuse/initrd/mkosi.postinst +++ b/mkosi.images/system/initrd/mkosi.postinst @@ -1,9 +1,10 @@ -#!/bin/sh +#!/bin/bash # SPDX-License-Identifier: LGPL-2.1-or-later set -e +# shellcheck disable=SC2086 +mkosi-install $INITRD_PACKAGES + # OpenSUSE insists on blacklisting erofs by default because its supposedly a legacy filesystem. # See https://github.com/openSUSE/suse-module-tools/pull/71 rm -f "$BUILDROOT/usr/lib/modprobe.d/60-blacklist_fs-erofs.conf" - -mkosi-install systemd udev systemd-experimental diff --git a/mkosi.images/system/mkosi.conf b/mkosi.images/system/mkosi.conf index 303af4acb1..7aa64c4e0e 100644 --- a/mkosi.images/system/mkosi.conf +++ b/mkosi.images/system/mkosi.conf @@ -1,5 +1,8 @@ # SPDX-License-Identifier: LGPL-2.1-or-later +[Config] +InitrdInclude=initrd/ + [Output] @Format=directory diff --git a/mkosi.images/system/mkosi.conf.d/10-arch/initrd/mkosi.postinst b/mkosi.images/system/mkosi.conf.d/10-arch/initrd/mkosi.postinst deleted file mode 100755 index ad4fe6e9a1..0000000000 --- a/mkosi.images/system/mkosi.conf.d/10-arch/initrd/mkosi.postinst +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: LGPL-2.1-or-later -set -e - -mkosi-install systemd systemd-sysvcompat diff --git a/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.conf b/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.conf index 06dec482d2..457cf6e71f 100644 --- a/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.conf +++ b/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.conf @@ -3,14 +3,12 @@ [Match] Distribution=arch -[Config] -InitrdInclude=initrd/ - # TODO: Switch to https://gitlab.archlinux.org/archlinux/packaging/packages/systemd once # https://gitlab.archlinux.org/archlinux/packaging/packages/systemd/-/merge_requests/8 is merged. [Content] Environment= SYSTEMD_PACKAGES="systemd systemd-ukify systemd-sysvcompat systemd-resolvconf systemd-tests" + INITRD_PACKAGES="systemd systemd-sysvcompat" Packages= bpf diff --git a/mkosi.images/system/mkosi.conf.d/10-centos-fedora/initrd/mkosi.postinst b/mkosi.images/system/mkosi.conf.d/10-centos-fedora/initrd/mkosi.postinst deleted file mode 100755 index 0b7a4cb6b7..0000000000 --- a/mkosi.images/system/mkosi.conf.d/10-centos-fedora/initrd/mkosi.postinst +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: LGPL-2.1-or-later -set -e - -mkosi-install systemd systemd-udev diff --git a/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.conf b/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.conf index c556aa8459..277d17d25c 100644 --- a/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.conf +++ b/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.conf @@ -4,9 +4,6 @@ Distribution=|centos Distribution=|fedora -[Config] -InitrdInclude=initrd/ - [Content] Environment= SYSTEMD_PACKAGES="systemd @@ -22,6 +19,8 @@ Environment= systemd-oomd-defaults systemd-journal-remote systemd-networkd-defaults" + INITRD_PACKAGES="systemd systemd-udev" + Packages= bpftool cryptsetup diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/initrd/mkosi.postinst b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/initrd/mkosi.postinst deleted file mode 100755 index 640cdb1e32..0000000000 --- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/initrd/mkosi.postinst +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: LGPL-2.1-or-later -set -e - -mkosi-install systemd udev diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf index 9e5ed1e4b4..b6f7fdd926 100644 --- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf +++ b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf @@ -4,9 +4,6 @@ Distribution=|debian Distribution=|ubuntu -[Config] -InitrdInclude=initrd/ - [Content] Environment= SYSTEMD_PACKAGES="systemd @@ -23,6 +20,7 @@ Environment= systemd-boot systemd-ukify udev" + INITRD_PACKAGES="systemd udev" Packages= ^libasan[0-9]+$ diff --git a/mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.conf b/mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.conf index b9cb0a5179..5d04718ef5 100644 --- a/mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.conf +++ b/mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.conf @@ -3,9 +3,6 @@ [Match] Distribution=opensuse -[Config] -InitrdInclude=initrd/ - [Content] Environment= SYSTEMD_PACKAGES="systemd @@ -18,6 +15,7 @@ Environment= systemd-portable systemd-sysvcompat systemd-testsuite" + INITRD_PACKAGES="systemd udev systemd-experimental" # We install gawk, gzip, grep, xz, sed, rsync and docbook-xsl-stylesheets here explicitly so that the busybox # versions don't get installed instead. |