From d32465c660ac81403b0788d45302f4e52a3f965031845d1145971915691f3a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 5 Nov 2015 09:48:04 +0000 Subject: [PATCH] - Add libsodium-init.patch to handle sodium_init() error. OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zeromq?expand=0&rev=41 --- libsodium-init.patch | 28 ++++++++++++++++++++++++++++ zeromq.changes | 5 +++++ zeromq.spec | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 libsodium-init.patch diff --git a/libsodium-init.patch b/libsodium-init.patch new file mode 100644 index 0000000..4d63400 --- /dev/null +++ b/libsodium-init.patch @@ -0,0 +1,28 @@ +Index: zeromq-4.1.3/src/curve_client.cpp +=================================================================== +--- zeromq-4.1.3.orig/src/curve_client.cpp ++++ zeromq-4.1.3/src/curve_client.cpp +@@ -57,8 +57,7 @@ zmq::curve_client_t::curve_client_t (con + unsigned char tmpbytes[4]; + randombytes(tmpbytes, 4); + #else +- // todo check return code +- sodium_init(); ++ zmq_assert (sodium_init() != -1); + #endif + + // Generate short-term key pair +Index: zeromq-4.1.3/src/curve_server.cpp +=================================================================== +--- zeromq-4.1.3.orig/src/curve_server.cpp ++++ zeromq-4.1.3/src/curve_server.cpp +@@ -60,8 +60,7 @@ zmq::curve_server_t::curve_server_t (ses + unsigned char tmpbytes[4]; + randombytes(tmpbytes, 4); + #else +- // todo check return code +- sodium_init(); ++ zmq_assert (sodium_init() != -1); + #endif + + // Generate short-term key pair diff --git a/zeromq.changes b/zeromq.changes index 7bba61f..f39f805 100644 --- a/zeromq.changes +++ b/zeromq.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 5 09:36:36 UTC 2015 - idonmez@suse.com + +- Add libsodium-init.patch to handle sodium_init() error. + ------------------------------------------------------------------- Tue Oct 6 11:26:39 UTC 2015 - idonmez@suse.com diff --git a/zeromq.spec b/zeromq.spec index 3cfaa4e..96ccfe4 100644 --- a/zeromq.spec +++ b/zeromq.spec @@ -28,6 +28,7 @@ License: LGPL-3.0+ Group: Productivity/Networking/Web/Servers Url: http://www.zeromq.org/ Source: http://download.zeromq.org/%{name}-%{version}.tar.gz +Patch1: libsodium-init.patch BuildRequires: asciidoc BuildRequires: gcc-c++ BuildRequires: pkgconfig @@ -109,6 +110,7 @@ This package holds the development files for ZeroMQ. %prep %setup -q +%patch1 -p1 %build %configure \