Skip to content

Commit 2aa413b

Browse files
cgwaltersJohan-Liebert1
authored andcommitted
Update composefs-rs
Bump our own ocidir and containers-image-proxy pins to match what composefs-oci now uses, so the dependency graph doesn't end up with two copies. Disable composefs-ctl's "ostree" feature for now: it pulls in reqwest (for remote pulls), which drags in rustls-webpki/untrusted/webpki-root-certs whose licenses aren't in our cargo-deny allow list. bootc doesn't use the ostree support in composefs-ctl yet, so just turn it off until the licensing is sorted out upstream or in our deny.toml. Signed-off-by: Colin Walters <walters@verbum.org>
1 parent 220f404 commit 2aa413b

10 files changed

Lines changed: 200 additions & 901 deletions

File tree

Cargo.lock

Lines changed: 175 additions & 894 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,17 @@ clap_mangen = { version = "0.3.0" }
4444
# [patch."https://github.com/composefs/composefs-rs"]
4545
# composefs-ctl = { path = "/path/to/composefs-rs/crates/composefs-ctl" }
4646
# The Justfile will auto-detect these and bind-mount them into container builds.
47-
composefs-ctl = { git = "https://github.com/composefs/composefs-rs", rev = "679a342db28c536d3bfa79a6225a888484a9742e" }
47+
# The "ostree" feature is disabled for now: it pulls in reqwest (for remote
48+
# pulls), which drags in rustls-webpki/untrusted/webpki-root-certs whose
49+
# licenses aren't in our cargo-deny allow list. Re-enable once that's sorted.
50+
# See: https://github.com/bootc-dev/bootc/pull/2295
51+
composefs-ctl = { git = "https://github.com/composefs/composefs-rs", rev = "6a34615fcbf9db6845949044be7543ef79a08f0a", default-features = false, features = [
52+
"pre-6.15",
53+
"pre-6.16",
54+
"oci",
55+
"containers-storage",
56+
"fuse",
57+
] }
4858
fn-error-context = "0.2.1"
4959
futures-util = "0.3"
5060
hex = "0.4.3"

crates/initramfs/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ fn build_overlay_fd(
273273
fsconfig_set_string(overlayfs.as_fd(), "source", source)?;
274274
overlayfs_set_fd(overlayfs.as_fd(), "workdir", work.as_fd())?;
275275
overlayfs_set_fd(overlayfs.as_fd(), "upperdir", upper.as_fd())?;
276-
overlayfs_set_lower_and_data_fds(&overlayfs, base.as_fd(), None::<OwnedFd>)?;
276+
overlayfs_set_lower_and_data_fds(&overlayfs, base.as_fd(), &[])?;
277277
fsconfig_create(overlayfs.as_fd())?;
278278
Ok(fsmount(
279279
overlayfs.as_fd(),

crates/lib/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ unicode-width = "0.2"
6767
libsystemd = "0.7"
6868
linkme = "0.3"
6969
nom = "8.0.0"
70-
ocidir = "0.7.0"
70+
ocidir = "0.8.0"
7171
schemars = { version = "1.0.4", features = ["chrono04"] }
7272
serde_ignored = "0.1.10"
7373
serde_yaml = "0.9.34"

crates/lib/src/bootc_composefs/boot.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,12 @@ fn write_pe_to_esp(
802802
// UKI/Addons would always be large enough to be an external object
803803
anyhow::bail!("File too small to be UKI/Addon")
804804
}
805-
RegularFile::External(id, ..) => std::fs::File::from(repo.open_object(id)?),
805+
RegularFile::External(id, ..) | RegularFile::ExternalNoVerity(id, ..) => {
806+
std::fs::File::from(repo.open_object(id)?)
807+
}
808+
RegularFile::Sparse(..) => {
809+
anyhow::bail!("Sparse file cannot be a UKI/Addon")
810+
}
806811
};
807812

808813
let mut boot_label: Option<UKIInfo> = None;

crates/ostree-ext/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ xshell = { workspace = true, optional = true }
3939

4040
# Crate-specific dependencies
4141
comfy-table = "7.1.1"
42-
containers-image-proxy = "0.10.1"
42+
containers-image-proxy = "0.11.0"
4343
flate2 = { features = ["zlib"], default-features = false, version = "1.0.20" }
4444
futures-util = "0.3.13"
4545
gvariant = "0.5.0"
4646
indexmap = { version = "2.2.2", features = ["serde"] }
4747
io-lifetimes = "3"
4848
libsystemd = "0.7.0"
49-
ocidir = "0.7.2"
49+
ocidir = "0.8.0"
5050
# We re-export this library too.
5151
ostree = { features = ["v2025_3"], version = "0.20.5" }
5252
pin-project = "1.0"

crates/ostree-ext/src/container/update_detachedmeta.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use camino::Utf8Path;
66
use cap_std::fs::Dir;
77
use cap_std_ext::cap_std;
88
use containers_image_proxy::oci_spec::image as oci_image;
9+
use ocidir::OciRead;
910
use std::io::{BufReader, BufWriter};
1011

1112
/// Given an OSTree container image reference, update the detached metadata (e.g. GPG signature)

crates/ostree-ext/src/fixture.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use fn_error_context::context;
2222
use gvariant::aligned_bytes::TryAsAligned;
2323
use gvariant::{Marker, Structure};
2424
use io_lifetimes::AsFd;
25+
use ocidir::OciRead;
2526
use ocidir::cap_std::fs::{DirBuilder, DirBuilderExt as _};
2627
use ocidir::oci_spec::image::ImageConfigurationBuilder;
2728
use regex::Regex;

crates/ostree-ext/src/integrationtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use fn_error_context::context;
1313
use gio::prelude::*;
1414
use oci_spec::image as oci_image;
1515
use ocidir::{
16-
LayerWriter,
16+
LayerWriter, OciRead,
1717
oci_spec::image::{Arch, Platform},
1818
};
1919
use ostree::gio;

crates/ostree-ext/tests/it/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use gvariant::aligned_bytes::TryAsAligned;
99
use gvariant::{Marker, Structure};
1010
use oci_image::ImageManifest;
1111
use oci_spec::image as oci_image;
12+
use ocidir::OciRead;
1213
use ocidir::oci_spec::distribution::Reference;
1314
use ocidir::oci_spec::image::{Arch, DigestAlgorithm};
1415
use ostree_ext::chunking::ObjectMetaSized;

0 commit comments

Comments
 (0)