]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Only build system preset by default
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 9 Sep 2023 08:20:01 +0000 (10:20 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 9 Sep 2023 13:45:49 +0000 (15:45 +0200)
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.

mkosi.conf.d/10-systemd.conf
mkosi.presets/initrd/mkosi.conf
mkosi.presets/system/mkosi.conf
mkosi.presets/system/mkosi.conf.d/05-initrd.conf [new file with mode: 0644]

index f25d53d2b76834f40f8bb25d333a29eb4922b664..adb46e488d311d3e73a501e58a6204f26dae41d5 100644 (file)
@@ -1,5 +1,8 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
+[Preset]
+Presets=system
+
 [Output]
 OutputDirectory=mkosi.output
 BuildDirectory=mkosi.builddir
index 5d347b71d81d7bc2656c55910ea1776098442dd4..0ef3a7bd4adc301aab0691b5399b5399523a04f8 100644 (file)
@@ -1,9 +1,5 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-[Match]
-Bootable=|auto
-Bootable=|yes
-
 [Preset]
 Dependencies=base
 
index 58cd4939427dee5881497537391f60406e4fa0af..aaf05364f8f5dd19254b8f47c8ae20140b311863 100644 (file)
@@ -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 (file)
index 0000000..e5dedaf
--- /dev/null
@@ -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