]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Conditionally use tools tree 29143/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 9 Sep 2023 10:20:26 +0000 (12:20 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 9 Sep 2023 13:53:26 +0000 (15:53 +0200)
If the systemd version on the host is too old and there's no local
build directory, use the default tools tree which will build an
image containing all the tooling required to build systemd and use
that to build the other presets.

.github/workflows/mkosi.yml
mkosi.conf.d/10-extra-search-paths.conf [new file with mode: 0644]
mkosi.conf.d/10-systemd.conf
mkosi.conf.d/10-tools.conf [new file with mode: 0644]

index d46b7d1782bd0c1b7247283e2b7e00a7a5a4f426..55bbad2bde2288567a25d46229ef66df154de0cd 100644 (file)
@@ -80,9 +80,6 @@ jobs:
 
     - name: Configure
       run: |
-        # We configure ExtraSearchPaths=build/ so make sure build/ exists.
-        mkdir build/
-
         tee mkosi.conf <<- EOF
         [Distribution]
         Distribution=${{ matrix.distro }}
diff --git a/mkosi.conf.d/10-extra-search-paths.conf b/mkosi.conf.d/10-extra-search-paths.conf
new file mode 100644 (file)
index 0000000..bd3cdb1
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+PathExists=build/
+
+[Host]
+ExtraSearchPaths=build/
index adb46e488d311d3e73a501e58a6204f26dae41d5..b2921ffc6745fa221a00f17de6027c9897ad547d 100644 (file)
@@ -17,7 +17,6 @@ Environment=ASAN_OPTIONS=verify_asan_link_order=false
 [Host]
 @Incremental=yes
 @QemuMem=2G
-ExtraSearchPaths=build/
 # Make sure we don't trigger systemd-firstboot prompting for the root password.
 Credentials=passwd.plaintext-password.root=
 KernelCommandLineExtra=systemd.crash_shell
diff --git a/mkosi.conf.d/10-tools.conf b/mkosi.conf.d/10-tools.conf
new file mode 100644 (file)
index 0000000..21bdea5
--- /dev/null
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+PathExists=!build/
+SystemdVersion=<254
+
+[Host]
+ToolsTree=default