summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-09-09 10:20:01 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-09-09 15:45:49 +0200
commita940484ee53152cc7d401e635267571a114319a4 (patch)
treec37854bfc5b6649e371e0f8e3a180cd17381a01c
parentmkosi: Move to Fedora 39 (diff)
downloadsystemd-a940484ee53152cc7d401e635267571a114319a4.tar.xz
systemd-a940484ee53152cc7d401e635267571a114319a4.zip
mkosi: Only build system preset by default
Let's not build all presets by default, but only the system preset. Also, let's only make the system preset depend on the initrd preset if we're building a bootable disk image. This means that if we build the system image as a cpio, uki or directory, the initrd preset will be skipped as it's not necessary, making the build a little faster.
-rw-r--r--mkosi.conf.d/10-systemd.conf3
-rw-r--r--mkosi.presets/initrd/mkosi.conf4
-rw-r--r--mkosi.presets/system/mkosi.conf2
-rw-r--r--mkosi.presets/system/mkosi.conf.d/05-initrd.conf11
4 files changed, 14 insertions, 6 deletions
diff --git a/mkosi.conf.d/10-systemd.conf b/mkosi.conf.d/10-systemd.conf
index f25d53d2b7..adb46e488d 100644
--- a/mkosi.conf.d/10-systemd.conf
+++ b/mkosi.conf.d/10-systemd.conf
@@ -1,5 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
+[Preset]
+Presets=system
+
[Output]
OutputDirectory=mkosi.output
BuildDirectory=mkosi.builddir
diff --git a/mkosi.presets/initrd/mkosi.conf b/mkosi.presets/initrd/mkosi.conf
index 5d347b71d8..0ef3a7bd4a 100644
--- a/mkosi.presets/initrd/mkosi.conf
+++ b/mkosi.presets/initrd/mkosi.conf
@@ -1,9 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
-[Match]
-Bootable=|auto
-Bootable=|yes
-
[Preset]
Dependencies=base
diff --git a/mkosi.presets/system/mkosi.conf b/mkosi.presets/system/mkosi.conf
index 58cd493942..aaf05364f8 100644
--- a/mkosi.presets/system/mkosi.conf
+++ b/mkosi.presets/system/mkosi.conf
@@ -2,14 +2,12 @@
[Preset]
Dependencies=base
- initrd
[Content]
Autologin=yes
BaseTrees=../../mkosi.output/base
ExtraTrees=../../mkosi.output/base-systemd
ExtraTrees=../../src:/usr/src/src
-Initrds=../../mkosi.output/initrd
Packages=
acl
bash-completion
diff --git a/mkosi.presets/system/mkosi.conf.d/05-initrd.conf b/mkosi.presets/system/mkosi.conf.d/05-initrd.conf
new file mode 100644
index 0000000000..e5dedafdc3
--- /dev/null
+++ b/mkosi.presets/system/mkosi.conf.d/05-initrd.conf
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+Bootable=!no
+Format=disk
+
+[Preset]
+Dependencies=initrd
+
+[Content]
+Initrds=../../mkosi.output/initrd