From 2ae2481acd69f4bf12b287a272a17cb182cb8f3b Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Thu, 25 Jun 2026 10:53:42 +0200 Subject: [PATCH] =?UTF-8?q?skill(freebsd):=20harden=20pkgbase=20path=20?= =?UTF-8?q?=E2=80=94=20edit=20existing=20repo,=20dry-run=20first?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A pkgbase host already has a FreeBSD-base repo; appending a second block creates a duplicate repo name (undefined, last-wins). Inspect and EDIT the existing entry in place (base_release_0 -> base_release_N/base_latest to cross a point release), then pkg update + pkg upgrade -n (dry run to confirm 15.1 is offered) before the real pkg upgrade. Also align the pre-status capture with the reference (freebsd-version -k/-u + uname -r, not -kru). Co-Authored-By: Claude Opus 4.8 --- skills/freebsd-os-upgrade/SKILL.md | 31 +++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/skills/freebsd-os-upgrade/SKILL.md b/skills/freebsd-os-upgrade/SKILL.md index 0d05f40..f7a7778 100644 --- a/skills/freebsd-os-upgrade/SKILL.md +++ b/skills/freebsd-os-upgrade/SKILL.md @@ -38,11 +38,16 @@ freebsd-version -u # installed userland uname -r # running kernel # 2a. pkgbase (base via pkg, e.g. FreeBSD-kernel-generic): -# confirm the base repo points at the TARGET series first — a release-pinned -# repo (base_release_0) only delivers patch levels; base_release_ or -# base_latest is what moves you across a point release. Then: +# INSPECT the existing base repo first — a pkgbase host already has one: +pkg -vv | grep -A6 -i 'FreeBSD-base' +grep -rn 'base_release\|base_latest\|FreeBSD-base' /etc/pkg /usr/local/etc/pkg/repos/ +# EDIT that existing entry in place (do NOT append a second FreeBSD-base +# block — duplicate repo names give undefined, last-wins behavior). A pinned +# base_release_0 only delivers 15.0 patch levels; change it to base_release_1 +# (or base_latest) to cross to 15.1. If it's already base_latest, skip. pkg update -pkg upgrade # upgrades base AND ports packages together +pkg upgrade -n # DRY RUN first — preview the 15.1 base move, applies nothing +pkg upgrade # apply once the plan looks right (base + ports together) # 2b. freebsd-update (binary base updates): freebsd-update -r 15.1-RELEASE upgrade @@ -63,14 +68,18 @@ pkg update -f && pkg upgrade # ports packages (separate from base here) ## Runbook 1. **Capture pre-status** for after-the-fact comparison — see - *Pre-reboot status capture* in the reference (hostname, `freebsd-version - -kru`, services, `jls`, `pfctl -s info`). Record permission-limited checks as - such, not as "down". + *Pre-reboot status capture* in the reference (hostname, `freebsd-version -k` + / `-u`, `uname -r`, services, `jls`, `pfctl -s info`). Record + permission-limited checks as such, not as "down". 2. **Upgrade base** (by the method from step 0): - - **pkgbase**: confirm the base repo targets the new series first — repoint - `FreeBSD-base` from a pinned `base_release_0` to `base_release_` / - `base_latest` if needed (a pinned release repo only delivers patch levels), - then `pkg update && pkg upgrade` (base + ports together). + - **pkgbase**: a pkgbase host already has a `FreeBSD-base` repo — **inspect + it** (`pkg -vv | grep -A6 -i FreeBSD-base`) and **edit that existing entry + in place**. A pinned `base_release_0` only delivers 15.0 patch levels; point + it at `base_release_` / `base_latest` to cross to the new release. Do + **not** append a second `FreeBSD-base` block — duplicate repo names give + undefined, last-wins behavior. Then `pkg update`, **dry-run** with + `pkg upgrade -n` to confirm 15.1 base packages are actually offered, then + `pkg upgrade` (base + ports together). - **freebsd-update**: `freebsd-update -r upgrade` then `freebsd-update install`. Either way the new kernel is staged; the system runs the old one until reboot.