feat(ddi): build OS payload as verity /usr image pinned by verity.usrhash - #153
Open
mrbobbytables wants to merge 2 commits into
Open
mrbobbytables wants to merge 2 commits into
mrbobbytables wants to merge 2 commits into
Conversation
…hash Enforce the Flatcar-compatible /usr dm-verity contract in the DDI and installer UKI (projectbluefin#135, Phase 4 of the Flatcar base migration design): - In elements/oci/bluefin-server-ddi.bst: - Add freedesktop-sdk.bst:components/cryptsetup.bst build-depends. - Enforce the 1,065,345,024-byte hard size budget before filesystem creation, failing loudly if payload content exceeds the limit. - Pre-allocate the filesystem to the exact budget offset and format with mkfs.xfs -f -L bluefin-usr. - Format and append the dm-verity hash tree at offset 1,065,345,024 using veritysetup format (260,094 blocks of 4096 bytes). - Print the root hash to build output and save to verity.usrhash. - In elements/oci/bluefin-server-installer.bst: - Read the verity root hash from /ddi/verity.usrhash. - Add verity.usr=PARTLABEL=USR-A verity.usrhash=${USR_HASH} to the target UKI kernel command line in dracut and ukify. - In tests/unit/test_ddi_verity.py and test_installer_contract.py: - Add comprehensive contract tests validating budget checks, cryptsetup dependency, veritysetup formatting arguments, and UKI cmdline pinning. - Update docs/skills/ddi-installer.md with verity payload details. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@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
Builds the OS payload as a dm-verity
/usrimage pinned byverity.usrhashin the target UKI cmdline (#135, Phase 4 of the Flatcar base migration design in PR #123).Changes
elements/oci/bluefin-server-ddi.bst:freedesktop-sdk.bst:components/cryptsetup.bsttobuild-dependsforveritysetup.HASH_OFFSET=1065345024) and creates an XFS filesystem formatted withmkfs.xfs -f -L bluefin-usr.veritysetup format(260,094 blocks of 4096 bytes).verity.usrhashandbluefin-server-ddi-<version>.verityinto the install root.elements/oci/bluefin-server-installer.bst:/ddi/verity.usrhashstaged from the DDI element.dracutandukify buildto includeverity.usr=PARTLABEL=USR-A verity.usrhash=${USR_HASH}.tests/unit/test_installer_contract.pyto assertverity.usr=PARTLABEL=USR-Aandverity.usrhash=${USR_HASH}in the target UKI command line.tests/unit/test_ddi_verity.pycovering cryptsetup build dependency, budget enforcement, veritysetup formatting arguments, root hash emission, and target UKI cmdline pinning.docs/skills/ddi-installer.mdto document the appended verity hash tree andverity.usrhashpinning.Verification
pytest tests/unit: 217 passed, 1 xfailed.bats tests/unit: 62 passed.python3 .github/scripts/docs-checks.py: passed.python3 .github/scripts/check-release-version.py: passed.python3 .github/scripts/check-k0s-version.py: passed.Closes #135
— hive: backend=copilot model=gemini-3.8-flash
🐝 Hive Agent:
contributor| SHA:8d4909c