Pin zelnet to the Zig toolchain with a working xar #299

Merged
binjovi-bot merged 1 commit from fix/zelnet-zig-v10-retry into trunk 2026-09-13 17:22:41 +00:00
Owner

zig-builder:v9 got zelnet onto ARM64 and cross-compiled both Linux architectures as 0.10.13, then the macOS .pkg step failed: that image's xar prints its usage and exits 1 for every command, including xar -t.

xar.c declares char command = 0, c; and loops on (c = getopt_long(...)) != -1. A plain char is signed on x86-64 so the loop ends; it is unsigned on ARM64, where -1 lands as 255, the loop never ends, and the next pass falls to the switch default that prints usage. Upstream has not changed since 2014, so it appeared the moment the image was built for the architecture that runs it.

builder-images #355 is released as zig-builder:v10, which builds xar with -fsigned-char and proves it by creating an archive and reading it back, rather than only running xar --version on a binary that could not archive anything.

The guard now refuses anything older than v10 and names the failure each older version carries: v1 through v8 are AMD64 manifests, v9 has the broken xar.

scripts/check passes.

https://claude.ai/code/session_01XdBRc9CHgFhAxCyHbdVtt6

`zig-builder:v9` got zelnet onto ARM64 and cross-compiled both Linux architectures as `0.10.13`, then the macOS `.pkg` step failed: that image's `xar` prints its usage and exits 1 for **every** command, including `xar -t`. `xar.c` declares `char command = 0, c;` and loops on `(c = getopt_long(...)) != -1`. A plain `char` is signed on x86-64 so the loop ends; it is unsigned on ARM64, where `-1` lands as 255, the loop never ends, and the next pass falls to the switch default that prints usage. Upstream has not changed since 2014, so it appeared the moment the image was built for the architecture that runs it. builder-images #355 is released as `zig-builder:v10`, which builds `xar` with `-fsigned-char` and proves it by creating an archive and reading it back, rather than only running `xar --version` on a binary that could not archive anything. The guard now refuses anything older than v10 and names the failure each older version carries: v1 through v8 are AMD64 manifests, v9 has the broken `xar`. `scripts/check` passes. https://claude.ai/code/session_01XdBRc9CHgFhAxCyHbdVtt6
Pin zelnet to the Zig toolchain with a working xar
All checks were successful
binjovi/ci Binjovi completed the frozen plan
49d31d7e11
zig-builder v9 put zelnet on ARM64 and got both Linux architectures
packaged, then its macOS .pkg step failed: that image's xar prints its
usage and exits 1 for every command, because a plain char is unsigned on
ARM64 and xar loops on a char holding getopt_long's -1.

v10 builds xar with -fsigned-char and proves it by making an archive and
reading it back. The guard now refuses anything older than v10 and says
which failure each older version carries.

Claude-Session: https://claude.ai/code/session_01XdBRc9CHgFhAxCyHbdVtt6
binjovi-bot deleted branch fix/zelnet-zig-v10-retry 2026-09-13 17:22:41 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/binjovi-plans!299
No description provided.