Update to latest version of libzmq and cppzmq.

epel9
Elliott Sales de Andrade 6 years ago
parent 6a4c511715
commit 5652a7377f

1
.gitignore vendored

@ -7,3 +7,4 @@
/x86_64/
/i?86/
/tarballs/
/libzmq-4.3.1.tar.gz

@ -1,25 +0,0 @@
From 32b2d3034b04a54118bc95c3f83ea5af78f9de41 Mon Sep 17 00:00:00 2001
From: Nikolay Amiantov <ab@fmap.me>
Date: Thu, 20 Nov 2014 05:08:45 +0300
Subject: [PATCH] Fix test_filter_ipc for cleared supplementary groups
This should fix part of [https://github.com/zeromq/libzmq/issues/1129].
---
tests/test_filter_ipc.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_filter_ipc.cpp b/tests/test_filter_ipc.cpp
index 00518f710..83035949b 100644
--- a/tests/test_filter_ipc.cpp
+++ b/tests/test_filter_ipc.cpp
@@ -122,8 +122,8 @@ int main (void)
// Get the group and supplimental groups of the process owner
gid_t groups[100];
int ngroups = getgroups(100, groups);
- assert (ngroups != -1 && ngroups != 0);
- gid_t group = getgid(), supgroup = groups[0], notgroup = groups[ngroups - 1] + 1;
+ assert (ngroups != -1);
+ gid_t group = getgid(), supgroup = group, notgroup = group + 1;
for (int i = 0; i < ngroups; i++) {
if (supgroup == group && group != groups[i])
supgroup = groups[i];

@ -1,27 +0,0 @@
From 25a50ca0d5d3ea076c63c23692e4cb9868bfb55d Mon Sep 17 00:00:00 2001
From: KIU Shueng Chuan <nixchuan@gmail.com>
Date: Tue, 8 Sep 2015 17:26:31 +0800
Subject: [PATCH] avoid dereferencing uint32_t on unaligned address
---
src/socket_base.cpp | 21 +++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index a980015fc..ea178a868 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -1361,8 +1361,11 @@ void zmq::socket_base_t::monitor_event (int event_, int value_, const std::strin
zmq_msg_t msg;
zmq_msg_init_size (&msg, 6);
uint8_t *data = (uint8_t *) zmq_msg_data (&msg);
- *(uint16_t *) (data + 0) = (uint16_t) event_;
- *(uint32_t *) (data + 2) = (uint32_t) value_;
+ // Avoid dereferencing uint32_t on unaligned address
+ uint16_t event = (uint16_t) event_;
+ uint32_t value = (uint32_t) value_;
+ memcpy (data + 0, &event, sizeof(event));
+ memcpy (data + 2, &value, sizeof(value));
zmq_sendmsg (monitor_socket, &msg, ZMQ_SNDMORE);
// Send address in second frame

@ -1 +1 @@
c89db4dbc0b90c34c9f4983cbff6d321 zeromq-4.1.6.tar.gz
SHA512 (libzmq-4.3.1.tar.gz) = 64855a73331a194c43b01aa86a985a149eba4ed32b9f6483d2a7415cfd8bba557aab5b7b33d160cd177141de02360b73c20e4696a19c2cd798eb5f82eeb72840

@ -1,26 +1,26 @@
%bcond_without pgm
# TODO: Split into a separate package?
%global cppzmq_version 4.3.0
Name: zeromq
Version: 4.1.6
Release: 11%{?dist}
Version: 4.3.1
Release: 1%{?dist}
Summary: Software library for fast, message-based applications
License: LGPLv3+
URL: http://www.zeromq.org
Source0: https://github.com/zeromq/zeromq4-1/releases/download/v%{version}/zeromq-%{version}.tar.gz
Source1: https://raw.githubusercontent.com/zeromq/cppzmq/master/zmq.hpp
Source2: https://raw.githubusercontent.com/zeromq/cppzmq/master/LICENSE
Patch0001: https://github.com/zeromq/libzmq/pull/1260.patch
Patch0002: https://github.com/zeromq/libzmq/pull/1574.patch
Source0: https://github.com/zeromq/libzmq/archive/v%{version}/libzmq-%{version}.tar.gz
Source1: https://github.com/zeromq/cppzmq/raw/v%{cppzmq_version}/zmq.hpp
Source2: https://github.com/zeromq/cppzmq/raw/v%{cppzmq_version}/LICENSE
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: libsodium-devel
BuildRequires: gcc-c++
BuildRequires: libunwind-devel
BuildRequires: glib2-devel
BuildRequires: libuuid-devel
%if %{with pgm}
BuildRequires: openpgm-devel
BuildRequires: krb5-devel
@ -49,6 +49,7 @@ developing applications that use %{name}.
%package -n cppzmq-devel
Summary: Development files for cppzmq
Version: %{cppzmq_version}
License: MIT
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
@ -59,12 +60,14 @@ developing applications that use the C++ header files of %{name}.
%prep
%autosetup -p1
%autosetup -p1 -n libzmq-%{version}
cp -a %{SOURCE2} .
# Don't turn warnings into errors
sed -i "s/libzmq_werror=\"yes\"/libzmq_werror=\"no\"/g" \
configure.ac
# Remove bundled code.
rm -rf external/wepoll
# Fix permissions.
chmod -x src/xsub.hpp
%build
@ -74,6 +77,9 @@ autoreconf -fi
--with-pgm \
--with-libgssapi_krb5 \
%endif
--with-libsodium \
--enable-libunwind \
--disable-Werror \
--disable-static
%make_build
@ -95,7 +101,7 @@ make check V=1 || ( cat test-suite.log && exit 1 )
%files
%doc AUTHORS ChangeLog MAINTAINERS NEWS
%doc README.md AUTHORS NEWS
%license COPYING COPYING.LESSER
%{_bindir}/curve_keygen
%{_libdir}/libzmq.so.5*
@ -111,6 +117,9 @@ make check V=1 || ( cat test-suite.log && exit 1 )
%changelog
* Tue Jan 22 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 4.3.1-1
- Update to latest version of libzmq and cppzmq
* Mon Jan 21 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 4.1.6-11
- Backport patches to fix test failures in build
- Cleanup spec a little

1527
zmq.hpp

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save