Hello community, here is the log from the commit of package czmq for openSUSE:Factory checked in at 2017-06-07 09:55:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/czmq (Old) and /work/SRC/openSUSE:Factory/.czmq.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "czmq" Wed Jun 7 09:55:22 2017 rev:5 rq:501098 version:4.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/czmq/czmq.changes 2017-01-10 10:45:19.431776305 +0100 +++ /work/SRC/openSUSE:Factory/.czmq.new/czmq.changes 2017-06-07 09:55:23.310978949 +0200 @@ -1,0 +2,8 @@ +Mon Jun 5 06:42:10 UTC 2017 - mvysko...@opensuse.org + +- Fix a build with gcc7 +- Add: + * 0000-gcc7-b651cb47.patch + * 0001-gcc7-41866333e.patch + +------------------------------------------------------------------- New: ---- 0000-gcc7-b651cb47.patch 0001-gcc7-41866333e.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ czmq.spec ++++++ --- /var/tmp/diff_new_pack.AlORGu/_old 2017-06-07 09:55:23.834904910 +0200 +++ /var/tmp/diff_new_pack.AlORGu/_new 2017-06-07 09:55:23.838904345 +0200 @@ -25,6 +25,10 @@ Group: Development/Libraries/C and C++ Url: https://github.com/zeromq/czmq Source0: https://github.com/zeromq/czmq/releases/download/v%{version}/czmq-%{version}.tar.gz +#PATCH-FIX-UPSTREAM: gcc7 build +Patch0: 0000-gcc7-b651cb47.patch +#PATCH-FIX-UPSTREAM: gcc7 build +Patch1: 0001-gcc7-41866333e.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -71,6 +75,8 @@ %prep %setup -q +%patch0 -p1 +%patch1 -p1 %build %configure --disable-static ++++++ 0000-gcc7-b651cb47.patch ++++++ commit b651cb479235751b22b8f9a822a2fc6bc1be01ab Author: Luca Boccassi <luca.bocca...@gmail.com> Date: Tue Feb 7 11:43:48 2017 +0000 Problem: build error with GCC7 in zgossip_engine.inc Solution: snprintf size parameter includes the NULL terminating char as the manpage says, so don't pass sizeof(..) - 1 diff --git a/src/zgossip_engine.inc b/src/zgossip_engine.inc index f66f76c1..b5596a8e 100644 --- a/src/zgossip_engine.inc +++ b/src/zgossip_engine.inc @@ -257,7 +257,7 @@ engine_set_log_prefix (client_t *client, const char *string) { if (client) { s_client_t *self = (s_client_t *) client; - snprintf (self->log_prefix, sizeof (self->log_prefix) - 1, + snprintf (self->log_prefix, sizeof (self->log_prefix), "%6d:%-33s", self->unique_id, string); } } ++++++ 0001-gcc7-41866333e.patch ++++++ commit 41866333eccc5bcc6e18dc823efb5fa8748719ce Author: Luca Boccassi <luca.bocca...@gmail.com> Date: Tue Feb 7 12:05:17 2017 +0000 Problem: build error in zsys with GCC7 Solution: use a larger buffer for the PID buffer in zsys_run_as to avoid a possible overflow. diff --git a/src/zsys.c b/src/zsys.c index 13caf667..c0b60305 100644 --- a/src/zsys.c +++ b/src/zsys.c @@ -1135,7 +1135,7 @@ zsys_run_as (const char *lockfile, const char *group, const char *user) } } // We record the current process id in the lock file - char pid_buffer [10]; + char pid_buffer [32]; snprintf (pid_buffer, sizeof (pid_buffer), "%6" PRIi64 "\n", (int64_t)getpid ()); if ((size_t) write (handle, pid_buffer, strlen (pid_buffer)) != strlen (pid_buffer)) { zsys_error ("cannot write to lockfile: %s", strerror (errno));