mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
AppImage: Make build reproducible
We build our own mksquashfs from squashfskit which supports generating reproducible squashfs images. We use a small wrapper script to remove the -mkfs-fixed-time which appimagekit passes but squashfskits mksquashfs does not support. ----- taken from Electron-Cash/Electron-Cash@dd1f106f4f see AppImage/AppImageKit#929
This commit is contained in:
parent
fd5d1dab4f
commit
ae714772c3
1 changed files with 19 additions and 1 deletions
|
@ -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"
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue