Skip to content

About

Statically linked squashfuse compiled with musl and glibc

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

squashfuse-static

Statically linked squashfuse 0.6.5 binaries. The release matrix produces musl + mimalloc outputs; the existing direct Ubuntu path remains available for local glibc outputs. Both squashfuse and squashfuse_ll are built.

Build locally

Prerequisites:

  • Linux and Docker Engine with docker run --platform support.
  • Internet access for pinned OCI images, Git repositories, and the ppc64 cross-toolchain archive.
  • Registered QEMU/binfmt handlers for non-native OCI platforms.
  • Host readelf (binutils) and the matching qemu-*-static executable for validation and foreign smoke tests.
  • For the optional real x86_64 mount smoke: a usable /dev/fuse, mksquashfs, fusermount3, and mountpoint.
git clone https://github.com/VHSgunzo/squashfuse-static.git
cd squashfuse-static
./scripts/build-matrix.sh x86_64
./scripts/build-matrix.sh aarch64
./scripts/build-matrix.sh riscv64
./scripts/build-matrix.sh loongarch64
./scripts/build-matrix.sh ppc64
./scripts/build-matrix.sh ppc64le
# Or build all six sequentially:
./scripts/build-matrix.sh all

The matrix mapping is exact:

ARCH OCI platform Build mode
x86_64 linux/amd64 native container
aarch64 linux/arm64 QEMU/native container
riscv64 linux/riscv64 QEMU/native container
loongarch64 linux/loong64 pinned LoongArch Alpine image
ppc64 linux/amd64 genuine powerpc64-linux-musl cross-toolchain
ppc64le linux/ppc64le QEMU/native container

Each selected musl target builds and validates both outputs under its target work directory before publishing them as a pair. Every binary is explicit static PIE (ET_DYN), has no interpreter or dynamic dependencies, and is processed by pinned sstrip while still staged so it publishes with zero section headers. Pair publication stages adjacent temporary files, backs up any previous pair, and rolls back the first rename if the second rename or a signal interrupts the transaction. A failed or interrupted musl target build leaves its previously published pair unchanged; obsolete -upx files are removed only after the normal pair is replaced successfully. Every other target's outputs are preserved:

release/squashfuse-musl-mimalloc-ARCH
release/squashfuse_ll-musl-mimalloc-ARCH

The musl build uses a target-isolated prefix under build/sysroot/ARCH; target pkg-config lookup does not include host /usr/lib. Squashfuse receives mimalloc through normal final -lmimalloc linkage (LIBS), never --whole-archive; verbose final links and an allocator-specific binary marker are both verified. The ppc64 build compiles mimalloc through a CMake toolchain, libfuse through a Meson cross file, all compression libraries with target tools, and squashfuse with distinct Autotools --build and --host triplets. ppc64 is big-endian and is validated separately from little-endian ppc64le.

Same-target musl builds are serialized by a per-target lock in release/; different targets can proceed independently. Each canonical lock is atomically hard-linked from an adjacent private file that already contains its owner, so observers never see an empty lock. Normal exits and handled signals remove the canonical lock and private file. If the process is killed without running traps, remove a stale lock only after confirming that no build for that target is still running.

Direct build.sh use defaults TARGET_ARCH to uname -m. On Alpine it creates the musl + mimalloc pair. On Ubuntu/Debian it dispatches to the retained local glibc build behavior; glibc outputs are not part of CI or aggregate releases.

Pinned musl matrix inputs

Dependency Logical version Exact commit
squashfuse 0.6.5 b3a880aacc63641c570f114ff8d45f221fc97d02
mimalloc 2.1.7 8c532c32c3c96e5ba1f2283e032f69ead8add00f
libfuse 3.18.3 3dbcfce64ba0dd529cec7b94305662e7901a991b
XZ 5.8.4 d3e650e63c110e830fd5391e7f8b45df0b91d3da
LZO upstream no-tag revision 0083878c235a89ef96a009d1ff0b500f3a364e4b
zlib 1.4 99623ef7097352da7993ba614161fd6a311e046e
LZ4 1.11.1 aa4647fad575d01a874aaaadcdbe8e6a40e072f5
Zstandard 1.5.7 d9c0c7e2cf8a8bf9fb98d3bee546dcf8dc9ac59a
super-strip master after 3.0a 9c57e288d8b2e0f90c9a15a4223331d1e7b43515

These pinning and reproducibility qualifications apply to the musl matrix only; the delegated direct glibc path remains outside this guarantee. Musl source checkout is detached and verifies exact HEAD. Normal targets use the Alpine 3.24.1 multiarch index pinned as docker.io/library/alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b, matching the current legacy alpine:latest behavior without allowing the image to drift. OCI images, GitHub Actions, the QEMU binfmt image, and the ppc64 toolchain archive/checksum are pinned. Alpine package repository contents and toolchain package revisions are not frozen: apk add resolves live repository state. The musl builds therefore are not guaranteed to be byte-identical across time.

UPX is not used or required. The pinned super-strip source is compiled with the build-host compiler and required for every staged musl output.

Verify

for test in tests/*.sh; do sh "$test"; done
./scripts/validate-artifacts.sh ARCH
./scripts/smoke-test.sh ARCH

Validation requires a nonzero executable ELF64 static PIE (ET_DYN) with the exact machine and endianness, zero section headers after sstrip, mimalloc evidence, and neither PT_INTERP nor DT_NEEDED. The smoke test executes each binary natively or under the matching QEMU, requires the exact squashfuse 0.6.5 identity line, and recognizes squashfuse's documented nonzero usage exits (254 and 2). Foreign tests are version/parser checks; they never claim a FUSE mount passed. On native x86_64, a real read-through mount is attempted for both binaries only when /dev/fuse and all host tools are available; otherwise the output explicitly reports that the mount test was skipped. Fixture tests are self-contained and are not represented as real mounts.

Release safety

Published releases are treated as immutable. An existing published release is a no-op only if it has the exact expected 12-asset manifest; a mismatch fails without mutation. A missing release is created as a verified-tag draft, all 12 assets are uploaded without clobbering historical assets, and the draft is published only after exact manifest verification.

Every create attempt places a unique ownership marker in the draft notes as part of the creation request. Failures clean up only a freshly read draft whose ID, tag, draft state, and per-attempt ownership marker all match; a competing publisher draft is never deleted. Publishing atomically clears the internal marker while changing the draft state, and the public read-back requires empty notes. Malformed metadata, ambiguous publication responses, failed state reads, or changed/public state leave the release intact for manual inspection. Release jobs are serialized by repository and tag as defense in depth, publication is tag-push-only, and only the release job receives contents: write and a GitHub token.

About

Statically linked squashfuse compiled with musl and glibc

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages