summaryrefslogtreecommitdiffstats
path: root/mkosi.images/exitrd
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-07-12 15:33:49 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-07-15 16:17:33 +0200
commit7205fc7dc31eb2be3075ee6ba23ebe84324aa5cb (patch)
tree4425e2413d76af1504d5f8666648a9667f0e4eb6 /mkosi.images/exitrd
parentmkosi: update fedora commit reference (diff)
downloadsystemd-7205fc7dc31eb2be3075ee6ba23ebe84324aa5cb.tar.xz
systemd-7205fc7dc31eb2be3075ee6ba23ebe84324aa5cb.zip
mkosi: Introduce build image
We want the exitrd image to be built with the latest systemd as well. As the exitrd image is built as part of mkosi.images, and all subimages are built before the main image, this implies the packages must be built as a subimage in mkosi.images/ as well. So we introduce the build image and move all logic related to building distribution packages there. This also has the nice side effect of slimming down the main image as the build dependencies are not installed into the main image anymore. It also makes sure the packages are built in a "clean" chroot without any of the other packages which we install in the main image available.
Diffstat (limited to 'mkosi.images/exitrd')
-rw-r--r--mkosi.images/exitrd/mkosi.conf3
-rw-r--r--mkosi.images/exitrd/mkosi.conf.d/10-arch.conf2
-rw-r--r--mkosi.images/exitrd/mkosi.conf.d/10-centos-fedora.conf2
-rw-r--r--mkosi.images/exitrd/mkosi.conf.d/10-debian.conf2
-rw-r--r--mkosi.images/exitrd/mkosi.conf.d/10-opensuse.conf3
-rw-r--r--mkosi.images/exitrd/mkosi.conf.d/10-ubuntu.conf2
-rw-r--r--mkosi.images/exitrd/mkosi.conf.d/20-build.conf9
7 files changed, 19 insertions, 4 deletions
diff --git a/mkosi.images/exitrd/mkosi.conf b/mkosi.images/exitrd/mkosi.conf
index 3b25091759..28da8a592b 100644
--- a/mkosi.images/exitrd/mkosi.conf
+++ b/mkosi.images/exitrd/mkosi.conf
@@ -12,3 +12,6 @@ MakeInitrd=yes
Packages=
bash
+
+[Config]
+Include=%D/mkosi.sanitizers
diff --git a/mkosi.images/exitrd/mkosi.conf.d/10-arch.conf b/mkosi.images/exitrd/mkosi.conf.d/10-arch.conf
index c8b1904f6f..a5a6506e94 100644
--- a/mkosi.images/exitrd/mkosi.conf.d/10-arch.conf
+++ b/mkosi.images/exitrd/mkosi.conf.d/10-arch.conf
@@ -4,7 +4,7 @@
Distribution=arch
[Content]
-Packages=
+VolatilePackages=
systemd
RemoveFiles=
diff --git a/mkosi.images/exitrd/mkosi.conf.d/10-centos-fedora.conf b/mkosi.images/exitrd/mkosi.conf.d/10-centos-fedora.conf
index 8458dee37e..a1fa32b786 100644
--- a/mkosi.images/exitrd/mkosi.conf.d/10-centos-fedora.conf
+++ b/mkosi.images/exitrd/mkosi.conf.d/10-centos-fedora.conf
@@ -5,5 +5,5 @@ Distribution=|centos
Distribution=|fedora
[Content]
-Packages=
+VolatilePackages=
systemd-standalone-shutdown
diff --git a/mkosi.images/exitrd/mkosi.conf.d/10-debian.conf b/mkosi.images/exitrd/mkosi.conf.d/10-debian.conf
index 68b0aa5fe7..6ca310cbc2 100644
--- a/mkosi.images/exitrd/mkosi.conf.d/10-debian.conf
+++ b/mkosi.images/exitrd/mkosi.conf.d/10-debian.conf
@@ -4,5 +4,5 @@
Distribution=debian
[Content]
-Packages=
+VolatilePackages=
systemd-standalone-shutdown
diff --git a/mkosi.images/exitrd/mkosi.conf.d/10-opensuse.conf b/mkosi.images/exitrd/mkosi.conf.d/10-opensuse.conf
index 3f6df21f84..fb0a498df5 100644
--- a/mkosi.images/exitrd/mkosi.conf.d/10-opensuse.conf
+++ b/mkosi.images/exitrd/mkosi.conf.d/10-opensuse.conf
@@ -5,4 +5,7 @@ Distribution=opensuse
[Content]
Packages=
+ patterns-base-minimal_base
+
+VolatilePackages=
systemd
diff --git a/mkosi.images/exitrd/mkosi.conf.d/10-ubuntu.conf b/mkosi.images/exitrd/mkosi.conf.d/10-ubuntu.conf
index ddd68dc1b4..61fe6baee0 100644
--- a/mkosi.images/exitrd/mkosi.conf.d/10-ubuntu.conf
+++ b/mkosi.images/exitrd/mkosi.conf.d/10-ubuntu.conf
@@ -4,5 +4,5 @@
Distribution=ubuntu
[Content]
-Packages=
+VolatilePackages=
systemd
diff --git a/mkosi.images/exitrd/mkosi.conf.d/20-build.conf b/mkosi.images/exitrd/mkosi.conf.d/20-build.conf
new file mode 100644
index 0000000000..8c16d9b9f8
--- /dev/null
+++ b/mkosi.images/exitrd/mkosi.conf.d/20-build.conf
@@ -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