From ab87d04f6c60e41512ab9b3837e71ff1896b00a6 Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Wed, 4 Jun 2025 09:14:47 +0200 Subject: [PATCH] use a different erofs algorithm but only for a month, we want to use zstd long term --- build.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 73c8034..9592eca 100755 --- a/build.sh +++ b/build.sh @@ -119,7 +119,16 @@ cd .. # and back to root # Create rootfs tarball for consumption by systemd-sysext (doesn't currently support consuming raw images :() -time mkfs.erofs -d0 -zzstd "$ROOTFS_EROFS" "$OUTPUT" > /dev/null 2>&1 +# Currently our build machine's kernel doesn't support zstd so we use xz instead. +# This is a temporary workaround until the great CI VM transition happens and we can use a more recent kernel. +erofs_algorithm=zstd +algorithm_timeout=1751612936 # Friday, July 4, 2025 7:08:56 AM +if [ "$(date +%s)" -le $algorithm_timeout ]; then + erofs_algorithm=deflate +fi +echo "Using erofs algorithm: $erofs_algorithm" + +time mkfs.erofs -d0 "-z$erofs_algorithm" "$ROOTFS_EROFS" "$OUTPUT" > /dev/null 2>&1 cp --reflink=auto "$ROOTFS_EROFS" kde-linux.cache/root.raw # Now assemble the two generated images using systemd-repart and the definitions in mkosi.repart into $IMG.