mkosi: Update to latest

This update introduces the explicit Dependencies= setting, instead
of relying on implicit dependencies via alphanumerical ordering.

We also take the opportunity to rename the "final" preset to the
"system" preset, which seems like a better name.
This commit is contained in:
Daan De Meyer 2023-08-09 17:17:50 +02:00
parent d1e8e8b5ae
commit 1f035c91bb
49 changed files with 16 additions and 9 deletions

View file

@ -76,7 +76,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: systemd/mkosi@f61dac009ee584797e61a961d508cc52d7f4a03c
- uses: systemd/mkosi@9ffcdac128c66935aa5d5a98633fa7498bce92d1
- name: Configure
run: |
@ -106,17 +106,17 @@ jobs:
# For erofs, we have to install linux-modules-extra-azure, but that doesn't match the running kernel
# version, so we can't load the erofs module. squashfs is a builtin module so we use that instead.
mkdir -p mkosi.presets/20-final/mkosi.repart/10-usr.conf.d
tee mkosi.presets/20-final/mkosi.repart/10-usr.conf.d/squashfs.conf <<- EOF
mkdir -p mkosi.presets/system/mkosi.repart/10-usr.conf.d
tee mkosi.presets/system/mkosi.repart/10-usr.conf.d/squashfs.conf <<- EOF
[Partition]
Format=squashfs
EOF
# The emergency shell is not useful in the CI, as it just blocks for a long time before the job
# eventually times out. Override it to just shutdown immediately.
mkdir -p mkosi.presets/10-initrd/mkosi.extra/usr/lib/systemd/system/emergency.service.d/
mkdir -p mkosi.presets/20-final/mkosi.extra/usr/lib/systemd/system/emergency.service.d/
tee mkosi.presets/10-initrd/mkosi.extra/usr/lib/systemd/system/emergency.service.d/poweroff.conf <<- EOF
mkdir -p mkosi.presets/initrd/mkosi.extra/usr/lib/systemd/system/emergency.service.d/
mkdir -p mkosi.presets/system/mkosi.extra/usr/lib/systemd/system/emergency.service.d/
tee mkosi.presets/initrd/mkosi.extra/usr/lib/systemd/system/emergency.service.d/poweroff.conf <<- EOF
[Unit]
FailureAction=exit
[Service]
@ -124,7 +124,7 @@ jobs:
ExecStart=
ExecStart=false
EOF
cp mkosi.presets/10-initrd/mkosi.extra/usr/lib/systemd/system/emergency.service.d/poweroff.conf mkosi.presets/20-final/mkosi.extra/usr/lib/systemd/system/emergency.service.d/poweroff.conf
cp mkosi.presets/initrd/mkosi.extra/usr/lib/systemd/system/emergency.service.d/poweroff.conf mkosi.presets/system/mkosi.extra/usr/lib/systemd/system/emergency.service.d/poweroff.conf
- name: Generate secure boot key
run: mkosi --debug genkey

View file

@ -10,8 +10,8 @@ if [ "${container:-}" != "mkosi" ]; then
fi
# We don't want to install our build of systemd in the base image, but use it as an extra tree for the
# initrd and final images, so override DESTDIR to store it in the output directory so we can reference it as
# an extra tree in the initrd and final image builds.
# initrd and system images, so override DESTDIR to store it in the output directory so we can reference it as
# an extra tree in the initrd and system image builds.
DESTDIR="$OUTPUTDIR/systemd"
# If mkosi.builddir/ exists mkosi will set $BUILDDIR to it, let's then use it

View file

@ -4,6 +4,9 @@
Bootable=|auto
Bootable=|yes
[Preset]
Dependencies=base
[Output]
Format=cpio

View file

@ -1,5 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Preset]
Dependencies=base
initrd
[Content]
Autologin=yes
BaseTrees=../../mkosi.output/base