From 3393ae50c98a619a04da8afaad45a8a1252a97c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Fri, 13 Sep 2019 18:14:21 +0200 Subject: [PATCH] Bump criterion to 0.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert-André Mauchin --- 0001-Fix-compat-issue-with-beta-rust.patch | 22 ++++++++ ...ut-has-been-expanded-from-u32-to-u64.patch | 53 +++++++++++++++++++ base64-fix-metadata.diff | 11 ++++ rust-base64.spec | 14 ++++- 4 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-compat-issue-with-beta-rust.patch create mode 100644 0001-Throughput-has-been-expanded-from-u32-to-u64.patch create mode 100644 base64-fix-metadata.diff diff --git a/0001-Fix-compat-issue-with-beta-rust.patch b/0001-Fix-compat-issue-with-beta-rust.patch new file mode 100644 index 0000000..2b6023c --- /dev/null +++ b/0001-Fix-compat-issue-with-beta-rust.patch @@ -0,0 +1,22 @@ +From afac000c8b89059e3ea1d22477a22ec31d6f6856 Mon Sep 17 00:00:00 2001 +From: Marshall Pierce +Date: Fri, 12 Jul 2019 11:54:33 -0600 +Subject: [PATCH] Fix compat issue with beta rust + +--- + src/decode.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/decode.rs b/src/decode.rs +index ae34230..9c9916c 100644 +--- a/src/decode.rs ++++ b/src/decode.rs +@@ -55,7 +55,7 @@ impl error::Error for DecodeError { + } + } + +- fn cause(&self) -> Option<&error::Error> { ++ fn cause(&self) -> Option<&dyn error::Error> { + None + } + } diff --git a/0001-Throughput-has-been-expanded-from-u32-to-u64.patch b/0001-Throughput-has-been-expanded-from-u32-to-u64.patch new file mode 100644 index 0000000..21f46de --- /dev/null +++ b/0001-Throughput-has-been-expanded-from-u32-to-u64.patch @@ -0,0 +1,53 @@ +From e923d5f45668e4dd8b8bc3109f4e1b664a386053 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= + <30413512+eclipseo@users.noreply.github.com> +Date: Fri, 13 Sep 2019 18:13:37 +0200 +Subject: [PATCH] Bump criterion to 0.3 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Robert-André Mauchin +--- + Cargo.toml | 2 +- + benches/benchmarks.rs | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Cargo.toml b/Cargo.toml +index 107537a..736b0c9 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -16,7 +16,7 @@ name = "benchmarks" + harness = false + + [dev-dependencies] +-criterion = "0.2" ++criterion = "0.3" + rand = "0.6.1" + doc-comment = "0.3" + +diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs +index e6ae3d2..475dfdb 100644 +--- a/benches/benchmarks.rs ++++ b/benches/benchmarks.rs +@@ -124,7 +124,7 @@ fn encode_benchmarks(byte_sizes: &[usize]) -> ParameterizedBenchmark { + ParameterizedBenchmark::new("encode", do_encode_bench, byte_sizes.iter().cloned()) + .warm_up_time(std::time::Duration::from_millis(500)) + .measurement_time(std::time::Duration::from_secs(3)) +- .throughput(|s| Throughput::Bytes(*s as u32)) ++ .throughput(|s| Throughput::Bytes(*s as u64)) + .with_function("encode_display", do_encode_bench_display) + .with_function("encode_reuse_buf", do_encode_bench_reuse_buf) + .with_function("encode_slice", do_encode_bench_slice) +@@ -135,7 +135,7 @@ fn decode_benchmarks(byte_sizes: &[usize]) -> ParameterizedBenchmark { + ParameterizedBenchmark::new("decode", do_decode_bench, byte_sizes.iter().cloned()) + .warm_up_time(std::time::Duration::from_millis(500)) + .measurement_time(std::time::Duration::from_secs(3)) +- .throughput(|s| Throughput::Bytes(*s as u32)) ++ .throughput(|s| Throughput::Bytes(*s as u64)) + .with_function("decode_reuse_buf", do_decode_bench_reuse_buf) + .with_function("decode_slice", do_decode_bench_slice) + } +-- +2.21.0 + diff --git a/base64-fix-metadata.diff b/base64-fix-metadata.diff new file mode 100644 index 0000000..c5da25f --- /dev/null +++ b/base64-fix-metadata.diff @@ -0,0 +1,11 @@ +--- base64-0.10.1/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ base64-0.10.1/Cargo.toml 2019-09-13T16:10:47.978838+00:00 +@@ -30,7 +30,7 @@ + [dependencies.byteorder] + version = "1.2.6" + [dev-dependencies.criterion] +-version = "0.2" ++version = "0.3" + + [dev-dependencies.rand] + version = "0.6.1" diff --git a/rust-base64.spec b/rust-base64.spec index a0d37a0..1b19bda 100644 --- a/rust-base64.spec +++ b/rust-base64.spec @@ -6,13 +6,22 @@ Name: rust-%{crate} Version: 0.10.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Encodes and decodes base64 as bytes or utf8 # Upstream license specification: MIT/Apache-2.0 License: MIT or ASL 2.0 URL: https://crates.io/crates/base64 Source: %{crates_source} +# Initial patched metadata +# - Bump criterion to 0.3 https://github.com/marshallpierce/rust-base64/pull/117 +Patch0: base64-fix-metadata.diff +# Fix compat issue with beta rust +# https://github.com/marshallpierce/rust-base64/commit/afac000c8b89059e3ea1d22477a22ec31d6f6856 +Patch1: https://github.com/marshallpierce/rust-base64/commit/afac000c8b89059e3ea1d22477a22ec31d6f6856.patch#/0001-Fix-compat-issue-with-beta-rust.patch +# criterion 0.3: Throughput has been expanded from u32 to u64 to accommodate very large input sizes. +Patch2: 0001-Throughput-has-been-expanded-from-u32-to-u64.patch + ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -71,6 +80,9 @@ which use "default" feature of "%{crate}" crate. %endif %changelog +* Fri Sep 13 18:10:48 CEST 2019 Robert-André Mauchin - 0.10.1-6 +- Bump criterion to 0.3 + * Fri Jul 26 2019 Fedora Release Engineering - 0.10.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild