1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-21 22:04:01 +03:00

mkosi: Build initrd as a subimage

Let's make things a little more consistent and build the initrd
explicitly as a subimage as well instead of relying on mkosi building
it as part of the main image build.

We drop the opensuse initrd postinst script as we don't use erofs by
default anymore. We can always reintroduce it again later if needed.

(cherry picked from commit 68ee9771145464949d36d62a0ec687ecfb39290a)
This commit is contained in:
Daan De Meyer 2024-07-16 12:07:38 +02:00
parent 81bafc8dd9
commit 4a55046779
19 changed files with 94 additions and 64 deletions

View File

@ -2,9 +2,9 @@
[Config]
MinimumVersion=23~devel
InitrdInclude=mkosi.initrd/
Dependencies=
exitrd
initrd
minimal-base
minimal-0
minimal-1
@ -45,6 +45,8 @@ ExtraTrees=
%O/minimal-base:/usr/share/TEST-13-NSPAWN-container-template
%O/exitrd:/exitrd
Initrds=%O/initrd
Environment=
SYSTEMD_REPART_OVERRIDE_FSTYPE_ROOT=%F
@ -83,11 +85,6 @@ KernelCommandLine=systemd.crash_shell
KernelModulesInitrdExclude=.*
KernelModulesInitrdInclude=default
InitrdPackages=
findutils
grep
sed
Packages=
acl
attr

View File

@ -52,12 +52,3 @@ Packages=
tgt
tpm2-tools
vim
InitrdPackages=
btrfs-progs
tpm2-tools
InitrdVolatilePackages=
systemd
systemd-libs
systemd-sysvcompat

View File

@ -59,10 +59,3 @@ Packages=
util-linux
veritysetup
vim-common
InitrdPackages=
tpm2-tools
InitrdVolatilePackages=
systemd
systemd-udev

View File

@ -75,13 +75,3 @@ Packages=
tpm2-tools
tzdata
xxd
InitrdPackages=
btrfs-progs
tpm2-tools
InitrdVolatilePackages=
systemd
systemd-cryptsetup
systemd-repart
udev

View File

@ -23,6 +23,3 @@ Packages=
rpmautospec
sbsigntools
scsi-target-utils
InitrdPackages=
btrfs-progs

View File

@ -1,7 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e
# 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"

View File

@ -3,9 +3,6 @@
[Match]
Distribution=opensuse
[Config]
InitrdInclude=initrd/
[Distribution]
Release=tumbleweed
Repositories=non-oss
@ -80,13 +77,3 @@ Packages=
vim
xz
zypper
InitrdPackages=
btrfs-progs
kmod
tpm2.0-tools
InitrdVolatilePackages=
systemd
udev
systemd-experimental

View File

@ -0,0 +1,16 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Config]
Include=
mkosi-initrd
%D/mkosi.sanitizers
[Content]
ExtraTrees=
%D/mkosi.leak-sanitizer-suppressions:/usr/lib/systemd/leak-sanitizer-suppressions
%D/mkosi.coredump-journal-storage.conf:/usr/lib/systemd/coredump.conf.d/10-coredump-journal-storage.conf
Packages=
findutils
grep
sed

View File

@ -0,0 +1,14 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Match]
Distribution=arch
[Content]
Packages=
btrfs-progs
tpm2-tools
VolatilePackages=
systemd
systemd-libs
systemd-sysvcompat

View File

@ -0,0 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# Add a dependency on the build image unless NO_BUILD=1.
[Match]
Environment=!NO_BUILD=1
[Config]
Dependencies=build

View File

@ -0,0 +1,13 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Match]
Distribution=|centos
Distribution=|fedora
[Content]
Packages=
tpm2-tools
VolatilePackages=
systemd
systemd-udev

View File

@ -0,0 +1,16 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Match]
Distribution=|debian
Distribution=|ubuntu
[Content]
Packages=
btrfs-progs
tpm2-tools
VolatilePackages=
systemd
systemd-cryptsetup
systemd-repart
udev

View File

@ -0,0 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Match]
Distribution=fedora
[Content]
Packages=
btrfs-progs

View File

@ -0,0 +1,15 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Match]
Distribution=opensuse
[Content]
Packages=
btrfs-progs
kmod
tpm2.0-tools
VolatilePackages=
systemd
udev
systemd-experimental

View File

@ -1,9 +0,0 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Content]
ExtraTrees=
../mkosi.leak-sanitizer-suppressions:/usr/lib/systemd/leak-sanitizer-suppressions
../mkosi.coredump-journal-storage.conf:/usr/lib/systemd/coredump.conf.d/10-coredump-journal-storage.conf
[Config]
Include=../mkosi.sanitizers