From 130f01bf15ced87aee7b35d05099b2a9e4fc359c Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Thu, 18 May 2023 16:46:59 +0200 Subject: [PATCH] Update to version 0.1.16 --- .gitignore | 1 + getrandom-fix-metadata-auto.diff | 11 ++++++ getrandom-fix-metadata.diff | 28 +++++++++----- rust-getrandom0.1.spec | 63 ++++++++++++++++---------------- .rust2rpm.conf => rust2rpm.conf | 3 -- sources | 2 +- 6 files changed, 62 insertions(+), 46 deletions(-) create mode 100644 getrandom-fix-metadata-auto.diff rename .rust2rpm.conf => rust2rpm.conf (64%) diff --git a/.gitignore b/.gitignore index dd25b35..3d1bc35 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /*.src.rpm /getrandom-0.1.15.crate +/getrandom-0.1.16.crate diff --git a/getrandom-fix-metadata-auto.diff b/getrandom-fix-metadata-auto.diff new file mode 100644 index 0000000..729fb3a --- /dev/null +++ b/getrandom-fix-metadata-auto.diff @@ -0,0 +1,11 @@ +--- getrandom-0.1.16/Cargo.toml 2020-12-31T12:12:09+00:00 ++++ getrandom-0.1.16/Cargo.toml 2023-05-18T14:44:12.577132+00:00 +@@ -43,8 +43,6 @@ + std = [] + test-in-browser = ["wasm-bindgen"] + wasm-bindgen = ["bindgen", "js-sys"] +-[target."cfg(target_os = \"wasi\")".dependencies.wasi] +-version = "0.9" + [target."cfg(unix)".dependencies.libc] + version = "0.2.64" + default-features = false diff --git a/getrandom-fix-metadata.diff b/getrandom-fix-metadata.diff index c4083a6..edd7e20 100644 --- a/getrandom-fix-metadata.diff +++ b/getrandom-fix-metadata.diff @@ -1,18 +1,26 @@ ---- getrandom-0.1.15/Cargo.toml 2020-09-10T10:21:20+00:00 -+++ getrandom-0.1.15/Cargo.toml 2020-11-28T13:48:16.106903+00:00 -@@ -42,8 +42,6 @@ +--- getrandom-0.1.16/Cargo.toml 2020-12-31T12:12:09+00:00 ++++ getrandom-0.1.16/Cargo.toml 2023-05-18T14:44:34.078229+00:00 +@@ -41,25 +41,10 @@ + dummy = [] rustc-dep-of-std = ["compiler_builtins", "core"] std = [] - test-in-browser = ["wasm-bindgen"] --[target."cfg(target_os = \"wasi\")".dependencies.wasi] --version = "0.9" +-test-in-browser = ["wasm-bindgen"] +-wasm-bindgen = ["bindgen", "js-sys"] [target."cfg(unix)".dependencies.libc] version = "0.2.64" default-features = false -@@ -54,8 +52,6 @@ - [target.wasm32-unknown-unknown.dependencies.wasm-bindgen] - version = "0.2.29" - optional = true +-[target.wasm32-unknown-unknown.dependencies.bindgen] +-version = "0.2.29" +-optional = true +-package = "wasm-bindgen" + +-[target.wasm32-unknown-unknown.dependencies.js-sys] +-version = "0.3" +-optional = true +- +-[target.wasm32-unknown-unknown.dependencies.stdweb] +-version = "0.4.18" +-optional = true -[target.wasm32-unknown-unknown.dev-dependencies.wasm-bindgen-test] -version = "0.2" [badges.appveyor] diff --git a/rust-getrandom0.1.spec b/rust-getrandom0.1.spec index 14f85d6..8c954fa 100644 --- a/rust-getrandom0.1.spec +++ b/rust-getrandom0.1.spec @@ -1,31 +1,28 @@ -# Generated by rust2rpm 16 +# Generated by rust2rpm 24 %bcond_without check %global debug_package %{nil} %global crate getrandom -Name: rust-%{crate}0.1 -Version: 0.1.15 +Name: rust-getrandom0.1 +Version: 0.1.16 Release: %autorelease Summary: Small cross-platform library for retrieving random data from system source -# Upstream license specification: MIT OR Apache-2.0 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/getrandom Source: %{crates_source} -# Initial patched metadata -# * No wasi / wasm deps -Patch0: getrandom-fix-metadata.diff +# Automatically generated patch to strip foreign dependencies +Patch: getrandom-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * drop WASM-specific features and dependencies +Patch: getrandom-fix-metadata.diff -ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: -Small cross-platform library for retrieving random data from system source.} +A small cross-platform library for retrieving random data from system +source.} %description %{_description} @@ -35,13 +32,15 @@ BuildArch: noarch %description devel %{_description} -This package contains library source intended for building other packages -which use "%{crate}" crate. +This package contains library source intended for building other packages which +use the "%{crate}" crate. %files devel -%license LICENSE-MIT LICENSE-APACHE -%doc README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -49,11 +48,11 @@ BuildArch: noarch %description -n %{name}+default-devel %{_description} -This package contains library source intended for building other packages -which use "default" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+dummy-devel Summary: %{summary} @@ -61,11 +60,11 @@ BuildArch: noarch %description -n %{name}+dummy-devel %{_description} -This package contains library source intended for building other packages -which use "dummy" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "dummy" feature of the "%{crate}" crate. %files -n %{name}+dummy-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+log-devel Summary: %{summary} @@ -73,11 +72,11 @@ BuildArch: noarch %description -n %{name}+log-devel %{_description} -This package contains library source intended for building other packages -which use "log" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "log" feature of the "%{crate}" crate. %files -n %{name}+log-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+std-devel Summary: %{summary} @@ -85,11 +84,11 @@ BuildArch: noarch %description -n %{name}+std-devel %{_description} -This package contains library source intended for building other packages -which use "std" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. %files -n %{name}+std-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 diff --git a/.rust2rpm.conf b/rust2rpm.conf similarity index 64% rename from .rust2rpm.conf rename to rust2rpm.conf index 52c21c1..302578b 100644 --- a/.rust2rpm.conf +++ b/rust2rpm.conf @@ -3,6 +3,3 @@ unwanted-features = compiler_builtins core rustc-dep-of-std - stdweb - test-in-browser - wasm-bindgen diff --git a/sources b/sources index 497b8c9..a4a6331 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (getrandom-0.1.15.crate) = b26d9558554058f8a54b03f56f488db5ebad2d5cc84f737e489f8f532f8464ef9038d104173eb30acca61caa1f99e1ce267bc493c01ba1611b829e0a090cc87f +SHA512 (getrandom-0.1.16.crate) = c5450c522c07c7a38b326f9a9062bac7d089630219d577ea4b55abad4e0c31d17b7cde385fc43912dfa100b42334e7a52422c55fda8b738caae428c6f9addb53