From 710a3631894dcce5a1b4bf095ea63d76719a0d8e Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Tue, 28 Feb 2023 15:28:47 +0100 Subject: [PATCH] Update to version 1.0.1; Fixes RHBZ#1928441 --- .gitignore | 1 + 0001-fix-s390x-issues.patch | 26 -------------------------- LICENSE.txt | 21 --------------------- bitvec-fix-metadata.diff | 24 ++++++++---------------- rust-bitvec.spec | 37 ++++++++++++++++++++----------------- sources | 2 +- 6 files changed, 30 insertions(+), 81 deletions(-) delete mode 100644 0001-fix-s390x-issues.patch delete mode 100644 LICENSE.txt diff --git a/.gitignore b/.gitignore index 8729992..e7ff4b4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /bitvec-0.19.4.crate /bitvec-0.19.6.crate +/bitvec-1.0.1.crate diff --git a/0001-fix-s390x-issues.patch b/0001-fix-s390x-issues.patch deleted file mode 100644 index 54bf184..0000000 --- a/0001-fix-s390x-issues.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/array.rs b/src/array.rs -index c0422c7..7ca8c0e 100644 ---- a/src/array.rs -+++ b/src/array.rs -@@ -188,7 +188,7 @@ where - /// ```rust - /// use bitvec::prelude::*; - /// -- /// let bitarr: BitArray = bitarr![0; 30]; -+ /// let bitarr = bitarr![Lsb0, usize; 0; 30]; - /// let native: [usize; 1] = bitarr.unwrap(); - /// ``` - #[inline(always)] -diff --git a/src/array/traits.rs b/src/array/traits.rs -index 0733a8a..4b62579 100644 ---- a/src/array/traits.rs -+++ b/src/array/traits.rs -@@ -412,7 +412,7 @@ mod tests { - let arr: &mut BitArray = bits.try_into().unwrap(); - assert!(arr.not_any()); - -- let bits = bits![mut 0; 4]; -+ let bits = bits![mut LocalBits, usize; 0; 4]; - let bit_arr: Result<&BitArray, _> = - (&*bits).try_into(); - assert!(bit_arr.is_err()); diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 467fbd9..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 myrrlyn (Alexander Payne) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/bitvec-fix-metadata.diff b/bitvec-fix-metadata.diff index 06cfc24..d23e970 100644 --- a/bitvec-fix-metadata.diff +++ b/bitvec-fix-metadata.diff @@ -1,20 +1,12 @@ ---- bitvec-0.19.6/Cargo.toml 2021-11-21T00:36:11+00:00 -+++ bitvec-0.19.6/Cargo.toml 2022-11-04T17:18:00.030643+00:00 -@@ -35,7 +35,7 @@ - default-features = false +--- bitvec-1.0.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ bitvec-1.0.1/Cargo.toml 2023-02-28T13:39:12.969102+00:00 +@@ -72,9 +72,6 @@ + [dev-dependencies.bincode] + version = "1.3" - [dependencies.radium] --version = "0.5" -+version = "0.6.1" - - [dependencies.serde] - version = "1" -@@ -48,8 +48,6 @@ - [dependencies.wyz] - version = "0.2" - default-features = false -[dev-dependencies.criterion] -version = "0.3" +- + [dev-dependencies.rand] + version = "0.8" - [dev-dependencies.serde] - version = "1" diff --git a/rust-bitvec.spec b/rust-bitvec.spec index 70227e6..0d46de0 100644 --- a/rust-bitvec.spec +++ b/rust-bitvec.spec @@ -1,34 +1,25 @@ -# Generated by rust2rpm 23 +# Generated by rust2rpm 24 %bcond_without check %global debug_package %{nil} %global crate bitvec Name: rust-bitvec -Version: 0.19.6 +Version: 1.0.1 Release: %autorelease -Summary: Crate for manipulating memory, bit by bit +Summary: Addresses memory by bits, for packed collections and bitfields License: MIT URL: https://crates.io/crates/bitvec -Source0: %{crates_source} -# https://github.com/myrrlyn/bitvec/issues/93 -Source1: https://github.com/bitvecto-rs/bitvec/raw/v0/19/6/LICENSE.txt +Source: %{crates_source} # Manually created patch for downstream crate metadata changes -# * bump radium from 0.5 to 0.6: -# https://github.com/bitvecto-rs/bitvec/commit/dedee4b # * drop unused, benchmark-only criterion dev-dependency to speed up builds -Patch0: bitvec-fix-metadata.diff - -# 0.19.x series has some problems with s390x that have been fixed for 0.20.x: -# https://github.com/bitvecto-rs/bitvec/commit/bb80797 -# https://github.com/bitvecto-rs/bitvec/commit/3bce0aa -Patch1: 0001-fix-s390x-issues.patch +Patch: bitvec-fix-metadata.diff BuildRequires: rust-packaging >= 21 %global _description %{expand: -Crate for manipulating memory, bit by bit.} +Addresses memory by bits, for packed collections and bitfields.} %description %{_description} @@ -42,7 +33,8 @@ This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel -%license LICENSE.txt +%license %{crate_instdir}/LICENSE.txt +%doc %{crate_instdir}/README.md %{crate_instdir}/ %package -n %{name}+default-devel @@ -105,9 +97,20 @@ use the "std" feature of the "%{crate}" crate. %files -n %{name}+std-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+testing-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+testing-devel %{_description} + +This package contains library source intended for building other packages which +use the "testing" feature of the "%{crate}" crate. + +%files -n %{name}+testing-devel +%ghost %{crate_instdir}/Cargo.toml + %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 -cp -pav %{SOURCE1} . %cargo_prep %generate_buildrequires diff --git a/sources b/sources index 6a5a01b..64d259e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bitvec-0.19.6.crate) = b0ff49814a0197e7be7dda7b0781fecf9b02e7ba0301769a89cf236c981736236263bdb5872afc711731d2c84cf8fe696b0dc4e284d24d399675f4ecc6ab7ea4 +SHA512 (bitvec-1.0.1.crate) = 83d643c5aca020ebbe9094b5aaba6a796e7c3c509228a4348444e57a06bc3a5dd042eed57a2254d91661e73bdab2bc0d1bd02be376906acc6b6d75b5354a8d8e