From 0e6c10c23f1bfbf67087d60ff2c76b223c5a9324 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 29 Jan 2025 07:57:07 -0500 Subject: [PATCH] Update to version 0.9.0; Fixes RHBZ#2342269 --- .gitignore | 1 + 0001-drop-deny-warnings-from-doctests.patch | 10 ++--- rust-rand_core.spec | 48 +++++---------------- rust2rpm.toml | 6 +++ sources | 2 +- 5 files changed, 24 insertions(+), 43 deletions(-) create mode 100644 rust2rpm.toml diff --git a/.gitignore b/.gitignore index 16b9178..c2e93ae 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /rand_core-0.6.2.crate /rand_core-0.6.3.crate /rand_core-0.6.4.crate +/rand_core-0.9.0.crate diff --git a/0001-drop-deny-warnings-from-doctests.patch b/0001-drop-deny-warnings-from-doctests.patch index 897c9fd..c1f8e4b 100644 --- a/0001-drop-deny-warnings-from-doctests.patch +++ b/0001-drop-deny-warnings-from-doctests.patch @@ -1,4 +1,4 @@ -From 687722bb07677758ca463eba433e9fecc32038ee Mon Sep 17 00:00:00 2001 +From ad2c05599ed3b8feff277cf8339f4cff9a48342d Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 5 Apr 2024 11:40:43 +0200 Subject: [PATCH] drop deny(warnings) from doctests @@ -8,18 +8,18 @@ Subject: [PATCH] drop deny(warnings) from doctests 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs -index 1234a56..de7a009 100644 +index 9faff9c7..87c57bfa 100644 --- a/src/lib.rs +++ b/src/lib.rs -@@ -34,7 +34,7 @@ +@@ -31,7 +31,7 @@ )] #![deny(missing_docs)] #![deny(missing_debug_implementations)] -#![doc(test(attr(allow(unused_variables), deny(warnings))))] +#![doc(test(attr(allow(unused_variables))))] - #![cfg_attr(doc_cfg, feature(doc_cfg))] + #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![no_std] -- -2.44.0 +2.48.1 diff --git a/rust-rand_core.spec b/rust-rand_core.spec index 71ffe36..db329f0 100644 --- a/rust-rand_core.spec +++ b/rust-rand_core.spec @@ -1,23 +1,21 @@ -# Generated by rust2rpm 22 -%bcond_without check +# Generated by rust2rpm 27 +%bcond check 1 %global debug_package %{nil} %global crate rand_core Name: rust-rand_core -Version: 0.6.4 +Version: 0.9.0 Release: %autorelease Summary: Core random number generator traits and tools for implementation License: MIT OR Apache-2.0 URL: https://crates.io/crates/rand_core Source: %{crates_source} -# drop deny(warnings) from doctests to fix building with recent Rust -Patch: 0001-drop-deny-warnings-from-doctests.patch +# * drop deny(warnings) from doctests to fix building with recent Rust +Patch10: 0001-drop-deny-warnings-from-doctests.patch -ExclusiveArch: %{rust_arches} - -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Core random number generator traits and tools for implementation.} @@ -53,28 +51,16 @@ use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+alloc-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+alloc-devel %{_description} - -This package contains library source intended for building other packages which -use the "alloc" feature of the "%{crate}" crate. - -%files -n %{name}+alloc-devel -%ghost %{crate_instdir}/Cargo.toml - -%package -n %{name}+getrandom-devel +%package -n %{name}+os_rng-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+getrandom-devel %{_description} +%description -n %{name}+os_rng-devel %{_description} This package contains library source intended for building other packages which -use the "getrandom" feature of the "%{crate}" crate. +use the "os_rng" feature of the "%{crate}" crate. -%files -n %{name}+getrandom-devel +%files -n %{name}+os_rng-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+serde-devel @@ -89,18 +75,6 @@ use the "serde" feature of the "%{crate}" crate. %files -n %{name}+serde-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+serde1-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+serde1-devel %{_description} - -This package contains library source intended for building other packages which -use the "serde1" feature of the "%{crate}" crate. - -%files -n %{name}+serde1-devel -%ghost %{crate_instdir}/Cargo.toml - %package -n %{name}+std-devel Summary: %{summary} BuildArch: noarch @@ -114,7 +88,7 @@ use the "std" 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..1eb6c74 --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,6 @@ +[[package.extra-patches]] +number = 10 +file = "0001-drop-deny-warnings-from-doctests.patch" +comments = [ + "drop deny(warnings) from doctests to fix building with recent Rust", +] diff --git a/sources b/sources index e8865ab..477a475 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rand_core-0.6.4.crate) = 36c67eb845aa2ccca49d6d680f28d418229bbc5a050729e487fe6b9f9f384fdd7b8d67fc6508b90b79ffb3c26688e72feceb3ecae57d3d7f59338aeb62296f79 +SHA512 (rand_core-0.9.0.crate) = def4746229c8405ceb46eb9300838918693f17a39a749e6ca42ad73fd02b0f0e14dca0dd26b3f030338db45da0d149d8c563d95cbd71c31995c5ab6294bd087a