From 5352a8d8feaeddeecfc7c3752b72926d3d334377 Mon Sep 17 00:00:00 2001 From: scanner Date: Tue, 29 Sep 2026 14:36:34 -0400 Subject: [PATCH] docs(release): describe the SBOM's fixed creation time; scope the publish claim The SBOM's creationInfo.created is stamped from SOURCE_DATE_EPOCH, which BuildStream fixes to its sandbox default, so it always reads 2011-11-11T11:11:11Z. That is intentional (the SBOM stays bit-identical across rebuilds), but the docs read as if it were a real build time. Say what it is and point at the SLSA provenance attestation for the build time. The docs also called scripts/publish-release.sh the only publish path while `just publish-oci` still pushes on its own. Scope that claim to CI, and give the recipe the same source and revision annotations the script sets so the two artifacts differ only in the script's post-push verification. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner --- AGENTS.md | 2 +- Justfile | 7 +++++++ docs/skills/ddi-installer.md | 4 +++- docs/skills/systemd-sysupdate-verification.md | 16 ++++++++++++---- elements/oci/bluefin-server-image.bst | 4 ++++ elements/oci/bluefin-server-sbom.bst | 4 +++- 6 files changed, 30 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index eda78e27..dde5a9fc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -55,7 +55,7 @@ All local `just` targets run BuildStream inside the FSDK `bst2` container via `j | `just build-image` / `just export-image` | Build and export the release image set to `dist/diskless/`. | | `just dogfood` / `just dogfood-check` | Boot `dist/diskless/` diskless in QEMU with Secure Boot (interactive / headless probe). | | `just dogfood-install NEXT=` | QEMU end-to-end: diskless boot, install to disk, boot it, then A/B update to NEXT. | -| `just publish-oci REF [DIR] [PLAIN_HTTP]` | Push `dist/diskless/` as an ORAS OCI artifact tagged `,latest` (one layer per file). | +| `just publish-oci REF [DIR] [PLAIN_HTTP]` | Push `dist/diskless/` as an ORAS OCI artifact tagged `,latest` (one layer per file). Local rehearsal; CI publishes via `scripts/publish-release.sh`. | | `just build-sysext` / `just export-sysext` | Build and export the k0s and KubeStellar `systemd-sysext` images. | | `just build-zfs-sysext` / `just export-zfs-sysext` | Build and export the OpenZFS `systemd-sysext`. | diff --git a/Justfile b/Justfile index 0eb280ac..26bd4b45 100644 --- a/Justfile +++ b/Justfile @@ -133,11 +133,16 @@ dogfood-install NEXT="": # REF=ghcr.io//bluefin-server or :30500/bluefin-server # (PLAIN_HTTP=1); log in with podman login first. One layer per file. +# Local rehearsal only: releases are published by scripts/publish-release.sh +# from .github/workflows/build.yml, which also verifies the pushed manifest +# against the local files. This recipe pushes the same artifact type, +# annotations and layout, and nothing else. # Publish an image set as an ORAS OCI artifact tagged and latest. [group('diskless')] publish-oci REF DIR="dist/diskless" PLAIN_HTTP="0": #!/usr/bin/env bash set -euo pipefail + revision="$(git rev-parse HEAD)" cd "{{DIR}}" uki="$(ls bluefin-server-netboot_*.efi)" ver="${uki#bluefin-server-netboot_}"; ver="${ver%.efi}" @@ -150,6 +155,8 @@ publish-oci REF DIR="dist/diskless" PLAIN_HTTP="0": {{oras_image}} push "${extra[@]}" \ --artifact-type application/vnd.projectbluefin.server.release.v1 \ --annotation "org.opencontainers.image.version=${ver}" \ + --annotation "org.opencontainers.image.source=${GITHUB_SERVER_URL:-https://github.com}/${GITHUB_REPOSITORY:-projectbluefin/server}" \ + --annotation "org.opencontainers.image.revision=${revision}" \ "{{REF}}:${ver},latest" "${files[@]}" # Boot dist/diskless/ in QEMU with Secure Boot, pulling /usr over HTTP. diff --git a/docs/skills/ddi-installer.md b/docs/skills/ddi-installer.md index 7a8daaf2..0edcc0d2 100644 --- a/docs/skills/ddi-installer.md +++ b/docs/skills/ddi-installer.md @@ -46,7 +46,9 @@ GPT partition label with room to spare): A release is this directory published as-is: a GitHub Release `v` plus an ORAS OCI artifact `ghcr.io//bluefin-server:,latest` (one layer per file, artifact type `application/vnd.projectbluefin.server.release.v1`). -`just publish-oci REF [DIR] [PLAIN_HTTP]` pushes the same artifact locally. +`just publish-oci REF [DIR] [PLAIN_HTTP]` pushes the same artifact locally, as +a rehearsal; CI publishes through `scripts/publish-release.sh`, which also +verifies the pushed manifest against the local files. The /usr image itself is built by `oci/bluefin-server-usr.bst` with an offline `systemd-repart`: an erofs partition (`bluefin_usr_`) plus its dm-verity diff --git a/docs/skills/systemd-sysupdate-verification.md b/docs/skills/systemd-sysupdate-verification.md index b59ea5ab..99a17c84 100644 --- a/docs/skills/systemd-sysupdate-verification.md +++ b/docs/skills/systemd-sysupdate-verification.md @@ -113,10 +113,18 @@ tell a human or a policy engine which commit and workflow run produced it. OpenZFS sysext payloads. It lists one SPDX package per source (name, version, download URL, source kind). Build-only elements such as the signing keys are not runtime dependencies of that payload and never - appear. The image element stamps `creationInfo.created` and ships it as - `bluefin-server_.spdx.json`, listed in `SHA256SUMS`, so the GPG - signature covers it too. No transfer matches it, so nodes never download it. -- **Publishing.** `scripts/publish-release.sh` is the only publish path. + appear. SPDX requires a `creationInfo.created`, which the plugin leaves to + the build, so the image element stamps it from `SOURCE_DATE_EPOCH`. The + build runs in a BuildStream sandbox that fixes `SOURCE_DATE_EPOCH` to + BuildStream's own default (1321009871), so the field always reads + `2011-11-11T11:11:11Z`: it is a reproducibility placeholder, not a build + time. Use the SLSA provenance attestation (or the release tag) for when a + set was built. The SBOM ships as `bluefin-server_.spdx.json`, listed + in `SHA256SUMS`, so the GPG signature covers it too. No transfer matches + it, so nodes never download it. +- **Publishing.** In CI, `scripts/publish-release.sh` is the only publish + path (`just publish-oci` pushes to a local or personal registry for + rehearsal and runs none of the script's checks). `verify` checks what nodes will check (`gpgv` against the keyring, every `SHA256SUMS` entry present and matching), plus: every published file is listed, every file name carries the release version, and the SBOM is valid diff --git a/elements/oci/bluefin-server-image.bst b/elements/oci/bluefin-server-image.bst index 3468d85a..d07e75a3 100644 --- a/elements/oci/bluefin-server-image.bst +++ b/elements/oci/bluefin-server-image.bst @@ -175,6 +175,10 @@ config: # SPDX requires a creation time, which the plugin leaves to the build, # and unique SPDXIDs: FSDK bootstrap elements reached through two # junction paths are collected twice, as identical packages. + # SOURCE_DATE_EPOCH is BuildStream's fixed sandbox default (1321009871), + # so created is always 2011-11-11T11:11:11Z. That keeps the SBOM bit + # identical across rebuilds; the real build time lives in the SLSA + # provenance attestation, not here. jq --arg created "$(date -u -d "@${SOURCE_DATE_EPOCH}" +%Y-%m-%dT%H:%M:%SZ)" \ '.creationInfo.created = $created | .packages |= unique_by(.SPDXID) diff --git a/elements/oci/bluefin-server-sbom.bst b/elements/oci/bluefin-server-sbom.bst index e94f06da..552e9271 100644 --- a/elements/oci/bluefin-server-sbom.bst +++ b/elements/oci/bluefin-server-sbom.bst @@ -19,7 +19,9 @@ description: | oci/*-sysext.bst element for its own local sources (units, extension-release, config), and the element it stages them from. - oci/bluefin-server-image.bst stamps creationInfo.created and ships the + oci/bluefin-server-image.bst stamps creationInfo.created from the + sandbox's fixed SOURCE_DATE_EPOCH (always 2011-11-11T11:11:11Z, a + reproducibility placeholder rather than a build time) and ships the result as bluefin-server_.spdx.json inside the signed SHA256SUMS. (@):