build: document Go+Rust build-host toolchains + toolchain-aware preflight
Go (builds the zot agent) and Rust (builds the Colibri release binaries) are required on the build host to produce the binaries build.sh stages, but were undocumented. Add them to REQUIREMENTS.md (build-host only, not the image), and make the binary-missing preflights note when the matching toolchain (go/cargo) isn't installed so that case surfaces up front instead of later. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
3cd60aa170
commit
579a8ccd74
2 changed files with 11 additions and 1 deletions
|
|
@ -33,9 +33,15 @@ Before booting/testing:
|
||||||
Install the baseline tools:
|
Install the baseline tools:
|
||||||
|
|
||||||
```sh
|
```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:
|
`build.sh` sets its own FreeBSD tool PATH:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
|
|
|
||||||
4
build.sh
4
build.sh
|
|
@ -340,6 +340,8 @@ preflight_colibri_artifacts() {
|
||||||
for _colibri_bin in colibri-daemon colibri colibri-smoke-agent colibri-mcp; do
|
for _colibri_bin in colibri-daemon colibri colibri-smoke-agent colibri-mcp; do
|
||||||
if [ ! -x "${_resolved_colibri_artifact_dir}/${_colibri_bin}" ]; then
|
if [ ! -x "${_resolved_colibri_artifact_dir}/${_colibri_bin}" ]; then
|
||||||
echo "ERROR: Colibri release binary missing: ${_resolved_colibri_artifact_dir}/${_colibri_bin}"
|
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 " Build first: (cd ${_resolved_colibri_repo} && cargo build --workspace --release)"
|
||||||
echo " Or set FEATURE_COLIBRI=NO to skip Colibri staging."
|
echo " Or set FEATURE_COLIBRI=NO to skip Colibri staging."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -372,6 +374,8 @@ preflight_zot_artifacts() {
|
||||||
resolve_zot_paths
|
resolve_zot_paths
|
||||||
if [ ! -x "${_resolved_zot_artifact_dir}/zot" ]; then
|
if [ ! -x "${_resolved_zot_artifact_dir}/zot" ]; then
|
||||||
echo "ERROR: Colibri agent binary missing: ${_resolved_zot_artifact_dir}/zot"
|
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 " The agent has no FreeBSD release — build it first:"
|
||||||
echo " (cd ${_resolved_zot_repo} && git checkout ${ZOT_VERSION:-v0.2.29} && \\"
|
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)"
|
echo " GOOS=freebsd GOARCH=amd64 go build -trimpath -o bin/zot ./cmd/zot)"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue