Build audit

How ljh-sh/wdiff is built, what each target produces, and how to verify a release.

5-target build matrix

targetrunnertoolchainlinkage
x86_64-linux-muslubuntu-latest + Alpine 3.20 dockeralpine gcc + muslfully static
aarch64-linux-muslubuntu-24.04-arm + Alpine 3.20 dockeralpine gcc + muslfully static
aarch64-macosmacos-14Apple clangstatic, system libc/libSystem
x86_64-macosmacos-14Apple clang (-arch x86_64)static, system libc/libSystem
x86_64-windowswindows-latest + MSYS2 + mingw64x86_64-w64-mingw32-gccfully static (no DLLs)

The matrix is split into two workflows (per the ljh-sh dist regime):

What scripts/build.sh does

  1. autoreconf -if --force on upstream/wdiff/ and upstream/diffutils/. The --force flag is needed because the upstream 1.2.2 tarball ships pre-generated po/ files that autopoint would otherwise refuse to overwrite.
  2. Sub-build 1: diffutils — out-of-tree configure with --disable-shared --enable-static, then make. Produces build/diffutils/src/diff.
  3. Sub-build 2: wdiff — out-of-tree configure with DIFF_PROGRAM=$abs_path_to_diff baked in (via the diff_cv_prog_diff_program cache variable), then make. Produces build/wdiff/src/wdiff.

Both sub-builds are out-of-tree: nothing under upstream/ is mutated. This lets musl-Alpine and host-glibc builds share the same source tree without fighting over Makefile state.

Reproducibility

The build is not bit-for-bit reproducible across machines (yet) because:

A user who runs bash scripts/build.sh on the same OS with the same toolchain version will get a functionally-identical binary but with different bytes. Bit-for-bit reproducibility is a future v0.2.0 goal, tracked under the OpenSSF Scorecard "reproducible-builds" check.

Verifying a release

Each GitHub Release ships:

To verify the Linux x86_64 musl binary:

curl -L -O https://github.com/ljh-sh/wdiff/releases/latest/download/wdiff-x86_64-linux-musl.tar.gz
curl -L -O https://github.com/ljh-sh/wdiff/releases/latest/download/wdiff-x86_64-linux-musl.tar.gz.sha256
sha256sum -c wdiff-x86_64-linux-musl.tar.gz.sha256

To verify all 5 archives against the top-level SHA256SUMS:

curl -L -O https://github.com/ljh-sh/wdiff/releases/latest/download/SHA256SUMS
for f in wdiff-*.tar.gz wdiff-*.zip; do sha256sum -c <(grep "  $f$" SHA256SUMS); done