mkosi: Conditionally use tools tree

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.
This commit is contained in:
Daan De Meyer 2023-09-09 12:20:26 +02:00
parent a940484ee5
commit bcc911a7d7
4 changed files with 15 additions and 4 deletions

View 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 }}

View file

@ -0,0 +1,7 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Match]
PathExists=build/
[Host]
ExtraSearchPaths=build/

View 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

View file

@ -0,0 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Match]
PathExists=!build/
SystemdVersion=<254
[Host]
ToolsTree=default