Skip to content

Commit 5782980

Browse files
authored
Merge pull request #1069 from cgwalters/update-ostree-rs
Update to ostree-rs 0.20
2 parents 02d5cd3 + cb99cf5 commit 5782980

File tree

11 files changed

+44
-100
lines changed

11 files changed

+44
-100
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
steps:
4949
- uses: actions/checkout@v4
5050
- name: Build container (fedora)
51-
run: sudo podman build --build-arg=base=quay.io/fedora/fedora-bootc:40 -t localhost/bootc -f hack/Containerfile .
51+
run: sudo podman build --build-arg=base=quay.io/fedora/fedora-bootc:41 -t localhost/bootc -f hack/Containerfile .
5252
- name: Container integration
5353
run: sudo podman run --rm localhost/bootc bootc-integration-tests container
5454
cargo-deny:

Cargo.lock

+33-88
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hack/Containerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build bootc from the current git into a c9s-bootc container image.
2-
# Use e.g. --build-arg=base=quay.io/fedora/fedora-bootc:40 to target
2+
# Use e.g. --build-arg=base=quay.io/fedora/fedora-bootc:41 to target
33
# Fedora instead.
44
#
55
# You can also generate an image with cloud-init and other dependencies

ostree-ext/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ version = "0.15.3"
1414
# semver here you must also bump our semver.
1515
containers-image-proxy = "0.7.0"
1616
# We re-export this library too.
17-
ostree = { features = ["v2022_6"], version = "0.19.0" }
17+
ostree = { features = ["v2025_1"], version = "0.20.0" }
1818

1919
# Private dependencies
2020
anyhow = { workspace = true }

ostree-ext/src/container/encapsulate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn commit_meta_to_labels<'a>(
6868
// Copy standard metadata keys `ostree.bootable` and `ostree.linux`.
6969
// Bootable is an odd one out in being a boolean.
7070
#[allow(clippy::explicit_auto_deref)]
71-
if let Some(v) = meta.lookup::<bool>(*ostree::METADATA_KEY_BOOTABLE)? {
71+
if let Some(v) = meta.lookup::<bool>(ostree::METADATA_KEY_BOOTABLE)? {
7272
labels.insert(ostree::METADATA_KEY_BOOTABLE.to_string(), v.to_string());
7373
labels.insert(BOOTC_LABEL.into(), "1".into());
7474
}

ostree-ext/src/container/store.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,9 @@ impl ImageImporter {
603603
) -> Result<Box<PreparedImport>> {
604604
let config_labels = super::labels_of(&config);
605605
if self.require_bootable {
606-
let bootable_key = *ostree::METADATA_KEY_BOOTABLE;
606+
let bootable_key = ostree::METADATA_KEY_BOOTABLE;
607607
let bootable = config_labels.map_or(false, |l| {
608-
l.contains_key(bootable_key) || l.contains_key(BOOTC_LABEL)
608+
l.contains_key(bootable_key.as_str()) || l.contains_key(BOOTC_LABEL)
609609
});
610610
if !bootable {
611611
anyhow::bail!("Target image does not have {bootable_key} label");

ostree-ext/src/fixture.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ fn build_mapping_recurse(
414414
gio::FileType::Directory => {
415415
build_mapping_recurse(path, &child, ret)?;
416416
}
417-
o => anyhow::bail!("Unhandled file type: {}", o),
417+
o => anyhow::bail!("Unhandled file type: {o:?}"),
418418
}
419419
path.pop();
420420
}
@@ -725,7 +725,7 @@ impl Fixture {
725725
metadata.insert("version", &"42.0");
726726
#[allow(clippy::explicit_auto_deref)]
727727
if self.bootable {
728-
metadata.insert(*ostree::METADATA_KEY_BOOTABLE, &true);
728+
metadata.insert(ostree::METADATA_KEY_BOOTABLE, &true);
729729
}
730730
let metadata = metadata.to_variant();
731731
let commit = self.srcrepo.write_commit_with_time(

ostree-ext/src/ima.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use camino::Utf8PathBuf;
88
use fn_error_context::context;
99
use gio::glib;
1010
use gio::prelude::*;
11-
use glib::Cast;
1211
use glib::Variant;
1312
use gvariant::aligned_bytes::TryAsAligned;
1413
use gvariant::{gv, Marker, Structure};

ostree-ext/src/ostree_prepareroot.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use std::str::FromStr;
99
use anyhow::{Context, Result};
1010
use camino::Utf8Path;
1111
use cap_std_ext::dirext::CapStdExtDirExt;
12-
use glib::Cast;
1312
use ocidir::cap_std::fs::Dir;
13+
use ostree::glib::object::Cast;
1414
use ostree::prelude::FileExt;
1515
use ostree::{gio, glib};
1616

ostree-ext/src/tar/import.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ impl Importer {
429429
match &mut self.data {
430430
ImporterMode::ObjectSet(_) => {
431431
anyhow::bail!(
432-
"Found metadata object {}.{} in object set mode",
432+
"Found metadata object {}.{:?} in object set mode",
433433
checksum,
434434
objtype
435435
);

tests/containerfiles/lbi/Containerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build bootc from the current git into a c9s-bootc container image.
2-
# Use e.g. --build-arg=base=quay.io/fedora/fedora-bootc:40 to target
2+
# Use e.g. --build-arg=base=quay.io/fedora/fedora-bootc:41 to target
33
# Fedora instead.
44
#
55
# You can also generate an image with cloud-init and other dependencies

0 commit comments

Comments
 (0)