From 33c5407d4090c9c92806b0ef760751fc58a1f17e Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mon, 16 Sep 2024 22:32:44 +0200 Subject: [PATCH] Update to version 0.3.9; Fixes RHBZ#2312357 --- .gitignore | 1 + ...9154bde9eef7475d1f622bae8851333ad336.patch | 54 ------------------- arrayref-fix-metadata.diff | 8 --- rust-arrayref.spec | 12 +---- sources | 2 +- 5 files changed, 3 insertions(+), 74 deletions(-) delete mode 100644 af5a9154bde9eef7475d1f622bae8851333ad336.patch delete mode 100644 arrayref-fix-metadata.diff diff --git a/.gitignore b/.gitignore index ac12143..b78916a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /arrayref-0.3.6.crate /arrayref-0.3.7.crate /arrayref-0.3.8.crate +/arrayref-0.3.9.crate diff --git a/af5a9154bde9eef7475d1f622bae8851333ad336.patch b/af5a9154bde9eef7475d1f622bae8851333ad336.patch deleted file mode 100644 index a38ed26..0000000 --- a/af5a9154bde9eef7475d1f622bae8851333ad336.patch +++ /dev/null @@ -1,54 +0,0 @@ -From af5a9154bde9eef7475d1f622bae8851333ad336 Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Tue, 3 Sep 2024 10:11:29 -0400 -Subject: [PATCH] Fix bounds math issues in tests revealed by quickcheck v1 - -Some tests relied on unsigned arithmetic that could wrap around, and -quickcheck 1.0 was able to reveal the problem. All of the issues were in -the tests rather than in the implementation. - -Fixes #22. Fixes compatibility with quickcheck v1. ---- - src/lib.rs | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/lib.rs b/src/lib.rs -index 7b6d4c0..1746f69 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -339,7 +339,7 @@ mod test { - #[test] - fn check_array_ref_5() { - fn f(data: Vec, offset: usize) -> quickcheck::TestResult { -- if data.len() < offset + 5 { -+ if data.len() < 5 || data.len() - 5 < offset { - return quickcheck::TestResult::discard(); - } - let out = array_ref!(data, offset, 5); -@@ -351,7 +351,7 @@ mod test { - #[test] - fn check_array_ref_out_of_bounds_5() { - fn f(data: Vec, offset: usize) -> quickcheck::TestResult { -- if data.len() >= offset + 5 { -+ if data.len() >= 5 && data.len() - 5 >= offset { - return quickcheck::TestResult::discard(); - } - quickcheck::TestResult::must_fail(move || { -@@ -364,7 +364,7 @@ mod test { - #[test] - fn check_array_mut_ref_7() { - fn f(mut data: Vec, offset: usize) -> quickcheck::TestResult { -- if data.len() < offset + 7 { -+ if data.len() < 7 || data.len() - 7 < offset { - return quickcheck::TestResult::discard(); - } - let out = array_mut_ref!(data, offset, 7); -@@ -377,7 +377,7 @@ mod test { - #[test] - fn check_array_mut_ref_out_of_bounds_32() { - fn f(mut data: Vec, offset: usize) -> quickcheck::TestResult { -- if data.len() >= offset + 32 { -+ if data.len() >= 32 && data.len() - 32 >= offset { - return quickcheck::TestResult::discard(); - } - quickcheck::TestResult::must_fail(move || { diff --git a/arrayref-fix-metadata.diff b/arrayref-fix-metadata.diff deleted file mode 100644 index 77bcbad..0000000 --- a/arrayref-fix-metadata.diff +++ /dev/null @@ -1,8 +0,0 @@ ---- arrayref-0.3.8/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ arrayref-0.3.8/Cargo.toml 2024-09-03T14:21:24.860504+00:00 -@@ -20,4 +20,4 @@ - repository = "https://github.com/droundy/arrayref" - - [dev-dependencies.quickcheck] --version = "0.6" -+version = "1.0" diff --git a/rust-arrayref.spec b/rust-arrayref.spec index 06c96cc..9a4a948 100644 --- a/rust-arrayref.spec +++ b/rust-arrayref.spec @@ -5,23 +5,13 @@ %global crate arrayref Name: rust-arrayref -Version: 0.3.8 +Version: 0.3.9 Release: %autorelease Summary: Macros to take array references of slices License: BSD-2-Clause URL: https://crates.io/crates/arrayref Source: %{crates_source} -# Manually created patch for downstream crate metadata changes -# * Update dev-dependency on quickcheck from 0.6 to 1.0 -Patch: arrayref-fix-metadata.diff -# Fix bounds math issues in tests revealed by quickcheck v1 -# https://github.com/droundy/arrayref/pull/28/commits/af5a9154bde9eef7475d1f622bae8851333ad336 -# Fixes: -# test::check_array_ref_5 and test::check_array_mut_ref_7 fail with -# quickcheck@1.0.3 -# https://github.com/droundy/arrayref/issues/22 -Patch: https://github.com/droundy/arrayref/pull/28/commits/af5a9154bde9eef7475d1f622bae8851333ad336.patch BuildRequires: cargo-rpm-macros >= 24 diff --git a/sources b/sources index fe88a49..d05a9ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (arrayref-0.3.8.crate) = 27a1b5688327a45358cc62df868835e7da7276c73e853130c41c9f6d9f95822780f159c6e7d1fa10848ba30fed8e173a1d8949630f18a828c3009de342be21dc +SHA512 (arrayref-0.3.9.crate) = f97e33e7fd65a8e908c21ab918350f71f12d49783162b90c5618660217b36516c39750b292a1248125f12429e4e00af9ff20c3846be81175946b8541d96ee606