Remove the remaining optional scripting runtimes, pin the core tools
- Drop perl, perl-io-socket-ssl, tcl-lib, tcl-tls, sqlite-tcl, lua5.4, lua5.4-dev, lua5.5, lua5.5-dev and sqlite (CLI) from the package set and add them to the prune denylist: 13 packages / 49.45 MiB including dependents. sqlite-libs, tcl, and all paramount runtimes stay. - Promote curl to an explicit world entry and pin curl, bc, ed, rlwrap, mandoc, nano, less and frotz as core tools in check-rebuild.sh. - Remove the lua/luac symlink creation and the lua5.5 critical-binary check from the build scripts; apply-bananarchy-overlay.sh deletes stale links. - Drop four legacy pmbootstrap-era so: world constraints (@ entries in the prune list); so:libperl.so was pinning perl and blocking its removal. - Update README.md, MANUAL.md, AGENTS.md, SDK.md section 7 and CHANGELOG.md. - Rebuild images/bananarchy-nokia-argon.img (1.59 GiB, down from 1.66 GiB) and verify with qemu-arm that yabasic, neoui.yab, neonet.yab, curl, bc and ed still work while perl, lua, sqlite3, gcc and janet are gone.
This commit is contained in:
1 parent
2da4c86923
commit
8078f211e5
12 files changed
+81
-39
No files matched your search
@@ -239,6 +239,8 @@ for path in glob.glob(os.path.join(rootfs, "usr/lib/libgallium-*.so")):
|
||||
print(f"Patched {os.path.basename(path)} with Adreno 304 (FD304) device descriptor.")
|
||||
PYEOF
|
||||
rm -rf \
|
||||
"$TARGET_ROOTFS/usr/bin/lua" \
|
||||
"$TARGET_ROOTFS/usr/bin/luac" \
|
||||
"$TARGET_ROOTFS/usr/bin/sxmo_swayinitconf.sh" \
|
||||
"$TARGET_ROOTFS/usr/bin/sxmo_swayinit.sh" \
|
||||
"$TARGET_ROOTFS/usr/bin/sxmo_riverinit.sh" \
|
||||
|
||||
@@ -48,8 +48,6 @@ else
|
||||
# shellcheck disable=SC2086
|
||||
apk --root "$ROOTFS" --arch armv7 add --no-scripts $PKGS >/dev/null
|
||||
fi
|
||||
ln -sf lua5.5 "$ROOTFS/usr/bin/lua"
|
||||
ln -sf luac5.5 "$ROOTFS/usr/bin/luac"
|
||||
|
||||
"$REPO/scripts/prune-rootfs-packages.sh" "$ROOTFS" purge
|
||||
|
||||
|
||||
@@ -46,13 +46,14 @@ 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 80 ]; then
|
||||
if [ "$PKG_COUNT" -lt 70 ]; 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 yabasic yabasic-doc; do
|
||||
sudo imv-x11 fcitx5-gtk3 mesa-utils sfeed yabasic yabasic-doc \
|
||||
curl bc ed rlwrap mandoc nano less frotz tcl; do
|
||||
if ! grep -Fxq "$pkg" "$PKGS_FILE"; then
|
||||
fail "missing critical package: $pkg"
|
||||
fi
|
||||
@@ -60,7 +61,9 @@ else
|
||||
# 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 \
|
||||
gcc g++ musl-dev make janet janet-dev jpm; do
|
||||
gcc g++ musl-dev make janet janet-dev jpm \
|
||||
perl perl-io-socket-ssl tcl-lib tcl-tls sqlite-tcl sqlite \
|
||||
lua5.4 lua5.4-dev lua5.5 lua5.5-dev; do
|
||||
if grep -Fxq "$pkg" "$PKGS_FILE"; then
|
||||
fail "forbidden Rust/Wayland package in package list: $pkg"
|
||||
fi
|
||||
@@ -73,12 +76,12 @@ if [ ! -f "$PRUNE_FILE" ]; then
|
||||
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 gcc janet; do
|
||||
for pkg in sudo-rs libwpebackend-fdo imv-wayland gcc janet perl lua5.5 sqlite; do
|
||||
if ! grep -Fxq "$pkg" "$PRUNE_FILE"; then
|
||||
fail "missing prune entry: $pkg"
|
||||
fi
|
||||
done
|
||||
for deny in '!imv-wayland' '!gstreamer-ptp-helper' '!libheif-rav1e'; do
|
||||
for deny in '!imv-wayland' '!gstreamer-ptp-helper' '!libheif-rav1e' '@so:libperl.so'; do
|
||||
if ! grep -Fxq "$deny" "$PRUNE_FILE"; then
|
||||
fail "missing negative world constraint: $deny"
|
||||
fi
|
||||
@@ -88,6 +91,12 @@ if [ ! -x "$BASE_DIR/scripts/prune-rootfs-packages.sh" ]; then
|
||||
fail "missing or non-executable scripts/prune-rootfs-packages.sh"
|
||||
fi
|
||||
|
||||
echo "[check] Lua symlink removal..."
|
||||
if grep -q 'lua5.5' "$BASE_DIR/rebuild-image.sh" || \
|
||||
grep -q 'lua5.5' "$BASE_DIR/scripts/bootstrap-rootfs-container.sh"; then
|
||||
fail "build scripts still create dangling lua/luac symlinks"
|
||||
fi
|
||||
|
||||
echo "[check] Yabasic FFI runtime..."
|
||||
for artifact in \
|
||||
"$BASE_DIR/prebuilt/sxmo-x11/usr/lib/libneoui.so" \
|
||||
|
||||
@@ -20,8 +20,9 @@ if [ ! -f "$PRUNE_FILE" ]; then
|
||||
echo "Error: missing $PRUNE_FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
PRUNE_PKGS="$(grep -v '^[[:space:]]*#' "$PRUNE_FILE" | grep -v '^[[:space:]]*$' | grep -v '^!' | tr '\n' ' ')"
|
||||
PRUNE_PKGS="$(grep -v '^[[:space:]]*#' "$PRUNE_FILE" | grep -v '^[[:space:]]*$' | grep -v '^[!@]' | tr '\n' ' ')"
|
||||
WORLD_DENY="$(grep '^!' "$PRUNE_FILE" | tr '\n' ' ')"
|
||||
WORLD_DROP="$(grep '^@' "$PRUNE_FILE" | sed 's/^@//' | tr '\n' ' ')"
|
||||
DENY_NAMES=""
|
||||
for deny in $WORLD_DENY; do
|
||||
DENY_NAMES="$DENY_NAMES ${deny#!}"
|
||||
@@ -39,6 +40,10 @@ pin_world_constraints() {
|
||||
grep -vxF "!$pkg" "$WORLD_FILE.bananarchy-tmp" > "$WORLD_FILE.bananarchy-tmp2" || true
|
||||
mv "$WORLD_FILE.bananarchy-tmp2" "$WORLD_FILE.bananarchy-tmp"
|
||||
done
|
||||
for entry in $WORLD_DROP; do
|
||||
grep -vxF "$entry" "$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
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
# Rust sudo-rs variant and its postmarketos-base-sudo-rs companion are excluded.
|
||||
# No on-device compiler or Janet runtime is shipped; native code is
|
||||
# cross-compiled with scripts/build-*.sh, and Yabasic FFI (neoui.yab /
|
||||
# neonet.yab) is the on-device SDK path.
|
||||
# neonet.yab) is the on-device SDK path. curl, bc, ed, rlwrap, mandoc, nano,
|
||||
# less, and frotz are the pinned core tools and must not be removed.
|
||||
# scripts/rootfs-prune-packages.txt lists packages purged from existing rootfs
|
||||
# trees (Wayland-only components and retired packages).
|
||||
adwaita-icon-theme
|
||||
@@ -16,6 +17,7 @@ bash
|
||||
bc
|
||||
brightnessctl
|
||||
coreutils
|
||||
curl
|
||||
doas
|
||||
ed
|
||||
evtest
|
||||
@@ -47,10 +49,6 @@ libxft
|
||||
libxinerama
|
||||
libxtst
|
||||
linux-postmarketos-qcom-msm8916
|
||||
lua5.4
|
||||
lua5.4-dev
|
||||
lua5.5
|
||||
lua5.5-dev
|
||||
mandoc
|
||||
mesa-utils
|
||||
modemmanager
|
||||
@@ -58,8 +56,6 @@ nano
|
||||
openssh
|
||||
openssh-server-pam
|
||||
openvpn
|
||||
perl
|
||||
perl-io-socket-ssl
|
||||
postmarketos-base
|
||||
postmarketos-base-nofde
|
||||
postmarketos-base-ui
|
||||
@@ -79,12 +75,8 @@ soc-qcom-msm8916
|
||||
soc-qcom-msm8916-rproc
|
||||
soc-qcom-msm8916-rproc-openrc
|
||||
soc-qcom-msm8916-ucm
|
||||
sqlite
|
||||
sqlite-tcl
|
||||
sudo
|
||||
tcl
|
||||
tcl-lib
|
||||
tcl-tls
|
||||
tor
|
||||
v4l-utils
|
||||
w3m
|
||||
|
||||
@@ -46,6 +46,31 @@ janet
|
||||
janet-dev
|
||||
jpm
|
||||
|
||||
# Retired scripting runtimes and optional extensions. The core tools
|
||||
# (curl, bc, ed, rlwrap, mandoc, nano, less, frotz) and the paramount
|
||||
# runtimes (yabasic, python3, bash, tcl, luajit, gawk, jq, gojq, quickjs)
|
||||
# stay in scripts/rootfs-packages.txt.
|
||||
perl
|
||||
perl-io-socket-ssl
|
||||
tcl-lib
|
||||
tcl-tls
|
||||
sqlite-tcl
|
||||
lua5.4
|
||||
lua5.4-dev
|
||||
lua5.5
|
||||
lua5.5-dev
|
||||
sqlite
|
||||
|
||||
# Legacy pmbootstrap-era so: world constraints. @ lines are dropped from
|
||||
# etc/apk/world entirely: they are not packages and must not be passed to apk.
|
||||
# so:libperl.so in particular pins perl and blocks its removal; the other
|
||||
# three providers (elogind-common, expect, libpulse) are hard dependencies of
|
||||
# remaining world packages and stay installed.
|
||||
@so:libelogind-shared-255.24.so
|
||||
@so:libexpect5.45.4.so
|
||||
@so:libperl.so
|
||||
@so:libpulsecommon-17.0.so
|
||||
|
||||
# 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
|
||||
|
||||
Reference in new issue
Block a user