From 5742a2841f9d54448ee1256931829bab9dd55ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Thu, 3 Sep 2026 06:09:55 -0400 Subject: [PATCH] Fit the appliance under GitHub's 2 GiB release limit The qcow2 is written with zstd and 2M clusters after trimming freed blocks, and the appliance leaves out clang, llvm, the Docker plugins, lazydocker, base-devel, aether, and yay, plus usr/share/doc through NoExtract: 2.78 GB became 2.10 GB. sudo is installed explicitly now that base-devel no longer pulls it in. Claude-Session: https://claude.ai/code/session_019krxFwnSbEM2n2QNQ1rG1K --- builder/build-utm.sh | 4 +++- builder/pacman-utm-se.conf | 2 ++ builder/utm-se-drop.packages | 9 ++++++++- builder/utm-se.packages | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/builder/build-utm.sh b/builder/build-utm.sh index 89a99c7..5710a6c 100755 --- a/builder/build-utm.sh +++ b/builder/build-utm.sh @@ -180,6 +180,8 @@ version=$(arch-chroot "$TARGET" pacman -Q omarchy-dev | cut -d' ' -f2) : >"$TARGET/etc/machine-id" rm -f "$TARGET"/etc/ssh/ssh_host_* "$TARGET/root/.bash_history" rm -rf "$TARGET"/var/cache/pacman/pkg/* +# Freed blocks still hold old bytes; trimming zeroes them so they compress to nothing. +fstrim "$TARGET" && fstrim "$TARGET/boot" echo "==> Checking the sealed image" [[ ! -s $TARGET/etc/machine-id ]] @@ -199,5 +201,5 @@ losetup -d "$loop" loop="" echo "==> Writing the compressed disk" -qemu-img convert -c -O qcow2 "$IMAGE" "$OUT/omarchy-utm-se.qcow2" +qemu-img convert -c -O qcow2 -o compression_type=zstd,cluster_size=2M "$IMAGE" "$OUT/omarchy-utm-se.qcow2" echo "$version" >"$OUT/omarchy-utm-se.version" diff --git a/builder/pacman-utm-se.conf b/builder/pacman-utm-se.conf index 85b978e..bbdd708 100644 --- a/builder/pacman-utm-se.conf +++ b/builder/pacman-utm-se.conf @@ -6,6 +6,8 @@ CheckSpace ParallelDownloads = 5 SigLevel = Required DatabaseOptional LocalFileSigLevel = Optional +# Developer documentation does not fit a bundle that GitHub caps at 2 GiB. +NoExtract = usr/share/doc/* usr/share/gtk-doc/* [core] Include = /etc/pacman.d/mirrorlist diff --git a/builder/utm-se-drop.packages b/builder/utm-se-drop.packages index c9bc98c..3d3c0f3 100644 --- a/builder/utm-se-drop.packages +++ b/builder/utm-se-drop.packages @@ -1,9 +1,16 @@ -# Base packages the appliance leaves out: desktop apps too heavy for an interpreted guest, tools with no aarch64 build, and hardware-only helpers. +# Base packages the appliance leaves out: apps and toolchains too heavy for an interpreted guest, tools with no aarch64 build, and helpers for hardware the guest has not. +aether asdcontrol +clang +docker-buildx +docker-compose gpu-screen-recorder hyprland-preview-share-picker kdenlive +lazydocker libreoffice-fresh +llvm localsend moonlight-qt xournalpp +yay diff --git a/builder/utm-se.packages b/builder/utm-se.packages index f142e4f..ecc54fd 100644 --- a/builder/utm-se.packages +++ b/builder/utm-se.packages @@ -1,7 +1,6 @@ # Installed before the Omarchy base set: the aarch64 kernel, keyrings, boot stack, guest tools, and the dev packages built from the utm-se checkout. archlinuxarm-keyring base -base-devel efibootmgr limine linux-aarch64 @@ -15,4 +14,5 @@ pipewire qemu-guest-agent snapper spice-vdagent +sudo zram-generator