From 2ece558fd5291ac66d4ed284589206430f32d193 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Mon, 2 Nov 2026 11:14:31 -0800 Subject: [PATCH] ci: check only file modes after the AppImage repack --appimage-extract creates every directory 0700 regardless of the modes stored in the image (verified by packing a 0755 AppDir and extracting it under umask 022), so the post-repack guard failed on a correct image. Check files, which extract with their stored modes. Co-Authored-By: Claude Opus 5.5 --- scripts/finalize-appimage.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/finalize-appimage.sh b/scripts/finalize-appimage.sh index c7c3385..ed4e41d 100755 --- a/scripts/finalize-appimage.sh +++ b/scripts/finalize-appimage.sh @@ -281,11 +281,13 @@ if [ "$demoted" = true ]; then fi [ -x "$out/usr/bin/triple-c" ] || fail "no executable usr/bin/triple-c." -# Every entry readable by all, every directory and program executable by all — -# what the `chmod -R a+rX` before the repack promised. A 0700 root here is an -# image other users of the machine cannot start. -unreadable="$(find "$out" ! -type l \( ! -perm -a+r -o \( -type d ! -perm -a+x \) \ - -o \( -type f -perm /111 ! -perm -a+x \) \) -print -quit)" +# Every file readable by all, every program executable by all — what the +# `chmod -R a+rX` before the repack promised (AppRun.wrapped used to ship 0770). +# Files only: the AppImage runtime's --appimage-extract creates every +# *directory* 0700 whatever the image stores (verified by packing a 0755 +# AppDir and extracting it under umask 022), so directory modes cannot be +# checked from an extraction. appimagetool's own check covers them pre-pack. +unreadable="$(find "$out" -type f \( ! -perm -a+r -o \( -perm /111 ! -perm -a+x \) \) -print -quit)" [ -z "$unreadable" ] || fail "${unreadable#"$out"/} is not readable/executable by all users." # An empty Categories or missing metadata ships an image a manager cannot file