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.

(cherry picked from commit 3cfb020cb9)
This commit is contained in:
Daan De Meyer 2024-07-11 16:19:20 +02:00
parent 480f8fa839
commit 945013a092

View File

@ -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" \