build: document Go+Rust build-host toolchains + preflight check #48

Merged
clawdie merged 1 commit from build/document-go-rust-toolchains into main 2026-06-14 12:27:32 +02:00
2 changed files with 11 additions and 1 deletions

View file

@ -33,9 +33,15 @@ Before booting/testing:
Install the baseline tools:
```sh
sudo pkg install -y curl node24 npm-node24 sudo
sudo pkg install -y curl node24 npm-node24 sudo go rust
```
`go` and `rust` are build-host toolchains, not image packages: `go` builds the
zot agent binary and `rust` builds the Colibri release binaries. `build.sh`
stages those prebuilt binaries (it does not compile them itself) and fails
preflight if they are missing — so build them on the host first. They are not
installed onto the image.
`build.sh` sets its own FreeBSD tool PATH:
```text

View file

@ -340,6 +340,8 @@ preflight_colibri_artifacts() {
for _colibri_bin in colibri-daemon colibri colibri-smoke-agent colibri-mcp; do
if [ ! -x "${_resolved_colibri_artifact_dir}/${_colibri_bin}" ]; then
echo "ERROR: Colibri release binary missing: ${_resolved_colibri_artifact_dir}/${_colibri_bin}"
command -v cargo >/dev/null 2>&1 || \
echo " NOTE: rust toolchain not found on this host — install it: pkg install rust"
echo " Build first: (cd ${_resolved_colibri_repo} && cargo build --workspace --release)"
echo " Or set FEATURE_COLIBRI=NO to skip Colibri staging."
exit 1
@ -372,6 +374,8 @@ preflight_zot_artifacts() {
resolve_zot_paths
if [ ! -x "${_resolved_zot_artifact_dir}/zot" ]; then
echo "ERROR: Colibri agent binary missing: ${_resolved_zot_artifact_dir}/zot"
command -v go >/dev/null 2>&1 || \
echo " NOTE: go toolchain not found on this host — install it: pkg install go"
echo " The agent has no FreeBSD release — build it first:"
echo " (cd ${_resolved_zot_repo} && git checkout ${ZOT_VERSION:-v0.2.29} && \\"
echo " GOOS=freebsd GOARCH=amd64 go build -trimpath -o bin/zot ./cmd/zot)"