Skip to content

Commit

Permalink
appimage build: build was failing on some host systems
Browse files Browse the repository at this point in the history
On Ubuntu host, build succeeded; but e.g. on Manjaro host, it failed with:
```
./build.sh: line 233: /opt/electrum/contrib/build-linux/appimage/../../../contrib/build-linux/appimage/.cache/appimage/appimagetool: No such file or directory
```

This seems to be caused by applications like `AppImageLauncher`
registering the AppImage magic bytes with `binfmt_misc` leaking into
the Docker container.

See also: AppImageCommunity/pkg2appimage#373
  • Loading branch information
SomberNight authored and EchterAgo committed Mar 4, 2021
1 parent 04abfd7 commit 826eda3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions contrib/build-linux/appimage/_build.sh
Expand Up @@ -206,8 +206,11 @@ find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
info "Creating the AppImage"
(
cd "$BUILDDIR"
chmod +x "$CACHEDIR/appimagetool"
"$CACHEDIR/appimagetool" --appimage-extract
cp "$CACHEDIR/appimagetool" "$CACHEDIR/appimagetool_copy"
# zero out "appimage" magic bytes, as on some systems they confuse the linker
sed -i 's|AI\x02|\x00\x00\x00|' "$CACHEDIR/appimagetool_copy"
chmod +x "$CACHEDIR/appimagetool_copy"
"$CACHEDIR/appimagetool_copy" --appimage-extract
# We build a small wrapper for mksquashfs that removes the -mkfs-fixed-time option
# that mksquashfs from squashfskit does not support. It is not needed for squashfskit.
cat > ./squashfs-root/usr/lib/appimagekit/mksquashfs << EOF
Expand Down

0 comments on commit 826eda3

Please sign in to comment.