summaryrefslogtreecommitdiffstats
path: root/mkosi.images/initrd
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-11-28 18:38:22 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-11-28 19:54:58 +0100
commitbcb335ac681fa8f5e88b9b62493f5c901ac7a008 (patch)
tree1d5ebbe78013ff30b2a0cff940f20bdead74b6f4 /mkosi.images/initrd
parentboot: suffix SecureBoot message with newline (diff)
downloadsystemd-bcb335ac681fa8f5e88b9b62493f5c901ac7a008.tar.xz
systemd-bcb335ac681fa8f5e88b9b62493f5c901ac7a008.zip
Update to mkosi v19
- Use mkosi.images/ instead of mkosi.presets/ - Use the .chroot suffix to run scripts in the image - Use BuildSources= match for the kernel build - Move 10-systemd.conf to mkosi.conf and rely on mkosi.local.conf for local configuration
Diffstat (limited to 'mkosi.images/initrd')
-rw-r--r--mkosi.images/initrd/mkosi.conf30
-rw-r--r--mkosi.images/initrd/mkosi.conf.d/10-centos.conf12
-rw-r--r--mkosi.images/initrd/mkosi.conf.d/10-default.conf12
-rw-r--r--mkosi.images/initrd/mkosi.conf.d/10-opensuse.conf11
-rwxr-xr-xmkosi.images/initrd/mkosi.postinst7
5 files changed, 72 insertions, 0 deletions
diff --git a/mkosi.images/initrd/mkosi.conf b/mkosi.images/initrd/mkosi.conf
new file mode 100644
index 0000000000..8e38dc1b78
--- /dev/null
+++ b/mkosi.images/initrd/mkosi.conf
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Config]
+Dependencies=base
+
+[Output]
+Format=cpio
+
+[Content]
+BaseTrees=../../mkosi.output/base
+ExtraTrees=../../mkosi.output/base-systemd
+MakeInitrd=yes
+Bootable=no
+BuildPackages=
+
+Packages=
+Packages=
+ gzip
+ systemd
+ udev
+
+# Arch Linux doesn't split their gcc-libs package so we manually remove unneeded stuff here to make sure it
+# doesn't end up in the initrd.
+RemoveFiles=
+ /usr/lib/libgfortran.so*
+ /usr/lib/libgo.so*
+ /usr/lib/libgomp.so*
+ /usr/lib/libgphobos.so*
+ /usr/lib/libobjc.so*
+ /usr/lib/libstdc++.so*
diff --git a/mkosi.images/initrd/mkosi.conf.d/10-centos.conf b/mkosi.images/initrd/mkosi.conf.d/10-centos.conf
new file mode 100644
index 0000000000..3f92e52300
--- /dev/null
+++ b/mkosi.images/initrd/mkosi.conf.d/10-centos.conf
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+Distribution=centos
+
+[Output]
+# TODO: Switch to zstd once we stop building CentOS Stream 8.
+CompressOutput=xz
+
+[Content]
+Packages=xfsprogs
+ tpm2-tools
diff --git a/mkosi.images/initrd/mkosi.conf.d/10-default.conf b/mkosi.images/initrd/mkosi.conf.d/10-default.conf
new file mode 100644
index 0000000000..9224b92dd0
--- /dev/null
+++ b/mkosi.images/initrd/mkosi.conf.d/10-default.conf
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+Distribution=!centos
+Distribution=!opensuse
+
+[Output]
+CompressOutput=zst
+
+[Content]
+Packages=btrfs-progs
+ tpm2-tools
diff --git a/mkosi.images/initrd/mkosi.conf.d/10-opensuse.conf b/mkosi.images/initrd/mkosi.conf.d/10-opensuse.conf
new file mode 100644
index 0000000000..5cf2df397e
--- /dev/null
+++ b/mkosi.images/initrd/mkosi.conf.d/10-opensuse.conf
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+Distribution=opensuse
+
+[Output]
+CompressOutput=zst
+
+[Content]
+Packages=btrfs-progs
+ tpm2.0-tools
diff --git a/mkosi.images/initrd/mkosi.postinst b/mkosi.images/initrd/mkosi.postinst
new file mode 100755
index 0000000000..de610dfeb6
--- /dev/null
+++ b/mkosi.images/initrd/mkosi.postinst
@@ -0,0 +1,7 @@
+#!/bin/sh
+# 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"