fix: search all 512-byte boundaries for squashfs offset in linuxdeploy AppImage
The 4096-byte-aligned scan raised StopIteration when linuxdeploy's squashfs starts at a non-page-aligned boundary. Scan every 512 bytes instead and exit cleanly with error code 1 if nothing is found. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -172,7 +172,7 @@ jobs:
|
||||
"https://github.com/tauri-apps/binary-releases/releases/download/linuxdeploy/linuxdeploy-x86_64.AppImage" \
|
||||
-O /tmp/linuxdeploy.AppImage
|
||||
|
||||
OFFSET=$(python3 -c "d=open('/tmp/linuxdeploy.AppImage','rb').read();next(print(i) for i in range(4096,len(d),4096) if d[i:i+4] in (b'hsqs',b'sqsh'))")
|
||||
OFFSET=$(python3 -c "d=open('/tmp/linuxdeploy.AppImage','rb').read();o=[i for i in range(0,len(d),512) if d[i:i+4] in (b'hsqs',b'sqsh')];print(o[0]) if o else exit(1)")
|
||||
unsquashfs -d /tmp/linuxdeploy-root -offset "$OFFSET" /tmp/linuxdeploy.AppImage
|
||||
|
||||
gcc -o ~/.cache/tauri/linuxdeploy-x86_64.AppImage tools/ld_wrapper.c
|
||||
|
||||
Reference in New Issue
Block a user