Skip to content

Commit

Permalink
Merge pull request #638 from cgwalters/depend-ocidir
Browse files Browse the repository at this point in the history
Update to use external `ocidir` crate
  • Loading branch information
cgwalters committed Jun 4, 2024
2 parents a5a1e0d + cf15ee3 commit 1ac0d14
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 579 deletions.
13 changes: 10 additions & 3 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ license = "MIT OR Apache-2.0"
name = "ostree-ext"
readme = "README.md"
repository = "https://github.com/ostreedev/ostree-rs-ext"
version = "0.13.4"
version = "0.14.0"
rust-version = "1.74.0"

[dependencies]
# Note that we re-export the oci-spec types
# that are exported by this crate, so when bumping
# semver here you must also bump our semver.
containers-image-proxy = "0.6.0"
# We re-export this library too.
ostree = { features = ["v2022_6"], version = "0.19.0" }

# Private dependencies
anyhow = "1.0"
containers-image-proxy = "0.5.5"
camino = "1.0.4"
chrono = "0.4.19"
olpc-cjson = "0.1.1"
Expand All @@ -29,7 +36,7 @@ once_cell = "1.9"
libc = "0.2.92"
libsystemd = "0.7.0"
openssl = "0.10.33"
ostree = { features = ["v2022_6"], version = "0.19.0" }
ocidir = "0.1.0"
pin-project = "1.0"
regex = "1.5.4"
rustix = { version = "0.38", features = ["fs", "process"] }
Expand Down
4 changes: 2 additions & 2 deletions lib/src/container/encapsulate.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//! APIs for creating container images from OSTree commits

use super::ocidir::{Layer, OciDir};
use super::{ocidir, OstreeImageReference, Transport, COMPONENT_SEPARATOR, CONTENT_ANNOTATION};
use super::{ImageReference, SignatureSource, OSTREE_COMMIT_LABEL};
use super::{OstreeImageReference, Transport, COMPONENT_SEPARATOR, CONTENT_ANNOTATION};
use crate::chunking::{Chunk, Chunking, ObjectMetaSized};
use crate::container::skopeo;
use crate::tar as ostree_tar;
Expand All @@ -16,6 +15,7 @@ use flate2::Compression;
use fn_error_context::context;
use gio::glib;
use oci_spec::image as oci_image;
use ocidir::{Layer, OciDir};
use ostree::gio;
use std::borrow::Cow;
use std::collections::{BTreeMap, HashMap};
Expand Down
13 changes: 0 additions & 13 deletions lib/src/container/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,19 +474,6 @@ mod encapsulate;
pub use encapsulate::*;
mod unencapsulate;
pub use unencapsulate::*;
// We have this trick of compiling ourself with integration testing
// enabled, which uses a lot of the code here. See the
// `ostree-ext = { path = ".", features = ["internal-testing-api"] }`
// bit in Cargo.toml.
//
// But that isn't turned on for other crates that use this, and correctly gating all
// of it is a little tedious. So let's just use the big hammer for now to
// quiet the dead code warnings.
#[cfg(feature = "internal-testing-api")]
pub mod ocidir;
#[cfg(not(feature = "internal-testing-api"))]
#[allow(dead_code)]
mod ocidir;
mod skopeo;
pub mod store;
mod update_detachedmeta;
Expand Down
Loading

0 comments on commit 1ac0d14

Please sign in to comment.