Update Bantam to upstream 0cd1a67 and rebuild the nokia-argon image

- Cross-compile bantam-cpp master (0cd1a67, "Send stable x-opencode-session
  header based on project_id") for armv7 and refresh prebuilt/, overlay/rootfs/,
  and the target rootfs; the new binary carries the x-opencode-session header.
- Rebuild images/bananarchy-nokia-argon.img with the updated agent (1.84 GiB,
  down from 2.01 GiB) and verify the binary inside the ext4 image by hash.
- Fix a prune regression seen in the rebuild log: apk install_if re-adds
  imv-wayland, gstreamer-ptp-helper and libheif-rav1e, so apk del alone leaves
  the Wayland viewer and two Rust helpers installed. Pin them with negative
  !pkg world constraints and run apk fix after each purge.
- Verify the constraints in check-rebuild.sh and document the fix.
This commit is contained in:
Luxferre committed 2026-11-05 14:39:21 +02:00
1 parent 5d10b801ff
commit dc2b6f6364
8 files changed
+57 -16

No files matched your search

+5
View File
@@ -77,6 +77,11 @@ else
fail "missing prune entry: $pkg"
fi
done
for deny in '!imv-wayland' '!gstreamer-ptp-helper' '!libheif-rav1e'; do
if ! grep -Fxq "$deny" "$PRUNE_FILE"; then
fail "missing negative world constraint: $deny"
fi
done
fi
if [ ! -x "$BASE_DIR/scripts/prune-rootfs-packages.sh" ]; then
fail "missing or non-executable scripts/prune-rootfs-packages.sh"
+35 -12
View File
@@ -2,9 +2,10 @@
# Remove Wayland-only, Rust-based, and retired packages from a target rootfs.
# Usage: prune-rootfs-packages.sh <rootfs-dir> world|purge
# world - drop retired entries from etc/apk/world before apk add, so apk can
# atomically replace conflicting providers (C sudo replaces sudo-rs)
# purge - apk del the still-installed entries after apk add, so install_if
# helpers are not re-added by the same transaction
# atomically replace conflicting providers (C sudo replaces sudo-rs),
# and pin install_if packages with negative constraints
# purge - apk del the still-installed entries after apk add, then re-pin the
# constraints and run apk fix so install_if packages stay removed
# Runs inside the build container, where apk and the repositories are available.
set -eu
@@ -19,18 +20,34 @@ if [ ! -f "$PRUNE_FILE" ]; then
echo "Error: missing $PRUNE_FILE" >&2
exit 1
fi
PRUNE_PKGS="$(grep -v '^[[:space:]]*#' "$PRUNE_FILE" | grep -v '^[[:space:]]*$' | tr '\n' ' ')"
PRUNE_PKGS="$(grep -v '^[[:space:]]*#' "$PRUNE_FILE" | grep -v '^[[:space:]]*$' | grep -v '^!' | tr '\n' ' ')"
WORLD_DENY="$(grep '^!' "$PRUNE_FILE" | tr '\n' ' ')"
DENY_NAMES=""
for deny in $WORLD_DENY; do
DENY_NAMES="$DENY_NAMES ${deny#!}"
done
pin_world_constraints() {
if [ -f "$WORLD_FILE" ]; then
cp "$WORLD_FILE" "$WORLD_FILE.bananarchy-tmp"
else
: > "$WORLD_FILE.bananarchy-tmp"
fi
for pkg in $PRUNE_PKGS $DENY_NAMES; do
grep -vxF "$pkg" "$WORLD_FILE.bananarchy-tmp" > "$WORLD_FILE.bananarchy-tmp2" || true
mv "$WORLD_FILE.bananarchy-tmp2" "$WORLD_FILE.bananarchy-tmp"
grep -vxF "!$pkg" "$WORLD_FILE.bananarchy-tmp" > "$WORLD_FILE.bananarchy-tmp2" || true
mv "$WORLD_FILE.bananarchy-tmp2" "$WORLD_FILE.bananarchy-tmp"
done
for deny in $WORLD_DENY; do
printf '%s\n' "$deny" >> "$WORLD_FILE.bananarchy-tmp"
done
mv "$WORLD_FILE.bananarchy-tmp" "$WORLD_FILE"
}
case "$PHASE" in
world)
if [ -f "$WORLD_FILE" ]; then
cp "$WORLD_FILE" "$WORLD_FILE.bananarchy-tmp"
for pkg in $PRUNE_PKGS; do
grep -vxF "$pkg" "$WORLD_FILE.bananarchy-tmp" > "$WORLD_FILE.bananarchy-tmp2" || true
mv "$WORLD_FILE.bananarchy-tmp2" "$WORLD_FILE.bananarchy-tmp"
done
mv "$WORLD_FILE.bananarchy-tmp" "$WORLD_FILE"
fi
pin_world_constraints
;;
purge)
if [ -f "$INSTALLED_DB" ]; then
@@ -47,6 +64,12 @@ case "$PHASE" in
echo " -> Warning: some retired packages could not be purged" >&2
fi
fi
# apk del drops negative constraints, so restore them and let apk fix
# purge the install_if packages that apk del cannot remove on its own.
pin_world_constraints
if ! apk --root "$ROOTFS" --arch armv7 fix --no-scripts; then
echo " -> Warning: apk fix could not enforce the prune constraints" >&2
fi
fi
;;
*)
+11 -2
View File
@@ -1,7 +1,9 @@
# Packages that must never be present in the final armv7 image.
# Read by scripts/bootstrap-rootfs-container.sh and rebuild-image.sh, which
# remove only the entries actually installed in the target rootfs.
# Read by scripts/prune-rootfs-packages.sh, which removes only the entries
# actually installed in the target rootfs.
# One package per line; lines starting with '#' and blank lines are ignored.
# Lines starting with '!' are negative etc/apk/world constraints: apk re-adds
# install_if packages on every transaction, so apk del alone cannot remove them.
# Wayland-purpose components (Bananarchy is pure X11). wayland-libs-* are
# shared libraries linked by GTK3/WebKitGTK and are deliberately not listed:
@@ -33,3 +35,10 @@ font-twemoji
mesa-demos
postmarketos-artwork-wallpapers
ttyescape
# Negative world constraints for install_if packages. apk del removes these
# constraints, so the pruner restores them and runs apk fix after every purge.
!imv-wayland
!gstreamer-ptp-helper
!libheif-rav1e
!postmarketos-base-sudo-rs