Skip to content

Commit

Permalink
Workaround for fusermountN
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd committed Apr 14, 2024
1 parent 9bf80ec commit cab6184
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,27 @@ if ! command -v apk; then
exit 1
fi

# Minimize binary size
export CFLAGS="-ffunction-sections -fdata-sections -Os"

apk update
apk add alpine-sdk util-linux strace file autoconf automake libtool
apk add alpine-sdk util-linux strace file autoconf automake libtool xz

# Build static libfuse3 with patch for https://github.com/AppImage/type2-runtime/issues/10
apk add eudev-dev gettext-dev linux-headers meson # From https://git.alpinelinux.org/aports/tree/main/fuse3/APKBUILD
wget -c -q "https://github.com/libfuse/libfuse/releases/download/fuse-3.15.0/fuse-3.15.0.tar.xz"
tar xf fuse-3.*.tar.xz
cd fuse-3.*/
patch -p1 < ../patches/libfuse/mount.c.diff
mkdir build
cd build
meson setup --prefix=/usr ..
meson configure --default-library static
ninja install
cd ../../

# Build static squashfuse
apk add fuse-dev fuse-static zstd-dev zstd-static zlib-dev zlib-static # fuse3-static fuse3-dev
apk add zstd-dev zstd-static zlib-dev zlib-static # fuse-dev fuse-static fuse3-static fuse3-dev
wget -c -q "https://github.com/vasi/squashfuse/archive/e51978c.tar.gz"
tar xf e51978c.tar.gz
cd squashfuse-*/
Expand All @@ -26,10 +42,10 @@ cd -
# Build static AppImage runtime
export GIT_COMMIT=$(cat src/runtime/version)
cd src/runtime
make runtime-fuse2 -j$(nproc)
file runtime-fuse2
strip runtime-fuse2
ls -lh runtime-fuse2
make runtime-fuse3 -j$(nproc)
file runtime-fuse3
strip runtime-fuse3
ls -lh runtime-fuse3
echo -ne 'AI\x02' | dd of=runtime-fuse2 bs=1 count=3 seek=8 conv=notrunc # magic bytes, always do AFTER strip
cd -

Expand Down

0 comments on commit cab6184

Please sign in to comment.