From 2e8482373917715f3efd364d655e181e75c37b1a Mon Sep 17 00:00:00 2001 From: blinxen Date: Sun, 23 Jun 2024 14:52:17 +0200 Subject: [PATCH] Update to version 0.13.1 (rhbz#2274892) --- .gitignore | 1 + decrease-zip-version.diff | 35 +++++++++++++++++++++++++++++++++++ rust-gix-archive.spec | 5 ++++- sources | 2 +- 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 decrease-zip-version.diff diff --git a/.gitignore b/.gitignore index 9033cdf..a56428b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /gix-archive-0.4.0.crate /gix-archive-0.6.0.crate /gix-archive-0.11.0.crate +/gix-archive-0.13.1.crate diff --git a/decrease-zip-version.diff b/decrease-zip-version.diff new file mode 100644 index 0000000..cf75621 --- /dev/null +++ b/decrease-zip-version.diff @@ -0,0 +1,35 @@ +--- gix-archive-0.13.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ gix-archive-0.13.1/Cargo.toml 2024-06-01T19:27:20.047617+00:00 +@@ -77,7 +77,7 @@ + default-features = false + + [dependencies.zip] +-version = "2.1.0" ++version = "0.6.6" + features = [ + "deflate", + "time", +--- gix-archive-0.13.1/src/write.rs ++++ gix-archive-0.13.1/src/write.rs +@@ -126,7 +126,7 @@ where + NextFn: FnMut(&mut Stream) -> Result>, gix_worktree_stream::entry::Error>, + { + let compression_level = match opts.format { +- Format::Zip { compression_level } => compression_level.map(|lvl| lvl as i64), ++ Format::Zip { compression_level } => compression_level.map(|lvl| lvl as i32), + _other => return write_stream(stream, next_entry, out, opts), + }; + +@@ -161,10 +161,10 @@ fn append_zip_entry( + mut entry: gix_worktree_stream::Entry<'_>, + buf: &mut Vec, + mtime: zip::DateTime, +- compression_level: Option, ++ compression_level: Option, + tree_prefix: Option<&bstr::BString>, + ) -> Result<(), Error> { +- let file_opts = zip::write::FileOptions::<'_, ()>::default() ++ let file_opts = zip::write::FileOptions::default() + .compression_method(zip::CompressionMethod::Deflated) + .compression_level(compression_level) + .large_file(entry.bytes_remaining().map_or(true, |len| len > u32::MAX as usize)) diff --git a/rust-gix-archive.spec b/rust-gix-archive.spec index 3ad0f87..d219165 100644 --- a/rust-gix-archive.spec +++ b/rust-gix-archive.spec @@ -7,13 +7,16 @@ %global crate gix-archive Name: rust-gix-archive -Version: 0.11.0 +Version: 0.13.1 Release: %autorelease Summary: Archive generation from of a worktree stream License: MIT OR Apache-2.0 URL: https://crates.io/crates/gix-archive Source: %{crates_source} +# Set zip version to 0.6 since that is the only version that is available at +# the moment +Patch: decrease-zip-version.diff BuildRequires: cargo-rpm-macros >= 24 diff --git a/sources b/sources index d7a8da0..f565d62 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gix-archive-0.11.0.crate) = 4be749d5bbdae5b7e14f1bd9d9182215cf72bdd8da9e6a057386737944f224e79326e3e3d853fc45ce49d966c4c93f7f05f73bc1be680fed0ea25df35a7e0dc5 +SHA512 (gix-archive-0.13.1.crate) = 96e91748968f170147bd9273b321c528ff380933351fda77e8089d7cc7b0d5e4726fe104f1703390d2c7c1d1689c8fd8051f0fea40217bdbd6658a7bc6861510