The package rpms/rust-psa-crypto-sys.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-psa-crypto-sys.git/commit/?i....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 5bf06e4f48057bb386d0fee89d93a269cd25fa4c
Author: Peter Robinson <pbrobinson(a)gmail.com>
Date: Tue Jul 21 20:08:30 2020 +0100
initial import
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cfd450c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/psa-crypto-sys-*.crate
diff --git a/psa-crypto-fix-tests.patch b/psa-crypto-fix-tests.patch
new file mode 100644
index 0000000..38a3a97
--- /dev/null
+++ b/psa-crypto-fix-tests.patch
@@ -0,0 +1,35 @@
+From f502c3ce52c20dfea04664219a79a7ae69ab61a5 Mon Sep 17 00:00:00 2001
+From: Joe Ellis <joe.ellis(a)arm.com>
+Date: Fri, 17 Jul 2020 13:15:12 +0100
+Subject: [PATCH] Blocklist `max_align_t` in bindgen
+
+We observe the following test failure for i686:
+
+ failures:
+ ---- psa_crypto_binding::bindgen_test_layout_max_align_t stdout ----
+ thread 'psa_crypto_binding::bindgen_test_layout_max_align_t'
+ panicked at 'assertion failed: `(left == right)`
+ left: `16`,
+ right: `24`: Size of: max_align_t',
+ .../build/psa-crypto-sys-59266dd2c6e5c562/out/shim_bindings.rs:3:22153
+
+This type isn't needed, so we can just blocklist it from bindgen.
+
+Signed-off-by: Joe Ellis <joe.ellis(a)arm.com>
+---
+ psa-crypto-sys/build.rs | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/build.rs b/build.rs
+index 77b400a..9f3b072 100644
+--- a/build.rs
++++ b/build.rs
+@@ -74,6 +74,7 @@ fn generate_mbed_crypto_bindings(mbed_include_dir: String) ->
Result<()> {
+ .clang_arg(format!("-I{}", mbed_include_dir))
+ .rustfmt_bindings(true)
+ .header("src/c/shim.h")
++ .blacklist_type("max_align_t")
+ .generate_comments(false)
+ .size_t_is_usize(true)
+ .generate()
+
diff --git a/rust-psa-crypto-sys.spec b/rust-psa-crypto-sys.spec
new file mode 100644
index 0000000..7a008e2
--- /dev/null
+++ b/rust-psa-crypto-sys.spec
@@ -0,0 +1,114 @@
+# Generated by rust2rpm 13
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate psa-crypto-sys
+
+Name: rust-%{crate}
+Version: 0.3.0
+Release: 2%{?dist}
+Summary: Wrapper around the PSA Cryptography API
+
+# Upstream license specification: Apache-2.0
+License: ASL 2.0
+URL:
https://crates.io/crates/psa-crypto-sys
+Source: %{crates_source}
+Patch0: psa-crypto-fix-tests.patch
+
+ExclusiveArch: %{rust_arches}
+%if %{__cargo_skip_build}
+BuildArch: noarch
+%endif
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+Wrapper around the PSA Cryptography API.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages
+which use "%{crate}" crate.
+
+%files devel
+%doc README.md
+%{cargo_registry}/%{crate}-%{version_no_tilde}/
+
+%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 "default" feature of "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+interface-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+interface-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "interface" feature of "%{crate}" crate.
+
+%files -n %{name}+interface-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+operations-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+operations-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "operations" feature of "%{crate}" crate.
+
+%files -n %{name}+operations-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+static-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+static-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "static" feature of "%{crate}" crate.
+
+%files -n %{name}+static-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+* Fri Jul 17 2020 Peter Robinson <pbrobinson(a)fedoraproject.org> - 0.3.0-2
+- Upstream fix for tests
+
+* Thu Jul 16 12:34:07 BST 2020 Peter Robinson <pbrobinson(a)fedoraproject.org> -
0.3.0-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..aaed61d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (psa-crypto-sys-0.3.0.crate) =
42f01bdd6c0c64d790b3ea26f04e51384dff187cb2ca17d327ce64f5f6f01ff4d76b7ea1d86e872d9e4d5d6c7a91e6e44798c3493ca9bf26dffe3cb1e8f0de31