The package rpms/rust-rustix.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-rustix.git/commit/?id=f18168....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit ba01c9facdf9fa211190e5fd295bfd92eefd43d7
Author: Olivier Lemasle <o.lemasle(a)gmail.com>
Date: Sat Dec 4 11:00:44 2021 +0100
Add .rust2rpm.conf
diff --git a/.rust2rpm.conf b/.rust2rpm.conf
new file mode 100644
index 0000000..4dd5169
--- /dev/null
+++ b/.rust2rpm.conf
@@ -0,0 +1,9 @@
+[DEFAULT]
+unwanted-features =
+ core
+ alloc
+ compiler_builtins
+ rustc-dep-of-std
+ fs-err
+ all-impls
+ cc
commit f18168c3847f3ec7dc4ba04edf68c8580c998390
Author: Olivier Lemasle <o.lemasle(a)gmail.com>
Date: Sat Dec 4 11:00:18 2021 +0100
Initial import (#2007419)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3002e8d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/rustix-0.29.1.crate
diff --git a/0001-Use-cc-to-rebuild-library.diff b/0001-Use-cc-to-rebuild-library.diff
new file mode 100644
index 0000000..41077b9
--- /dev/null
+++ b/0001-Use-cc-to-rebuild-library.diff
@@ -0,0 +1,61 @@
+diff --color -Naur a/build.rs b/build.rs
+--- a/build.rs 1973-11-29 22:33:09.000000000 +0100
++++ b/build.rs 2021-11-28 23:12:38.544273047 +0100
+@@ -1,4 +1,3 @@
+-#[cfg(feature = "cc")]
+ use cc::Build;
+ use std::env::var;
+ use std::io::Write;
+@@ -45,40 +44,13 @@
+ let to = format!("{}/{}/lib{}.a", OUTLINE_PATH, profile, name);
+ println!("cargo:rerun-if-changed={}", to);
+
+- // If "cc" is not enabled, use a pre-built library.
+- #[cfg(not(feature = "cc"))]
+- {
+- let _ = asm_name;
+- println!("cargo:rustc-link-search={}/{}", OUTLINE_PATH, profile);
+- println!("cargo:rustc-link-lib=static={}", name);
+- }
+-
+- // If "cc" is enabled, build the library from source, update the
pre-built
+- // version, and assert that the pre-built version is checked in.
+- #[cfg(feature = "cc")]
++ // Build the library from source
+ {
+ let out_dir = var("OUT_DIR").unwrap();
+ Build::new().file(&asm_name).compile(&name);
+ println!("cargo:rerun-if-changed={}", asm_name);
+ let from = format!("{}/lib{}.a", out_dir, name);
+- let prev_metadata = std::fs::metadata(&to);
+ std::fs::copy(&from, &to).unwrap();
+- assert!(
+- prev_metadata.is_ok(),
+- "{} didn't previously exist; please inspect the new file and `git
add` it",
+- to
+- );
+- assert!(
+- std::process::Command::new("git")
+- .arg("diff")
+- .arg("--quiet")
+- .arg(&to)
+- .status()
+- .unwrap()
+- .success(),
+- "{} changed; please inspect the change and `git commit` it",
+- to
+- );
+ }
+ }
+
+diff --color -Naur a/Cargo.toml b/Cargo.toml
+--- a/Cargo.toml 1970-01-01 01:00:01.000000000 +0100
++++ b/Cargo.toml 2021-11-28 23:03:20.041506221 +0100
+@@ -68,7 +68,6 @@
+ version = "3.2.0"
+ [build-dependencies.cc]
+ version = "1.0.68"
+-optional = true
+
+ [features]
+ all-impls = ["async-std", "tokio", "os_pipe",
"socket2", "mio", "fs-err"]
diff --git a/rust-rustix.spec b/rust-rustix.spec
new file mode 100644
index 0000000..b909e81
--- /dev/null
+++ b/rust-rustix.spec
@@ -0,0 +1,208 @@
+# Generated by rust2rpm 18
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate rustix
+
+Name: rust-%{crate}
+Version: 0.29.1
+Release: 1%{?dist}
+Summary: Safe Rust bindings to POSIX/Unix/Linux syscalls
+
+# Upstream license specification: Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
+License: ASL 2.0 or MIT
+URL:
https://crates.io/crates/rustix
+Source: %{crates_source}
+# Initial patched metadata
+# - Remove windows-only dependency
+# - Upgrade "bitflags" dependency
+Patch0: rustix-fix-metadata.diff
+# Rebuild the static library
+Patch1: 0001-Use-cc-to-rebuild-library.diff
+
+ExclusiveArch: %{rust_arches}
+%if %{__cargo_skip_build}
+BuildArch: noarch
+%endif
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+Safe Rust bindings to POSIX/Unix/Linux syscalls.}
+
+%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
+%license LICENSE-MIT LICENSE-Apache-2.0_WITH_LLVM-exception LICENSE-APACHE COPYRIGHT
+%doc SECURITY.md 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}+async-std-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+async-std-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "async-std" feature of "%{crate}" crate.
+
+%files -n %{name}+async-std-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+io-lifetimes-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+io-lifetimes-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "io-lifetimes" feature of "%{crate}" crate.
+
+%files -n %{name}+io-lifetimes-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+itoa-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+itoa-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "itoa" feature of "%{crate}" crate.
+
+%files -n %{name}+itoa-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+mio-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+mio-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "mio" feature of "%{crate}" crate.
+
+%files -n %{name}+mio-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/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 "once_cell" feature of "%{crate}" crate.
+
+%files -n %{name}+once_cell-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+os_pipe-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+os_pipe-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "os_pipe" feature of "%{crate}" crate.
+
+%files -n %{name}+os_pipe-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+procfs-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+procfs-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "procfs" feature of "%{crate}" crate.
+
+%files -n %{name}+procfs-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%package -n %{name}+socket2-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+socket2-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "socket2" feature of "%{crate}" crate.
+
+%files -n %{name}+socket2-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
+
+%package -n %{name}+tokio-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+tokio-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "tokio" feature of "%{crate}" crate.
+
+%files -n %{name}+tokio-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+# Remove pre-built binaries
+rm src/imp/linux_raw/arch/outline/debug/*.a
+rm src/imp/linux_raw/arch/outline/release/*.a
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+* Fri Dec 03 2021 Olivier Lemasle <o.lemasle(a)gmail.com> - 0.29.1-1
+- Update to upstream 0.29.1
+- Remove Obsoletes for rust-posish
+
+* Sun Nov 28 2021 Olivier Lemasle <o.lemasle(a)gmail.com> - 0.27.1-1
+- Initial package
diff --git a/rustix-fix-metadata.diff b/rustix-fix-metadata.diff
new file mode 100644
index 0000000..6f8382b
--- /dev/null
+++ b/rustix-fix-metadata.diff
@@ -0,0 +1,18 @@
+--- rustix-0.27.1/Cargo.toml 1970-01-01T00:00:01+00:00
++++ rustix-0.27.1/Cargo.toml 2021-11-28T19:50:14.726305+00:00
+@@ -35,7 +35,7 @@
+ package = "rustc-std-workspace-alloc"
+
+ [dependencies.bitflags]
+-version = "1.2.1"
++version = "1.3"
+
+ [dependencies.compiler_builtins]
+ version = "0.1.49"
+@@ -98,6 +98,3 @@
+ optional = true
+ [target."cfg(not(target_os =
\"emscripten\"))".dev-dependencies.criterion]
+ version = "0.3"
+-[target."cfg(windows)".dependencies.winapi]
+-version = "0.3.9"
+-features = ["ws2ipdef", "ws2tcpip"]
diff --git a/sources b/sources
new file mode 100644
index 0000000..34b064a
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (rustix-0.29.1.crate) =
82e21713d774cfd38050b015327cd757ea57e3a93db2901970d5585c42638d25df6adf07770ba650f9962b487e94cb44a5d1492269c6627d1e5360e08dae4c0c