chore: drop stale duplicate stage-colibri-iso.sh (Sam & Claude)
Item 4 from the rc.d/release-gate audit. The colibri repo carried its own copy of scripts/stage-colibri-iso.sh that had drifted behind clawdie-iso's — the ISO build uses clawdie-iso's copy, and nothing in colibri executes this one, so the colibri copy was dead split-brain (a maintenance trap). Deleted it and pointed the PRIORITY-HANDOFF references at clawdie-iso as the canonical owner. Checks: ./scripts/check-format.sh. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
c1076f3379
commit
c17b1bf0f2
2 changed files with 12 additions and 126 deletions
|
|
@ -27,17 +27,17 @@ Gate 1 (passive service) is unproven.
|
|||
|
||||
### What's done (build wiring)
|
||||
|
||||
| Artifact / step | Location | Status |
|
||||
| -------------------- | ------------------------------------------------ | ---------------------------------------------------------------------------------------------- |
|
||||
| staging script | `scripts/stage-colibri-iso.sh` | done — copies `colibri-daemon`, `colibri`, `colibri-test-agent`, rc.d, newsyslog, creates dirs |
|
||||
| rc.d script | `packaging/freebsd/colibri_daemon.in` | done — `start_precmd`, pidfile, daemon(8) wrapper, `COLIBRI_COST_MODE` propagation |
|
||||
| newsyslog config | `packaging/freebsd/newsyslog-colibri.conf` | done |
|
||||
| rc.conf.sample | generated by staging script | done |
|
||||
| acceptance runbook | `docs/ISO-ACCEPTANCE-RUNBOOK.md` | done |
|
||||
| build integration | clawdie-iso `build.sh::install_colibri_service` | done — calls `stage-colibri-iso.sh` against the image root |
|
||||
| `colibri` user/group | clawdie-iso `build.sh` (`pw useradd colibri`) | done — created in the image during build |
|
||||
| service enable | clawdie-iso `build.sh` (`colibri_daemon_enable`) | done — written into image rc.conf |
|
||||
| prebuilt binaries | build-host Rust toolchain (preflight-gated) | done — `build.sh` stages prebuilt release binaries and fails preflight if missing |
|
||||
| Artifact / step | Location | Status |
|
||||
| -------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| staging script | clawdie-iso `scripts/stage-colibri-iso.sh` | done — copies `colibri-daemon`, `colibri`, `colibri-test-agent`, rc.d, newsyslog, creates dirs (canonical; lives in clawdie-iso) |
|
||||
| rc.d script | `packaging/freebsd/colibri_daemon.in` | done — `start_precmd`, pidfile, daemon(8) wrapper, `COLIBRI_COST_MODE` propagation |
|
||||
| newsyslog config | `packaging/freebsd/newsyslog-colibri.conf` | done |
|
||||
| rc.conf.sample | generated by staging script | done |
|
||||
| acceptance runbook | `docs/ISO-ACCEPTANCE-RUNBOOK.md` | done |
|
||||
| build integration | clawdie-iso `build.sh::install_colibri_service` | done — calls `stage-colibri-iso.sh` against the image root |
|
||||
| `colibri` user/group | clawdie-iso `build.sh` (`pw useradd colibri`) | done — created in the image during build |
|
||||
| service enable | clawdie-iso `build.sh` (`colibri_daemon_enable`) | done — written into image rc.conf |
|
||||
| prebuilt binaries | build-host Rust toolchain (preflight-gated) | done — `build.sh` stages prebuilt release binaries and fails preflight if missing |
|
||||
|
||||
### What's missing (boot/runtime validation)
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ Gate 1 (passive service) is unproven.
|
|||
|
||||
### Key files
|
||||
|
||||
- `scripts/stage-colibri-iso.sh` — the staging script (dir creation, bin copy, rc.d install, rc.conf.sample generation)
|
||||
- clawdie-iso `scripts/stage-colibri-iso.sh` — the staging script (dir creation, bin copy, rc.d install, rc.conf.sample generation). Canonical copy lives in clawdie-iso; the colibri repo no longer keeps a duplicate.
|
||||
- `packaging/freebsd/colibri_daemon.in` — rc.d script
|
||||
- `docs/ISO-ACCEPTANCE-RUNBOOK.md` — acceptance commands to run on the booted image
|
||||
- `docs/FREEBSD-BUILD-LANE-HANDOFF.md` — step-by-step build/boot/validate handoff for the FreeBSD agent
|
||||
|
|
|
|||
|
|
@ -1,114 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Stage Colibri FreeBSD service files into an ISO/image root.
|
||||
#
|
||||
# Usage:
|
||||
# cargo build --workspace --release
|
||||
# scripts/stage-colibri-iso.sh /path/to/image-root
|
||||
#
|
||||
# Optional env:
|
||||
# COLIBRI_STAGE_CHOWN=1 # chown service dirs to colibri:colibri (requires root)
|
||||
# COLIBRI_STAGE_INCLUDE_TUI=0 # skip colibri-tui even when built
|
||||
# COLIBRI_STAGE_ENABLE=YES # value written in rc.conf sample (default: NO)
|
||||
|
||||
set -eu
|
||||
|
||||
if [ "${1:-}" = "" ]; then
|
||||
echo "usage: $0 DESTDIR" >&2
|
||||
exit 64
|
||||
fi
|
||||
|
||||
DESTDIR=$1
|
||||
ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
||||
TARGET=${CARGO_TARGET_DIR:-"$ROOT/target"}/release
|
||||
|
||||
BIN_DIR="$DESTDIR/usr/local/bin"
|
||||
RC_DIR="$DESTDIR/usr/local/etc/rc.d"
|
||||
ETC_DIR="$DESTDIR/usr/local/etc/colibri"
|
||||
NEWSYSLOG_DIR="$DESTDIR/usr/local/etc/newsyslog.conf.d"
|
||||
DB_DIR="$DESTDIR/var/db/colibri"
|
||||
RUN_DIR="$DESTDIR/var/run/colibri"
|
||||
LOG_DIR="$DESTDIR/var/log/colibri"
|
||||
|
||||
require_bin() {
|
||||
if [ ! -x "$TARGET/$1" ]; then
|
||||
echo "missing $TARGET/$1; run: cargo build --workspace --release" >&2
|
||||
exit 66
|
||||
fi
|
||||
}
|
||||
|
||||
copy_bin() {
|
||||
require_bin "$1"
|
||||
install -m 0555 "$TARGET/$1" "$BIN_DIR/$1"
|
||||
}
|
||||
|
||||
mkdir -p "$BIN_DIR" "$RC_DIR" "$ETC_DIR" "$NEWSYSLOG_DIR" "$DB_DIR" "$RUN_DIR" "$LOG_DIR"
|
||||
|
||||
copy_bin colibri-daemon
|
||||
copy_bin colibri
|
||||
copy_bin colibri-test-agent
|
||||
|
||||
if [ "${COLIBRI_STAGE_INCLUDE_TUI:-1}" != "0" ] && [ -x "$TARGET/colibri-tui" ]; then
|
||||
copy_bin colibri-tui
|
||||
fi
|
||||
|
||||
install -m 0555 "$ROOT/packaging/freebsd/colibri_daemon.in" \
|
||||
"$RC_DIR/colibri_daemon"
|
||||
|
||||
install -m 0644 "$ROOT/packaging/freebsd/newsyslog-colibri.conf" \
|
||||
"$NEWSYSLOG_DIR/colibri.conf"
|
||||
|
||||
cat > "$ETC_DIR/rc.conf.sample" <<EOF
|
||||
# Colibri control plane service defaults for the Clawdie ISO.
|
||||
# Copy or merge into /etc/rc.conf or /etc/rc.conf.d/colibri_daemon.
|
||||
colibri_daemon_enable="${COLIBRI_STAGE_ENABLE:-NO}"
|
||||
colibri_daemon_user="colibri"
|
||||
colibri_daemon_group="colibri"
|
||||
colibri_daemon_data_dir="/var/db/colibri"
|
||||
colibri_daemon_run_dir="/var/run/colibri"
|
||||
colibri_daemon_socket="/var/run/colibri/colibri.sock"
|
||||
colibri_daemon_db_path="/var/db/colibri/colibri.sqlite"
|
||||
colibri_daemon_logfile="/var/log/colibri/daemon.log"
|
||||
colibri_daemon_host="\$(/bin/hostname)"
|
||||
colibri_daemon_cost_mode="smart"
|
||||
EOF
|
||||
|
||||
cat > "$ETC_DIR/README.iso" <<'EOF'
|
||||
Colibri ISO staging notes
|
||||
=========================
|
||||
|
||||
Required service account on the target system:
|
||||
|
||||
pw groupadd colibri
|
||||
pw useradd colibri -g colibri -d /var/db/colibri -s /usr/sbin/nologin
|
||||
|
||||
Runtime validation:
|
||||
|
||||
service colibri_daemon start
|
||||
colibri status
|
||||
colibri create-task --title "iso check"
|
||||
colibri list-tasks --status queued
|
||||
service colibri_daemon stop
|
||||
EOF
|
||||
|
||||
chmod 0750 "$DB_DIR" "$RUN_DIR" "$LOG_DIR"
|
||||
|
||||
if [ "${COLIBRI_STAGE_CHOWN:-0}" = "1" ]; then
|
||||
chown colibri:colibri "$DB_DIR" "$RUN_DIR" "$LOG_DIR"
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
Staged Colibri into: $DESTDIR
|
||||
|
||||
Installed:
|
||||
/usr/local/bin/colibri-daemon
|
||||
/usr/local/bin/colibri
|
||||
/usr/local/bin/colibri-test-agent
|
||||
/usr/local/etc/rc.d/colibri_daemon
|
||||
/usr/local/etc/colibri/rc.conf.sample
|
||||
/usr/local/etc/newsyslog.conf.d/colibri.conf
|
||||
|
||||
Next image integration steps:
|
||||
1. Ensure colibri user/group exists in the image.
|
||||
2. Merge rc.conf.sample into /etc/rc.conf.d/colibri_daemon or /etc/rc.conf.
|
||||
3. Boot image and run docs/ISO-ACCEPTANCE-RUNBOOK.md.
|
||||
EOF
|
||||
Loading…
Add table
Reference in a new issue