From 91b29a94ce891b033fc57d00a425eab024e5cb40 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 10 Jul 2026 08:35:44 +0300 Subject: =?UTF-8?q?skills:=20pkgrepo=20=E2=80=94=20fix=20OpenBSD=20upgrade?= =?UTF-8?q?=20doc=20(fec2f9d=20attribution,=20restart=20step)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fec2f9d is the dtail server-side fix (absolute CacheDir resolution independent of CWD), not a FreeBSD template bug — the FreeBSD template never used relative paths. Also make the pre-2026-07-10 upgrade procedure an explicit ordered list: migrate the host key first, then reinstall, then rcctl restart — neither pkg_add nor Rex restarts a running daemon, and after a reboot the old host key is already gone. Co-Authored-By: Claude Fable 5 --- prompts/skills/pkgrepo/references/dtail-package.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'prompts') diff --git a/prompts/skills/pkgrepo/references/dtail-package.md b/prompts/skills/pkgrepo/references/dtail-package.md index 32641d7..bb8fe1e 100644 --- a/prompts/skills/pkgrepo/references/dtail-package.md +++ b/prompts/skills/pkgrepo/references/dtail-package.md @@ -24,10 +24,13 @@ make dtail-rocky # Rocky Linux: x86_64 + aarch64 RPMs + repodata | `/usr/local/bin/dserver-update-key-cache.sh` | `frontends/scripts/dserver-update-key-cache.sh.tpl` (ksh) | OpenBSD notes: -- Packages before 2026-07-10 used relative `CacheDir: "cache"` / `HostKeyFile: "cache/ssh_host_key"` — that only worked because rc.d starts the daemon via `su -l _dserver` (CWD = `/var/run/dserver`, the `_dserver` home dir); a manual start from any other directory broke key lookup. Same bug class as on FreeBSD (dtail commit `fec2f9d`) +- Packages before 2026-07-10 used relative `CacheDir: "cache"` / `HostKeyFile: "cache/ssh_host_key"` — that only worked because rc.d starts the daemon via `su -l _dserver` (CWD = `/var/run/dserver`, the `_dserver` home dir); a manual start from any other directory broke public key lookup — the same bug class dtail commit `fec2f9d` fixed on the server side (making absolute `CacheDir` paths resolve independently of dserver's CWD) - OpenBSD's `/etc/rc` wipes `/var/run/*` at boot, so the SSH host key now lives in persistent `/var/db/dserver/ssh_host_key` (mirrors NetBSD). The rc.d `rc_pre` recreates `/var/run/dserver/cache` and `/var/db/dserver` and re-runs `dserver-update-key-cache.sh` on every start; the daily cron entry keeps it fresh afterwards -- When upgrading a host from a pre-2026-07-10 package, copy the old key first to preserve the host identity: `doas install -d -o _dserver -m 0700 /var/db/dserver && doas cp -p /var/run/dserver/cache/ssh_host_key /var/db/dserver/` — otherwise dserver generates a new host key and clients without `--trustAllHosts` must re-accept it (done on fishfinger 2026-07-10; **blowfish still runs the pre-2026-07-10 package**) -- Same-version reinstall: `pkg_add -u` is a no-op — `doas pkg_delete dtail` then `doas env PKG_PATH=... pkg_add dtail` +- When upgrading a host from a pre-2026-07-10 package, follow this order — neither `pkg_add` nor Rex restarts a running daemon, and once the host reboots `/etc/rc` has already wiped the old host key, making migration impossible: + 1. Migrate the host key FIRST to preserve the host identity: `doas install -d -o _dserver -m 0700 /var/db/dserver && doas cp -p /var/run/dserver/cache/ssh_host_key /var/db/dserver/` — otherwise dserver generates a new host key and clients without `--trustAllHosts` must re-accept it + 2. Reinstall the package (same-version: `pkg_add -u` is a no-op — `doas pkg_delete dtail` then `doas env PKG_PATH=... pkg_add dtail`) + 3. `doas rcctl restart dserver` — without this the running daemon keeps the old relative-path config until reboot + (done on fishfinger 2026-07-10; **blowfish still runs the pre-2026-07-10 package**) - From the WireGuard VPN, `f0.lan.buetow.org` may not route — run the Makefile with `make dtail-openbsd FREEBSD_HOST=f0.wg0` ### FreeBSD (f0–f3) -- cgit v1.2.3