Slim the armv7 rootfs: drop Rust and Wayland packages, dead code, and build residue
- Replace Rust sudo-rs with C sudo (sudo-virt provider at priority 100) and add a two-phase pruner so apk atomically swaps the conflicting provider. - Remove Wayland-purpose libwpebackend-fdo from the runtime set and add imv-x11 for the X11-only image viewer path. - Drop unused mesa-demos, postmarketos-artwork-wallpapers, ttyescape/hkdm, clickclack/sdl3, and font-twemoji; keep sfeed, w3m, htop, non-Latin fonts, and the documented SDK toolchain to avoid functional regressions. - Strip apk index caches, apk logs, and unused gettext locales before mke2fs, with a hard guard that fails the build if any residue survives. - Harden check-rebuild.sh with critical/forbidden package and guard checks. - Delete the unreferenced Sway-era configurator and patch; sync the docs.
This commit is contained in:
1 parent
0ab9367e28
commit
5d10b801ff
12 files changed
+187
-1024
No files matched your search
@@ -41,15 +41,51 @@ PYEOF
|
||||
|
||||
echo "[check] Rootfs package list..."
|
||||
PKGS_FILE="$BASE_DIR/scripts/rootfs-packages.txt"
|
||||
PRUNE_FILE="$BASE_DIR/scripts/rootfs-prune-packages.txt"
|
||||
if [ ! -f "$PKGS_FILE" ]; then
|
||||
fail "missing $PKGS_FILE"
|
||||
else
|
||||
PKG_COUNT="$(grep -v '^[[:space:]]*#' "$PKGS_FILE" | grep -cv '^[[:space:]]*$' || true)"
|
||||
if [ "$PKG_COUNT" -lt 100 ]; then
|
||||
if [ "$PKG_COUNT" -lt 80 ]; then
|
||||
fail "package list has only $PKG_COUNT entries"
|
||||
else
|
||||
echo " $PKG_COUNT packages"
|
||||
fi
|
||||
for pkg in alpine-base postmarketos-ui-sxmo-de-dwm webkit2gtk-4.1 libwpe \
|
||||
sudo imv-x11 fcitx5-gtk3 mesa-utils sfeed; do
|
||||
if ! grep -Fxq "$pkg" "$PKGS_FILE"; then
|
||||
fail "missing critical package: $pkg"
|
||||
fi
|
||||
done
|
||||
# Pure X11 and Rust-free top-level package set.
|
||||
for pkg in sudo-rs postmarketos-base-sudo-rs libwpebackend-fdo imv-wayland \
|
||||
xwayland sxmo-utils-wayland wofi grim slurp; do
|
||||
if grep -Fxq "$pkg" "$PKGS_FILE"; then
|
||||
fail "forbidden Rust/Wayland package in package list: $pkg"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo "[check] Rootfs prune list..."
|
||||
if [ ! -f "$PRUNE_FILE" ]; then
|
||||
fail "missing $PRUNE_FILE"
|
||||
else
|
||||
PRUNE_COUNT="$(grep -v '^[[:space:]]*#' "$PRUNE_FILE" | grep -cv '^[[:space:]]*$' || true)"
|
||||
echo " $PRUNE_COUNT prune entries"
|
||||
for pkg in sudo-rs libwpebackend-fdo imv-wayland; do
|
||||
if ! grep -Fxq "$pkg" "$PRUNE_FILE"; then
|
||||
fail "missing prune entry: $pkg"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ ! -x "$BASE_DIR/scripts/prune-rootfs-packages.sh" ]; then
|
||||
fail "missing or non-executable scripts/prune-rootfs-packages.sh"
|
||||
fi
|
||||
|
||||
echo "[check] Image residue guard..."
|
||||
if ! grep -q 'strip_build_residue' "$BASE_DIR/rebuild-image.sh" || \
|
||||
! grep -q 'apk cache/log still present' "$BASE_DIR/rebuild-image.sh"; then
|
||||
fail "rebuild-image.sh is missing the apk cache/log guard"
|
||||
fi
|
||||
|
||||
echo "[check] Vendored EDL client library..."
|
||||
|
||||
Reference in new issue
Block a user