From e2e74e84182a85e715763fded9d11777ae5ad6bd Mon Sep 17 00:00:00 2001 From: "Claude (domedog)" Date: Wed, 17 Jun 2026 14:38:20 +0200 Subject: [PATCH 1/2] build(iso): upgrade FreeBSD Python 3.11 -> 3.12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Standardize the ISO on the agreed Python 3.12 floor (operator + Hermes + Claude consensus; see layered-soul/docs/TOOLCHAIN.md). - pkg lists: python311->python312, py311-{pip,aider_chat,pillow}->py312-* - build.sh: derive the installed python3.N for the python3/python symlink so a future bump needs only a pkg-list change, never an edit here - shell-deploy.sh: create the Aider venv with 'python3 -m venv' (resolves via the symlink) instead of a hardcoded python3.11 - import-clawdie-skills.sh: python3 fallback instead of python3.11 - BUILD.md: doc references Aider kept (bumped, not dropped): redundant coding tooling is intentional per the agent matrix. Pre-merge gate: confirm FreeBSD pkg coverage on osa — pkg search '^py312-aider_chat' '^py312-pygobject' (common modules pillow/pip are safe). Co-Authored-By: Claude Opus 4.8 --- BUILD.md | 4 ++-- build.sh | 17 +++++++++++------ firstboot/shell-deploy.sh | 6 +++--- packages/pkg-list-host.txt | 8 ++++---- packages/pkg-list-live-operator.txt | 4 ++-- scripts/import-clawdie-skills.sh | 2 +- 6 files changed, 23 insertions(+), 18 deletions(-) diff --git a/BUILD.md b/BUILD.md index a7e63d4b..f1753f63 100644 --- a/BUILD.md +++ b/BUILD.md @@ -515,7 +515,7 @@ dependencies from desktop applications, not an installer direction: | `telegram-desktop` | `qt6-declarative`, `qt6-wayland`, `qt6-svg`, `qt6-lottie`, `kf6-*`, **`pipewire`** | | `simplescreenrecorder` | **`pulseaudio`**, **`pipewire`**, `qt6-base`, `ffmpeg` | | `mpv` | `ffmpeg`, `libplacebo`, `mesa-libs`, `wayland`, `vulkan-loader` | -| `gnumeric` | `python311`, `py311-pygobject`, `goffice` | +| `gnumeric` | `python312`, `py312-pygobject`, `goffice` | | `abiword` | `goffice`, `libgsf`, `wv` | `simplescreenrecorder` is the worst offender — a single niche tool drags @@ -561,7 +561,7 @@ Listed for completeness so the lean/full split stays honest: `FreeBSD-fwget`. - **Jails:** `bastille`. - **Operator diagnostics (tmux screenshot skill):** `tmux`, `screen`, - `mc`, `zip`, `unzip`, `7-zip`, `python311`, `py311-pillow`, `dejavu`. + `mc`, `zip`, `unzip`, `7-zip`, `python312`, `py312-pillow`, `dejavu`. - **Xorg base:** `xorg-minimal`, `xkeyboard-config`, `xkbcomp`, `xf86-input-libinput`, `xf86-video-scfb`, `xf86-video-intel`, `xf86-video-amdgpu`, `xf86-video-ati`, `drm-kmod`, diff --git a/build.sh b/build.sh index 3d744a8c..4af80dac 100755 --- a/build.sh +++ b/build.sh @@ -1246,12 +1246,17 @@ configure_live_operator_session() { chmod 0644 "${MOUNT_POINT}/etc/resolv.conf" fi - # FreeBSD packages ship python3.11 but not a bare python3 symlink. - # Scripts that use /usr/bin/env python3 break without this. - if [ -x "${MOUNT_POINT}/usr/local/bin/python3.11" ] && \ - [ ! -e "${MOUNT_POINT}/usr/local/bin/python3" ]; then - ln -sf python3.11 "${MOUNT_POINT}/usr/local/bin/python3" - ln -sf python3.11 "${MOUNT_POINT}/usr/local/bin/python" + # FreeBSD packages ship pythonX.Y (e.g. python3.12) but not a bare python3 + # symlink. Scripts that use /usr/bin/env python3 break without this. + # Derive the installed minor version so a future bump (3.12 -> 3.13) needs + # only a package-list change, never an edit here. + if [ ! -e "${MOUNT_POINT}/usr/local/bin/python3" ]; then + py_bin=$(ls "${MOUNT_POINT}/usr/local/bin"/python3.* 2>/dev/null \ + | sed 's@.*/@@' | grep -E '^python3\.[0-9]+$' | sort -V | tail -1) + if [ -n "${py_bin}" ]; then + ln -sf "${py_bin}" "${MOUNT_POINT}/usr/local/bin/python3" + ln -sf "${py_bin}" "${MOUNT_POINT}/usr/local/bin/python" + fi fi mkdir -p "${MOUNT_POINT}/usr/local/etc/sddm.conf.d" diff --git a/firstboot/shell-deploy.sh b/firstboot/shell-deploy.sh index 30feb8c4..a6d588d6 100755 --- a/firstboot/shell-deploy.sh +++ b/firstboot/shell-deploy.sh @@ -486,9 +486,9 @@ clawdie_shell_deploy_setup_aider_venv() { if [ ! -x "$python_bin" ]; then log_msg "[deploy] Creating Aider venv at $venv_dir" if [ "$(id -u)" -eq 0 ]; then - su - clawdie -c "python3.11 -m venv --system-site-packages '$venv_dir'" || return 1 + su - clawdie -c "python3 -m venv --system-site-packages '$venv_dir'" || return 1 else - python3.11 -m venv --system-site-packages "$venv_dir" || return 1 + python3 -m venv --system-site-packages "$venv_dir" || return 1 fi fi @@ -578,7 +578,7 @@ clawdie_shell_deploy_verify() { log_msg "[deploy] ✓ Aider available" fi else - log_msg "[deploy] ⚠ Aider CLI not found (py311-aider_chat missing)" + log_msg "[deploy] ⚠ Aider CLI not found (py312-aider_chat missing)" fi return $failed diff --git a/packages/pkg-list-host.txt b/packages/pkg-list-host.txt index e96a1cbe..8d9d6b35 100644 --- a/packages/pkg-list-host.txt +++ b/packages/pkg-list-host.txt @@ -14,9 +14,9 @@ bsddialog codex # Python / tooling -python311 -py311-pip -py311-aider_chat +python312 +py312-pip +py312-aider_chat just uv ripgrep @@ -35,7 +35,7 @@ postgresql18-client dnsmasq # Media / fonts -py311-pillow +py312-pillow dejavu # Wayland display stack (desktop installs) diff --git a/packages/pkg-list-live-operator.txt b/packages/pkg-list-live-operator.txt index 669d2838..d54445b5 100644 --- a/packages/pkg-list-live-operator.txt +++ b/packages/pkg-list-live-operator.txt @@ -65,8 +65,8 @@ zip unzip 7-zip bitchx -python311 -py311-pillow +python312 +py312-pillow dejavu # Hardware introspection. FreeBSD base already provides pciconf(8), # usbconfig(8), devinfo(8), and kldstat(8); add a few extra probes that diff --git a/scripts/import-clawdie-skills.sh b/scripts/import-clawdie-skills.sh index 87dac8fe..bd944f5e 100755 --- a/scripts/import-clawdie-skills.sh +++ b/scripts/import-clawdie-skills.sh @@ -71,7 +71,7 @@ for skill_md in "$CLAWDIE_AI"/.agent/skills/*/SKILL.md; do category="freebsd" fi - id=$(uuidgen 2>/dev/null || python3.11 -c "import uuid; print(uuid.uuid4())" 2>/dev/null || echo "skill-$(echo "$name" | md5)") + id=$(uuidgen 2>/dev/null || python3 -c "import uuid; print(uuid.uuid4())" 2>/dev/null || echo "skill-$(echo "$name" | md5)") sqlite3 "$DB" "INSERT OR IGNORE INTO skills (id, name, description, category, created_at) VALUES ('$id', '$(echo "$name" | sed "s/'/''/g")', '$(echo "$description" | sed "s/'/''/g")', '$category', '$NOW');" 2>/dev/null && IMPORTED=$((IMPORTED + 1)) || SKIPPED=$((SKIPPED + 1)) From 79ea3b45909905909737f130a7427633c2144be1 Mon Sep 17 00:00:00 2001 From: Pi ISO Developer Date: Wed, 17 Jun 2026 14:56:38 +0200 Subject: [PATCH 2/2] build(iso): drop py311-only extras from Python 3.12 lane --- BUILD.md | 10 +++++----- README.md | 2 +- TESTING.md | 4 ++-- firstboot/shell-deploy.sh | 2 +- packages/pkg-list-disk-install-extras.txt | 3 +-- packages/pkg-list-host.txt | 3 --- packages/pkg-list-live-operator.txt | 1 - 7 files changed, 10 insertions(+), 15 deletions(-) diff --git a/BUILD.md b/BUILD.md index f1753f63..093a00ee 100644 --- a/BUILD.md +++ b/BUILD.md @@ -456,7 +456,7 @@ installed onto the live rootfs. **Two distinct categories live in the same file** with the same code path (fetched, not installed on live), but different long-term homes: -1. **Desktop-spin leftovers** (telegram-desktop, mpv, abiword, gnumeric, +1. **Desktop-spin leftovers** (telegram-desktop, mpv, abiword, simplescreenrecorder, …). Inherited from the earlier all-in-one desktop image. Don't match the operator-USB role. **Long-term home: disk-install only.** Not returning to the live USB. @@ -483,7 +483,6 @@ disk-install consumer still needs to install | ---------------------- | ------------------------------------------------------ | -----------------------------: | -------------: | ----------------- | | `blender` | Parametric 3D modelling + Python `bpy` skill substrate | (large; measure on next image) | (large) | roadmap-essential | | `telegram-desktop` | Messaging | 52.08 MiB | 236.90 MiB | leftover | -| `gnumeric` | Spreadsheet | 13.14 MiB | 45.91 MiB | leftover | | `abiword` | Word processor | 4.75 MiB | 21.60 MiB | leftover | | `mpv` | Media player | 1.60 MiB | 6.96 MiB | leftover | | `simplescreenrecorder` | Screen/audio capture | 1.31 MiB | 3.83 MiB | leftover | @@ -515,7 +514,6 @@ dependencies from desktop applications, not an installer direction: | `telegram-desktop` | `qt6-declarative`, `qt6-wayland`, `qt6-svg`, `qt6-lottie`, `kf6-*`, **`pipewire`** | | `simplescreenrecorder` | **`pulseaudio`**, **`pipewire`**, `qt6-base`, `ffmpeg` | | `mpv` | `ffmpeg`, `libplacebo`, `mesa-libs`, `wayland`, `vulkan-loader` | -| `gnumeric` | `python312`, `py312-pygobject`, `goffice` | | `abiword` | `goffice`, `libgsf`, `wv` | `simplescreenrecorder` is the worst offender — a single niche tool drags @@ -560,8 +558,10 @@ Listed for completeness so the lean/full split stays honest: - **Networking:** `tailscale`, `networkmgr`, `wifi-firmware-kmod`, `FreeBSD-fwget`. - **Jails:** `bastille`. -- **Operator diagnostics (tmux screenshot skill):** `tmux`, `screen`, - `mc`, `zip`, `unzip`, `7-zip`, `python312`, `py312-pillow`, `dejavu`. +- **Operator diagnostics:** `tmux`, `screen`, `mc`, `zip`, `unzip`, + `7-zip`, `python312`, `dejavu`. Python package-flavored extras such as + Pillow stay out of pkg lists until FreeBSD quarterly publishes Python 3.12 + flavors. - **Xorg base:** `xorg-minimal`, `xkeyboard-config`, `xkbcomp`, `xf86-input-libinput`, `xf86-video-scfb`, `xf86-video-intel`, `xf86-video-amdgpu`, `xf86-video-ati`, `drm-kmod`, diff --git a/README.md b/README.md index 522cc336..007b8d13 100644 --- a/README.md +++ b/README.md @@ -286,7 +286,7 @@ and allocated size; write the logical image to a USB key large enough for it. tailscale version firefox tmux -V - python3 -c "import PIL; print(PIL.__version__)" + python3 --version bastille --help mdo -u root bastille --help test -f /usr/local/share/fonts/dejavu/DejaVuSansMono.ttf diff --git a/TESTING.md b/TESTING.md index b63e794e..b5a11992 100644 --- a/TESTING.md +++ b/TESTING.md @@ -523,7 +523,7 @@ command -v pi pi --help tailscale version tmux -V -python3 -c "import PIL; print(PIL.__version__)" +python3 --version bastille --help mdo -u root bastille --help ``` @@ -1087,7 +1087,7 @@ Mark the image good only when all of these are true: - [ ] `pi --help` works - [ ] `tailscale version` works - [ ] `tmux -V` works -- [ ] `python3 -c "import PIL; print(PIL.__version__)"` works +- [ ] `python3 --version` reports Python 3.12 - [ ] `bastille --help` works - [ ] `sudo` is absent from the live image - [ ] no stale-label confusion remains on the flashed USB stick diff --git a/firstboot/shell-deploy.sh b/firstboot/shell-deploy.sh index a6d588d6..fb713904 100755 --- a/firstboot/shell-deploy.sh +++ b/firstboot/shell-deploy.sh @@ -578,7 +578,7 @@ clawdie_shell_deploy_verify() { log_msg "[deploy] ✓ Aider available" fi else - log_msg "[deploy] ⚠ Aider CLI not found (py312-aider_chat missing)" + log_msg "[deploy] ⚠ Aider CLI not found (Aider venv setup missing)" fi return $failed diff --git a/packages/pkg-list-disk-install-extras.txt b/packages/pkg-list-disk-install-extras.txt index e5ed5acf..67efa5da 100644 --- a/packages/pkg-list-disk-install-extras.txt +++ b/packages/pkg-list-disk-install-extras.txt @@ -4,7 +4,7 @@ # Two categories live here. They share the same code path (fetched to the # offline repo, not installed on live) but have different long-term homes: # -# 1. Desktop-spin leftovers (telegram-desktop, mpv, abiword, gnumeric, ...). +# 1. Desktop-spin leftovers (telegram-desktop, mpv, abiword, ...). # Long-term home: disk-install only. Not coming back to the live USB. # # 2. Roadmap-essential, deferred for stabilization (blender). First-class @@ -31,7 +31,6 @@ zed-editor telegram-desktop epdfview abiword -gnumeric antiword catdoc xls2txt diff --git a/packages/pkg-list-host.txt b/packages/pkg-list-host.txt index 8d9d6b35..db970c38 100644 --- a/packages/pkg-list-host.txt +++ b/packages/pkg-list-host.txt @@ -15,8 +15,6 @@ codex # Python / tooling python312 -py312-pip -py312-aider_chat just uv ripgrep @@ -35,7 +33,6 @@ postgresql18-client dnsmasq # Media / fonts -py312-pillow dejavu # Wayland display stack (desktop installs) diff --git a/packages/pkg-list-live-operator.txt b/packages/pkg-list-live-operator.txt index d54445b5..f47c8b7c 100644 --- a/packages/pkg-list-live-operator.txt +++ b/packages/pkg-list-live-operator.txt @@ -66,7 +66,6 @@ unzip 7-zip bitchx python312 -py312-pillow dejavu # Hardware introspection. FreeBSD base already provides pciconf(8), # usbconfig(8), devinfo(8), and kldstat(8); add a few extra probes that