Repository navigation
build: reproducible image assembly, key-set safety, patch docs - #281
Merged
Merged
Conversation
A complete set was already kept, but the check looked only at DB.key and sysupdate-signing.asc: with DB.key gone the script regenerated PK, KEK and the module certificate over the existing files, and with the signing key gone it replaced import-pubring.pgp. Both sets are now checked file by file (an empty file counts as missing) and a partial set exits 1 before anything is written. tests/unit/test_gen_dev_keys.py runs the script against a scratch tree with openssl and gpg stubbed: a complete set is left untouched, every partial set is refused without calling either tool, and --force still regenerates. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
patches/README.md records why each patch exists, whether it went upstream and when to drop it, and that 0003-0005 name full library versions (libgirepository 1.0.0, gdk-pixbuf 0.4400.7, appstream 1.1.6) that a component bump leaves dangling while the patch still applies. bump-fsdk-version.md pointed at a single remaining CAS patch; it now links the README and adds the version comparison to the bump procedure. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cpio --reproducible fixes inode and device numbers but keeps mtimes, and everything the boot element creates in the initrd tree (symlinks, sysusers output, depmod indexes) carried the build time, so every rebuild gave a different initrd and UKIs. Rebuilds now differ in no initrd byte. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
sbsign puts the current time in each Authenticode signature's signingTime attribute; systemd-sbsign (FSDK systemd, /usr/lib/systemd) takes it from SOURCE_DATE_EPOCH, so a rebuild with the same keys signs identically. sbverify still checks every output. ukify needs --no-sign-kernel with this signtool, which keeps today's behaviour: the embedded kernel was never signed on its own, only the UKI. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The staged ESP trees carried the build time into the FAT entries (mcopy keeps mtimes) and mkfs.fat from dosfstools 4.2, which ignores SOURCE_DATE_EPOCH, stamped each volume label with the current time. Clamp the trees before systemd-repart and pass --invariant to mkfs.fat through SYSTEMD_REPART_MKFS_OPTIONS_VFAT (which also fixes the ESP volume ID). Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
reproducibility.yml builds the image set, deletes the final-assembly artifacts, rebuilds them without remote caches and diffs every output except *.gpg. efi-keys.bst stays cached: sbvarsign stamps the current time into each signed variable update and has no option to fix it. ddi-installer-build.md records what makes the assembly reproducible. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jeefy
added a commit
to jeefy/server
that referenced
this pull request
Sep 29, 2026
A wall-clock creation time made every rebuild of the release set differ and defeats the reproducibility check proposed in projectbluefin#281. Assisted-by: Claude Opus 5.5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keeps main's patch bullet in bump-fsdk-version.md and adds this branch's pointer to patches/README.md. 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
5. Key rotation
Overwrite check.
scripts/gen-dev-keys.shalready kept a complete key set without--force. But it only checkedDB.keyandsysupdate-signing.asc:DB.keymissing, it regenerated PK, KEK and the module certificate over the files that still existed.import-pubring.pgp.Both sets are now checked file by file, and an empty file counts as missing. A partial set exits 1 before anything is written. CI is unaffected: main unpacks a complete set and PRs start from none.
Tests.
tests/unit/test_gen_dev_keys.pyruns the script against a scratch tree withopenssl/gpgstubbed:--forcestill regenerates.Against the old script, 6 of the 8 cases fail.
Docs. The canonical rule is in
ddi-installer-build.md→ "Keys": rotating any key needs a newimage-version. Every key ends up in the image bits, versions are immutable, andsystemd-sysupdatenever re-installs the running version.systemd-sysupdate-verification.mdstep 3 links to it.6. Reproducibility
SOURCE_DATE_EPOCH=1321009871into every sandbox./usrwas already reproducible: rebuildingoci/bluefin-server-usr.bstgave the same usrhash and byte-identicalusr.raw/usr-verity.raw, both at26.09.2and at a scratch version.cpio --reproduciblekeeps. Now clamped toSOURCE_DATE_EPOCHbeforecpio.sbsignwrites the current time into each signature'ssigningTime. Now signed withsystemd-sbsign, which usesSOURCE_DATE_EPOCH(FSDK systemd v261,/usr/lib/systemd/systemd-sbsign). I confirmed two signatures of the same file are identical andsbverifypasses. ukify needs--no-sign-kernelwith this signtool; that matches current behaviour, since the kernel embedded in today's UKIs has no signature table of its own.mcopy -m), and mkfs.fat from dosfstools 4.2 ignoresSOURCE_DATE_EPOCHand stamps the volume label with the current time. Now the trees are clamped beforesystemd-repart, andSYSTEMD_REPART_MKFS_OPTIONS_VFAT=--invariantis set. The ESP volume ID changes to mkfs.fat's fixed value. Nothing references it; boot finds partitions by type and UUID..raw.zst: a random erofs UUID. The fix is in refactor: shared sysext packing recipe, arm64 binary pins, base-image cleanups #279, which owns the shared sysext recipe.efi-keys/*.auth, becausesbvarsignstamps the current time and has no option to change it, andSHA256SUMS.gpg.SHA256SUMS, which lists them. The files that match areusr.raw,usr-verity.raw, the disk, netboot and installer UKIs,bluefin-server_<v>.raw,bluefin-server-installer_<v>.rawandbluefin-server-netboot_<v>.esp.raw. On refactor: shared sysext packing recipe, arm64 binary pins, base-image cleanups #279's branch, the four sysexts are byte-identical across rebuilds..github/workflows/reproducibility.ymlruns weekly (Mon 09:00 UTC) and onworkflow_dispatch. It builds the image set, deletes the final-assembly artifacts, rebuilds without remote caches, and diffs the sha256 of every output except*.gpg.efi-keys.bststays cached between the two builds, for thesbvarsignreason above. Until refactor: shared sysext packing recipe, arm64 binary pins, base-image cleanups #279 merges, it will report the four sysext files.7. Patches
patches/README.mdrecords, for each FSDK patch, why it exists, its upstream status and its drop condition.libgirepository-1.0.so.1.0.0,libgdk_pixbuf-2.0.so.0.4400.7,libappstream*.so.1.1.6. Those match FSDK 26.08.0's gobject-introspection 1.86.0, gdk-pixbuf 2.44.7 and appstream 1.1.6. A component bump would leave the patch applying cleanly with dangling links.bump-fsdk-version.mdnow links the README and adds a by-hand version comparison to the bump procedure, replacing its stale claim that only 0001 remains.Verification
python3 -m pytest tests/unit -qpasses: 379 in a throwaway worktree with no boot-keys.bats tests/unitpasses: 0 failures.docs-checks.pypasses.actionlintreports only theubuntu-26.04label warning every existing workflow gets.flock … just validatepasses.just export-imagethenflock … just dogfood-checkpasses. This is a Secure Boot QEMU netboot, so it also shows thesystemd-sbsign-signed systemd-boot and UKIs are accepted by the firmware:os=bluefin-server 26.09.2,failed=0.Note for #269
Its SBOM step sets
creationInfo.createdfromdate -u, which puts a build-time value intoSHA256SUMS. To keep the set reproducible, usedate -u -d "@${SOURCE_DATE_EPOCH}" +%Y-%m-%dT%H:%M:%SZ.