Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ add_test(NAME config_pin_check COMMAND python3 ${CMAKE_SOURCE_DIR}/tools/ci/conf
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
add_test(NAME config_pin_check_selftest COMMAND python3 ${CMAKE_SOURCE_DIR}/tools/ci/config_pin_check.py --self-test
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
# Gantt "Kernel 7.4 readiness": the inputs written inline in workflows and build scripts (a container image, a
# `uses:` ref, a raw download, a pip requirement) name a commit or a digest. CI's `ubuntu:26.04` changed digest between
# 2026-11-09 and 2026-11-13 with no change in this tree. Offline, reads the tree only.
add_test(NAME moving_ref_check COMMAND python3 ${CMAKE_SOURCE_DIR}/tools/ci/moving_ref_check.py --check --root ${CMAKE_SOURCE_DIR})
add_test(NAME moving_ref_check_selftest COMMAND python3 ${CMAKE_SOURCE_DIR}/tools/ci/moving_ref_check.py --self-test)
# engine#2183: the lost-update class has a second medium. `registration_loss_check` covers what a branch removes
# from the BUILD; this covers what it removes from the DOCS -- a rebase that resolved `docs/npu.md` by taking the
# branch's side dropped a section that had merged that morning (#2314). Offline, git-only, no build input.
Expand Down
22 changes: 22 additions & 0 deletions docs/model-pins.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,28 @@ makes the run's first line say so, and adding it is `--pin` plus a `used_for` th
A repo of `.1bp` packs is not pinned here, and a private repo never is (next section) — both are filtered
out, so the census cannot go permanently red over something this file must not contain.

## Build inputs

The model pins above are one kind of input. A build or CI run also takes inputs written inline in workflows and
scripts, and each of those is named by a commit or a digest too, so a release is a pin bump and not a scramble:

| input | pinned where | example |
|---|---|---|
| CI container | `.github/workflows/ci.yml` `image:` | `ubuntu:26.04@sha256:065aa862…` (the tag moved between 2026-11-09 and 2026-11-13). **Owed**: a workflow edit needs the `workflow` token scope, so it is baselined in `tools/ci/moving_ref_baseline.txt` until the owner applies it |
| CI Python packages | the `pip install` line | `numpy==2.5.4 gguf==0.19.0` (**owed**, same reason) |
| GitHub Actions | every `uses:` | a 40-hex commit |
| package-build containers | `scripts/pack-distro.sh` | `fedora:45@sha256:…`, `archlinux:base-20261108.0.623074@sha256:…` |
| Puppy appliance | [`os/v3/puppy/pin.txt`](../os/v3/puppy/pin.txt) | the woof-CE commit, the build container digest, `vercmp.c` by commit + sha256 |

[`tools/ci/moving_ref_check.py`](../tools/ci/moving_ref_check.py) (ctest `moving_ref_check`) fails a tree that names
a branch, a tag or no version in any of these places, except the rows listed in
[`tools/ci/moving_ref_baseline.txt`](../tools/ci/moving_ref_baseline.txt). That baseline only shrinks: a row that no
longer matches anything fails the check too. A read that is moving on purpose carries a
`moving-ref: <why>` comment on the line or the line above it, and the check prints that reason. Two kinds of read
are marked this way: the bump bots, which read the newest release only to propose a pin, and `scripts/pack-proof.sh`,
whose point is "installs on this distro as users pull it today". A new image or version is a reviewed edit of the
line that names it.

## What is not pinned, and why

- `base_model` on a card is provenance, not a dependency: what we took from a vendor repo is the file we
Expand Down
3 changes: 3 additions & 0 deletions os/v3/puppy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ not with this installer. The Ubuntu design in [docs/os-v3.md](../../../docs/os-v
| `sb-vars.sh` | OVMF's variable store with our certificate enrolled in `db`, so a QEMU boot verifies the appliance the way the board does |
| `mk-huge-kernel.sh` | our kernel as woof-CE's kernel package (`huge-<kver>.tar.*`: `vmlinuz-<kver>` + a zdrv SFS with the module tree, the firmware and a marker). **Refuses an unsigned kernel image** |
| `build.sh` | woof-CE's CI recipe in a throwaway container, with our kernel and the build root on a host filesystem. Host side only: it resolves the inputs, then runs `container-build.sh` |
| `pin.txt` | the inputs by commit or digest: the woof-CE commit, the build container (`ubuntu:24.04@sha256:…`), and `vercmp.c` by initrd_progs commit + sha256. `build.sh` **refuses a woof-CE clone at any other commit** (`WOOF_CE_UNPINNED=1` builds anyway, with a warning that the image is not reproducible from the tree); `container-build.sh` refuses a `vercmp.c` whose sha256 differs |
| `container-build.sh` | what runs **inside** the container (merge2out → kernel into `kernel-kit/output` → 0setup → 1download → 2createpackages → 3builddistro, then the embed and the artifact checks). Its own file since cycle 14: as a 300-line single-quoted `bash -c '…'` string inside `build.sh`, one apostrophe in a comment ended the quote and bash reported a syntax error a hundred lines away — five builds in this lane — and shellcheck could not check it at all |
| `g2-probe.sh` | gate G2: boot the built ISO headless in QEMU and keep the init's transcript, so "it boots on our kernel" is a measurement |
| `g3-probe.sh` | gate G3, artifact half: the ISO carries our kernel, **that kernel image is signed**, its zdrv carries the module tree, and `amdxdna`/`ec_su_axb35` are built for that kernel and signed. `--cert <mok.pem>` requires the image's signature to be the enrolled MOK's; `--require-mok` for the release gate |
Expand Down Expand Up @@ -113,6 +114,8 @@ os/v3/puppy/mk-huge-kernel.sh <stage> <out-dir>
os/v3/puppy/build.sh resolute64 <kernel-out-dir> <puppy-out-dir> [woof-CE-dir]
# (woof-CE defaults to $HOME/wt/woof-CE - not /tmp, which a reboot empties; the 4th argument is the
# clone, and the build copies it into the build root itself)
# The clone must be at the woof_ce_commit in os/v3/puppy/pin.txt:
# git clone https://github.com/puppylinux-woof-CE/woof-CE ~/wt/woof-CE-pin && git -C ~/wt/woof-CE-pin checkout <woof_ce_commit>
# A new BUILD_ROOT downloads 2.6 GB again, and one mirror hiccup over a thousand files fails the
# build (measured: one package, all four mirrors, and the URL was fine minutes later). If the box has
# built before, seed the cache instead: sudo cp -a <old-build-root>/local-repositories <new-build-root>/
Expand Down
19 changes: 17 additions & 2 deletions os/v3/puppy/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,21 @@ case "$woof_real/" in
exit 1 ;;
esac
kernel=$(cd "$kernel" && pwd)
# The pinned inputs (os/v3/puppy/pin.txt): the woof-CE commit, the build container by digest, vercmp.c by commit.
pinfile="$(cd "$(dirname "$0")" && pwd)/pin.txt"
pin() { sed -n "s/^$1=//p" "$pinfile" | head -n 1; }
woof_pin=$(pin woof_ce_commit) build_image=$(pin build_image)
[ -n "$woof_pin" ] && [ -n "$build_image" ] || { echo "build: REFUSED: $pinfile names no woof_ce_commit / build_image" >&2; exit 1; }
woof_head=$(git -C "$woof" rev-parse HEAD 2>/dev/null || echo "no git metadata")
if [ "$woof_head" != "$woof_pin" ]; then
if [ "${WOOF_CE_UNPINNED:-0}" = 1 ]; then
echo "build: WARNING: woof-CE at $woof is $woof_head, the pin is $woof_pin (WOOF_CE_UNPINNED=1: building anyway; this image is not reproducible from the tree)" >&2
else
printf 'build: REFUSED: woof-CE at %s is %s, os/v3/puppy/pin.txt pins %s.\n' "$woof" "$woof_head" "$woof_pin" >&2
printf 'build: git -C %s fetch origin && git -C %s checkout %s (or WOOF_CE_UNPINNED=1 for a deliberate experiment)\n' "$woof" "$woof" "$woof_pin" >&2
exit 1
fi
fi
ls "$kernel"/huge-*.tar.* >/dev/null 2>&1 || {
echo "build: no huge-*.tar.* in $kernel (run mk-huge-kernel.sh first)" >&2; exit 1; }
mkdir -p "$out"; out=$(cd "$out" && pwd)
Expand Down Expand Up @@ -161,7 +176,7 @@ if [ -n "$tui_bin" ]; then
echo "build: console TUI $tui_bin ($(sha256sum "$tui_bin" | cut -c1-16))"
fi

echo "build: woof-CE $woof, kernel $kernel, out $out, build root $build_root ($mnt_opts)"
echo "build: woof-CE $woof ($woof_head), image $build_image, kernel $kernel, out $out, build root $build_root ($mnt_opts)"
# The container side is its own file (os/v3/puppy/container-build.sh, mounted at /recipe) since 2026-11-02:
# it was a 300-line single-quoted `bash -c '...'` string here, where one apostrophe in a comment ended the
# quote and bash reported a syntax error a hundred lines away - five builds in this lane, two of them in
Expand All @@ -179,4 +194,4 @@ exec docker run --rm --privileged --memory=12g --cpus=4 \
${tui_bin:+-v "$tui_bin":/console-tui:ro} \
${tui_bin:+-e CONSOLE_TUI_BIN=/console-tui} \
--device /dev/loop-control:/dev/loop-control \
-e COMPAT="$compat" ubuntu:24.04 bash /recipe/container-build.sh
-e COMPAT="$compat" "$build_image" bash /recipe/container-build.sh
8 changes: 7 additions & 1 deletion os/v3/puppy/container-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ bash -n woof-code/3builddistro || { echo "build: REFUSED: the patched 3builddist
echo " ok: 3builddistro normalises rootfs-complete and devx before packing, keeping their setuid bits"
mkdir -p /work/local-repositories petbuild-sources petbuild-cache petbuild-output
[ -e ../local-repositories ] || ln -s /work/local-repositories ../local-repositories
[ -f local-repositories/vercmp ] || curl -fsSL https://raw.githubusercontent.com/puppylinux-woof-CE/initrd_progs/master/pkg/w_apps_static/w_apps/vercmp.c | gcc -x c -o local-repositories/vercmp -
# vercmp.c at the commit and sha256 os/v3/puppy/pin.txt names (it came from initrd_progs `master` before 2026-11-13)
if [ ! -f local-repositories/vercmp ]; then
vercmp_url=$(sed -n 's/^vercmp_url=//p' /recipe/pin.txt) vercmp_sha=$(sed -n 's/^vercmp_sha256=//p' /recipe/pin.txt)
curl -fsSL "$vercmp_url" -o /tmp/vercmp.c
echo "$vercmp_sha /tmp/vercmp.c" | sha256sum -c --quiet - || { echo "build: REFUSED: vercmp.c from $vercmp_url is not sha256 $vercmp_sha" >&2; exit 1; }
gcc -x c -o local-repositories/vercmp /tmp/vercmp.c
fi
install -m 755 local-repositories/vercmp /usr/local/bin/vercmp
install -D -m 644 woof-code/rootfs-skeleton/usr/local/petget/categories.dat /usr/local/petget/categories.dat
# initrd-progs packs its initrd with `find . | cpio -o -H newc > ../initrd 2>/dev/null`, so without cpio the
Expand Down
28 changes: 28 additions & 0 deletions os/v3/puppy/pin.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2026 bong-water-water-bong
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The inputs the Puppy appliance is built from, each named by something that cannot move.
# build.sh reads this file; a new input is a reviewed change to this file (Refs Gantt "Kernel 7.4 readiness").
#
# woof-CE: the commit the cycle-17..21 images were built from (2026-10-27, "Update kernel-kit-k6.18.yml").
# Upstream `testing` was 3 commits past it by 2026-11-13, so a fresh clone no longer builds the same image.
# build.sh refuses a clone at any other commit unless WOOF_CE_UNPINNED=1 is set.
woof_ce_repo=https://github.com/puppylinux-woof-CE/woof-CE
woof_ce_commit=c3a5c6d42b41d424ebeb24e6fc05d31da8f11fac
# The container the build runs in: ubuntu:24.04 by digest (resolved from Docker Hub 2026-11-13).
build_image=ubuntu:24.04@sha256:2198e4c65076e9cb0b3d695219df667c0e3b0072da64ca3c2648aca17dcecaf5
# vercmp.c from initrd_progs. It used to come from `master`; this is the commit master pointed at on 2026-11-13
# (2025-12-27). The sha256 is checked before the file is compiled.
vercmp_url=https://raw.githubusercontent.com/puppylinux-woof-CE/initrd_progs/176c2df25840dbe1bb34fa9f71e9a7b6904ec9e7/pkg/w_apps_static/w_apps/vercmp.c
vercmp_sha256=271fe14a033714ccdc48b186527b0ee78b2c5e4b775aebe7f9a9a1d1ecd24a9e
4 changes: 2 additions & 2 deletions scripts/pack-distro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ SH
docker run --rm -v "$work:/build" -w /build -e HOSTUID="$(id -u)" -e HOSTGID="$(id -g)" \
-e VER="$ver" -e REL="$rel" -e SPEC="$(basename "$spec")" \
-e CHLOGDATE="$(LC_ALL=C date '+%a %b %d %Y')" \
fedora:latest bash /build/in-container.sh > "$work/rpmbuild.log" 2>&1 ||
fedora:45@sha256:a7d72ba2745b100a3351087472e5ee7b2450af7cf331e7673007e3817612839c bash /build/in-container.sh > "$work/rpmbuild.log" 2>&1 ||
{ tail -30 "$work/rpmbuild.log" >&2; exit 1; }
built=$(find "$work/rpmbuild/RPMS" -name '*.rpm' -type f | head -1)
[ -n "$built" ] || { echo "pack-distro.sh: rpmbuild produced no package" >&2; exit 1; }
Expand Down Expand Up @@ -220,7 +220,7 @@ su builder -c 'cd /build && makepkg -f --nodeps --noconfirm'
SH
docker run --rm -v "$work:/build" -w /build -e HOSTUID="$(id -u)" -e HOSTGID="$(id -g)" \
-e PKGVER="$ver" -e PKGREL="$rel" \
archlinux:latest bash /build/in-container.sh > "$work/makepkg.log" 2>&1 ||
archlinux:base-20261108.0.623074@sha256:d4594bb2300cba11f41c2f27923eb56f63d9988909c402f9c95517d1e362c899 bash /build/in-container.sh > "$work/makepkg.log" 2>&1 ||
{ tail -30 "$work/makepkg.log" >&2; exit 1; }
built=$(find "$work" -maxdepth 1 -name '*.pkg.tar.zst' -type f | head -1)
[ -n "$built" ] || { echo "pack-distro.sh: makepkg produced no package" >&2; exit 1; }
Expand Down
3 changes: 3 additions & 0 deletions scripts/pack-proof.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,15 @@ apt-get remove -y -qq 1bit-engine >/dev/null 2>&1 || { echo 'apt-get remove fail
[ ! -e /opt/1bit/engine/1bit ] || { echo 'the payload survived the removal'; exit 1; }
"

# moving-ref: the proof is that the package installs on this distro as a user pulls it today, so the newest image is the point
run_row "rpm, fedora" fedora:latest "
dnf -y -q install /pkg/$rpm >/dev/null 2>&1 || { echo 'dnf install failed'; exit 1; }
$body
dnf -y -q remove 1bit-engine >/dev/null 2>&1 || { echo 'dnf remove failed'; exit 1; }
[ ! -e /opt/1bit/engine/1bit ] || { echo 'the payload survived the removal'; exit 1; }
"

# moving-ref: the proof is that the package installs on this distro as a user pulls it today, so the newest image is the point
run_row "rpm, opensuse tumbleweed" opensuse/tumbleweed:latest "
zypper --non-interactive --gpg-auto-import-keys install --allow-unsigned-rpm /pkg/$rpm >/dev/null 2>&1 ||
{ echo 'zypper install failed'; exit 1; }
Expand All @@ -118,6 +120,7 @@ zypper --non-interactive remove 1bit-engine >/dev/null 2>&1 || { echo 'zypper re
[ ! -e /opt/1bit/engine/1bit ] || { echo 'the payload survived the removal'; exit 1; }
"

# moving-ref: the proof is that the package installs on this distro as a user pulls it today, so the newest image is the point
run_row "arch, pacman" archlinux:latest "
pacman -Sy --noconfirm >/dev/null 2>&1 || { echo 'pacman -Sy failed'; exit 1; }
pacman -U --noconfirm /pkg/$arch_pkg >/dev/null 2>&1 || { echo 'pacman -U failed'; exit 1; }
Expand Down
22 changes: 22 additions & 0 deletions tools/ci/moving_ref_baseline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2026 bong-water-water-bong
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Moving build inputs that are known and owed (tools/ci/moving_ref_check.py). One row per finding:
# path<TAB>rule<TAB>text<TAB>why it waits
# The check fails on a finding not listed here AND on a row that no longer matches, so this file only shrinks.
# All three rows are workflow files: a push that changes .github/workflows needs the `workflow` token scope, which the
# lanes do not have. The fix is the patch named in the PR that added this file; the owner applies it, then deletes these rows.
.github/workflows/ci.yml image ubuntu:26.04 pin to ubuntu:26.04@sha256:065aa8626841f16057b78b027b464cd59c4fac36c204c72dcbf48d66f5fa8a96 (workflow scope)
.github/workflows/ci.yml pip numpy gguf (no ==version) pin numpy==2.5.4 gguf==0.19.0 (workflow scope)
.github/workflows/bump-tokenizers.yml latest releases/latest deliberate (the bump bot proposes a pin): add a moving-ref comment (workflow scope)
Loading
Loading