Skip to content

Conversation

@alexlarsson
Copy link
Collaborator

This adds support for adding composefs digests and signing commits to rpm-ostree experimental compose build-chunked-oci, which allows (with care) using signed composfs ostree commits in layered bootc images (if they are rechunked).

Note, this depends on the changes in ostreedev/ostree#3527 and those need to land and be released before this is buildable. Also, the double-free fix in ostree it contains is needed for --sign-commit to work at runtime (without failing on the double free).

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for signing composefs ostree commits and propagating composefs digests when layering bootc images. The changes look good overall, introducing a new --sign-commit option and the necessary logic to handle commit signing and digest propagation. I've found one issue with duplicated code in the commit signing logic that should be addressed.

alexlarsson added a commit to alexlarsson/bootc that referenced this pull request Oct 2, 2025
This will be needed by coreos/rpm-ostree#5497
as it picks up ostree-rs via ostree-ext.
alexlarsson added a commit to alexlarsson/bootc that referenced this pull request Oct 2, 2025
This will be needed by coreos/rpm-ostree#5497
as it picks up ostree-rs via ostree-ext.

Signed-off-by: Alexander Larsson <[email protected]>
cgwalters pushed a commit to bootc-dev/bootc that referenced this pull request Oct 2, 2025
This will be needed by coreos/rpm-ostree#5497
as it picks up ostree-rs via ostree-ext.

Signed-off-by: Alexander Larsson <[email protected]>
@alexlarsson
Copy link
Collaborator Author

Ok, I updated this now that we have a released rust commit we can use to pick up the new ostree dependencies. However, testing this failed because build-chunked-oci labeled files incorrectly, so I also added a new commit to fix that.

On top of this, there is another issue with build-chunked-oci, which doesn't break the composefs usecase, but is non-ideal, and that is that the base commit files in the are deployed without full metadata (is it bare user?). This means that we loose information when we build the new commit from just the deployed files. In particular, I saw this with directory permissions being canonicalized, but I wonder if we not also lose file ownership info.

@alexlarsson
Copy link
Collaborator Author

Generating container image
error: Encapsulating: Skopeo copy: skopeo failed: time="2025-10-03T13:09:22Z" level=info msg="Not using native diff for overlay, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled"
time="2025-10-03T13:10:02Z" level=error msg="While recovering from a failure (applying layer diff), error deleting layer "ddfbd262df34fab1b8dcef42226055938d02a24c7971637895f4dd87a278d3cd": creating temp directory /var/lib/containers/storage/overlay-layers/tmp/temp-dir-1632257491 failed: mkdir /var/lib/containers/storage/overlay-layers/tmp/temp-dir-1632257491: no space left on device"

Unclear why this is failing with a ENOSPC. I tried to run the test locally, and it worked.

Also, unclear why e2e failed with:

filesystem error: cannot create directories: Permission denied [/.local/state]
failed to execute cmd-build: exit status 1

I'll try to look into it. And i'll try:

/test fcos-e2e

@alexlarsson
Copy link
Collaborator Author

I moved the chunked-oci relabeling commit to #550 to make it easier to find what the CI issue is comming from.

@alexlarsson
Copy link
Collaborator Author

I broke out the remaining issues to #5503

@alexlarsson
Copy link
Collaborator Author

I rebased this on top of #5502 because they are interdependent. That should be merged first.

@alexlarsson
Copy link
Collaborator Author

continuous-integration/jenkins/pr-merge seems to fail with out of diskspace:

writing blob: adding layer with blob \"sha256:f1ea7a996ea12c31ce9fb57faf780f7f29aefdd3ffb335ca1eae54f54fa67f7c\"/\"\"/\"sha256:db2adaf5fa2a51213c1479a064ac96d6df282d85a69e175048f05b25a86f9837\": unpacking failed (error: exit status 1; output: symlink Entrust_Root_Certification_Authority_-_G2.pem /sysroot/ostree/repo/objects/fc/637f222562c57653fae87d8316b9c33ce35feb36befbc4e4a03fa1a577bf04.file: no space left on device)"

Whereas fcos-e2e fails with:

filesystem error: cannot create directories: Permission denied [/.local/state]

This also updates the related packages only. We need this because there
are some binding fixes in 0.20.5 that we need.
When chunking an image that has a ostree commit, check if that
commit has a composefs digest, and if so, create one in the
new commit as well.

This allows using signed composefs images after rechunking.
This adds a new --sign-commit CLI option to `rpm-ostree experimental
compose build-chunked-oci` which signs the embedded ostree commit.

With this, it is possible (with some care) to layer a signed bootc
image that uses old-school signed ostree/composefs support.

Note, this relies on the double free fix for ostree_sign_set_sk() in
ostreedev/ostree#3527 to work.
@alexlarsson
Copy link
Collaborator Author

Now that #5502 is merged, i rebased this on main.

@openshift-ci
Copy link

openshift-ci bot commented Oct 15, 2025

@alexlarsson: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/fcos-e2e 3dfcbad link true /test fcos-e2e

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@alexlarsson
Copy link
Collaborator Author

The only CI failure seems to be the classic:

Resolving packages for x86_64...
filesystem error: cannot create directories: Permission denied [/.local/state]

Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This all looks relatively straightforward.

@cgwalters cgwalters merged commit 9f04449 into coreos:main Oct 16, 2025
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants