Skip to content

Don't overwrite AppImage magic hex#112

Open
jkaczman wants to merge 1 commit into
mainfrom
fix/appimage-magic-numbers
Open

Don't overwrite AppImage magic hex#112
jkaczman wants to merge 1 commit into
mainfrom
fix/appimage-magic-numbers

Conversation

@jkaczman

@jkaczman jkaczman commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

The deterministic AppImage Deploy Tool build created by the reproducible build release script has an incorrect header that does not conform to the AppImage Specification Type 2 image format. The magic hex needs to match what they've outlined in that specification (and discussed in the below GitHub issue).

Screenshot 2026-06-02 at 4 38 06 PM

The way we emit a deterministic AppImage is via a normal build, and then taking it apart and re-building it back together to be deterministic (introduced in e1c6921). However, when we were putting it back together, we were overwriting the magic hex that's meant to be in the header with the size of the runtime. Since libappimage is capable of knowing the size of the runtime without us explicitly saying so (as seen below), this is unnecessary and a bug. Removing the overwrite fixes the issue, and correctly maintains the proper magic hex.

Screenshot 2026-06-02 at 4 37 36 PM Screenshot 2026-06-02 at 4 37 46 PM

(https://github.com/AppImage/AppImageKit/blob/master/src/runtime.c, https://github.com/AppImageCommunity/libappimage/blob/f8f106b42911aea53e3fa1618e9198b1bbd3bfc9/src/libappimage/utils/ElfFile.h#L16)

fixes #111

@jkaczman jkaczman requested a review from arrdalan June 2, 2026 20:46
@jkaczman jkaczman changed the title fix(releases): don't overwrite AppImage magic hex Don't overwrite AppImage magic hex Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Appimage has non standard header

1 participant