From 43adf21548c290dbfa24e6c862cf8e9b65935653 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Mon, 3 Nov 2025 22:58:08 -0500 Subject: [PATCH] =?UTF-8?q?Arch(dev):=20AGS=20wrapper=20hardening=20?= =?UTF-8?q?=E2=80=94=20cd=20$HOME,=20proper=20--,=20GI=20paths,=20ensure?= =?UTF-8?q?=20ESM=20perms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Wrapper now cds to $HOME, forwards args via "--" to avoid gjs parsing, expands GI_TYPELIB_PATH (incl. /usr/lib64/ags:/usr/lib/ags), and sets LD_LIBRARY_PATH for /usr/local libs. - Ensure ESM entry com.github.Aylur.ags is 0644 under /usr/local/share and /usr/share. Aligns Arch installer with Fedora fix; resolves "unknown option" and read-permission issues for `ags -t overview`. --- install-scripts/ags.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index 345cd99..a5dea81 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -109,12 +109,16 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then sudo tee /usr/local/bin/ags >/dev/null </dev/null || true # Ensure GI typelibs and native libs are discoverable before gjs ESM loads -export GI_TYPELIB_PATH="/usr/local/lib64/girepository-1.0:/usr/local/lib/girepository-1.0:/usr/lib64/girepository-1.0:/usr/lib/girepository-1.0:/usr/local/lib64:/usr/local/lib:/usr/lib64/ags:/usr/lib/ags:${GI_TYPELIB_PATH:-}" -export LD_LIBRARY_PATH="/usr/local/lib64:/usr/local/lib:${LD_LIBRARY_PATH:-}" -exec /usr/bin/gjs -m "$MAIN_JS" "$@" +export GI_TYPELIB_PATH="/usr/local/lib64:/usr/local/lib:/usr/local/lib64/girepository-1.0:/usr/local/lib/girepository-1.0:/usr/lib64/girepository-1.0:/usr/lib/girepository-1.0:/usr/lib64/ags:/usr/lib/ags:${GI_TYPELIB_PATH-}" +export LD_LIBRARY_PATH="/usr/local/lib64:/usr/local/lib:${LD_LIBRARY_PATH-}" +exec /usr/bin/gjs -m "$MAIN_JS" -- "$@" WRAP sudo chmod 0755 /usr/local/bin/ags + # Ensure ESM entry is readable by gjs + sudo chmod 0644 /usr/local/share/com.github.Aylur.ags/com.github.Aylur.ags 2>/dev/null || true + sudo chmod 0644 /usr/share/com.github.Aylur.ags/com.github.Aylur.ags 2>/dev/null || true printf "${OK} AGS wrapper installed at /usr/local/bin/ags\n" else printf "${WARN} Launcher not found at $LAUNCHER, skipping patch.\n"