From 4203d544512e816835371f9149ccd632ec3dc1ee Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sat, 18 Mar 2023 23:10:34 +0100 Subject: [PATCH] Regenerate with rust2rpm v24 and fix package.license in metadata --- README.md | 3 -- ring-fix-metadata-auto.diff | 31 ++++++++++++++++++++ ring-fix-metadata.diff | 58 ++++++++++++++++++------------------- rust-ring.spec | 55 +++++++++++++++++------------------ 4 files changed, 85 insertions(+), 62 deletions(-) delete mode 100644 README.md create mode 100644 ring-fix-metadata-auto.diff diff --git a/README.md b/README.md deleted file mode 100644 index fbeba7b..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-ring - -The rust-ring package diff --git a/ring-fix-metadata-auto.diff b/ring-fix-metadata-auto.diff new file mode 100644 index 0000000..3c41da5 --- /dev/null +++ b/ring-fix-metadata-auto.diff @@ -0,0 +1,31 @@ +--- ring-0.16.20/Cargo.toml 2021-02-01T22:20:41+00:00 ++++ ring-0.16.20/Cargo.toml 2023-03-18T22:05:06.357486+00:00 +@@ -60,10 +60,6 @@ + std = ["alloc"] + test_logging = [] + wasm32_c = [] +-[target."cfg(all(target_arch = \"wasm32\", target_vendor = \"unknown\", target_os = \"unknown\", target_env = \"\"))".dependencies.web-sys] +-version = "0.3.37" +-features = ["Crypto", "Window"] +-default-features = false + [target."cfg(any(target_arch = \"x86\",target_arch = \"x86_64\", all(any(target_arch = \"aarch64\", target_arch = \"arm\"), any(target_os = \"android\", target_os = \"fuchsia\", target_os = \"linux\"))))".dependencies.spin] + version = "0.5.2" + default-features = false +@@ -76,17 +72,6 @@ + features = ["std"] + optional = true + default-features = false +-[target."cfg(any(target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"illumos\", target_os = \"netbsd\", target_os = \"openbsd\", target_os = \"solaris\"))".dependencies.once_cell] +-version = "1.5.2" +-features = ["std"] +-default-features = false + [target."cfg(any(unix, windows))".dev-dependencies.libc] + version = "0.2.80" + default-features = false +-[target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-test] +-version = "0.3.18" +-default-features = false +-[target."cfg(target_os = \"windows\")".dependencies.winapi] +-version = "0.3.8" +-features = ["ntsecapi", "wtypesbase"] +-default-features = false diff --git a/ring-fix-metadata.diff b/ring-fix-metadata.diff index 92d6c36..303fe84 100644 --- a/ring-fix-metadata.diff +++ b/ring-fix-metadata.diff @@ -1,31 +1,29 @@ --- ring-0.16.20/Cargo.toml 2021-02-01T22:20:41+00:00 -+++ ring-0.16.20/Cargo.toml 2022-01-06T21:12:48.064914+00:00 -@@ -60,10 +60,6 @@ - std = ["alloc"] - test_logging = [] - wasm32_c = [] --[target."cfg(all(target_arch = \"wasm32\", target_vendor = \"unknown\", target_os = \"unknown\", target_env = \"\"))".dependencies.web-sys] --version = "0.3.37" --features = ["Crypto", "Window"] --default-features = false - [target."cfg(any(target_arch = \"x86\",target_arch = \"x86_64\", all(any(target_arch = \"aarch64\", target_arch = \"arm\"), any(target_os = \"android\", target_os = \"fuchsia\", target_os = \"linux\"))))".dependencies.spin] - version = "0.5.2" - default-features = false -@@ -76,17 +72,6 @@ - features = ["std"] - optional = true - default-features = false --[target."cfg(any(target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"illumos\", target_os = \"netbsd\", target_os = \"openbsd\", target_os = \"solaris\"))".dependencies.once_cell] --version = "1.5.2" --features = ["std"] --default-features = false - [target."cfg(any(unix, windows))".dev-dependencies.libc] - version = "0.2.80" - default-features = false --[target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-test] --version = "0.3.18" --default-features = false --[target."cfg(target_os = \"windows\")".dependencies.winapi] --version = "0.3.8" --features = ["ntsecapi", "wtypesbase"] --default-features = false ++++ ring-0.16.20/Cargo.toml 2023-03-18T22:06:09.210728+00:00 +@@ -23,25 +23,10 @@ + readme = "doc/link-to-readme.md" + keywords = ["crypto", "cryptography", "rand", "ECC", "RSA"] + categories = ["cryptography", "no-std"] +-license-file = "LICENSE" ++license = "ISC AND OpenSSL AND MIT" + repository = "https://github.com/briansmith/ring" + [package.metadata.docs.rs] + all-features = true +-[profile.bench] +-opt-level = 3 +-lto = true +-codegen-units = 1 +-debug = false +-debug-assertions = false +-rpath = false +- +-[profile.release] +-opt-level = 3 +-lto = true +-codegen-units = 1 +-debug = false +-debug-assertions = false +-rpath = false + + [lib] + name = "ring" diff --git a/rust-ring.spec b/rust-ring.spec index cc18614..d6f8af0 100644 --- a/rust-ring.spec +++ b/rust-ring.spec @@ -1,29 +1,30 @@ -# Generated by rust2rpm 20 +# Generated by rust2rpm 24 %bcond_without check %global debug_package %{nil} %global crate ring -Name: rust-%{crate} +Name: rust-ring Version: 0.16.20 Release: %autorelease Summary: Safe, fast, small crypto using Rust # https://github.com/briansmith/ring/issues/902 -License: ISC and OpenSSL and MIT - +License: ISC AND OpenSSL AND MIT URL: https://crates.io/crates/ring Source: %{crates_source} -# Initial patched metadata -# * drop dependencies that are specific to non-linux targets -Patch0: ring-fix-metadata.diff +# Automatically generated patch to strip foreign dependencies +Patch: ring-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * drop profiles that set compiler flags that are incompatible with packaging +# * set package.license in metadata to match package license +Patch: ring-fix-metadata.diff -ExclusiveArch: %{rust_arches} -# ring does not support s390x and ppc64le: -# https://bugzilla.redhat.com/show_bug.cgi?id=1869980 -ExcludeArch: s390x %{power64} +# * ring does not support ppc64le and s390x: +# https://bugzilla.redhat.com/show_bug.cgi?id=1869980 +ExcludeArch: ppc64le s390x -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Safe, fast, small crypto using Rust.} @@ -40,8 +41,9 @@ This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel -%license LICENSE LICENSE-fiat -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE +%license %{crate_instdir}/third_party/fiat/LICENSE +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -53,7 +55,7 @@ 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}+alloc-devel Summary: %{summary} @@ -65,7 +67,7 @@ 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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+dev_urandom_fallback-devel Summary: %{summary} @@ -77,7 +79,7 @@ This package contains library source intended for building other packages which use the "dev_urandom_fallback" feature of the "%{crate}" crate. %files -n %{name}+dev_urandom_fallback-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+internal_benches-devel Summary: %{summary} @@ -89,7 +91,7 @@ This package contains library source intended for building other packages which use the "internal_benches" feature of the "%{crate}" crate. %files -n %{name}+internal_benches-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+once_cell-devel Summary: %{summary} @@ -101,7 +103,7 @@ This package contains library source intended for building other packages which use the "once_cell" feature of the "%{crate}" crate. %files -n %{name}+once_cell-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+slow_tests-devel Summary: %{summary} @@ -113,7 +115,7 @@ This package contains library source intended for building other packages which use the "slow_tests" feature of the "%{crate}" crate. %files -n %{name}+slow_tests-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+std-devel Summary: %{summary} @@ -125,7 +127,7 @@ 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 %package -n %{name}+test_logging-devel Summary: %{summary} @@ -137,7 +139,7 @@ This package contains library source intended for building other packages which use the "test_logging" feature of the "%{crate}" crate. %files -n %{name}+test_logging-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+wasm32_c-devel Summary: %{summary} @@ -149,12 +151,11 @@ This package contains library source intended for building other packages which use the "wasm32_c" feature of the "%{crate}" crate. %files -n %{name}+wasm32_c-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep -cp third_party/fiat/LICENSE LICENSE-fiat %generate_buildrequires %cargo_generate_buildrequires @@ -167,14 +168,10 @@ cp third_party/fiat/LICENSE LICENSE-fiat %if %{with check} %check -# * test files for some integration tests are not included in published crates +# * files needed for integration tests are not included in published crates %cargo_test -- --lib -# * skip doctests on i686 to work around LLVM codegen issues -# https://bugzilla.redhat.com/show_bug.cgi?id=2020861 -%ifnarch %{ix86} %cargo_test -- --doc %endif -%endif %changelog %autochangelog