Skip to content

DO NOT MERGE: Test composefs-rs fs-verity helper - #2637

Draft
jeckersb wants to merge 1 commit into
bootc-dev:mainfrom
jeckersb:composefs-verity-helper
Draft

jeckersb wants to merge 1 commit into
bootc-dev:mainfrom
jeckersb:composefs-verity-helper

Conversation

@jeckersb

@jeckersb jeckersb commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Do not merge. This points bootc at an unreleased composefs-rs branch to run it through the full CI integration suite.

What it tests

composefs/composefs-rs#447 makes composefs-rs create objects through an FsVerityHelper, a thread pool with a private file descriptor table. A child forked by another thread can then never hold a writable fd to a new object, which used to make FS_IOC_ENABLE_VERITY fail with ETXTBSY. It also deprecates enable_verity_with_retry and enable_verity_maybe_copy.

Changes here

  • Cargo.toml / Cargo.lock: a temporary [patch.crates-io] for all composefs crates, pinned to the PR's head commit on jeckersb/composefs-rs.
  • ostree-ext/src/fsverity.rs: enabling fs-verity on existing ostree objects now uses enable_verity_raw instead of the deprecated retry. Verity has to go on the existing inode, and nothing should still have it open for writing. If CI hits FileOpenedForWrite here, we'll revisit.

Nothing else in bootc needed to change: it writes objects through composefs_oci::pull, which picks up the helper automatically.

Local testing

  • Passing: cargo fmt --check, cargo test --no-run, the --no-default-features checks and cargo doc -D warnings.
  • cargo clippy with the CI config reports one error, in tests-integration/src/container.rs (untouched).
  • Unit tests: 380 pass. Three aboot tests fail, and fail the same way on main in my environment (permission denied).

Generated-by: AI
The changes are LLM-generated; I reviewed the diff.

Point the composefs crates at the fs-verity helper series from
composefs/composefs-rs#447 (not yet released), to run it through the
full CI integration suite.  See composefs/composefs-rs#442.

bootc doesn't call the composefs-rs APIs that change in that series:
objects are written by composefs_oci::pull, which now enables fs-verity
from a thread with a private file descriptor table, so a child forked
by another thread can't make it fail with ETXTBSY.

The one change needed here is in ostree-ext, which used the now
deprecated enable_verity_with_retry() to enable fs-verity on existing
ostree objects.  Use enable_verity_raw() instead: verity has to go on
the existing inode, and nothing should still have it open for writing.

Generated-by: AI
Copilot AI balanced review requested due to automatic review settings November 7, 2026 20:04
@github-actions github-actions Bot added the area/ostree Issues related to ostree label Nov 7, 2026
@bootc-bot
bootc-bot Bot requested a review from henrywang November 7, 2026 20:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The eight patched crates use a Git fork absent from deny.toml’s allowlist, causing the CI cargo-deny source check to reject them.

1 open issue
What changed in this PR

This intentionally non-mergeable PR tests the unreleased composefs-rs fs-verity helper through bootc’s CI integration suite.

Changes:

  • Temporarily pin eight composefs crates to the helper implementation’s Git commit.
  • Replace deprecated retry-based fs-verity enabling for existing OSTree objects with the raw API, handling already-enabled objects and adding error context.
File Description
crates/​ostree-ext/​src/​fsverity.rs Use raw fs-verity enabling on existing object inodes.
Cargo.toml Add temporary Git patches for eight composefs crates.
Cargo.lock Lock patched crates to the test commit and record the added libc dependency.

Review effort: Balanced

Comment thread Cargo.toml
# Temporary: test against the fs-verity helper from
# https://github.com/composefs/composefs-rs/pull/447 (not yet released).
[patch.crates-io]
composefs = { git = "https://github.com/jeckersb/composefs-rs", rev = "500b287742bce5b3ccbb6e9a7841034c1980e5fb" }

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ostree Issues related to ostree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants