Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 50 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
FsverityOpts::Enable { path } => {
let fd =
std::fs::File::open(&path).with_context(|| format!("Reading {path}"))?;
fsverity::enable_verity::<fsverity::Sha256HashValue>(&fd)?;
fsverity::enable_verity_raw::<fsverity::Sha256HashValue>(&fd)?;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is the most direct change and is fine for now but we should do a followup that uses the retry variants

Ok(())
}
},
Expand Down
4 changes: 3 additions & 1 deletion crates/ostree-ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ ostree = { features = ["v2025_2"], version = "0.20" }
anyhow = { workspace = true }
bootc-utils = { package = "bootc-internal-utils", path = "../utils", version = "0.0.0" }
camino = { workspace = true, features = ["serde1"] }
composefs = { git = "https://github.com/containers/composefs-rs", rev = "d5455222f282200913902f29c66d5f625ca5661f", features = ["rhel9"] }
composefs = { git = "https://github.com/containers/composefs-rs", rev = "28d4721f77f973f0e394d60d6a69d9b39cb38d7f", package = "composefs", features = ["rhel9"] }
composefs-boot = { git = "https://github.com/containers/composefs-rs", rev = "28d4721f77f973f0e394d60d6a69d9b39cb38d7f", package = "composefs-boot" }
composefs-oci = { git = "https://github.com/containers/composefs-rs", rev = "28d4721f77f973f0e394d60d6a69d9b39cb38d7f", package = "composefs-oci" }
Comment thread
cgwalters marked this conversation as resolved.
chrono = { workspace = true }
clap = { workspace = true, features = ["derive","cargo"] }
clap_mangen = { workspace = true, optional = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/ostree-ext/src/fsverity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn enable_fsverity_in_objdir(d: &Dir) -> anyhow::Result<()> {
let enabled =
composefs::fsverity::measure_verity_opt::<Sha256HashValue>(f.as_fd())?.is_some();
if !enabled {
composefs_fsverity::enable_verity::<Sha256HashValue>(&f)?;
composefs_fsverity::enable_verity_raw::<Sha256HashValue>(&f)?;
}
}
Ok(())
Expand Down Expand Up @@ -123,7 +123,7 @@ pub async fn ensure_verity(repo: &ostree::Repo) -> Result<()> {
// And finally, enable fsverity as a flag that we have successfully
// enabled fsverity on all objects.
let f = repodir.open(CONFIG_PATH)?;
match composefs_fsverity::enable_verity::<Sha256HashValue>(f.as_fd()) {
match composefs_fsverity::enable_verity_raw::<Sha256HashValue>(f.as_fd()) {
Ok(()) => Ok(()),
Err(composefs_fsverity::EnableVerityError::AlreadyEnabled) => Ok(()),
Err(e) => Err(e.into()),
Expand Down