The package rpms/rust-zmq-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-zmq-sys.git/commit/?id=19dc9....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit b9303333ace29adadbd45b94722a50d760d2bbeb
Author: Daiki Ueno <dueno(a)redhat.com>
Date: Fri Dec 3 11:51:14 2021 +0100
Remove zeromq-src dependency in installed Cargo.toml
Signed-off-by: Daiki Ueno <dueno(a)redhat.com>
diff --git a/rust-zmq-sys-system-deps.patch b/rust-zmq-sys-0.11.0-system-deps.patch
similarity index 100%
rename from rust-zmq-sys-system-deps.patch
rename to rust-zmq-sys-0.11.0-system-deps.patch
diff --git a/rust-zmq-sys-test-alignment.patch b/rust-zmq-sys-0.11.0-test-alignment.patch
similarity index 100%
rename from rust-zmq-sys-test-alignment.patch
rename to rust-zmq-sys-0.11.0-test-alignment.patch
diff --git a/rust-zmq-sys-0.11.0-vendored.patch b/rust-zmq-sys-0.11.0-vendored.patch
new file mode 100644
index 0000000..35766bd
--- /dev/null
+++ b/rust-zmq-sys-0.11.0-vendored.patch
@@ -0,0 +1,27 @@
+From c3f0c2069163f5573abd95b0c0d8934c7b2cd882 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Thu, 2 Dec 2021 18:55:55 +0100
+Subject: [PATCH] a
+
+---
+ Cargo.toml | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/Cargo.toml b/Cargo.toml
+index 985ea45..5d0aa4b 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -27,10 +27,3 @@ libzmq = "4.1"
+ version = "0.2.15"
+ [build-dependencies.system-deps]
+ version = "3"
+-
+-[build-dependencies.zeromq-src]
+-version = "0.1.7"
+-optional = true
+-
+-[features]
+-vendored = ["zeromq-src"]
+--
+2.31.1
+
diff --git a/rust-zmq-sys.spec b/rust-zmq-sys.spec
index 083c0ee..275d687 100644
--- a/rust-zmq-sys.spec
+++ b/rust-zmq-sys.spec
@@ -6,15 +6,16 @@
Name: rust-%{crate}
Version: 0.11.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Low-level bindings to the zeromq library
# Upstream license specification: MIT/Apache-2.0
License: MIT or ASL 2.0
URL:
https://crates.io/crates/zmq-sys
Source: %{crates_source}
-Patch1: rust-zmq-sys-system-deps.patch
-Patch2: rust-zmq-sys-test-alignment.patch
+Patch1: rust-zmq-sys-0.11.0-system-deps.patch
+Patch2: rust-zmq-sys-0.11.0-test-alignment.patch
+Patch3: rust-zmq-sys-0.11.0-vendored.patch
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
@@ -75,5 +76,8 @@ echo 'pkgconfig(libzmq) >= 4.3.4'
%endif
%changelog
+* Thu Dec 2 2021 Daiki Ueno <dueno(a)redhat.com> - 0.11.0-2
+- Remove zeromq-src dependency in installed Cargo.toml
+
* Wed Jul 28 2021 Daiki Ueno <dueno(a)redhat.com> - 0.11.0-1
- Initial package
commit 790831b6ef1b164552b1e47df01d5629ecd154a5
Author: Daiki Ueno <dueno(a)redhat.com>
Date: Thu Dec 2 11:16:02 2021 +0100
Adjust the rust-bindgen generated tests to work on 32-bit arches
Signed-off-by: Daiki Ueno <dueno(a)redhat.com>
diff --git a/rust-zmq-sys-test-alignment.patch b/rust-zmq-sys-test-alignment.patch
new file mode 100644
index 0000000..95ba86b
--- /dev/null
+++ b/rust-zmq-sys-test-alignment.patch
@@ -0,0 +1,85 @@
+From 2e26906d4908e1d6901bfad4633e97cb45c02af4 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Thu, 2 Dec 2021 11:13:57 +0100
+Subject: [PATCH] rust-zmq-sys-test-alignment.patch
+
+---
+ src/ffi.rs | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 55 insertions(+)
+
+diff --git a/src/ffi.rs b/src/ffi.rs
+index 17e37fc..0338825 100644
+--- a/src/ffi.rs
++++ b/src/ffi.rs
+@@ -414,6 +414,7 @@ pub struct zmq_pollitem_t {
+ pub events: ::std::os::raw::c_short,
+ pub revents: ::std::os::raw::c_short,
+ }
++#[cfg(target_pointer_width = "64")]
+ #[test]
+ fn bindgen_test_layout_zmq_pollitem_t() {
+ assert_eq!(
+@@ -467,6 +468,60 @@ fn bindgen_test_layout_zmq_pollitem_t() {
+ )
+ );
+ }
++#[cfg(target_pointer_width = "32")]
++#[test]
++fn bindgen_test_layout_zmq_pollitem_t() {
++ assert_eq!(
++ ::std::mem::size_of::<zmq_pollitem_t>(),
++ 12usize,
++ concat!("Size of: ", stringify!(zmq_pollitem_t))
++ );
++ assert_eq!(
++ ::std::mem::align_of::<zmq_pollitem_t>(),
++ 4usize,
++ concat!("Alignment of ", stringify!(zmq_pollitem_t))
++ );
++ assert_eq!(
++ unsafe { &(*(::std::ptr::null::<zmq_pollitem_t>())).socket as *const _
as usize },
++ 0usize,
++ concat!(
++ "Offset of field: ",
++ stringify!(zmq_pollitem_t),
++ "::",
++ stringify!(socket)
++ )
++ );
++ assert_eq!(
++ unsafe { &(*(::std::ptr::null::<zmq_pollitem_t>())).fd as *const _ as
usize },
++ 4usize,
++ concat!(
++ "Offset of field: ",
++ stringify!(zmq_pollitem_t),
++ "::",
++ stringify!(fd)
++ )
++ );
++ assert_eq!(
++ unsafe { &(*(::std::ptr::null::<zmq_pollitem_t>())).events as *const _
as usize },
++ 8usize,
++ concat!(
++ "Offset of field: ",
++ stringify!(zmq_pollitem_t),
++ "::",
++ stringify!(events)
++ )
++ );
++ assert_eq!(
++ unsafe { &(*(::std::ptr::null::<zmq_pollitem_t>())).revents as *const
_ as usize },
++ 10usize,
++ concat!(
++ "Offset of field: ",
++ stringify!(zmq_pollitem_t),
++ "::",
++ stringify!(revents)
++ )
++ );
++}
+ impl Default for zmq_pollitem_t {
+ fn default() -> Self {
+ unsafe { ::std::mem::zeroed() }
+--
+2.31.1
+
diff --git a/rust-zmq-sys.spec b/rust-zmq-sys.spec
index 64c6171..083c0ee 100644
--- a/rust-zmq-sys.spec
+++ b/rust-zmq-sys.spec
@@ -13,7 +13,8 @@ Summary: Low-level bindings to the zeromq library
License: MIT or ASL 2.0
URL:
https://crates.io/crates/zmq-sys
Source: %{crates_source}
-Patch: rust-zmq-sys-system-deps.patch
+Patch1: rust-zmq-sys-system-deps.patch
+Patch2: rust-zmq-sys-test-alignment.patch
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
commit 19dc9ab2a618a23f6487e5545cb1c2b164f1b1bd
Author: Daiki Ueno <dueno(a)redhat.com>
Date: Thu Dec 2 07:19:43 2021 +0100
Initial package
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a0b5949
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/zmq-sys-0.11.0.crate
diff --git a/rust-zmq-sys-system-deps.patch b/rust-zmq-sys-system-deps.patch
new file mode 100644
index 0000000..8d72a0e
--- /dev/null
+++ b/rust-zmq-sys-system-deps.patch
@@ -0,0 +1,46 @@
+From 35f7568ae04d6d36947cfab8477178075271d756 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Tue, 30 Nov 2021 17:34:42 +0100
+Subject: [PATCH] rust-zmq-sys-system-deps.patch
+
+---
+ Cargo.toml | 6 +++---
+ build/pkg_config.rs | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Cargo.toml b/Cargo.toml
+index 4c2ad41..985ea45 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -21,12 +21,12 @@ keywords = ["ffi", "bindings"]
+ categories = ["external-ffi-bindings"]
+ license = "MIT/Apache-2.0"
+ repository = "https://github.com/erickt/rust-zmq"
+-[package.metadata.pkg-config]
++[package.metadata.system-deps]
+ libzmq = "4.1"
+ [dependencies.libc]
+ version = "0.2.15"
+-[build-dependencies.metadeps]
+-version = "1"
++[build-dependencies.system-deps]
++version = "3"
+
+ [build-dependencies.zeromq-src]
+ version = "0.1.7"
+diff --git a/build/pkg_config.rs b/build/pkg_config.rs
+index b598969..e2909af 100644
+--- a/build/pkg_config.rs
++++ b/build/pkg_config.rs
+@@ -22,7 +22,7 @@ pub fn configure() {
+ (Some(_), None) => panic!("Unable to locate libzmq include
directory."),
+ (None, Some(_)) => panic!("Unable to locate libzmq library
directory."),
+ (None, None) => {
+- if let Err(e) = metadeps::probe() {
++ if let Err(e) = system_deps::Config::new().probe() {
+ panic!("Unable to locate libzmq:\n{}", e);
+ }
+ }
+--
+2.31.1
+
diff --git a/rust-zmq-sys.spec b/rust-zmq-sys.spec
new file mode 100644
index 0000000..64c6171
--- /dev/null
+++ b/rust-zmq-sys.spec
@@ -0,0 +1,78 @@
+# Generated by rust2rpm 18
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate zmq-sys
+
+Name: rust-%{crate}
+Version: 0.11.0
+Release: 1%{?dist}
+Summary: Low-level bindings to the zeromq library
+
+# Upstream license specification: MIT/Apache-2.0
+License: MIT or ASL 2.0
+URL:
https://crates.io/crates/zmq-sys
+Source: %{crates_source}
+Patch: rust-zmq-sys-system-deps.patch
+
+ExclusiveArch: %{rust_arches}
+%if %{__cargo_skip_build}
+BuildArch: noarch
+%endif
+
+BuildRequires: rust-packaging
+BuildRequires: pkgconfig(libzmq) >= 4.3.4
+
+%global _description %{expand:
+Low-level bindings to the zeromq library.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+Requires: pkgconfig(libzmq) >= 4.3.4
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages
+which use "%{crate}" crate.
+
+%files devel
+%license LICENSE-APACHE LICENSE-MIT
+%{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
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+echo 'pkgconfig(libzmq) >= 4.3.4'
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+* Wed Jul 28 2021 Daiki Ueno <dueno(a)redhat.com> - 0.11.0-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..975952b
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (zmq-sys-0.11.0.crate) =
eacf60332b3ab93344c8fc97390533a1e79b9eaf899be331399526d7142b0c4455ef556826dfe77b6abf6452c32dd2601f3e47f7569cc784f1938dbd3efa80a0