The package rpms/rust-ring0.16.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-ring0.16.git/commit/?id=845d....
Change:
+%ifarch %{supported_arches}
Thanks.
Full change:
============
commit 845d3a2fbbd08bff8bfdaed82b92ed02516466a9
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Fri Oct 27 15:38:36 2023 +0200
Initial import (ring 0.16 compat package)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5720d7c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/ring-0.16.20.crate
diff --git a/README.md b/README.md
deleted file mode 100644
index 1e7616c..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# rust-ring0.16
-
-The rust-ring0.16 package
diff --git a/ring-fix-metadata-auto.diff b/ring-fix-metadata-auto.diff
new file mode 100644
index 0000000..c167a9d
--- /dev/null
+++ b/ring-fix-metadata-auto.diff
@@ -0,0 +1,32 @@
+--- ring-0.16.20/Cargo.toml 2021-02-01T22:20:41+00:00
++++ ring-0.16.20/Cargo.toml 2023-10-25T13:14:45.165319+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,7 @@
+ 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
new file mode 100644
index 0000000..7e67e75
--- /dev/null
+++ b/ring-fix-metadata.diff
@@ -0,0 +1,11 @@
+--- ring-0.16.20/Cargo.toml 2021-02-01T22:20:41+00:00
++++ ring-0.16.20/Cargo.toml 2023-10-25T13:14:55.242361+00:00
+@@ -23,7 +23,7 @@
+ readme = "doc/link-to-readme.md"
+ keywords = ["crypto", "cryptography", "rand",
"ECC", "RSA"]
+ categories = ["cryptography", "no-std"]
+-license-file = "LICENSE"
++license = "ISC AND MIT AND OpenSSL"
+ repository = "https://github.com/briansmith/ring"
+ [package.metadata.docs.rs]
+ all-features = true
diff --git a/rust-ring0.16.spec b/rust-ring0.16.spec
new file mode 100644
index 0000000..8a45f42
--- /dev/null
+++ b/rust-ring0.16.spec
@@ -0,0 +1,180 @@
+# Generated by rust2rpm 25
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate ring
+
+# compile and run tests only on supported architectures
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1869980
+%global supported_arches x86_64 %{ix86} aarch64 %{arm}
+
+Name: rust-ring0.16
+Version: 0.16.20
+Release: %autorelease
+Summary: Safe, fast, small crypto using Rust
+
+License: ISC AND MIT AND OpenSSL
+URL:
https://crates.io/crates/ring
+Source: %{crates_source}
+# Automatically generated patch to strip dependencies and normalize metadata
+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
+
+BuildRequires: cargo-rpm-macros >= 24
+
+%global _description %{expand:
+Safe, fast, small crypto using Rust.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%license %{crate_instdir}/LICENSE
+%license %{crate_instdir}/third_party/fiat/LICENSE
+%{crate_instdir}/
+
+%package -n %{name}+default-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+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 %{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}+dev_urandom_fallback-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+dev_urandom_fallback-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+internal_benches-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+internal_benches-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+once_cell-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+once_cell-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+slow_tests-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+slow_tests-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+std-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+std-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+test_logging-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+test_logging-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+wasm32_c-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+wasm32_c-devel %{_description}
+
+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 %{crate_instdir}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%ifarch %{supported_arches}
+%cargo_build
+%endif
+
+%install
+%cargo_install
+
+%if %{with check}
+%ifarch %{supported_arches}
+%check
+# * files needed for integration tests are not included in published crates
+%cargo_test -- --lib
+%cargo_test -- --doc
+%endif
+%endif
+
+%changelog
+%autochangelog
diff --git a/rust2rpm.toml b/rust2rpm.toml
new file mode 100644
index 0000000..2b82b09
--- /dev/null
+++ b/rust2rpm.toml
@@ -0,0 +1,12 @@
+[package]
+supported-arches = [
+ "x86_64",
+ "%{ix86}",
+ "aarch64",
+ "%{arm}",
+]
+
+[tests]
+run = ["lib", "doc"]
+comments = ["files needed for integration tests are not included in published
crates"]
+
diff --git a/sources b/sources
new file mode 100644
index 0000000..66ceb6d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (ring-0.16.20.crate) =
d97d1b08eb796d4c107426ff2c015ab1f221612500c8a57fca8e3f064e8c0f5ae2a5e6071d013313cd9f4be8fed4ba03beae84bd446f56b2b2ca5d483c328191