The package rpms/rust-zmq.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.git/commit/?id=5e8e92a4c...
https://src.fedoraproject.org/cgit/rpms/rust-zmq.git/commit/?id=889b6b831...
https://src.fedoraproject.org/cgit/rpms/rust-zmq.git/commit/?id=6d99108bd....
Change:
+%ifarch s390x
+%ifarch s390x
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 376529e2543343d8f28cc62eb37d10aa59f57f45
Author: Daiki Ueno <dueno(a)redhat.com>
Date: Wed Dec 15 14:08:32 2021 +0100
Don't create backup for arch-dependent patches
Otherwise the build fails with:
BuildError: The following noarch package built differently on different
architectures: rust-zmq-devel-0.9.2-1.fc36.noarch.rpm
rpmdiff output was:
removed /usr/share/cargo/registry/zmq-0.9.2/tests/monitor.rs.s390x
removed /usr/share/cargo/registry/zmq-0.9.2/tests/test.rs.s390x
Signed-off-by: Daiki Ueno <dueno(a)redhat.com>
diff --git a/rust-zmq.spec b/rust-zmq.spec
index c514329..70dcb9f 100644
--- a/rust-zmq.spec
+++ b/rust-zmq.spec
@@ -76,7 +76,7 @@ mv examples/zguide/README.md README-examples-zguide.md
# FIXME:
https://github.com/erickt/rust-zmq/issues/335
%ifarch s390x
%else
-%patch3 -p1 -R -b .s390x
+%patch3 -p1 -R
%endif
%generate_buildrequires
commit 3db859ffa9fdb429e994f77382a0ba97593ce015
Author: Daiki Ueno <dueno(a)redhat.com>
Date: Wed Dec 15 13:43:25 2021 +0100
Ignore test_monitor_events on s390x
diff --git a/rust-zmq-0.9.2-s390x.patch b/rust-zmq-0.9.2-s390x.patch
index 2a73a52..20f1ec8 100644
--- a/rust-zmq-0.9.2-s390x.patch
+++ b/rust-zmq-0.9.2-s390x.patch
@@ -1,12 +1,83 @@
-From c08b96df3e4e980c345459e09ef03b75bb8ef283 Mon Sep 17 00:00:00 2001
+From e3d53757e1634e5b6ecb705886819302d194274b Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
-Date: Wed, 15 Dec 2021 13:16:56 +0100
-Subject: [PATCH] Skip test_exchanging_multipart
+Date: Wed, 15 Dec 2021 13:42:04 +0100
+Subject: [PATCH] rust-zmq-0.9.2-s390x.patch
---
- tests/test.rs | 20 --------------------
- 1 file changed, 20 deletions(-)
+ tests/monitor.rs | 62 ------------------------------------------------
+ tests/test.rs | 20 ----------------
+ 2 files changed, 82 deletions(-)
+diff --git a/tests/monitor.rs b/tests/monitor.rs
+index 4e801b8..b475160 100644
+--- a/tests/monitor.rs
++++ b/tests/monitor.rs
+@@ -69,65 +69,3 @@ fn close_zero_linger(socket: zmq::Socket) {
+ socket.set_linger(0).unwrap();
+ drop(socket);
+ }
+-
+-test!(test_monitor_events, {
+- let ctx = zmq::Context::new();
+-
+- let mut client = ctx.socket(zmq::DEALER).unwrap();
+- let mut server = ctx.socket(zmq::DEALER).unwrap();
+-
+- let err = client
+- .monitor("tcp://127.0.0.1:9999", 0)
+- .expect_err("Socket monitoring only works over inproc://");
+- assert_eq!(zmq::Error::EPROTONOSUPPORT, err);
+-
+- assert!(client
+- .monitor("inproc://monitor-client", zmq::SocketEvent::ALL as i32)
+- .is_ok());
+- assert!(server
+- .monitor("inproc://monitor-server", zmq::SocketEvent::ALL as i32)
+- .is_ok());
+-
+- let mut client_mon = ctx.socket(zmq::PAIR).unwrap();
+- let mut server_mon = ctx.socket(zmq::PAIR).unwrap();
+-
+- // Connect these to the inproc endpoints so they'll get events
+- client_mon.connect("inproc://monitor-client").unwrap();
+- server_mon.connect("inproc://monitor-server").unwrap();
+-
+- // Now do a basic ping test
+- server.bind("tcp://127.0.0.1:9998").unwrap();
+- client.connect("tcp://127.0.0.1:9998").unwrap();
+- bounce(&mut client, &mut server);
+-
+- // Close client and server
+- close_zero_linger(client);
+- close_zero_linger(server);
+-
+- // Now collect and check events from both sockets
+- let mut event = get_monitor_event(&mut client_mon).unwrap();
+- if event == zmq::SocketEvent::CONNECT_DELAYED {
+- event = get_monitor_event(&mut client_mon).unwrap();
+- }
+- assert_eq!(zmq::SocketEvent::CONNECTED, event);
+-
+- if version_ge_4_3() {
+- expect_event(&mut client_mon, zmq::SocketEvent::HANDSHAKE_SUCCEEDED);
+- }
+-
+- expect_event(&mut client_mon, zmq::SocketEvent::MONITOR_STOPPED);
+-
+- // This is the flow of server events
+- expect_event(&mut server_mon, zmq::SocketEvent::LISTENING);
+- expect_event(&mut server_mon, zmq::SocketEvent::ACCEPTED);
+-
+- if version_ge_4_3() {
+- expect_event(&mut server_mon, zmq::SocketEvent::HANDSHAKE_SUCCEEDED);
+- }
+- expect_event(&mut server_mon, zmq::SocketEvent::CLOSED);
+- expect_event(&mut server_mon, zmq::SocketEvent::MONITOR_STOPPED);
+-
+- // Close down the sockets
+- close_zero_linger(client_mon);
+- close_zero_linger(server_mon);
+-});
diff --git a/tests/test.rs b/tests/test.rs
index 8a49b1b..87d41c6 100644
--- a/tests/test.rs
commit 5e8e92a4c95032ba6858615aff2266028abdefb1
Author: Daiki Ueno <dueno(a)redhat.com>
Date: Wed Dec 15 13:30:23 2021 +0100
Fix patch application
Signed-off-by: Daiki Ueno <dueno(a)redhat.com>
diff --git a/rust-zmq.spec b/rust-zmq.spec
index b8a1da6..c514329 100644
--- a/rust-zmq.spec
+++ b/rust-zmq.spec
@@ -15,10 +15,8 @@ URL:
https://crates.io/crates/zmq
Source: %{crates_source}
Patch1: rust-zmq-0.9.2-trybuild.patch
Patch2: rust-zmq-0.9.2-metadata.patch
-%ifarch s390x
# FIXME:
https://github.com/erickt/rust-zmq/issues/335
Patch3: rust-zmq-0.9.2-s390x.patch
-%endif
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
@@ -75,6 +73,12 @@ which use "zmq_has" feature of "%{crate}" crate.
mv examples/zguide/README.md README-examples-zguide.md
%cargo_prep
+# FIXME:
https://github.com/erickt/rust-zmq/issues/335
+%ifarch s390x
+%else
+%patch3 -p1 -R -b .s390x
+%endif
+
%generate_buildrequires
%cargo_generate_buildrequires
commit 889b6b831eb2872bfbfb1b016c69d0510128c569
Author: Daiki Ueno <dueno(a)redhat.com>
Date: Wed Dec 15 13:19:15 2021 +0100
Skip test_exchanging_multipart on s390x
Signed-off-by: Daiki Ueno <dueno(a)redhat.com>
diff --git a/rust-zmq-0.9.2-s390x.patch b/rust-zmq-0.9.2-s390x.patch
new file mode 100644
index 0000000..2a73a52
--- /dev/null
+++ b/rust-zmq-0.9.2-s390x.patch
@@ -0,0 +1,43 @@
+From c08b96df3e4e980c345459e09ef03b75bb8ef283 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Wed, 15 Dec 2021 13:16:56 +0100
+Subject: [PATCH] Skip test_exchanging_multipart
+
+---
+ tests/test.rs | 20 --------------------
+ 1 file changed, 20 deletions(-)
+
+diff --git a/tests/test.rs b/tests/test.rs
+index 8a49b1b..87d41c6 100644
+--- a/tests/test.rs
++++ b/tests/test.rs
+@@ -67,26 +67,6 @@ test!(test_exchanging_strings, {
+ assert_eq!(result, Err(vec![0xff, 0xb7]));
+ });
+
+-test!(test_exchanging_multipart, {
+- let (sender, receiver) = create_socketpair();
+-
+- // convenience API
+- sender.send_multipart(&["foo", "bar"], 0).unwrap();
+- assert_eq!(receiver.recv_multipart(0).unwrap(), vec![b"foo",
b"bar"]);
+-
+- // manually
+- receiver.send("foo", SNDMORE).unwrap();
+- receiver.send("bar", 0).unwrap();
+- let msg1 = sender.recv_msg(0).unwrap();
+- assert!(msg1.get_more());
+- assert!(sender.get_rcvmore().unwrap());
+- assert_eq!(&msg1[..], b"foo");
+- let msg2 = sender.recv_msg(0).unwrap();
+- assert!(!msg2.get_more());
+- assert!(!sender.get_rcvmore().unwrap());
+- assert_eq!(&msg2[..], b"bar");
+-});
+-
+ test!(test_polling, {
+ let (sender, receiver) = create_socketpair();
+
+--
+2.31.1
+
diff --git a/rust-zmq.spec b/rust-zmq.spec
index 64b0abe..b8a1da6 100644
--- a/rust-zmq.spec
+++ b/rust-zmq.spec
@@ -15,6 +15,10 @@ URL:
https://crates.io/crates/zmq
Source: %{crates_source}
Patch1: rust-zmq-0.9.2-trybuild.patch
Patch2: rust-zmq-0.9.2-metadata.patch
+%ifarch s390x
+# FIXME:
https://github.com/erickt/rust-zmq/issues/335
+Patch3: rust-zmq-0.9.2-s390x.patch
+%endif
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
commit 6d99108bdd7c44df8ebeddf3ec4b0a8f8d66d7fa
Author: Daiki Ueno <dueno(a)redhat.com>
Date: Mon Dec 13 11:35:22 2021 +0100
Initial package
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e86a68b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/zmq-0.9.2.crate
diff --git a/rust-zmq-0.9.2-metadata.patch b/rust-zmq-0.9.2-metadata.patch
new file mode 100644
index 0000000..99bc067
--- /dev/null
+++ b/rust-zmq-0.9.2-metadata.patch
@@ -0,0 +1,41 @@
+From 41d347f953dc0d1abc5f4f6605976a09b9994935 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Fri, 3 Dec 2021 10:18:03 +0100
+Subject: [PATCH] rust-zmq-0.9.2-dev-deps.patch
+
+---
+ Cargo.toml | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/Cargo.toml b/Cargo.toml
+index 5d36e21..b81be3c 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -166,14 +166,13 @@ version = "0.4.3"
+ [dependencies.zmq-sys]
+ version = "0.11.0"
+ [dev-dependencies.trybuild]
+-version = "0.4.0"
+-features = ["stable"]
++version = "*"
+
+ [dev-dependencies.env_logger]
+ version = "0.6"
+
+ [dev-dependencies.nix]
+-version = "0.15"
++version = "0.17"
+
+ [dev-dependencies.quickcheck]
+ version = "0.9"
+@@ -189,7 +188,6 @@ version = "0.1.2"
+
+ [features]
+ default = ["zmq_has"]
+-vendored = ["zmq-sys/vendored"]
+ zmq_has = []
+ [badges.appveyor]
+ repository = "erickt/rust-zmq"
+--
+2.31.1
+
diff --git a/rust-zmq-0.9.2-trybuild.patch b/rust-zmq-0.9.2-trybuild.patch
new file mode 100644
index 0000000..cb63fe7
--- /dev/null
+++ b/rust-zmq-0.9.2-trybuild.patch
@@ -0,0 +1,229 @@
+From 51a9cd28de12a3fc3ed1d5a616da52a51ccc7f95 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Mon, 6 Dec 2021 14:54:03 +0100
+Subject: [PATCH 1/2] rust-zmq-0.9.2-trybuild.patch
+
+---
+ Cargo.toml | 4 +-
+ tests/compile-fail/no-leaking-poll-items.rs | 2 -
+ .../compile-fail/no-leaking-poll-items.stderr | 59 ++++++++++++++++++
+ tests/compile-fail/socket-thread-unsafe.rs | 4 +-
+ .../compile-fail/socket-thread-unsafe.stderr | 60 +++++++++++++++++++
+ tests/compile-tests.rs | 28 +--------
+ 6 files changed, 125 insertions(+), 32 deletions(-)
+ create mode 100644 tests/compile-fail/no-leaking-poll-items.stderr
+ create mode 100644 tests/compile-fail/socket-thread-unsafe.stderr
+
+diff --git a/Cargo.toml b/Cargo.toml
+index 69ba24b..5d36e21 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -165,8 +165,8 @@ version = "0.4.3"
+
+ [dependencies.zmq-sys]
+ version = "0.11.0"
+-[dev-dependencies.compiletest_rs]
+-version = "0.3.10"
++[dev-dependencies.trybuild]
++version = "0.4.0"
+ features = ["stable"]
+
+ [dev-dependencies.env_logger]
+diff --git a/tests/compile-fail/no-leaking-poll-items.rs
b/tests/compile-fail/no-leaking-poll-items.rs
+index f311af5..5fb03a6 100644
+--- a/tests/compile-fail/no-leaking-poll-items.rs
++++ b/tests/compile-fail/no-leaking-poll-items.rs
+@@ -1,5 +1,3 @@
+-extern crate zmq;
+-
+ fn main() {
+ let context = zmq::Context::new();
+ let _poll_item = {
+diff --git a/tests/compile-fail/no-leaking-poll-items.stderr
b/tests/compile-fail/no-leaking-poll-items.stderr
+new file mode 100644
+index 0000000..423e013
+--- /dev/null
++++ b/tests/compile-fail/no-leaking-poll-items.stderr
+@@ -0,0 +1,59 @@
++warning: use of deprecated associated function `std::error::Error::description`: use the
Display impl or to_string()
++ --> src/lib.rs
++ |
++ | EncodeError::FromUtf8Error(ref e) => e.description(),
++ | ^^^^^^^^^^^
++ |
++ = note: `#[warn(deprecated)]` on by default
++
++warning: use of deprecated associated function `std::error::Error::description`: use the
Display impl or to_string()
++ --> src/lib.rs
++ |
++ | DecodeError::NulError(ref e) => e.description(),
++ | ^^^^^^^^^^^
++
++warning: panic message is not a string literal
++ --> src/message.rs
++ |
++ | panic!(errno_to_error())
++ | ^^^^^^^^^^^^^^^^
++ |
++ = note: `#[warn(non_fmt_panics)]` on by default
++ = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
++ = note: for more information, see
<
https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-con...
++help: add a "{}" format string to Display the message
++ |
++52 | panic!("{}", errno_to_error())
++ | +++++
++help: or use std::panic::panic_any instead
++ |
++52 | std::panic::panic_any(errno_to_error())
++ | ~~~~~~~~~~~~~~~~~~~~~
++
++warning: panic message is not a string literal
++ --> src/lib.rs
++ |
++ | panic!(errno_to_error());
++ | ^^^^^^^^^^^^^^^^
++ |
++ = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
++ = note: for more information, see
<
https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-con...
++help: add a "{}" format string to Display the message
++ |
++487 | panic!("{}", errno_to_error());
++ | +++++
++help: or use std::panic::panic_any instead
++ |
++487 | std::panic::panic_any(errno_to_error());
++ | ~~~~~~~~~~~~~~~~~~~~~
++
++error[E0597]: `socket` does not live long enough
++ --> tests/compile-fail/no-leaking-poll-items.rs:5:9
++ |
++3 | let _poll_item = {
++ | ---------- borrow later stored here
++4 | let socket = context.socket(zmq::PAIR).unwrap();
++5 | socket.as_poll_item(zmq::POLLIN)
++ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
++6 | }; //~^ ERROR `socket` does not live long enough [E0597]
++ | - `socket` dropped here while still borrowed
+diff --git a/tests/compile-fail/socket-thread-unsafe.rs
b/tests/compile-fail/socket-thread-unsafe.rs
+index 9a88735..4c754dc 100644
+--- a/tests/compile-fail/socket-thread-unsafe.rs
++++ b/tests/compile-fail/socket-thread-unsafe.rs
+@@ -1,5 +1,3 @@
+-extern crate zmq;
+-
+ use std::thread;
+
+ macro_rules! t {
+@@ -12,7 +10,7 @@ fn main() {
+ let mut context = zmq::Context::new();
+ let socket = t!(context.socket(zmq::REP));
+ let s = &socket;
+- let t = thread::spawn(move || { //~ cannot be shared between threads safely
[E0277]
++ let t = thread::spawn(move || {
+ t!(s.bind("tcp://127.0.0.1:12345"))
+ });
+ socket.send("ABC", 0);
+diff --git a/tests/compile-fail/socket-thread-unsafe.stderr
b/tests/compile-fail/socket-thread-unsafe.stderr
+new file mode 100644
+index 0000000..96e0723
+--- /dev/null
++++ b/tests/compile-fail/socket-thread-unsafe.stderr
+@@ -0,0 +1,60 @@
++warning: use of deprecated associated function `std::error::Error::description`: use the
Display impl or to_string()
++ --> src/lib.rs
++ |
++ | EncodeError::FromUtf8Error(ref e) => e.description(),
++ | ^^^^^^^^^^^
++ |
++ = note: `#[warn(deprecated)]` on by default
++
++warning: use of deprecated associated function `std::error::Error::description`: use the
Display impl or to_string()
++ --> src/lib.rs
++ |
++ | DecodeError::NulError(ref e) => e.description(),
++ | ^^^^^^^^^^^
++
++warning: panic message is not a string literal
++ --> src/message.rs
++ |
++ | panic!(errno_to_error())
++ | ^^^^^^^^^^^^^^^^
++ |
++ = note: `#[warn(non_fmt_panics)]` on by default
++ = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
++ = note: for more information, see
<
https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-con...
++help: add a "{}" format string to Display the message
++ |
++52 | panic!("{}", errno_to_error())
++ | +++++
++help: or use std::panic::panic_any instead
++ |
++52 | std::panic::panic_any(errno_to_error())
++ | ~~~~~~~~~~~~~~~~~~~~~
++
++warning: panic message is not a string literal
++ --> src/lib.rs
++ |
++ | panic!(errno_to_error());
++ | ^^^^^^^^^^^^^^^^
++ |
++ = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
++ = note: for more information, see
<
https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-con...
++help: add a "{}" format string to Display the message
++ |
++487 | panic!("{}", errno_to_error());
++ | +++++
++help: or use std::panic::panic_any instead
++ |
++487 | std::panic::panic_any(errno_to_error());
++ | ~~~~~~~~~~~~~~~~~~~~~
++
++error[E0277]: `*mut c_void` cannot be shared between threads safely
++ --> tests/compile-fail/socket-thread-unsafe.rs:13:13
++ |
++13 | let t = thread::spawn(move || {
++ | ^^^^^^^^^^^^^ `*mut c_void` cannot be shared between threads safely
++ |
++ = help: within `Socket`, the trait `Sync` is not implemented for `*mut c_void`
++ = note: required because it appears within the type `Socket`
++ = note: required because of the requirements on the impl of `Send` for
`&Socket`
++ = note: required because it appears within the type
`[closure@$DIR/tests/compile-fail/socket-thread-unsafe.rs:13:27: 15:6]`
++note: required by a bound in `spawn`
+diff --git a/tests/compile-tests.rs b/tests/compile-tests.rs
+index 17316af..db50dfd 100644
+--- a/tests/compile-tests.rs
++++ b/tests/compile-tests.rs
+@@ -1,27 +1,5 @@
+-use std::env::var;
+-use std::path::PathBuf;
+-
+-fn run_mode(mode: &'static str) {
+- let mut config = compiletest_rs::Config::default();
+-
+- let cfg_mode = mode.parse().expect("Invalid mode");
+-
+- config.target_rustcflags = Some(format!(
+- "-L target/{profile} -L target/{profile}/deps",
+- profile = env!("BUILD_PROFILE")
+- ));
+-
+- if let Ok(name) = var::<&str>("TESTNAME") {
+- let s: String = name.to_owned();
+- config.filter = Some(s)
+- }
+- config.mode = cfg_mode;
+- config.src_base = PathBuf::from(format!("tests/{}", mode));
+-
+- compiletest_rs::run_tests(&config);
+-}
+-
+ #[test]
+-fn compile_test() {
+- run_mode("compile-fail");
++fn compile_fail() {
++ let t = trybuild::TestCases::new();
++ t.compile_fail("tests/compile-fail/*.rs");
+ }
+--
+2.31.1
+
diff --git a/rust-zmq.spec b/rust-zmq.spec
new file mode 100644
index 0000000..64b0abe
--- /dev/null
+++ b/rust-zmq.spec
@@ -0,0 +1,90 @@
+# Generated by rust2rpm 18
+%bcond_without check
+%global debug_package %{nil}
+
+%global crate zmq
+
+Name: rust-%{crate}
+Version: 0.9.2
+Release: 1%{?dist}
+Summary: High-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
+Source: %{crates_source}
+Patch1: rust-zmq-0.9.2-trybuild.patch
+Patch2: rust-zmq-0.9.2-metadata.patch
+
+ExclusiveArch: %{rust_arches}
+%if %{__cargo_skip_build}
+BuildArch: noarch
+%endif
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+High-level bindings to the zeromq library.}
+
+%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
+%doc examples README.md NEWS.md HACKING.md CONTRIBUTING.md README-examples-zguide.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}+zmq_has-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+zmq_has-devel %{_description}
+
+This package contains library source intended for building other packages
+which use "zmq_has" feature of "%{crate}" crate.
+
+%files -n %{name}+zmq_has-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+mv examples/zguide/README.md README-examples-zguide.md
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+* Thu Dec 02 2021 Daiki Ueno <dueno(a)redhat.com> - 0.9.2-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..c8a81b5
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (zmq-0.9.2.crate) =
c4a44ce7bb3c0efae6a337b5d0c703cbf74c5035425236ed2ec3ffe7016ef06124694b491e2d12469ca4462cf9eb8699a25888900bc3097cecd44720d231e8a4