From 3cfb020cb9ce5958ac39a7fd586cc4e893a7b190 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 11 Jul 2024 16:19:20 +0200 Subject: [PATCH] mkosi: Use squashfs for sysext if mkfs.erofs is not available CentOS Stream 10 does not have erofs-utils so let's add a fallback to squashfs when building the sysext. --- mkosi.functions | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mkosi.functions b/mkosi.functions index c19c1aa643..993f2e8a39 100644 --- a/mkosi.functions +++ b/mkosi.functions @@ -38,7 +38,15 @@ EOF rm -f "$BUILDDIR"/systemd.raw - env --unset=SYSTEMD_REPART_OVERRIDE_FSTYPE_ROOT \ + local fstype + + if command -v mkfs.erofs; then + fstype=erofs + else + fstype=squashfs + fi + + env SYSTEMD_REPART_OVERRIDE_FSTYPE_ROOT="$fstype" \ "$BUILDDIR"/systemd-repart \ --make-ddi=sysext-unsigned \ --copy-source="$1" \