From dc326129809968a1c86773992089c31038fd0d25 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 21 Jan 2019 05:45:12 -0500 Subject: [PATCH] Backport patch to fix test failure. --- 1260.patch | 25 +++++++++++++++++++++++++ zeromq.spec | 9 +++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 1260.patch diff --git a/1260.patch b/1260.patch new file mode 100644 index 0000000..bc70ec5 --- /dev/null +++ b/1260.patch @@ -0,0 +1,25 @@ +From 32b2d3034b04a54118bc95c3f83ea5af78f9de41 Mon Sep 17 00:00:00 2001 +From: Nikolay Amiantov +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]; diff --git a/zeromq.spec b/zeromq.spec index ff23ee8..3c22a49 100644 --- a/zeromq.spec +++ b/zeromq.spec @@ -2,7 +2,7 @@ Name: zeromq Version: 4.1.6 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Software library for fast, message-based applications License: LGPLv3+ @@ -10,6 +10,7 @@ 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 BuildRequires: autoconf BuildRequires: automake @@ -57,7 +58,7 @@ developing applications that use the C++ header files of %{name}. %prep -%setup -q +%autosetup -p1 cp -a %{SOURCE2} . # Don't turn warnings into errors @@ -108,6 +109,10 @@ make check V=1 %changelog +* Mon Jan 21 2019 Elliott Sales de Andrade - 4.1.6-11 +- Backport patch to fix test failures in build +- Cleanup spec a little + * Tue Aug 28 2018 Pavel Zhukov - 4.1.6-10 - Add gcc-c++ BR