Repository navigation
Conversation
fxrdhan
force-pushed
the
feat/freebsd-release-binary
branch
from
December 1, 2026 21:37
30d9777 to
6c9be4d
Compare
GitHub has no FreeBSD runner, and a FreeBSD virtual machine on one runs ARM64 emulated, too slow to build in. So the release workflow builds x86_64-unknown-freebsd and aarch64-unknown-freebsd on ubuntu-latest like any other target, after a new composite action, .github/actions/freebsd-sysroot, points cargo and the cc crate at clang and lld with FreeBSD 14.0's base system as the sysroot. 14.0 is the first release of the oldest major release still supported; its base.txz is fetched from the FreeBSD archive, which alone still serves it and slowly (200 MB took 41 minutes on one run), so it is cached under the checksum its MANIFEST gives and checked against it each run. Each binary then runs in a FreeBSD virtual machine (vmactions/freebsd-vm, the workspace mounted over NFS): --version on FreeBSD 14 before a release, and in CI's Release Build on FreeBSD 15 a long listing of the checkout with xattrs, flags and Git, a tree and JSON. That build is also the one place the FreeBSD code paths are held to no warnings. The binstall metadata needs no change: the default tgz format and URL template cover both archives, which the binstall tests read from the release matrix. Upstream: eza-community#1999 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The installer refused FreeBSD as an unknown system. It now asks the release for the <arch>-unknown-freebsd archive, on amd64 and arm64 as uname -m names them there. NetBSD stands in as the unknown system in the refusal test. INSTALL.md says the script needs bash and curl from pkg there, neither being in FreeBSD's base system. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
binstall_metadata reads the release workflow's matrix of targets, and install_script runs packaging/install.sh and checks INSTALL.md lists the archive it takes. Release Build cross-compiles FreeBSD with the action under .github/actions. A pull request that touched only those files skipped the jobs that check them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fxrdhan
force-pushed
the
feat/freebsd-release-binary
branch
from
December 1, 2026 22:26
6c9be4d to
827dfb8
Compare
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.
Summary
Releases had no FreeBSD binary, and
packaging/install.shrefused FreeBSD outright. This addsx86_64-unknown-freebsdandaarch64-unknown-freebsd.Build: GitHub has no FreeBSD runner. On its runners a FreeBSD VM runs ARM64 emulated, which is too slow to compile in. So both targets are cross-compiled on
ubuntu-latestlike any other target. A new composite action,.github/actions/freebsd-sysroot, sets this up:base.txzfrom archive.freebsd.org and checks it against the SHA-256 in that release's MANIFEST;lib,usr/libandusr/includeas the sysroot;CC_<target>,AR_<target>andCARGO_TARGET_<TARGET>_LINKERat one clang driver script. It is a script rather than RUSTFLAGS because CI's ownRUSTFLAGSwould replace those.The archive is the only place that still serves 14.0, and it is slow from GitHub's runners. In the first run of this PR the 200 MB download took 41 min for x86_64 and 11 min for ARM64. The build itself took about 70s and each VM run 1–1.5 min, the emulated ARM64 one included. So the verified
base.txzis now kept inactions/cache, keyed by its checksum, and fetched only on a cache miss.14.0 is the first release of the oldest major release still supported (14 and 15, per freebsd.org/security). zlib is linked from FreeBSD's base system; libgit2 is built from source, as on every other target.
Run: each FreeBSD binary then runs in a FreeBSD VM (
vmactions/freebsd-vmv1.6.0, the workspace mounted over NFS):--versionon FreeBSD 14;-la@O --git --group,--tree --level=2and--json --longon FreeBSD 15.Between them, both supported major releases run the binaries. CI's build is also the only one that compiles the FreeBSD code paths with
--deny warnings.Installer: FreeBSD now maps to
unknown-freebsdand downloads the archive foramd64orarm64. INSTALL.md notes that bash and curl have to come frompkg.cargo-binstall: no change needed. The default
tgzformat and URL template cover both archives, andbinstall_metadatareads the release matrix, so it checks both new rows.CI path filter (separate commit): the suite and Release Build now also run when only
release.yml,packaging/**,INSTALL.mdor.github/actions/**change.An earlier push of this PR built x86_64 natively inside a FreeBSD 14.5 VM: 1m55s to compile, then the same smoke run passed. That approach is replaced by the cross build above, so both targets are built the same way and link against the same FreeBSD release.
Type of Change
Related Issues & Upstream References
How Has This Been Tested?
cargo nextest run --test platform_tests -E 'test(binstall) | test(install_script)'(11 passed). The FreeBSD installer tests fail with theinstall.shchange reverted. Also rancargo clippy --test platform_tests -- -D warnings,cargo fmt --check,actionlintandyamlfmt -linton the workflows and the action, andshellcheckoninstall.shand the action's script.Contributor Checklist
dev(unless this is a release PR targetingmain)cargo clippy --all-targetspasses with no warnings (ran onplatform_testsonly; CI covers the rest)cargo nextest run(orcargo test) passes (ran the platform suites only; CI covers the rest)cargo fmt --check/nix fmtpasses🤖 Generated with Claude Code