Repository navigation
refactor: shared sysext packing recipe, arm64 binary pins, base-image cleanups - #279
Merged
Merged
Conversation
This was referenced Sep 29, 2026
kubestellar, kubeadm and zfs each carried a copy of the same tail: stamp
extension-release, mkfs.erofs, zstd, SHA256SUMS. include/sysext.yml now
holds it as %{sysext-pack}; each element stages ./sysext, names itself with
sysext-* variables and runs the recipe last.
Outputs are unchanged: extracting the rebuilt images gives the same files,
contents, modes, owners and mtimes as before. Only the erofs superblock
UUID differs, which mkfs.erofs randomizes on every build.
Assisted-by: Claude Opus 5.5 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The asset name and VERSION_ID now live in sysext-image / sysext-version, so check-k0s-version.py reads those instead of FNAME= and the echoed VERSION_ID line, and the transfer test resolves sysext-image to the emitted .raw name. Drops the unused xz build dependency. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The description pointed at elements/oci/base.bst, which does not exist, and described base-stack as a shipped distroless runtime. Every reference is a build-depends; the OS payload is bluefin-server/os-base.bst. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The KubeStellar banner already ships in oci/kubestellar-sysext.bst (/usr/lib/issue.d, which agetty reads when /etc/issue is absent); the base image's banner has no KubeStellar text, so fix the os-stack.bst comment that said otherwise. k0s-first-boot.service must stay in /usr: a sysext cannot merge itself, and the k0s image sits in /var/lib/k0s, outside the extension directories. Record that, and that 80-bluefin-opt-in.preset keeps both units off. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
options.arch in project.conf only allows aarch64 and x86_64, so the ppc64le and riscv64 bootstrap_build_arch branches could never be taken. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
k0s-bin.bst takes the arm64 asset under arch == aarch64 (sha256 from the
release's sha256sums.txt) and installs the %{go-arch} file, a new amd64 /
arm64 spelling in include/arch.yml. The x86_64-only guards in k0s-bin.bst
and k0s-sysext.bst go; check-k0s-version.py now checks every source URL.
The x86_64 k0s sysext is unchanged (same files, modes and mtimes); a
-o arch aarch64 source fetch downloads and verifies only the arm64 asset.
Assisted-by: Claude Opus 5.5 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
arm64 kubelet, kubeadm, kubectl, crictl, containerd static, runc and CNI plugins, each sha256 taken from the checksum its project publishes next to the asset (the amd64 pins match theirs too). The x86_64 kubeadm sysext is unchanged. architecture-roadmap.md lists what still blocks an aarch64 image: no aarch64 FSDK artifacts in any cache, no CI build, and x86-only dogfood scripts. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mkfs.erofs gave every build a random filesystem UUID, the only difference between two builds of the same sysext: file contents, modes and mtimes already match because BuildStream exports SOURCE_DATE_EPOCH and mkfs.erofs clamps to it. With the UUID derived from sysext-image, two builds of each sysext with the artifacts deleted in between (and remote caches ignored) produce byte-identical .raw, .raw.zst and SHA256SUMS. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
castrojo
force-pushed
the
refactor/build-graph-cleanup
branch
from
September 29, 2026 08:01
5517e66 to
927b90d
Compare
castrojo
reviewed
Sep 29, 2026
castrojo
left a comment
Contributor
There was a problem hiding this comment.
Rebased branch onto current main to resolve the minor conflict in elements/bluefin-server/os-stack.bst (preserving both the system-container helper from #276 and the updated issue banner comment). All unit tests and docs checks pass locally.
jeefy
added a commit
that referenced
this pull request
Sep 29, 2026
…#288) #279 added arm64 sources under `arch == "aarch64"` in k0s-bin.bst and kubeadm-bin.bst after #272's tracker landed. The tracker already treats every `url:` line carrying a component's marker as a pin, so it rewrites the arm64 refs too, but nothing held it to that. Behavioural tests (mocked HTTP) now do: a runc and a k0s bump rewrite both architectures' refs; a release missing the arm64 asset is not a candidate; a missing arm64 asset or checksum fails the component and writes nothing; a no-op run leaves the files byte-identical; the real elements pin arm64 for every amd64 source. The docstring and the tracker docs say so. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Build-graph cleanup from the image/sysext audit. Each finding was checked first; two turned out to be already done and only needed their stale comments fixed.
1. Kubernetes bits in the base image
oci/kubestellar-sysext.bstas/usr/lib/issue.d/40-kubestellar.issue. The base banner (30-bluefin.issue) has no KubeStellar text. I checked the built/usr: it has no/etc/issue(factory or otherwise), so agetty falls back to/usr/lib/issue.d, which the merged sysext adds to. The only change here is the misleading comment inos-stack.bst.k0s-first-boot.servicestays in/usr.docs/skills/k0s-sysext.mdnow says why: a sysext can't merge itself, andk0s.rawlives in/var/lib/k0s, which is not an extension directory. It also records that80-bluefin-opt-in.presetdisables both units and no preset enables them (checked withgit grepoverfiles/).3. One packing recipe for the four sysexts
include/sysext.ymldefines%{sysext-pack}, which stamps extension-release, runsmkfs.erofs, compresses withzstd -19and writesSHA256SUMS. Eachoci/*-sysext.bststages./sysext, setssysext-{name,image,release,version,architecture}and runs the recipe as its last step. KubeStellar setssysext-architecture: ""because it had noARCHITECTURE=before.check-k0s-version.pynow readssysext-image/sysext-versioninstead of the oldFNAME=line and theecho VERSION_IDline. Its tests are updated to match, as aretest_signed_lockstep.pyandtest_kubeadm_sysext.py. The transfer test resolvessysext-imageto the emitted.rawname. The unusedxzbuild dependency is gone from the k0s sysext.fsck.erofs --extract --preserveand compared it with upstreammain. For all four sysexts the file list, contents, modes, owners and mtimes are identical. The only byte difference is the erofs superblock UUID, whichmkfs.erofsrandomizes.fix(sysext): derive the erofs UUID from the image name, fixes that one difference. With it, two builds (artifacts deleted in between, remote caches ignored) give byte-identical.raw,.raw.zstandSHA256SUMSfor all four sysexts.4. aarch64
ppc64le/riscv64bootstrap_build_archbranches, which can't be reached becauseoptions.archonly allows aarch64 and x86_64.k0s-bin.bstandkubeadm-bin.bstnow pick the arm64 sources whenarch == "aarch64". Every sha256 comes from the checksum the project publishes next to the asset; the existing amd64 pins match those files too. Installs use a new%{go-arch}(amd64/arm64) frominclude/arch.yml. The x86_64-only guards are gone, andcheck-k0s-version.pychecks every source URL.bst -o arch aarch64 showresolves all five targets.bst -o arch aarch64 source fetch k0s-bin kubeadm-bindownloads only arm64 assets and every ref checks out. The x86_64 k0s and kubeadm sysexts are unchanged (same files, modes and mtimes).architecture-roadmap.md):scripts/dogfood-*.shrunqemu-system-x86_64with x64 OVMF.MatchPatterns carry no architecture.8. The
base-stack.bstdescription pointed atelements/oci/base.bst, which doesn't exist. It now describes base-stack as what it is: the build sandbox, which nothing ships.Verification
python3 -m pytest tests/unit -qpasses: 372 in a throwaway worktree with no boot-keys.bats tests/unitpasses: 0 failures.python3 .github/scripts/docs-checks.pypasses.flock … just validatepasses.just export-imagethenflock … just dogfood-checkpasses: netboot boot reportsos=bluefin-server 26.09.2,failed=0.Follow-ups
track-binaries.pyrewrites only the amd64 pins, because it anchors on those URLs. Once both merge, it needs to learn the arm64 pins. Otherwise its first patch bump leaves the arm64 refs stale. x86_64 is unaffected; an aarch64 fetch would fail.tests/unit/test_kubeadm_sysext.py(ci(release): dry-run the publish path on pull requests; attest provenance and publish an SBOM #269 and ci: track patch releases of upstream binaries (Kubernetes, containerd, runc, CNI, k0s, ORAS) #272 edit nearby lines) and a one-line comment inos-stack.bst(feat(update): automatic updates with a Kubernetes interlock, a boot health gate and a diskless update signal #271). Both are trivial.