Skip to content

Build the release on the platforms it is for - #8

Merged
jimbotonic merged 5 commits into
mainfrom
ci/release-matrix-multiplatform
Aug 23, 2026
Merged

jimbotonic merged 5 commits into
mainfrom
ci/release-matrix-multiplatform

Conversation

@jimbotonic

Copy link
Copy Markdown
Contributor

Three things, found while giving BackRidge a way to ship for macOS and Windows.

The release matrix was Linux only, and its packaging step assumed it:
ln -s, sha256sum, no .exe, and a systemd unit copied into every bundle.
It now builds all five targets and packages under shell: bash everywhere —
GitHub's Windows image ships Git Bash, and one script that works on every
target beats three that drift. The fvn symlink is Unix only (creating one on
Windows needs a privilege the runner lacks, and a copy would be a megabyte
pretending to be an alias), the systemd unit ships only with Linux, and
checksums use whichever of sha256sum/shasum the runner has.

A dispatch no longer publishes a release. workflow_dispatch exists to
prove the matrix builds; attaching that to a GitHub release would publish
something nobody asked to publish, named after a branch. The release job is
now gated on startsWith(github.ref, 'refs/tags/').

--dest-root repeats. A machine legitimately exposes several trees, and
one root can only cover them by being their common ancestor — often /.
Confinement that has to widen to / to be usable is not confinement. A
destination must fall under one of the roots given; escapes are still escapes,
and a path under none of them is refused with all of them named.

The TCP fallback keeps the first root only: it predates this, carries no
manifest, and is disabled whenever peer authentication or grants are required.

644 tests pass, including three new ones for multi-root confinement.

jimbotonic and others added 5 commits August 23, 2026 02:34
`--dest-root` took one directory. A machine legitimately exposes more than
one tree — media on one volume, archives on another — and a single root can
only cover both by being their common ancestor, which for /srv/archive and
/mnt/media is `/`. Confinement that has to widen to `/` to be usable is not
confinement, so operators either give up the second tree or give up the
protection.

Found from the other side: BackRidge agents declare several roots, and a
transfer to the second one was refused by the daemon with "escapes the
configured --dest-root" — the last lock doing its job, and a configuration
that could not be expressed.

The flag repeats now, and a destination must fall under one of the roots
given. Escapes are still escapes: `..` cannot climb out of one root, and a
path under none of them is refused with all of them named, because "escapes
the configured root" is unhelpful when there are three and the reader cannot
see which one they missed.

The TCP fallback keeps the first root only. It predates this, carries no
manifest, and is disabled outright whenever peer authentication or grants
are required — which is every deployment that would have several roots.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011X32VXT8sZmacjuiGwXG7R
Signed-off-by: Jimmy <jimbotonic@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011X32VXT8sZmacjuiGwXG7R
Signed-off-by: Jimmy <jimbotonic@users.noreply.github.com>
The matrix was Linux only, and the packaging step assumed it: `ln -s`,
`sha256sum`, no `.exe`, and a systemd unit copied into every bundle.

macOS and Windows are added as their own runners rather than as
cross-compilation targets, because cross-compiling this does not work: `ring`
and `blake3` build C and assembly, so each target needs a C toolchain for
*that* target. A Linux host hands them its own `cc`, which does not
understand `-mmacosx-version-min` or `/arch:AVX512`. Finding that out at
release time is expensive; the matrix is where it belongs.

Packaging runs under `shell: bash` everywhere, Windows included — GitHub's
Windows image ships Git Bash, and one script that works on all five targets
is worth more than three that drift. The `.exe` suffix is derived from the
target. The `fvn` symlink is Unix only: creating one on Windows needs a
privilege the runner does not have, and a copy would be a second megabyte
pretending to be an alias. The systemd unit ships only with Linux, because
shipping it elsewhere is a small lie about what that platform's install looks
like. Checksums use whichever of `sha256sum` and `shasum` the runner has —
neither platform has both.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011X32VXT8sZmacjuiGwXG7R
Signed-off-by: Jimmy <jimbotonic@users.noreply.github.com>
workflow_dispatch exists to find out whether five targets across three
operating systems actually build — the first run of any of them is the one
that finds the packaging assumption nobody noticed. Attaching that to a
GitHub release would publish something nobody asked to publish, named after
a branch. A dispatch now leaves its artefacts on the run and nothing else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011X32VXT8sZmacjuiGwXG7R
Signed-off-by: Jimmy <jimbotonic@users.noreply.github.com>
I wrote macos-13 into the release matrix. favonius.yml already records why
that is wrong: GitHub retired it on 2025-12-04, and a job naming a label
that no longer resolves does not fail — it queues indefinitely and reports
nothing, which is how three genuine failures once sat unnoticed for fourteen
hours. macos-latest has the same problem more slowly: it moves under you.

The release matrix now uses the labels the cross-platform job already
proves: windows-latest, macos-14, macos-15-intel.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011X32VXT8sZmacjuiGwXG7R
Signed-off-by: Jimmy <jimbotonic@users.noreply.github.com>
@jimbotonic
jimbotonic force-pushed the ci/release-matrix-multiplatform branch from 58dc18e to 9b6be7e Compare August 23, 2026 00:34
@jimbotonic
jimbotonic merged commit 586f0de into main Aug 23, 2026
7 checks passed
@jimbotonic
jimbotonic deleted the ci/release-matrix-multiplatform branch August 23, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant