The package rpms/rust-cranelift-frontend.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-cranelift-frontend.git/commi...
https://src.fedoraproject.org/cgit/rpms/rust-cranelift-frontend.git/commi....
Change:
+ExcludeArch: %{power64}
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 97f1972bd68c0cac90f06aaa7c26d47357b5ae44
Author: Olivier Lemasle <o.lemasle(a)gmail.com>
Date: Tue Jun 1 12:03:58 2021 +0200
Exclude arch unsupported by Cranelift
Ignore tests which depend on x86_64 on other architectures
diff --git a/ignore-arch-dependent-tests.patch b/ignore-arch-dependent-tests.patch
new file mode 100644
index 0000000..62f9825
--- /dev/null
+++ b/ignore-arch-dependent-tests.patch
@@ -0,0 +1,55 @@
+From 93a2446f9c03febc745110d284f3d19176b03f1e Mon Sep 17 00:00:00 2001
+From: Olivier Lemasle <o.lemasle(a)gmail.com>
+Date: Tue, 1 Jun 2021 13:44:38 +0200
+Subject: [PATCH] Restrict running tests dependent of x86_64
+
+These 5 tests fail with the error "This test requires x86_64 support." when
+executed on another architecture.
+---
+ cranelift/frontend/src/frontend.rs | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs
+index 3b76a47450..8b68e6f62d 100644
+--- a/cranelift/frontend/src/frontend.rs
++++ b/cranelift/frontend/src/frontend.rs
+@@ -969,6 +969,7 @@ mod tests {
+ }
+
+ #[test]
++ #[cfg_attr(not(target_arch = "x86_64"), ignore)]
+ fn memcpy() {
+ use core::str::FromStr;
+ use cranelift_codegen::{isa, settings};
+@@ -1031,6 +1032,7 @@ block0:
+ }
+
+ #[test]
++ #[cfg_attr(not(target_arch = "x86_64"), ignore)]
+ fn small_memcpy() {
+ use core::str::FromStr;
+ use cranelift_codegen::{isa, settings};
+@@ -1098,6 +1100,7 @@ block0:
+ }
+
+ #[test]
++ #[cfg_attr(not(target_arch = "x86_64"), ignore)]
+ fn not_so_small_memcpy() {
+ use core::str::FromStr;
+ use cranelift_codegen::{isa, settings};
+@@ -1168,6 +1171,7 @@ block0:
+ }
+
+ #[test]
++ #[cfg_attr(not(target_arch = "x86_64"), ignore)]
+ fn small_memset() {
+ use core::str::FromStr;
+ use cranelift_codegen::{isa, settings};
+@@ -1221,6 +1225,7 @@ block0:
+ }
+
+ #[test]
++ #[cfg_attr(not(target_arch = "x86_64"), ignore)]
+ fn not_so_small_memset() {
+ use core::str::FromStr;
+ use cranelift_codegen::{isa, settings};
diff --git a/rust-cranelift-frontend.spec b/rust-cranelift-frontend.spec
index 7d5f13d..3a797fa 100644
--- a/rust-cranelift-frontend.spec
+++ b/rust-cranelift-frontend.spec
@@ -6,13 +6,23 @@
Name: rust-%{crate}
Version: 0.74.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Cranelift IR builder helper
# Upstream license specification: Apache-2.0 WITH LLVM-exception
License: ASL 2.0 with exceptions
URL:
https://crates.io/crates/cranelift-frontend
Source: %{crates_source}
+Patch0:
https://github.com/bytecodealliance/wasmtime/pull/2957.patch#/ignore-arch...
+
+# Cranelift currently only supports x86_64, aarch64 and s390x.
+
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1966344
+ExcludeArch: %{ix86}
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1966346
+ExcludeArch: %{arm32}
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1966347
+ExcludeArch: %{power64}
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
@@ -89,7 +99,7 @@ which use "std" feature of "%{crate}" crate.
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
-%autosetup -n %{crate}-%{version_no_tilde} -p1
+%autosetup -n %{crate}-%{version_no_tilde} -p3
%cargo_prep
%generate_buildrequires
@@ -107,6 +117,10 @@ which use "std" feature of "%{crate}" crate.
%endif
%changelog
+* Tue Jun 01 2021 Olivier Lemasle <o.lemasle(a)gmail.com> - 0.74.0-2
+- Exclude arch unsupported by Cranelift
+- Ignore tests which depend on x86_64 on other architectures
+
* Sat May 22 14:42:53 CEST 2021 Olivier Lemasle <o.lemasle(a)gmail.com> - 0.74.0-1
- Update to 0.74.0 - Security fix GHSA-hpqh-2wqx-7qp5
commit 32a9610528356e8e1656906f2ead10d0f5053e59
Author: Olivier Lemasle <o.lemasle(a)gmail.com>
Date: Tue Jun 1 10:00:12 2021 +0200
Initial import (#1962622)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1a457ca
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/cranelift-frontend-0.74.0.crate
diff --git a/rust-cranelift-frontend.spec b/rust-cranelift-frontend.spec
new file mode 100644
index 0000000..7d5f13d
--- /dev/null
+++ b/rust-cranelift-frontend.spec
@@ -0,0 +1,114 @@
+# Generated by rust2rpm 17
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate cranelift-frontend
+
+Name: rust-%{crate}
+Version: 0.74.0
+Release: 1%{?dist}
+Summary: Cranelift IR builder helper
+
+# Upstream license specification: Apache-2.0 WITH LLVM-exception
+License: ASL 2.0 with exceptions
+URL:
https://crates.io/crates/cranelift-frontend
+Source: %{crates_source}
+
+ExclusiveArch: %{rust_arches}
+%if %{__cargo_skip_build}
+BuildArch: noarch
+%endif
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+Cranelift IR builder helper.}
+
+%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
+%license LICENSE
+%{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}+core-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+core-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "core" feature of "%{crate}" crate.
+
+%files -n %{name}+core-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+hashbrown-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+hashbrown-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "hashbrown" feature of "%{crate}" crate.
+
+%files -n %{name}+hashbrown-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "std" feature of "%{crate}" crate.
+
+%files -n %{name}+std-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
+* Sat May 22 14:42:53 CEST 2021 Olivier Lemasle <o.lemasle(a)gmail.com> - 0.74.0-1
+- Update to 0.74.0 - Security fix GHSA-hpqh-2wqx-7qp5
+
+* Sun May 16 19:49:13 CEST 2021 Olivier Lemasle <o.lemasle(a)gmail.com> - 0.73.0-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..e78573e
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (cranelift-frontend-0.74.0.crate) =
10e222bb6dff3d3e7204a5b0b42523124ed62a1cf9b58a01fa579c781cf216bb12c812c91bdcfbab6ee498fb6a5cd161b0d7e1de631169839b73206084de973e