Standardize ISO build checkouts under /home/clawdie/ai (Sam & Codex)
This commit is contained in:
parent
4dc665b7a5
commit
7ba92ed116
17 changed files with 146 additions and 72 deletions
26
AGENTS.md
26
AGENTS.md
|
|
@ -21,14 +21,14 @@ Use this as the lightweight "who checks in where" matrix while work spans
|
||||||
multiple repos. Pushed commits, mounted-image reports, manifests, or explicit
|
multiple repos. Pushed commits, mounted-image reports, manifests, or explicit
|
||||||
handoff docs are the expected check-in surface.
|
handoff docs are the expected check-in surface.
|
||||||
|
|
||||||
| Agent lane / identity | Primary codebase(s) | Typical check-in artifact |
|
| Agent lane / identity | Primary codebase(s) | Typical check-in artifact |
|
||||||
| ------------------------------ | ------------------------------------ | -------------------------------------------------------------- |
|
| ------------------------------ | ---------------------------------------------------------- | -------------------------------------------------------------- |
|
||||||
| **Pi ISO Developer** | `clawdie-iso` | Small pushed commit on active branch plus static-check result |
|
| **Pi ISO Developer** | `clawdie-iso` | Small pushed commit on active branch plus static-check result |
|
||||||
| **Codex ISO Builder** | `clawdie-iso`, adjacent `../colibri` | Build log, mounted-image sweep, publish manifest, smoke notes |
|
| **Codex ISO Builder** | `/home/clawdie/ai/clawdie-iso`, `/home/clawdie/ai/colibri` | Build log, mounted-image sweep, publish manifest, smoke notes |
|
||||||
| **Hermes USB/IMG Deployer** | published ISO artifacts | Checksum/manifest verification plus flash-target confirmation |
|
| **Hermes USB/IMG Deployer** | published ISO artifacts | Checksum/manifest verification plus flash-target confirmation |
|
||||||
| **Claude Reviewer / Tweaker** | `clawdie-iso` | Review/GUI-polish commit or explicit handoff note |
|
| **Claude Reviewer / Tweaker** | `clawdie-iso` | Review/GUI-polish commit or explicit handoff note |
|
||||||
| **Opencode / Z.ai Integrator** | `clawdie-ai`, `colibri` | Provider smoke output, small manifest, or handoff doc |
|
| **Opencode / Z.ai Integrator** | `clawdie-ai`, `colibri` | Provider smoke output, small manifest, or handoff doc |
|
||||||
| **Operator (Sam)** | all three repos | Final acceptance note, branch choice, release/publish approval |
|
| **Operator (Sam)** | all three repos | Final acceptance note, branch choice, release/publish approval |
|
||||||
|
|
||||||
### Git Coordination Rules
|
### Git Coordination Rules
|
||||||
|
|
||||||
|
|
@ -95,9 +95,9 @@ devices that require cleanup.
|
||||||
### Colibri Dependency
|
### Colibri Dependency
|
||||||
|
|
||||||
The ISO build stages FreeBSD-native Colibri control-plane artifacts from the
|
The ISO build stages FreeBSD-native Colibri control-plane artifacts from the
|
||||||
adjacent `../colibri` checkout (`FEATURE_COLIBRI=YES` is the default lane). The
|
canonical `/home/clawdie/ai/colibri` checkout (`FEATURE_COLIBRI=YES` is the default
|
||||||
staging is wired into `build.sh` and `scripts/stage-colibri-iso.sh`; the ISO
|
lane). The staging is wired into `build.sh` and `scripts/stage-colibri-iso.sh`;
|
||||||
does **not** build Rust while the image is mounted.
|
the ISO does **not** build Rust while the image is mounted.
|
||||||
|
|
||||||
- Build Colibri release artifacts on the FreeBSD/OSA host, not on Debian/Linux.
|
- Build Colibri release artifacts on the FreeBSD/OSA host, not on Debian/Linux.
|
||||||
- Build order, binary verification, and cleanup timing live in the `iso-build`
|
- Build order, binary verification, and cleanup timing live in the `iso-build`
|
||||||
|
|
@ -108,8 +108,8 @@ does **not** build Rust while the image is mounted.
|
||||||
`colibri-tui` is optional in staging code but desired for this USB target and
|
`colibri-tui` is optional in staging code but desired for this USB target and
|
||||||
should be verified alongside the other three.
|
should be verified alongside the other three.
|
||||||
|
|
||||||
**Invariant:** do not `cargo clean` the Colibri checkout until the ISO
|
**Invariant:** do not `cargo clean` `/home/clawdie/ai/colibri` until the ISO
|
||||||
preflight/build has consumed `../colibri/target/release`.
|
preflight/build has consumed `/home/clawdie/ai/colibri/target/release`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
4
BUILD.md
4
BUILD.md
|
|
@ -59,14 +59,14 @@ the image is mounted.
|
||||||
Default adjacent-checkout flow:
|
Default adjacent-checkout flow:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
(cd ../colibri && cargo build --workspace --release)
|
(cd /home/clawdie/ai/colibri && cargo build --workspace --release)
|
||||||
sudo ./build.sh --skip-fetch
|
sudo ./build.sh --skip-fetch
|
||||||
```
|
```
|
||||||
|
|
||||||
Override locations when needed:
|
Override locations when needed:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
COLIBRI_REPO=/path/to/colibri sudo ./build.sh --skip-fetch
|
COLIBRI_REPO=/home/clawdie/ai/colibri sudo ./build.sh --skip-fetch
|
||||||
COLIBRI_ARTIFACT_DIR=/path/to/colibri-target/release sudo ./build.sh --skip-fetch
|
COLIBRI_ARTIFACT_DIR=/path/to/colibri-target/release sudo ./build.sh --skip-fetch
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -369,7 +369,7 @@ sudo ./scripts/bhyve-pf-allow.sh
|
||||||
### Run the boot verification
|
### Run the boot verification
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd /home/clawdie/clawdie-iso
|
cd /home/clawdie/ai/clawdie-iso
|
||||||
sudo ./scripts/bhyve-test.sh
|
sudo ./scripts/bhyve-test.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
11
build.cfg
11
build.cfg
|
|
@ -79,11 +79,16 @@ EMBED_MODEL="${EMBED_MODEL:-}"
|
||||||
EMBED_API_KEY="${EMBED_API_KEY:-}"
|
EMBED_API_KEY="${EMBED_API_KEY:-}"
|
||||||
EMBED_DIMENSIONS="${EMBED_DIMENSIONS:-1024}"
|
EMBED_DIMENSIONS="${EMBED_DIMENSIONS:-1024}"
|
||||||
|
|
||||||
|
# Canonical build-host source checkout root. Keep all source repos under
|
||||||
|
# /home/clawdie/ai across agents/build hosts so detached worktrees and tmp builds do not
|
||||||
|
# depend on fragile ../ sibling layout.
|
||||||
|
CLAWDIE_AI_REPO="${CLAWDIE_AI_REPO:-/home/clawdie/ai/clawdie-ai}"
|
||||||
|
|
||||||
# Colibri Rust control-plane service (next ISO integration lane).
|
# Colibri Rust control-plane service (next ISO integration lane).
|
||||||
# The ISO build stages prebuilt FreeBSD release binaries from COLIBRI_REPO or
|
# The ISO build stages prebuilt FreeBSD release binaries from COLIBRI_REPO or
|
||||||
# COLIBRI_ARTIFACT_DIR; it does not compile Rust while the image is mounted.
|
# COLIBRI_ARTIFACT_DIR; it does not compile Rust while the image is mounted.
|
||||||
FEATURE_COLIBRI="${FEATURE_COLIBRI:-YES}"
|
FEATURE_COLIBRI="${FEATURE_COLIBRI:-YES}"
|
||||||
COLIBRI_REPO="${COLIBRI_REPO:-../colibri}"
|
COLIBRI_REPO="${COLIBRI_REPO:-/home/clawdie/ai/colibri}"
|
||||||
COLIBRI_ARTIFACT_DIR="${COLIBRI_ARTIFACT_DIR:-}"
|
COLIBRI_ARTIFACT_DIR="${COLIBRI_ARTIFACT_DIR:-}"
|
||||||
# Stage Colibri binaries by default, but do not block live boot on the daemon.
|
# Stage Colibri binaries by default, but do not block live boot on the daemon.
|
||||||
# Hardware validation can start it manually after rc.d supervision is proven on
|
# Hardware validation can start it manually after rc.d supervision is proven on
|
||||||
|
|
@ -93,10 +98,10 @@ COLIBRI_COST_MODE="${COLIBRI_COST_MODE:-smart}"
|
||||||
|
|
||||||
# Clawdie agent — the simplified, operator-friendly Colibri lane.
|
# Clawdie agent — the simplified, operator-friendly Colibri lane.
|
||||||
# One small Rust binary (glasspane + herdr + DeepSeek/Telegram), built from the
|
# One small Rust binary (glasspane + herdr + DeepSeek/Telegram), built from the
|
||||||
# same ../colibri checkout. Opt-in (default NO) so it does not disturb the
|
# same /home/clawdie/ai/colibri checkout. Opt-in (default NO) so it does not disturb the
|
||||||
# current default build; flip to YES for the simplified operator image.
|
# current default build; flip to YES for the simplified operator image.
|
||||||
# The two credentials are normally baked into the binary at build time:
|
# The two credentials are normally baked into the binary at build time:
|
||||||
# (cd ../colibri && CLAWDIE_TG_TOKEN=... CLAWDIE_DEEPSEEK_KEY=... \
|
# (cd /home/clawdie/ai/colibri && CLAWDIE_TG_TOKEN=... CLAWDIE_DEEPSEEK_KEY=... \
|
||||||
# cargo build --release -p clawdie)
|
# cargo build --release -p clawdie)
|
||||||
# Leave them blank to ship a "bring your own key" binary configured via the
|
# Leave them blank to ship a "bring your own key" binary configured via the
|
||||||
# rc.d env file (/usr/local/etc/clawdie/clawdie.env) at runtime instead.
|
# rc.d env file (/usr/local/etc/clawdie/clawdie.env) at runtime instead.
|
||||||
|
|
|
||||||
6
build.sh
6
build.sh
|
|
@ -280,7 +280,7 @@ pkg_archive_for() {
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve_colibri_paths() {
|
resolve_colibri_paths() {
|
||||||
_resolved_colibri_repo="${COLIBRI_REPO:-${SCRIPT_DIR}/../colibri}"
|
_resolved_colibri_repo="${COLIBRI_REPO:-/home/clawdie/ai/colibri}"
|
||||||
case "${_resolved_colibri_repo}" in
|
case "${_resolved_colibri_repo}" in
|
||||||
/*) ;;
|
/*) ;;
|
||||||
*) _resolved_colibri_repo="${SCRIPT_DIR}/${_resolved_colibri_repo}" ;;
|
*) _resolved_colibri_repo="${SCRIPT_DIR}/${_resolved_colibri_repo}" ;;
|
||||||
|
|
@ -297,7 +297,7 @@ resolve_colibri_paths() {
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve_clawdie_ai_repo() {
|
resolve_clawdie_ai_repo() {
|
||||||
_resolved_clawdie_ai_repo="${CLAWDIE_AI_REPO:-${SCRIPT_DIR}/../clawdie-ai}"
|
_resolved_clawdie_ai_repo="${CLAWDIE_AI_REPO:-/home/clawdie/ai/clawdie-ai}"
|
||||||
case "${_resolved_clawdie_ai_repo}" in
|
case "${_resolved_clawdie_ai_repo}" in
|
||||||
/*) ;;
|
/*) ;;
|
||||||
*) _resolved_clawdie_ai_repo="${SCRIPT_DIR}/${_resolved_clawdie_ai_repo}" ;;
|
*) _resolved_clawdie_ai_repo="${SCRIPT_DIR}/${_resolved_clawdie_ai_repo}" ;;
|
||||||
|
|
@ -336,7 +336,7 @@ preflight_colibri_artifacts() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# clawdie shares the ../colibri checkout; CLAWDIE_ARTIFACT_DIR overrides where
|
# clawdie shares the /home/clawdie/ai/colibri checkout; CLAWDIE_ARTIFACT_DIR overrides where
|
||||||
# the prebuilt `clawdie` binary is found.
|
# the prebuilt `clawdie` binary is found.
|
||||||
resolve_clawdie_paths() {
|
resolve_clawdie_paths() {
|
||||||
resolve_colibri_paths
|
resolve_colibri_paths
|
||||||
|
|
|
||||||
65
doc/CANONICAL-BUILD-PATHS-HANDOFF.md
Normal file
65
doc/CANONICAL-BUILD-PATHS-HANDOFF.md
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
# Canonical build paths handoff
|
||||||
|
|
||||||
|
**From:** Pi ISO Developer
|
||||||
|
|
||||||
|
**To:** Codex ISO Builder / Hermes USB-IMG Deployer
|
||||||
|
|
||||||
|
**Status:** open until the next image is rebuilt from `/home/clawdie/ai` paths
|
||||||
|
|
||||||
|
## Decision
|
||||||
|
|
||||||
|
Use `/home/clawdie/ai` as the build-host source root across systems. Do not rely on
|
||||||
|
adjacent checkout fallbacks such as `../colibri` or `../clawdie-ai`.
|
||||||
|
|
||||||
|
Canonical checkouts:
|
||||||
|
|
||||||
|
```text
|
||||||
|
/home/clawdie/ai/clawdie-iso
|
||||||
|
/home/clawdie/ai/colibri
|
||||||
|
/home/clawdie/ai/clawdie-ai
|
||||||
|
```
|
||||||
|
|
||||||
|
Runtime/live-user paths such as `/home/clawdie/clawdie-ai` are separate and are
|
||||||
|
not part of this build-host source-root change.
|
||||||
|
|
||||||
|
## Task checklist
|
||||||
|
|
||||||
|
- [ ] Create `/home/clawdie/ai` on each build/validation host, owned by the operator user.
|
||||||
|
- [ ] Move or reclone the three source repos into the canonical paths above.
|
||||||
|
- [ ] Refresh each repo from Forgejo `origin/main` before building.
|
||||||
|
- [ ] Build Colibri release artifacts from `/home/clawdie/ai/colibri`.
|
||||||
|
- [ ] Build the ISO from `/home/clawdie/ai/clawdie-iso`.
|
||||||
|
- [ ] Confirm the build log no longer reports skipped `clawdie-ai` or `colibri`
|
||||||
|
source snapshots.
|
||||||
|
|
||||||
|
## Rebuild command
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd /home/clawdie/ai/colibri
|
||||||
|
git fetch origin --prune
|
||||||
|
git checkout main
|
||||||
|
git pull --ff-only
|
||||||
|
cargo build --workspace --release
|
||||||
|
|
||||||
|
cd /home/clawdie/ai/clawdie-iso
|
||||||
|
git fetch origin --prune
|
||||||
|
git checkout main
|
||||||
|
git pull --ff-only
|
||||||
|
sudo env NVIDIA_UNIVERSAL=YES \
|
||||||
|
FEATURE_CLAWDIE=YES CLAWDIE_ENABLE=NO COLIBRI_DAEMON_ENABLE=NO \
|
||||||
|
CLAWDIE_AI_REPO=/home/clawdie/ai/clawdie-ai \
|
||||||
|
COLIBRI_REPO=/home/clawdie/ai/colibri \
|
||||||
|
CLAWDIE_ARTIFACT_DIR=/home/clawdie/ai/colibri/target/release \
|
||||||
|
./build.sh --skip-memstick-fetch --live-default-password
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deletion criteria
|
||||||
|
|
||||||
|
Delete this handoff after one rebuilt image confirms all three source snapshots
|
||||||
|
are present under `/home/clawdie/ai` in the live image and the build log contains
|
||||||
|
no source-snapshot skips for `clawdie-ai` or `colibri`.
|
||||||
|
|
||||||
|
## Results
|
||||||
|
|
||||||
|
_(Codex/Hermes: paste build host, commit SHAs, source-snapshot log lines, and
|
||||||
|
mounted-image source snapshot paths here.)_
|
||||||
|
|
@ -28,7 +28,7 @@ Both prerequisite PRs are merged to `main`. Codex is unblocked:
|
||||||
### 1. Build colibri (do NOT `cargo clean` afterward — the ISO consumes `target/release`)
|
### 1. Build colibri (do NOT `cargo clean` afterward — the ISO consumes `target/release`)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd /home/clawdie/colibri
|
cd /home/clawdie/ai/colibri
|
||||||
git fetch origin && git pull --ff-only
|
git fetch origin && git pull --ff-only
|
||||||
# Baked creds are compiled into the binary and are extractable from the image.
|
# Baked creds are compiled into the binary and are extractable from the image.
|
||||||
# For a distributable image, OMIT both flags and use the rc.d env file instead
|
# For a distributable image, OMIT both flags and use the rc.d env file instead
|
||||||
|
|
@ -42,7 +42,7 @@ ls -lh target/release/clawdie && file target/release/clawdie
|
||||||
### 2. ISO preflight
|
### 2. ISO preflight
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd /home/clawdie/clawdie-iso
|
cd /home/clawdie/ai/clawdie-iso
|
||||||
git fetch origin && git pull --ff-only
|
git fetch origin && git pull --ff-only
|
||||||
sh -n build.sh
|
sh -n build.sh
|
||||||
sh -n scripts/stage-clawdie-iso.sh
|
sh -n scripts/stage-clawdie-iso.sh
|
||||||
|
|
@ -84,7 +84,7 @@ FEATURE_CLAWDIE=YES /usr/bin/script -q \
|
||||||
### 6. Cleanup (only after the ISO build consumed the artifacts)
|
### 6. Cleanup (only after the ISO build consumed the artifacts)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd /home/clawdie/colibri && cargo clean && rm -rf /tmp/colibri-*
|
cd /home/clawdie/ai/colibri && cargo clean && rm -rf /tmp/colibri-*
|
||||||
```
|
```
|
||||||
|
|
||||||
## Notes / caveats
|
## Notes / caveats
|
||||||
|
|
|
||||||
|
|
@ -42,14 +42,16 @@ nvidia-settings` resolves purely from the file:// repo with no network.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# colibri artifacts first (do NOT cargo clean after)
|
# colibri artifacts first (do NOT cargo clean after)
|
||||||
cd /home/clawdie/colibri && git fetch origin && git reset --hard origin/main
|
cd /home/clawdie/ai/colibri && git fetch origin && git reset --hard origin/main
|
||||||
cargo build --workspace --release
|
cargo build --workspace --release
|
||||||
|
|
||||||
# universal image (set COLIBRI_REPO explicitly if building from a tmp worktree)
|
# universal image (set COLIBRI_REPO explicitly if building from a tmp worktree)
|
||||||
cd /home/clawdie/clawdie-iso && git fetch origin && git reset --hard origin/main
|
cd /home/clawdie/ai/clawdie-iso && git fetch origin && git reset --hard origin/main
|
||||||
sudo env NVIDIA_UNIVERSAL=YES FEATURE_CLAWDIE=YES \
|
sudo env NVIDIA_UNIVERSAL=YES \
|
||||||
COLIBRI_REPO=/home/clawdie/colibri \
|
FEATURE_CLAWDIE=YES CLAWDIE_ENABLE=NO COLIBRI_DAEMON_ENABLE=NO \
|
||||||
CLAWDIE_ARTIFACT_DIR=/home/clawdie/colibri/target/release \
|
CLAWDIE_AI_REPO=/home/clawdie/ai/clawdie-ai \
|
||||||
|
COLIBRI_REPO=/home/clawdie/ai/colibri \
|
||||||
|
CLAWDIE_ARTIFACT_DIR=/home/clawdie/ai/colibri/target/release \
|
||||||
./build.sh --skip-memstick-fetch --live-default-password
|
./build.sh --skip-memstick-fetch --live-default-password
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ Phase 4 (shell integration) fixes all 3 blockers and completes the QML installer
|
||||||
```cpp
|
```cpp
|
||||||
if (QFile::exists("/usr/local/share/clawdie-iso/firstboot/firstboot.sh")) {
|
if (QFile::exists("/usr/local/share/clawdie-iso/firstboot/firstboot.sh")) {
|
||||||
firstbootPath = "/usr/local/share/clawdie-iso/firstboot/firstboot.sh"; // ISO
|
firstbootPath = "/usr/local/share/clawdie-iso/firstboot/firstboot.sh"; // ISO
|
||||||
} else if (QFile::exists("/home/clawdie/clawdie-iso/firstboot/firstboot.sh")) {
|
} else if (QFile::exists("/home/clawdie/ai/clawdie-iso/firstboot/firstboot.sh")) {
|
||||||
firstbootPath = "/home/clawdie/clawdie-iso/firstboot/firstboot.sh"; // Dev
|
firstbootPath = "/home/clawdie/ai/clawdie-iso/firstboot/firstboot.sh"; // Dev
|
||||||
} else {
|
} else {
|
||||||
return false; // Error
|
return false; // Error
|
||||||
}
|
}
|
||||||
|
|
@ -110,7 +110,7 @@ installProcess->start("/bin/sh", QStringList() << "-c"
|
||||||
- **Host:** FreeBSD 15.0-RELEASE
|
- **Host:** FreeBSD 15.0-RELEASE
|
||||||
- **Time:** 17:03:53 — 17:09:XX (6 minutes)
|
- **Time:** 17:03:53 — 17:09:XX (6 minutes)
|
||||||
- **Phases:** 7/7 complete
|
- **Phases:** 7/7 complete
|
||||||
- **Output:** `/home/clawdie/clawdie-iso/tmp/output/clawdie-iso-unified-06.apr.2026.img`
|
- **Output:** `/home/clawdie/ai/clawdie-iso/tmp/output/clawdie-iso-unified-06.apr.2026.img`
|
||||||
|
|
||||||
### Build Stages Completed
|
### Build Stages Completed
|
||||||
|
|
||||||
|
|
@ -184,7 +184,7 @@ Boot Method: dd if=clawdie-iso-unified-06.apr.2026.img of=/dev/daX bs=1M
|
||||||
|
|
||||||
### Shell Syntax ✅
|
### Shell Syntax ✅
|
||||||
|
|
||||||
- `sh -n /home/clawdie/clawdie-iso/firstboot/firstboot.sh` — valid
|
- `sh -n /home/clawdie/ai/clawdie-iso/firstboot/firstboot.sh` — valid
|
||||||
|
|
||||||
### Git Status ✅
|
### Git Status ✅
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,22 +19,22 @@ The simplest automation — runs weekly, no external dependencies.
|
||||||
```sh
|
```sh
|
||||||
# /etc/cron.d/clawdie-iso
|
# /etc/cron.d/clawdie-iso
|
||||||
# Rebuild ISO every Sunday at 03:00, publish to CMS nginx downloads
|
# Rebuild ISO every Sunday at 03:00, publish to CMS nginx downloads
|
||||||
0 3 * * 0 root /home/clawdie/clawdie-iso/build.sh && \
|
0 3 * * 0 root /home/clawdie/ai/clawdie-iso/build.sh && \
|
||||||
/home/clawdie/clawdie-iso/scripts/publish.sh \
|
/home/clawdie/ai/clawdie-iso/scripts/publish.sh \
|
||||||
>> /var/log/clawdie-iso-build.log 2>&1
|
>> /var/log/clawdie-iso-build.log 2>&1
|
||||||
```
|
```
|
||||||
|
|
||||||
Enable:
|
Enable:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
echo '0 3 * * 0 root /home/clawdie/clawdie-iso/build.sh && /home/clawdie/clawdie-iso/scripts/publish.sh >> /var/log/clawdie-iso-build.log 2>&1' \
|
echo '0 3 * * 0 root /home/clawdie/ai/clawdie-iso/build.sh && /home/clawdie/ai/clawdie-iso/scripts/publish.sh >> /var/log/clawdie-iso-build.log 2>&1' \
|
||||||
> /etc/cron.d/clawdie-iso
|
> /etc/cron.d/clawdie-iso
|
||||||
```
|
```
|
||||||
|
|
||||||
Manual trigger:
|
Manual trigger:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd /home/clawdie/clawdie-iso && sudo ./build.sh && sudo ./scripts/publish.sh
|
cd /home/clawdie/ai/clawdie-iso && sudo ./build.sh && sudo ./scripts/publish.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
@ -70,8 +70,8 @@ forgejo-runner register \
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cat > /usr/local/etc/sudoers.d/forgejo-runner <<EOF
|
cat > /usr/local/etc/sudoers.d/forgejo-runner <<EOF
|
||||||
forgejo-runner ALL=(root) NOPASSWD: /home/clawdie/clawdie-iso/build.sh
|
forgejo-runner ALL=(root) NOPASSWD: /home/clawdie/ai/clawdie-iso/build.sh
|
||||||
forgejo-runner ALL=(root) NOPASSWD: /home/clawdie/clawdie-iso/scripts/publish.sh
|
forgejo-runner ALL=(root) NOPASSWD: /home/clawdie/ai/clawdie-iso/scripts/publish.sh
|
||||||
EOF
|
EOF
|
||||||
chmod 440 /usr/local/etc/sudoers.d/forgejo-runner
|
chmod 440 /usr/local/etc/sudoers.d/forgejo-runner
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Wrapper script to run bhyve test with full logging and error capture
|
# Wrapper script to run bhyve test with full logging and error capture
|
||||||
|
|
||||||
LOG_FILE="/home/clawdie/clawdie-iso/logs/bhyve-test-$(date +%Y%m%d-%H%M%S).log"
|
LOG_DIR="${PWD}/logs"
|
||||||
|
mkdir -p "$LOG_DIR"
|
||||||
|
LOG_FILE="${LOG_DIR}/bhyve-test-$(date +%Y%m%d-%H%M%S).log"
|
||||||
echo "Test started: $(date)" > "$LOG_FILE"
|
echo "Test started: $(date)" > "$LOG_FILE"
|
||||||
echo "Log: $LOG_FILE" >&2
|
echo "Log: $LOG_FILE" >&2
|
||||||
echo "" >> "$LOG_FILE"
|
echo "" >> "$LOG_FILE"
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@
|
||||||
# (glasspane + herdr + DeepSeek/Telegram). This script does NOT build it — build
|
# (glasspane + herdr + DeepSeek/Telegram). This script does NOT build it — build
|
||||||
# or provide the artifact first, optionally with baked credentials:
|
# or provide the artifact first, optionally with baked credentials:
|
||||||
#
|
#
|
||||||
# (cd ../colibri && CLAWDIE_TG_TOKEN=... CLAWDIE_DEEPSEEK_KEY=... \
|
# (cd /home/clawdie/ai/colibri && CLAWDIE_TG_TOKEN=... CLAWDIE_DEEPSEEK_KEY=... \
|
||||||
# cargo build --release -p clawdie)
|
# cargo build --release -p clawdie)
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# COLIBRI_REPO=../colibri scripts/stage-clawdie-iso.sh /path/to/image-root
|
# COLIBRI_REPO=/home/clawdie/ai/colibri scripts/stage-clawdie-iso.sh /path/to/image-root
|
||||||
# CLAWDIE_ARTIFACT_DIR=/path/to/release scripts/stage-clawdie-iso.sh /path/to/image-root
|
# CLAWDIE_ARTIFACT_DIR=/path/to/release scripts/stage-clawdie-iso.sh /path/to/image-root
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
@ -22,7 +22,7 @@ fi
|
||||||
DESTDIR=$1
|
DESTDIR=$1
|
||||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||||
REPO_ROOT=$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)
|
REPO_ROOT=$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)
|
||||||
COLIBRI_REPO=${COLIBRI_REPO:-"${REPO_ROOT}/../colibri"}
|
COLIBRI_REPO=${COLIBRI_REPO:-"/home/clawdie/ai/colibri"}
|
||||||
CLAWDIE_ARTIFACT_DIR=${CLAWDIE_ARTIFACT_DIR:-"${COLIBRI_REPO}/target/release"}
|
CLAWDIE_ARTIFACT_DIR=${CLAWDIE_ARTIFACT_DIR:-"${COLIBRI_REPO}/target/release"}
|
||||||
CLAWDIE_STAGE_ENABLE=${CLAWDIE_STAGE_ENABLE:-YES}
|
CLAWDIE_STAGE_ENABLE=${CLAWDIE_STAGE_ENABLE:-YES}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
# Stage prebuilt Colibri FreeBSD service artifacts into an ISO/image root.
|
# Stage prebuilt Colibri FreeBSD service artifacts into an ISO/image root.
|
||||||
#
|
#
|
||||||
# This script does not build Colibri. Build or provide artifacts first:
|
# This script does not build Colibri. Build or provide artifacts first:
|
||||||
# (cd ../colibri && cargo build --workspace --release)
|
# (cd /home/clawdie/ai/colibri && cargo build --workspace --release)
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# COLIBRI_REPO=../colibri scripts/stage-colibri-iso.sh /path/to/image-root
|
# COLIBRI_REPO=/home/clawdie/ai/colibri scripts/stage-colibri-iso.sh /path/to/image-root
|
||||||
# COLIBRI_ARTIFACT_DIR=/path/to/release scripts/stage-colibri-iso.sh /path/to/image-root
|
# COLIBRI_ARTIFACT_DIR=/path/to/release scripts/stage-colibri-iso.sh /path/to/image-root
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
@ -18,7 +18,7 @@ fi
|
||||||
DESTDIR=$1
|
DESTDIR=$1
|
||||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||||
REPO_ROOT=$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)
|
REPO_ROOT=$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)
|
||||||
COLIBRI_REPO=${COLIBRI_REPO:-"${REPO_ROOT}/../colibri"}
|
COLIBRI_REPO=${COLIBRI_REPO:-"/home/clawdie/ai/colibri"}
|
||||||
COLIBRI_ARTIFACT_DIR=${COLIBRI_ARTIFACT_DIR:-"${COLIBRI_REPO}/target/release"}
|
COLIBRI_ARTIFACT_DIR=${COLIBRI_ARTIFACT_DIR:-"${COLIBRI_REPO}/target/release"}
|
||||||
COLIBRI_STAGE_ENABLE=${COLIBRI_STAGE_ENABLE:-YES}
|
COLIBRI_STAGE_ENABLE=${COLIBRI_STAGE_ENABLE:-YES}
|
||||||
COLIBRI_STAGE_INCLUDE_TUI=${COLIBRI_STAGE_INCLUDE_TUI:-1}
|
COLIBRI_STAGE_INCLUDE_TUI=${COLIBRI_STAGE_INCLUDE_TUI:-1}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# OBSOLETE: do not use this helper for current operator-USB builds.
|
# OBSOLETE: do not use this helper for current operator-USB builds.
|
||||||
#
|
#
|
||||||
# The active workflow is:
|
# The active workflow is:
|
||||||
# - repo-local build from /home/clawdie/clawdie-iso
|
# - repo-local build from /home/clawdie/ai/clawdie-iso
|
||||||
# - tmp/ caches and output artifacts in this repo
|
# - tmp/ caches and output artifacts in this repo
|
||||||
# - default tmux window clawdie:3 named "iso"
|
# - default tmux window clawdie:3 named "iso"
|
||||||
# - commit-suffixed raw .img, .img.gz, and .img.gz.sha256 artifacts
|
# - commit-suffixed raw .img, .img.gz, and .img.gz.sha256 artifacts
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ ls -lh tmp/output
|
||||||
du -xh -d 1 tmp/cache | sort -h
|
du -xh -d 1 tmp/cache | sort -h
|
||||||
ls -lah tmp/cache | sort -k5 -h | tail -n 30
|
ls -lah tmp/cache | sort -k5 -h | tail -n 30
|
||||||
find tmp/cache -maxdepth 1 -type f -ls
|
find tmp/cache -maxdepth 1 -type f -ls
|
||||||
/sbin/mount | grep /home/clawdie/clawdie-iso/tmp/cache/mnt
|
/sbin/mount | grep /home/clawdie/ai/clawdie-iso/tmp/cache/mnt
|
||||||
```
|
```
|
||||||
|
|
||||||
This tells you whether the space is in:
|
This tells you whether the space is in:
|
||||||
|
|
@ -47,9 +47,9 @@ This tells you whether the space is in:
|
||||||
Only run the unmounts that still exist:
|
Only run the unmounts that still exist:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo /sbin/umount /home/clawdie/clawdie-iso/tmp/cache/mnt/proc
|
sudo /sbin/umount /home/clawdie/ai/clawdie-iso/tmp/cache/mnt/proc
|
||||||
sudo /sbin/umount /home/clawdie/clawdie-iso/tmp/cache/mnt/dev
|
sudo /sbin/umount /home/clawdie/ai/clawdie-iso/tmp/cache/mnt/dev
|
||||||
sudo /sbin/umount /home/clawdie/clawdie-iso/tmp/cache/mnt
|
sudo /sbin/umount /home/clawdie/ai/clawdie-iso/tmp/cache/mnt
|
||||||
```
|
```
|
||||||
|
|
||||||
If one of these says “not mounted”, continue.
|
If one of these says “not mounted”, continue.
|
||||||
|
|
@ -66,8 +66,8 @@ sudo /sbin/mdconfig -lv
|
||||||
Typical stuck state looks like:
|
Typical stuck state looks like:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
md0 vnode 28G /home/clawdie/clawdie-iso/tmp/cache/work.img
|
md0 vnode 28G /home/clawdie/ai/clawdie-iso/tmp/cache/work.img
|
||||||
md1 vnode 28G /home/clawdie/clawdie-iso/tmp/cache/work.img
|
md1 vnode 28G /home/clawdie/ai/clawdie-iso/tmp/cache/work.img
|
||||||
```
|
```
|
||||||
|
|
||||||
Detach the stale devices:
|
Detach the stale devices:
|
||||||
|
|
@ -84,8 +84,8 @@ If the unit numbers differ, detach the ones pointing at `tmp/cache/work.img`.
|
||||||
Clear the work-image marker and the work image itself:
|
Clear the work-image marker and the work image itself:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo rm -f /home/clawdie/clawdie-iso/tmp/cache/.md_device
|
sudo rm -f /home/clawdie/ai/clawdie-iso/tmp/cache/.md_device
|
||||||
sudo rm -f /home/clawdie/clawdie-iso/tmp/cache/work.img
|
sudo rm -f /home/clawdie/ai/clawdie-iso/tmp/cache/work.img
|
||||||
```
|
```
|
||||||
|
|
||||||
## 5. Safe delete list
|
## 5. Safe delete list
|
||||||
|
|
@ -95,11 +95,11 @@ before removing the newest commit-suffixed `.img.gz` artifact if it may be the
|
||||||
current test image:
|
current test image:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo rm -f /home/clawdie/clawdie-iso/tmp/output/*.img
|
sudo rm -f /home/clawdie/ai/clawdie-iso/tmp/output/*.img
|
||||||
sudo rm -f /home/clawdie/clawdie-iso/tmp/output/*.img.gz
|
sudo rm -f /home/clawdie/ai/clawdie-iso/tmp/output/*.img.gz
|
||||||
sudo rm -f /home/clawdie/clawdie-iso/tmp/output/*.sha256
|
sudo rm -f /home/clawdie/ai/clawdie-iso/tmp/output/*.sha256
|
||||||
sudo rm -f /home/clawdie/clawdie-iso/tmp/cache/memstick-s2.img
|
sudo rm -f /home/clawdie/ai/clawdie-iso/tmp/cache/memstick-s2.img
|
||||||
sudo rm -f /home/clawdie/clawdie-iso/tmp/cache/memstick-s2a.img
|
sudo rm -f /home/clawdie/ai/clawdie-iso/tmp/cache/memstick-s2a.img
|
||||||
```
|
```
|
||||||
|
|
||||||
Keep these if you want the next build to reuse caches:
|
Keep these if you want the next build to reuse caches:
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ switch to `iso-build-cleanup`.
|
||||||
### Colibri artifact preflight
|
### Colibri artifact preflight
|
||||||
|
|
||||||
`FEATURE_COLIBRI=YES` is the default for the next ISO lane. The ISO build
|
`FEATURE_COLIBRI=YES` is the default for the next ISO lane. The ISO build
|
||||||
stages FreeBSD-native Colibri artifacts from the adjacent `../colibri` checkout;
|
stages FreeBSD-native Colibri artifacts from `/home/clawdie/ai/colibri`;
|
||||||
it does **not** build Rust while the image is mounted. The daemon is staged but
|
it does **not** build Rust while the image is mounted. The daemon is staged but
|
||||||
kept disabled at boot by default (`COLIBRI_DAEMON_ENABLE=NO`) until rc.d
|
kept disabled at boot by default (`COLIBRI_DAEMON_ENABLE=NO`) until rc.d
|
||||||
supervision has passed live-USB validation, so Colibri cannot block SDDM/XFCE
|
supervision has passed live-USB validation, so Colibri cannot block SDDM/XFCE
|
||||||
|
|
@ -143,7 +143,7 @@ from debby unless the native OSA build fails.
|
||||||
Run this before the ISO build:
|
Run this before the ISO build:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd /home/clawdie/colibri
|
cd /home/clawdie/ai/colibri
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git status --short --branch
|
git status --short --branch
|
||||||
git pull --ff-only
|
git pull --ff-only
|
||||||
|
|
@ -165,7 +165,7 @@ target/release/colibri --help | head
|
||||||
Then return to the ISO repo and run syntax/preflight checks:
|
Then return to the ISO repo and run syntax/preflight checks:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd /home/clawdie/clawdie-iso
|
cd /home/clawdie/ai/clawdie-iso
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git status --short --branch
|
git status --short --branch
|
||||||
git pull --ff-only
|
git pull --ff-only
|
||||||
|
|
@ -174,12 +174,12 @@ sh -n scripts/stage-colibri-iso.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Important cleanup timing: **do not run `cargo clean` immediately after the
|
Important cleanup timing: **do not run `cargo clean` immediately after the
|
||||||
Colibri build.** The ISO preflight/build consumes `../colibri/target/release`.
|
Colibri build.** The ISO preflight/build consumes `/home/clawdie/ai/colibri/target/release`.
|
||||||
Only clean Colibri after the ISO build or after deciding those artifacts are no
|
Only clean Colibri after the ISO build or after deciding those artifacts are no
|
||||||
longer needed:
|
longer needed:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd /home/clawdie/colibri
|
cd /home/clawdie/ai/colibri
|
||||||
cargo clean
|
cargo clean
|
||||||
rm -rf /tmp/colibri-*
|
rm -rf /tmp/colibri-*
|
||||||
```
|
```
|
||||||
|
|
@ -191,11 +191,11 @@ USB target and should be verified with the other three binaries.
|
||||||
|
|
||||||
`FEATURE_CLAWDIE` (default `NO`) stages the simplified `clawdie` agent — one
|
`FEATURE_CLAWDIE` (default `NO`) stages the simplified `clawdie` agent — one
|
||||||
small binary (glasspane + herdr + DeepSeek/Telegram) built from the same
|
small binary (glasspane + herdr + DeepSeek/Telegram) built from the same
|
||||||
`../colibri` checkout. Enable it for the simplified operator image. The two
|
`/home/clawdie/ai/colibri` checkout. Enable it for the simplified operator image. The two
|
||||||
credentials are normally baked at build time:
|
credentials are normally baked at build time:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd /home/clawdie/colibri
|
cd /home/clawdie/ai/colibri
|
||||||
CLAWDIE_TG_TOKEN="<telegram-bot-token>" \
|
CLAWDIE_TG_TOKEN="<telegram-bot-token>" \
|
||||||
CLAWDIE_DEEPSEEK_KEY="<deepseek-key>" \
|
CLAWDIE_DEEPSEEK_KEY="<deepseek-key>" \
|
||||||
cargo build --release -p clawdie
|
cargo build --release -p clawdie
|
||||||
|
|
@ -207,15 +207,15 @@ file target/release/clawdie
|
||||||
Leave the flags unset to ship a "bring your own key" binary configured via the
|
Leave the flags unset to ship a "bring your own key" binary configured via the
|
||||||
rc.d env file (`/usr/local/etc/clawdie/clawdie.env`) at runtime. Same cleanup
|
rc.d env file (`/usr/local/etc/clawdie/clawdie.env`) at runtime. Same cleanup
|
||||||
invariant as Colibri: do **not** `cargo clean` until the ISO build has consumed
|
invariant as Colibri: do **not** `cargo clean` until the ISO build has consumed
|
||||||
`../colibri/target/release/clawdie`. ISO-repo preflight:
|
`/home/clawdie/ai/colibri/target/release/clawdie`. ISO-repo preflight:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd /home/clawdie/clawdie-iso
|
cd /home/clawdie/ai/clawdie-iso
|
||||||
sh -n build.sh
|
sh -n build.sh
|
||||||
sh -n scripts/stage-clawdie-iso.sh
|
sh -n scripts/stage-clawdie-iso.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
See `../colibri/docs/CLAWDIE-BUILD.md` and `../colibri/docs/CLAWDIE-AGENT-WIKI.md`.
|
See `/home/clawdie/ai/colibri/docs/CLAWDIE-BUILD.md` and `/home/clawdie/ai/colibri/docs/CLAWDIE-AGENT-WIKI.md`.
|
||||||
|
|
||||||
### Next build: carry the XFCE operator-USB fixes
|
### Next build: carry the XFCE operator-USB fixes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ public download target.
|
||||||
|
|
||||||
## Paths
|
## Paths
|
||||||
|
|
||||||
- Repo root: `/home/clawdie/clawdie-iso`
|
- Repo root: `/home/clawdie/ai/clawdie-iso`
|
||||||
- Build output: `tmp/output`
|
- Build output: `tmp/output`
|
||||||
- Public webroot: `/usr/local/www/osa/downloads/iso`
|
- Public webroot: `/usr/local/www/osa/downloads/iso`
|
||||||
- Public base URL: `https://osa.smilepowered.org/downloads/iso`
|
- Public base URL: `https://osa.smilepowered.org/downloads/iso`
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue