feat(build): mirror biber for all platforms + prefer musl (fixes libnsl crash)#3
Merged
Merged
Conversation
The biber-binaries mirror release only held the glibc Linux x86_64 builds. The glibc binary dynamically links libnsl.so.1 (and friends), which are absent on many minimal/modern systems, so the build crashed with "error while loading shared libraries: libnsl.so.1". Mirror the remaining upstream architectures for biber 2.11-2.19 and make the downloader pick the right one: - Upload to the biber-binaries release (and pin SHA256 for each): Linux x86_64 musl (static, no shared-lib deps), Linux aarch64, macOS x86_64 and universal (arm64-native), Windows x86_64. SHA256SUMS regenerated. - Replace _biber_sf_path/_mirror_asset with _biber_candidates(version), returning ordered (sf_dir, sf_file, mirror_asset) tuples. On Linux x86_64 the static musl build is preferred, with glibc as a fallback; on macOS the universal build is preferred, then x86_64. Candidates a given version never shipped simply 404 and the loop moves on. - _biber_sources flattens candidates to mirror-then-SourceForge URLs, each carrying its pinned checksum. - Extract from .zip as well as .tar.gz (Windows ships biber.exe in a zip); pick the largest biber* member so musl tarballs that name the binary after the archive (biber-linux_x86_64-musl) and AppleDouble ._biber sidecars are handled. Cache as biber.exe on Windows. Tested extraction against every downloaded archive (ELF/Mach-O/PE all resolve). New unit tests for candidate ordering, source flattening, and archive extraction. ruff + mypy --strict clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
biber-binariesmirror only held glibc Linux x86_64 builds. That binary dynamically linkslibnsl.so.1, missing on many minimal/modern systems → builds crashed withbiber: error while loading shared libraries: libnsl.so.1.Change
Mirror (release
biber-binaries) — uploaded for biber 2.11–2.19 (where upstream published them) and pinned SHA256 for each:linux_x86_64-musl(static, no shared-lib deps)linux_aarch64(2.19)darwin_x86_64,darwin_universal(arm64-native, 2.17+)MSWIN64.zipSHA256SUMSregenerated (39 entries).Downloader (
tectonic.py):_biber_sf_path/_mirror_asset→_biber_candidates(version): ordered(sf_dir, sf_file, mirror_asset). Linux x86_64 prefers musl then glibc; macOS prefers universal then x86_64. Versions that never shipped a given arch 404 and fall through._biber_sourcesflattens candidates to mirror-then-SourceForge, each with its pinned checksum..zip(Windowsbiber.exe) as well as.tar.gz; picks the largestbiber*member so odd musl names (biber-linux_x86_64-musl) and AppleDouble._bibersidecars resolve. Caches asbiber.exeon Windows.Verification
ruff+ruff formatclean;mypy --strictclean ontectonic.py.🤖 Generated with Claude Code