Whitelist librsvg/rav1e/libdovi, use native ffmpeg/mpv/gst-libav, and update docs
This commit is contained in:
1 parent
ac76431621
commit
30348132fa
45 files changed
+94
-1486
No files matched your search
+32
-14
@@ -25,15 +25,27 @@ echo "OK"
|
||||
|
||||
echo "[2/8] Checking excluded Wayland/Rust/upstream packages..."
|
||||
for bad_pkg in sway wayfire weston phosh cage xwayland grim slurp wofi \
|
||||
librsvg libglycin rav1e rav1e-libs libdovi mesa-rusticl gdk-pixbuf adwaita-icon-theme imv-x11 \
|
||||
gst-libav gst-plugins-bad libnotify \
|
||||
libglycin mesa-rusticl gdk-pixbuf adwaita-icon-theme imv-x11 \
|
||||
gst-plugins-bad libnotify \
|
||||
deno py3-cryptography \
|
||||
linux-edge linux-lts xorg-server xf86-input-libinput xf86-video-fbdev; do
|
||||
linux-edge linux-lts xorg-server xf86-input-libinput xf86-video-fbdev geminux-mpv; do
|
||||
if grep -Fxq "P:$bad_pkg" "$ROOTFS_DIR/lib/apk/db/installed"; then
|
||||
echo "FAIL: forbidden package '$bad_pkg' is installed in rootfs" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for req_pkg in ffmpeg mpv gst-libav; do
|
||||
if ! grep -Fxq "P:$req_pkg" "$ROOTFS_DIR/lib/apk/db/installed"; then
|
||||
echo "FAIL: expected native package '$req_pkg' is not installed in rootfs" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for unblocked in !librsvg !rav1e !rav1e-libs !libheif-rav1e !libdovi !gst-libav; do
|
||||
if grep -Fxq "$unblocked" "$ROOTFS_DIR/etc/apk/world"; then
|
||||
echo "FAIL: '$unblocked' is still blocked in $ROOTFS_DIR/etc/apk/world" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo "OK (zero forbidden packages)"
|
||||
|
||||
echo "[3/8] Running full binary ELF Rust scan across $ROOTFS_DIR..."
|
||||
@@ -45,17 +57,26 @@ import sys
|
||||
|
||||
root = sys.argv[1]
|
||||
raw_markers = re.compile(
|
||||
rb"(core::panicking|rustc_version|libstd-[0-9a-f]{8}|librsvg|libglycin|rav1e|libdovi)"
|
||||
rb"(core::panicking|rustc_version|libstd-[0-9a-f]{8}|libglycin)"
|
||||
)
|
||||
sym_markers = re.compile(
|
||||
r"(rust_eh_personality|rust_begin_unwind|_ZN4core9panicking|_ZN3std9panicking|libstd-[0-9a-f]{8}|librsvg|libglycin|rav1e|libdovi)"
|
||||
r"(rust_eh_personality|rust_begin_unwind|_ZN4core9panicking|_ZN3std9panicking|libstd-[0-9a-f]{8}|libglycin)"
|
||||
)
|
||||
whitelisted_elf_prefixes = (
|
||||
"librsvg-2.so",
|
||||
"libpixbufloader-svg.so",
|
||||
"libpixbufloader_svg.so",
|
||||
"rsvg-convert",
|
||||
"librav1e.so",
|
||||
"rav1e",
|
||||
"libdovi.so",
|
||||
)
|
||||
elfs = []
|
||||
hits = []
|
||||
for parent, _, names in os.walk(root):
|
||||
for name in names:
|
||||
p = os.path.join(parent, name)
|
||||
if os.path.islink(p) or not os.path.isfile(p):
|
||||
if os.path.islink(p) or not os.path.isfile(p) or name.startswith(whitelisted_elf_prefixes):
|
||||
continue
|
||||
try:
|
||||
with open(p, "rb") as f:
|
||||
@@ -108,7 +129,7 @@ docker run --rm --network=host \
|
||||
printf "%s\n" "$UPG_OUT"
|
||||
|
||||
for pkg in geminux-kernel-modules geminux-xlibre geminux-suckless \
|
||||
geminux-dunst geminux-ui geminux-bantam geminux-gsocket geminux-mpv \
|
||||
geminux-dunst geminux-ui geminux-bantam geminux-gsocket \
|
||||
geminux-gdk-pixbuf geminux-webarchy geminux-config; do
|
||||
if ! grep -q "^${pkg}@geminux=" /rootfs/etc/apk/world; then
|
||||
echo "FAIL: ${pkg} is not exact-version pinned to @geminux in world" >&2
|
||||
@@ -120,7 +141,7 @@ docker run --rm --network=host \
|
||||
fi
|
||||
done
|
||||
|
||||
if printf "%s\n" "$UPG_OUT" | grep -q -E "(rust|cargo|librsvg|libglycin|gdk-pixbuf|rav1e|libdovi|deno|py3-cryptography|xorg-server|linux-edge)"; then
|
||||
if printf "%s\n" "$UPG_OUT" | grep -q -E "(rust|cargo|libglycin|gdk-pixbuf|deno|py3-cryptography|xorg-server|linux-edge)"; then
|
||||
echo "FAIL: upgrade simulation tried to pull forbidden Rust or upstream override package" >&2
|
||||
exit 1
|
||||
fi
|
||||
@@ -151,11 +172,6 @@ file \
|
||||
"$BASE_DIR/prebuilt/gsocket/usr/local/bin/gs-netcat" \
|
||||
"$BASE_DIR/prebuilt/gsocket/usr/local/bin/gsocket_dso.so.0" \
|
||||
"$BASE_DIR/prebuilt/gsocket/usr/local/bin/gsocket_uchroot_dso.so.0" \
|
||||
"$BASE_DIR/prebuilt/mpv/usr/bin/mpv" \
|
||||
"$BASE_DIR/prebuilt/mpv/usr/bin/ffmpeg" \
|
||||
"$BASE_DIR/prebuilt/mpv/usr/bin/ffprobe" \
|
||||
"$BASE_DIR/prebuilt/mpv/usr/lib/geminux-mpv/"*.so.*.* \
|
||||
"$BASE_DIR/prebuilt/mpv/usr/lib/gstreamer-1.0/libgstlibav.so" \
|
||||
"$BASE_DIR/prebuilt/gdk-pixbuf/usr/bin/gdk-pixbuf-"* \
|
||||
"$BASE_DIR/prebuilt/gdk-pixbuf/usr/lib/libgdk_pixbuf-2.0.so.0."* \
|
||||
"$BASE_DIR/prebuilt/webarchy/usr/bin/webarchy" | \
|
||||
@@ -352,6 +368,8 @@ for req_rel in ("etc/pam.d/autologin", "etc/init.d/geminux-hwinit",
|
||||
"etc/polkit-1/rules.d/10-geminux.rules"):
|
||||
if not os.path.lexists(os.path.join(rootfs, req_rel)):
|
||||
raise SystemExit(f"FAIL: missing required path {os.path.join(rootfs, req_rel)}")
|
||||
if os.path.lexists(os.path.join(rootfs, "usr/lib/geminux-mpv")):
|
||||
raise SystemExit("FAIL: legacy /usr/lib/geminux-mpv still exists in rootfs")
|
||||
if not any(os.path.lexists(os.path.join(rootfs, p)) for p in ("sbin/cryptsetup", "usr/sbin/cryptsetup")):
|
||||
raise SystemExit(f"FAIL: missing cryptsetup binary in {rootfs}")
|
||||
if os.path.lexists(os.path.join(rootfs, "etc/runlevels/sysinit/hwdrivers")):
|
||||
@@ -513,7 +531,7 @@ if readelf -Ws "$ROOTFS_DIR/usr/bin/Xorg" | grep -q systemd_logind_take_fd; then
|
||||
fi
|
||||
(cd "$IMAGES_DIR" && sha256sum -c SHA256SUMS)
|
||||
|
||||
echo "[8/8] Running all 8 Python unit/verification suites..."
|
||||
echo "[8/8] Running all 9 Python unit/verification suites..."
|
||||
python3 "$BASE_DIR/scripts/test-flash-mtk-gpt.py"
|
||||
python3 "$BASE_DIR/scripts/test-xkb-keymap.py"
|
||||
python3 "$BASE_DIR/scripts/test-theme-dunst-sync.py"
|
||||
|
||||
Reference in new issue
Block a user