fix(build): unpack the Linux builder where binfmt_misc hands AppImages to appimage-run (#66) #67
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!67
Loading…
Reference in a new issue
No description provided.
Delete branch "mrdev023/LongshotLauncher:fix/66-appimage-binfmt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On NixOS with
programs.appimage.binfmt(and with AppImageLauncher), step 1 never finishes: the builder's AppImage "could not be unpacked (137)". Fixes #66.The kernel's binfmt_misc hands any file carrying AppImage's magic (
AI\x02at offset 8) toappimage-run, which unpacks the builder into its own cache and runs itsAppRun --appimage-extract: the builder starts (its "no window of its own" dialog) and nosquashfs-rootis made.Toolchains.HasAppImageBinfmtreads/proc/sys/fs/binfmt_misc: an enabled handler whose magic ends with414902(NixOS's at offset 0, AppImageLauncher's at offset 8). None where the folder is missing or unreadable.ClearAppImageMagiczeroes those 3 bytes of the checked download before its--appimage-extract, so the kernel runs the AppImage's own runtime, which unpacks it in place. Elsewhere nothing changes.Tested:
python -I tests/test_launcher_core.py: 964 checks passed (5 new: no handler, a disabled one, NixOS's, one at offset 8, the magic cleared and nothing else)python -I tests/test_release.py: 28 tests OKprograms.appimage.binfmt = true: an AppImage made withscripts/package.shfrom this branch installs the Nightly 143 builder, where the current nightly fails as in #66Not covered: a handler whose
maskmakes it take AppImages without its magic ending with414902.AI Note:
programs.appimage.binfmt = true;On NixOS with programs.appimage.binfmt (and with AppImageLauncher), the kernel hands any file carrying AppImage's magic to appimage-run, which unpacks the builder into its own cache and runs its AppRun with --appimage-extract: the builder starts, shows its "no window" dialog and exits, and no squashfs-root is made ("could not be unpacked (137)"). When an enabled binfmt_misc handler takes type 2 AppImages, the checked download's magic is cleared before its --appimage-extract runs, so the kernel runs the AppImage's own runtime, which unpacks it in place. Co-Authored-By: Claude Opus 5.5 <<EMAIL_ADDRESS>>Anarkkie referenced this pull request2026-11-14 20:51:48 +00:00