diff --git a/contrib/build-linux/appimage/build.sh b/contrib/build-linux/appimage/build.sh index a8f5631e2..1147b9218 100755 --- a/contrib/build-linux/appimage/build.sh +++ b/contrib/build-linux/appimage/build.sh @@ -14,6 +14,7 @@ CACHEDIR="$CONTRIB_APPIMAGE/.cache/appimage" PYTHON_VERSION=3.6.8 PKG2APPIMAGE_COMMIT="eb8f3acdd9f11ab19b78f5cb15daa772367daf15" LIBSECP_VERSION="b408c6a8b287003d1ade5709e6f7bc3c7f1d5be7" +SQUASHFSKIT_COMMIT="ae0d656efa2d0df2fcac795b6823b44462f19386" VERSION=`git describe --tags --dirty --always` @@ -55,6 +56,16 @@ tar xf "$CACHEDIR/Python-$PYTHON_VERSION.tar.xz" -C "$BUILDDIR" ) +info "Building squashfskit" +git clone "https://github.com/squashfskit/squashfskit.git" "$BUILDDIR/squashfskit" +( + cd "$BUILDDIR/squashfskit" + git checkout "$SQUASHFSKIT_COMMIT" + make -C squashfs-tools mksquashfs +) +MKSQUASHFS="$BUILDDIR/squashfskit/squashfs-tools/mksquashfs" + + info "building libsecp256k1." ( git clone https://github.com/bitcoin-core/secp256k1 "$CACHEDIR"/secp256k1 \ @@ -203,7 +214,14 @@ info "creating the AppImage." cd "$BUILDDIR" chmod +x "$CACHEDIR/appimagetool" "$CACHEDIR/appimagetool" --appimage-extract - env VERSION="$VERSION" ARCH=x86_64 ./squashfs-root/AppRun --no-appstream --verbose "$APPDIR" "$APPIMAGE" + # 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 +#!/bin/sh +args=\$(echo "\$@" | sed -e 's/-mkfs-fixed-time 0//') +"$MKSQUASHFS" \$args +EOF + env VERSION="$VERSION" ARCH=x86_64 SOURCE_DATE_EPOCH=1530212462 ./squashfs-root/AppRun --no-appstream --verbose "$APPDIR" "$APPIMAGE" )