From 7c74c3375fc44a2950695e1ff57e6e48fa08e82f Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Thu, 29 Aug 2024 18:47:10 +0200 Subject: [PATCH] Update to version 0.7.6; Fixes RHBZ#2306009 --- .gitignore | 1 + arrayvec-fix-metadata.diff | 44 ++++++++++++++++++++++++++++++++++++++ rust-arrayvec.spec | 12 +++++++---- rust2rpm.toml | 6 ++++++ sources | 2 +- 5 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 arrayvec-fix-metadata.diff create mode 100644 rust2rpm.toml diff --git a/.gitignore b/.gitignore index 63341a0..92c45b0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /arrayvec-0.5.2.crate /arrayvec-0.7.2.crate /arrayvec-0.7.4.crate +/arrayvec-0.7.6.crate diff --git a/arrayvec-fix-metadata.diff b/arrayvec-fix-metadata.diff new file mode 100644 index 0000000..0b6829f --- /dev/null +++ b/arrayvec-fix-metadata.diff @@ -0,0 +1,44 @@ +--- arrayvec-0.7.6/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ arrayvec-0.7.6/Cargo.toml 2024-08-29T16:41:42.028259+00:00 +@@ -59,31 +59,12 @@ + path = "src/lib.rs" + + [[test]] +-name = "borsh" +-path = "tests/borsh.rs" +- +-[[test]] + name = "serde" + path = "tests/serde.rs" + + [[test]] + name = "tests" + path = "tests/tests.rs" +- +-[[bench]] +-name = "arraystring" +-path = "benches/arraystring.rs" +-harness = false +- +-[[bench]] +-name = "extend" +-path = "benches/extend.rs" +-harness = false +- +-[dependencies.borsh] +-version = "1.2.0" +-optional = true +-default-features = false + + [dependencies.serde] + version = "1.0" +@@ -94,9 +75,6 @@ + version = "1.4" + optional = true + default-features = false +- +-[dev-dependencies.bencher] +-version = "0.1.4" + + [dev-dependencies.matches] + version = "0.1" diff --git a/rust-arrayvec.spec b/rust-arrayvec.spec index 71ea3e4..6897d75 100644 --- a/rust-arrayvec.spec +++ b/rust-arrayvec.spec @@ -1,19 +1,23 @@ -# Generated by rust2rpm 24 +# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} %global crate arrayvec Name: rust-arrayvec -Version: 0.7.4 +Version: 0.7.6 Release: %autorelease Summary: Vector with fixed capacity, backed by an array License: MIT OR Apache-2.0 URL: https://crates.io/crates/arrayvec Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * drop unused, benchmark-only bencher dev-dependency +# * drop unused support for borsh +Patch: arrayvec-fix-metadata.diff -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: A vector with fixed capacity, backed by an array (it can be stored on @@ -86,7 +90,7 @@ use the "zeroize" feature of the "%{crate}" crate. %ghost %{crate_instdir}/Cargo.toml %prep -%autosetup -n %{crate}-%{version_no_tilde} -p1 +%autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..c1f7731 --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,6 @@ +[package] +cargo-toml-patch-comments = [ + "drop unused, benchmark-only bencher dev-dependency", + "drop unused support for borsh", +] + diff --git a/sources b/sources index 00f2750..12a446d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (arrayvec-0.7.4.crate) = 91e8f70330c515c966d78ae235e890594f9607381ac738a2c3586b53f01411e98d1687494f39ccc365948ae60497df3dfb2be18e26ab7e69bc0966b6c250e1ac +SHA512 (arrayvec-0.7.6.crate) = b1f320746018a7f32340a833420089446ec5cefb7f299b4506eab7423d5db49f00b72d8aa8c6600f9159b9480d5eb3ce69407d93f5c9934147860c83e4d6eca8