From eaf0415c3433ac0d83a905a91e87efc1bc652815 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 3 Jun 2024 14:59:13 -0400 Subject: [PATCH 1/3] Bump to 0.6.0 I missed that the previous change was semver-incompatible; I plan to yank 0.5.9. Signed-off-by: Colin Walters --- Cargo.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1340d3a..75fcc43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,13 +5,15 @@ license = "MIT OR Apache-2.0" name = "containers-image-proxy" readme = "README.md" repository = "https://github.com/containers/containers-image-proxy-rs" -version = "0.5.9" +version = "0.6.0" rust-version = "1.70.0" [dependencies] anyhow = "1.0" fn-error-context = "0.2.0" futures-util = "0.3.13" +# NOTE when bumping this in a semver-incompatible way, because we re-export it you +# must also bump the semver of this project. oci-spec = "0.6.5" rustix = { version = "0.38", features = ["process", "net"] } serde = { features = ["derive"], version = "1.0.125" } From 4b4354d351eb9e2cbdd03341e07608de85ecea41 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 3 Jun 2024 15:00:58 -0400 Subject: [PATCH 2/3] Drop the proxy_0_2_4 feature We can safely assume everyone has a new enough skopeo now. Signed-off-by: Colin Walters --- Cargo.toml | 4 ---- src/imageproxy.rs | 1 - 2 files changed, 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 75fcc43..50455fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,3 @@ clap = { version = "4.4", features = ["derive"] } [lib] path = "src/imageproxy.rs" - -[features] -# See https://github.com/containers/skopeo/blob/03da797e42374892bca8759668adb0b06d087876/cmd/skopeo/proxy.go#L95 -proxy_v0_2_4 = [] diff --git a/src/imageproxy.rs b/src/imageproxy.rs index 04f8775..55c08f1 100644 --- a/src/imageproxy.rs +++ b/src/imageproxy.rs @@ -399,7 +399,6 @@ impl ImageProxy { } #[instrument] - #[cfg(feature = "proxy_v0_2_4")] pub async fn open_image_optional(&self, imgref: &str) -> Result> { tracing::debug!("opening image"); let (imgid, _) = self From 77ab8f3e9cc42c213800c01c68e9ad4061e4a18a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 3 Jun 2024 15:02:26 -0400 Subject: [PATCH 3/3] Drop unnecessary constants Signed-off-by: Colin Walters --- src/imageproxy.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/imageproxy.rs b/src/imageproxy.rs index 55c08f1..48e363c 100644 --- a/src/imageproxy.rs +++ b/src/imageproxy.rs @@ -25,9 +25,6 @@ use tracing::instrument; /// Re-export because we use this in our public APIs pub use oci_spec; -pub const OCI_TYPE_LAYER_GZIP: &str = "application/vnd.oci.image.layer.v1.tar+gzip"; -pub const OCI_TYPE_LAYER_TAR: &str = "application/vnd.oci.image.layer.v1.tar"; - /// File descriptor range which is reserved for passing data down into the proxy; /// avoid configuring the command to use files in this range. (Also, stdin is /// reserved)