The package rpms/rust-io-uring.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-io-uring.git/commit/?id=4e59....
Change:
+%ifnarch %{ix86}
Thanks.
Full change:
============
commit 4e59b2f534e704d943e1c6195dac719d4c97d072
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Fri Oct 28 18:18:23 2022 +0200
Initial import (#2138378)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6c776fb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/results_*/
+/*.src.rpm
+
+/io-uring-0.5.8.crate
diff --git a/0001-unconditionally-regenerate-bindings-with-bindgen.patch
b/0001-unconditionally-regenerate-bindings-with-bindgen.patch
new file mode 100644
index 0000000..a615865
--- /dev/null
+++ b/0001-unconditionally-regenerate-bindings-with-bindgen.patch
@@ -0,0 +1,76 @@
+From 7a5eccfe4dac646a44d5035e1129f1072bce6299 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe(a)gmail.com>
+Date: Fri, 28 Oct 2022 15:46:51 +0200
+Subject: [PATCH] unconditionally regenerate bindings with bindgen
+
+---
+ build.rs | 8 --------
+ src/sys/mod.rs | 21 ---------------------
+ 2 files changed, 29 deletions(-)
+
+diff --git a/build.rs b/build.rs
+index 111d505..6e85930 100644
+--- a/build.rs
++++ b/build.rs
+@@ -1,7 +1,3 @@
+-#[cfg(not(feature = "bindgen"))]
+-fn main() {}
+-
+-#[cfg(feature = "bindgen")]
+ fn main() {
+ use std::env;
+ use std::path::PathBuf;
+@@ -15,12 +11,8 @@ fn main() {
+ #include <linux/io_uring.h>
+ "#;
+
+- #[cfg(not(feature = "overwrite"))]
+ let outdir = PathBuf::from(env::var("OUT_DIR").unwrap());
+
+- #[cfg(feature = "overwrite")]
+- let outdir =
PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()).join("src/sys");
+-
+ bindgen::Builder::default()
+ .header_contents("include-file.h", INCLUDE)
+ .ctypes_prefix("libc")
+diff --git a/src/sys/mod.rs b/src/sys/mod.rs
+index cae2ae5..8e90cf3 100644
+--- a/src/sys/mod.rs
++++ b/src/sys/mod.rs
+@@ -9,33 +9,12 @@
+
+ use libc::*;
+
+-#[cfg(all(feature = "bindgen", not(feature = "overwrite")))]
+ include!(concat!(env!("OUT_DIR"), "/sys.rs"));
+
+-#[cfg(any(
+- not(feature = "bindgen"),
+- all(feature = "bindgen", feature = "overwrite")
+-))]
+-include!("sys.rs");
+-
+-#[cfg(feature = "bindgen")]
+ const SYSCALL_REGISTER: c_long = __NR_io_uring_register as _;
+-
+-#[cfg(not(feature = "bindgen"))]
+-const SYSCALL_REGISTER: c_long = libc::SYS_io_uring_register;
+-
+-#[cfg(feature = "bindgen")]
+ const SYSCALL_SETUP: c_long = __NR_io_uring_setup as _;
+-
+-#[cfg(not(feature = "bindgen"))]
+-const SYSCALL_SETUP: c_long = libc::SYS_io_uring_setup;
+-
+-#[cfg(feature = "bindgen")]
+ const SYSCALL_ENTER: c_long = __NR_io_uring_enter as _;
+
+-#[cfg(not(feature = "bindgen"))]
+-const SYSCALL_ENTER: c_long = libc::SYS_io_uring_enter;
+-
+ #[cfg(not(feature = "direct-syscall"))]
+ pub unsafe fn io_uring_register(
+ fd: c_int,
+--
+2.38.1
+
diff --git a/README.md b/README.md
deleted file mode 100644
index c91e1dc..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# rust-io-uring
-
-The rust-io-uring package
diff --git a/io-uring-fix-metadata.diff b/io-uring-fix-metadata.diff
new file mode 100644
index 0000000..54e7aad
--- /dev/null
+++ b/io-uring-fix-metadata.diff
@@ -0,0 +1,27 @@
+--- io-uring-0.5.8/Cargo.toml 1970-01-01T00:00:01+00:00
++++ io-uring-0.5.8/Cargo.toml 2022-10-28T13:02:51.981383+00:00
+@@ -36,10 +36,6 @@
+ version = "0.2.98"
+ default-features = false
+
+-[dependencies.sc]
+-version = "0.2"
+-optional = true
+-
+ [dev-dependencies.anyhow]
+ version = "1"
+
+@@ -50,11 +46,10 @@
+ version = "0.4"
+
+ [build-dependencies.bindgen]
+-version = "0.60"
+-optional = true
++version = "0.59"
+
+ [features]
+-direct-syscall = ["sc"]
++bindgen = []
+ io_safety = []
+ overwrite = ["bindgen"]
+ unstable = []
diff --git a/rust-io-uring.spec b/rust-io-uring.spec
new file mode 100644
index 0000000..1f372d2
--- /dev/null
+++ b/rust-io-uring.spec
@@ -0,0 +1,128 @@
+# Generated by rust2rpm 23
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate io-uring
+
+Name: rust-io-uring
+Version: 0.5.8
+Release: %autorelease
+Summary: Low-level io_uring userspace interface for Rust
+
+# Upstream license specification: MIT/Apache-2.0
+License: MIT OR Apache-2.0
+URL:
https://crates.io/crates/io-uring
+Source: %{crates_source}
+# Manually created patch for downstream crate metadata changes
+# * temporarily downgrade bindgen from 0.60 to 0.59
+# * make bindgen build-dependency non-optional
+# * drop feature for making syscalls directly (not available on all arches)
+Patch: io-uring-fix-metadata.diff
+# * patch build.rs to unconditionally regenerate bindings
+Patch: 0001-unconditionally-regenerate-bindings-with-bindgen.patch
+
+BuildRequires: rust-packaging >= 21
+
+%global _description %{expand:
+Low-level `io_uring` userspace interface for 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-APACHE
+%license %{crate_instdir}/LICENSE-MIT
+%doc %{crate_instdir}/README.md
+%{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}+bindgen-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+bindgen-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "bindgen" feature of the "%{crate}" crate.
+
+%files -n %{name}+bindgen-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+io_safety-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+io_safety-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "io_safety" feature of the "%{crate}" crate.
+
+%files -n %{name}+io_safety-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+overwrite-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+overwrite-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "overwrite" feature of the "%{crate}" crate.
+
+%files -n %{name}+overwrite-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+unstable-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+unstable-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "unstable" feature of the "%{crate}" crate.
+
+%files -n %{name}+unstable-devel
+%ghost %{crate_instdir}/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
+%ifnarch %{ix86}
+# * bindgen struct layout / alignment tests are broken on i686
+%cargo_test
+%endif
+%endif
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..352a40d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (io-uring-0.5.8.crate) =
6ac38864ad676a5aded80c33394824abac30f5758cfa1d0a6ae00447317833a32624622c72ad4fd940343c2a28d187fca850f90d2b188d63aea857e7107cf75a