From d09be93da8e0e3da484d82ede8bb35bbd449ef2e Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Mon, 18 Aug 2025 01:12:14 +0200 Subject: [PATCH] erofs: use advanced features to get a smaller image shouldn't have much practical impact other than smaller images dedupe would also be nice to use but unfortunately is single threaded right now and that would cause **substantial** slow down of builds. hours for in fact. for only about 300mb reduction :( --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 02949ba..874ea48 100755 --- a/build.sh +++ b/build.sh @@ -136,7 +136,7 @@ time zstd -T0 --rm "$ROOTFS_TAR" # Drop flatpak data from erofs. They are in the usr/share/factory and deployed from there. rm -rf "$OUTPUT/var/lib/flatpak" mkdir "$OUTPUT/var/lib/flatpak" # but keep a mountpoint around for the live session -time mkfs.erofs -d0 -zzstd "$ROOTFS_EROFS" "$OUTPUT" > /dev/null 2>&1 +time mkfs.erofs -d0 -zzstd -Efragments,ztailpacking "$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.