Skip to content

Commit

Permalink
Update to use external ocidir crate
Browse files Browse the repository at this point in the history
I moved the code that was in `ocidir` to a new repository
and crate: https://github.com/containers/ocidir-rs/

It definitely cleans things up here.

Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
cgwalters committed Jun 3, 2024
1 parent a5a1e0d commit e43ac9f
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 576 deletions.
1 change: 1 addition & 0 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ once_cell = "1.9"
libc = "0.2.92"
libsystemd = "0.7.0"
openssl = "0.10.33"
ocidir = "0.1.0"
ostree = { features = ["v2022_6"], version = "0.19.0" }
pin-project = "1.0"
regex = "1.5.4"
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 e43ac9f

Please sign in to comment.