[bug] install_core missing unzip — install_bun fails on fresh VMs, blocks service_books install #187

Open
opened 2026-05-01 18:00:48 +00:00 by mik-tf · 1 comment
Owner

Summary

install_core (or install_bun, whichever owns the dependency) should ensure unzip is installed as a base apt dep. Today's deploy on a fresh-ish herodemo VM hit:

→ bun not found on PATH — installing via install_bun...
error: unzip is required to install bun
  ✗ service_books: External command had a non-zero exit code

Workaround on the VM: apt-get install -y unzip. After that, install_bun runs and service_books install completes.

Where it fits

Either:

  • install_core adds unzip to its apt list (most defensible — matches its broader role of installing apt deps)
  • install_bun checks for unzip and installs it explicitly when missing

Either is fine. install_core is the cleaner spot since other tools (besides bun) might also benefit from unzip being present.

Why it surfaced today

VM was set up months ago without unzip; the bun installer worked back then because someone manually ran apt at some point. New VMs / re-provisioned VMs would hit this on first install_all that reaches service_books.

Severity

Low (one-line apt install workaround), but it's a deploy-blocker on a fresh VM. Worth catching in install_core to avoid the next person hitting the same wall.

Cross-refs

  • hero_demo#55 — post-deploy verification scripts (verify scripts assume base deps are present)
  • hero_skills#186 — the previous service_install_all gap
## Summary `install_core` (or `install_bun`, whichever owns the dependency) should ensure `unzip` is installed as a base apt dep. Today's deploy on a fresh-ish herodemo VM hit: ``` → bun not found on PATH — installing via install_bun... error: unzip is required to install bun ✗ service_books: External command had a non-zero exit code ``` Workaround on the VM: `apt-get install -y unzip`. After that, `install_bun` runs and `service_books install` completes. ## Where it fits Either: - `install_core` adds `unzip` to its apt list (most defensible — matches its broader role of installing apt deps) - `install_bun` checks for `unzip` and installs it explicitly when missing Either is fine. `install_core` is the cleaner spot since other tools (besides bun) might also benefit from unzip being present. ## Why it surfaced today VM was set up months ago without unzip; the bun installer worked back then because someone manually ran apt at some point. New VMs / re-provisioned VMs would hit this on first install_all that reaches service_books. ## Severity Low (one-line apt install workaround), but it's a deploy-blocker on a fresh VM. Worth catching in install_core to avoid the next person hitting the same wall. ## Cross-refs - [hero_demo#55](https://forge.ourworld.tf/lhumina_code/hero_demo/issues/55) — post-deploy verification scripts (verify scripts assume base deps are present) - [hero_skills#186](https://forge.ourworld.tf/lhumina_code/hero_skills/issues/186) — the previous service_install_all gap
Author
Owner

Adding two more deps that bit us during the same 2026-05-01 deploy:

  • sccacheapt-get install -y sccache works (Ubuntu 24.04 has 0.7.7). Hero already has the sccache.nu skill with install_sccache machinery, and install_core calls it under is-admin, but on this VM that pathway never ran (manual install_core not executed since provision). Workaround applied: direct apt install sccache + symlink /usr/local/bin/sccache → /usr/bin/sccache (matching what install_sccache would produce). Now which sccache returns clean for both root and driver.

  • install_sccache run-as-root bugs (separate but related):

    • Command sudo not found — when invoked as root, run_priv calls sudo unconditionally instead of detecting root and running directly
    • ROOTDIR not setinit main runs load_init_sh which expects ~/hero/cfg/init.sh to exist; for root that path is /root/hero/cfg/init.sh which isn\u0027t configured on this VM

    Both probably worth a pass on the run-as-root code paths in sccache.nu and init.nu.

Combined with the unzip case in this issue, the picture is: install_core is the right place for these but the path of "manually run install_core on a fresh VM" hasn\u0027t been part of the deploy runbook in a while. Either:

  1. Add an install_core --idempotent step to service_complete so deploys self-heal missing apt deps
  2. OR ship the binaries via CI (hero_demo#54) and skip the build-deps-on-VM problem entirely

Option 2 is the long answer; option 1 is the cheap shorter-term fix.

Adding two more deps that bit us during the same 2026-05-01 deploy: - **`sccache`** — `apt-get install -y sccache` works (Ubuntu 24.04 has 0.7.7). Hero already has the [`sccache.nu`](https://forge.ourworld.tf/lhumina_code/hero_skills/src/branch/development/tools/modules/sccache.nu) skill with `install_sccache` machinery, and `install_core` calls it under `is-admin`, but on this VM that pathway never ran (manual `install_core` not executed since provision). Workaround applied: direct `apt install sccache` + symlink `/usr/local/bin/sccache → /usr/bin/sccache` (matching what `install_sccache` would produce). Now `which sccache` returns clean for both `root` and `driver`. - **`install_sccache` run-as-root bugs** (separate but related): - `Command sudo not found` — when invoked as root, `run_priv` calls `sudo` unconditionally instead of detecting root and running directly - `ROOTDIR not set` — `init main` runs `load_init_sh` which expects `~/hero/cfg/init.sh` to exist; for root that path is `/root/hero/cfg/init.sh` which isn\u0027t configured on this VM Both probably worth a pass on the run-as-root code paths in `sccache.nu` and `init.nu`. Combined with the unzip case in this issue, the picture is: `install_core` is the right place for these but the path of "manually run install_core on a fresh VM" hasn\u0027t been part of the deploy runbook in a while. Either: 1. Add an `install_core --idempotent` step to `service_complete` so deploys self-heal missing apt deps 2. OR ship the binaries via CI ([hero_demo#54](https://forge.ourworld.tf/lhumina_code/hero_demo/issues/54)) and skip the build-deps-on-VM problem entirely Option 2 is the long answer; option 1 is the cheap shorter-term fix.
Sign in to join this conversation.
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
lhumina_code/hero_skills#187
No description provided.