diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 253ded92..e3db965a 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -36,7 +36,7 @@ once_cell = "1.9" libc = "0.2.92" libsystemd = "0.7.0" openssl = "0.10.33" -ocidir = "0.1.0" +ocidir = "0.2.0" pin-project = "1.0" regex = "1.5.4" rustix = { version = "0.38", features = ["fs", "process"] } diff --git a/lib/src/container/store.rs b/lib/src/container/store.rs index 8a92ad0e..0266345f 100644 --- a/lib/src/container/store.rs +++ b/lib/src/container/store.rs @@ -1310,7 +1310,7 @@ pub(crate) fn export_to_oci( let compression = opts.skip_compression.then_some(Compression::none()); for (i, layer) in remaining_layers.iter().enumerate() { let layer_ref = &ref_for_layer(layer)?; - let mut target_blob = dest_oci.create_raw_layer(compression)?; + let mut target_blob = dest_oci.create_gzip_layer(compression)?; // Sadly the libarchive stuff isn't exposed via Rust due to type unsafety, // so we'll just fork off the CLI. let repo_dfd = repo.dfd_borrow(); diff --git a/lib/src/container/update_detachedmeta.rs b/lib/src/container/update_detachedmeta.rs index 50576ed4..8993680b 100644 --- a/lib/src/container/update_detachedmeta.rs +++ b/lib/src/container/update_detachedmeta.rs @@ -74,7 +74,7 @@ pub async fn update_detached_metadata( // Create tar streams for source and destination let src_layer = BufReader::new(tempsrc.read_blob(commit_layer)?); let mut src_layer = flate2::read::GzDecoder::new(src_layer); - let mut out_layer = BufWriter::new(tempsrc.create_raw_layer(None)?); + let mut out_layer = BufWriter::new(tempsrc.create_gzip_layer(None)?); // Process the tar stream and inject our new detached metadata crate::tar::update_detached_metadata( diff --git a/lib/src/integrationtest.rs b/lib/src/integrationtest.rs index e7397dd4..3b3e82e0 100644 --- a/lib/src/integrationtest.rs +++ b/lib/src/integrationtest.rs @@ -11,7 +11,7 @@ use containers_image_proxy::oci_spec; use fn_error_context::context; use gio::prelude::*; use oci_spec::image as oci_image; -use ocidir::RawLayerWriter; +use ocidir::GzipLayerWriter; use ostree::gio; use xshell::cmd; @@ -58,7 +58,7 @@ pub fn generate_derived_oci_from_tar( tag: Option<&str>, ) -> Result<()> where - F: FnOnce(&mut RawLayerWriter) -> Result<()>, + F: FnOnce(&mut GzipLayerWriter) -> Result<()>, { let src = src.as_ref(); let src = Dir::open_ambient_dir(src, cap_std::ambient_authority())?; @@ -67,7 +67,7 @@ where let mut manifest = src.read_manifest()?; let mut config: oci_spec::image::ImageConfiguration = src.read_json_blob(manifest.config())?; - let mut bw = src.create_raw_layer(None)?; + let mut bw = src.create_gzip_layer(None)?; f(&mut bw)?; let new_layer = bw.complete()?;