From b0d292f8cba635218f192d634961e5d5a05f166eb38ae42b38f7e4b77549e1cb Mon Sep 17 00:00:00 2001 From: Yan Gao Date: Fri, 15 Apr 2016 14:10:29 +0000 Subject: [PATCH] Accepting request 390203 from home:yan_gao:branches:network:ha-clustering:Factory:Test - further avoid magic in qblog.h by using named constants - defs: add wrappers over preprocessor operators - Upstream version cs: 6f2b3e85d0315288ee76869b99369e2b1f2f1b71 - Update to version 1.0.0 - build: update library soname to 0.18.0 - build: enable syslog tests when configuring in spec - log: allow changing the identifier for syslog (+tests) - ipc: return -errno when getsockopt/setsockopt fail - ipc: set socket buffer size used by ipcs service - ipc: set socket receive buffer - includes: format __attribute__ func. annotations in qblog.h - spec cleanup: get rid of redundant %clean section - ipc: set gid on unix sockets - lib: store server peer credentials in qb_ipcc_connection - lib: create mmap files in socket directory - includes: Fix format string - ipc: Prevent fd and memory leaks in handle_new_connection() (bsc#947341) * Drop bug-947341_libqb-ipc-fd-memory-leaks.patch which has been merged upstream - Upstream version cs: 6fc24f855bfc8dadb4c84bf823b225680670b1c3 (v1.0) OBS-URL: https://build.opensuse.org/request/show/390203 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/libqb?expand=0&rev=71 --- _service | 6 ++--- bug-947341_libqb-ipc-fd-memory-leaks.patch | 30 ---------------------- libqb-0.17.2+git20151001.1a7ea3b.tar.bz2 | 3 --- libqb-1.0.0+git20160407.6f2b3e8.tar.bz2 | 3 +++ libqb.changes | 28 ++++++++++++++++++++ libqb.spec | 17 ++++++------ 6 files changed, 43 insertions(+), 44 deletions(-) delete mode 100644 bug-947341_libqb-ipc-fd-memory-leaks.patch delete mode 100644 libqb-0.17.2+git20151001.1a7ea3b.tar.bz2 create mode 100644 libqb-1.0.0+git20160407.6f2b3e8.tar.bz2 diff --git a/_service b/_service index 1496f33..626e606 100644 --- a/_service +++ b/_service @@ -8,10 +8,10 @@ To update to a new release, change "revision" to the desired git commit hash and bump "version" if necessary - 0.17.2 + 1.0.0 --> - 0.17.2+git%cd.%h - 1a7ea3b8d8bf9d5ffbbfdc785ace2b81e9f2356d + 1.0.0+git%cd.%h + 6f2b3e85d0315288ee76869b99369e2b1f2f1b71 diff --git a/bug-947341_libqb-ipc-fd-memory-leaks.patch b/bug-947341_libqb-ipc-fd-memory-leaks.patch deleted file mode 100644 index 10d6762..0000000 --- a/bug-947341_libqb-ipc-fd-memory-leaks.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit f5fd0c950ce1bf19fd5186fd2b1f2cc67f5de3ec -Author: Gao,Yan -Date: Tue Oct 6 17:48:05 2015 +0200 - - Fix: ipc: Prevent fd and memory leaks in handle_new_connection() - - In handle_new_connection(), connection_accept() could fail, which would - leave the state of the connection inactive. Previously, in this case, - the socket and the allocated qb_ipcs_connection would be leaked. - -diff --git a/lib/ipc_setup.c b/lib/ipc_setup.c -index 28a0ddc..06257c1 100644 ---- a/lib/ipc_setup.c -+++ b/lib/ipc_setup.c -@@ -556,7 +556,14 @@ send_response: - "Error in connection setup (%s)", - c->description); - } -- qb_ipcs_disconnect(c); -+ -+ if (c->state == QB_IPCS_CONNECTION_INACTIVE) { -+ /* This removes the initial alloc ref */ -+ qb_ipcs_connection_unref(c); -+ qb_ipcc_us_sock_close(sock); -+ } else { -+ qb_ipcs_disconnect(c); -+ } - } - return res; - } diff --git a/libqb-0.17.2+git20151001.1a7ea3b.tar.bz2 b/libqb-0.17.2+git20151001.1a7ea3b.tar.bz2 deleted file mode 100644 index f4ef304..0000000 --- a/libqb-0.17.2+git20151001.1a7ea3b.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de88b20e4b29a0d6ceb41f0ddd9a4565c05118b2a318ff7713cd1ce59e1b990e -size 129823 diff --git a/libqb-1.0.0+git20160407.6f2b3e8.tar.bz2 b/libqb-1.0.0+git20160407.6f2b3e8.tar.bz2 new file mode 100644 index 0000000..04bc317 --- /dev/null +++ b/libqb-1.0.0+git20160407.6f2b3e8.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fbfe430fa1badb9f2cb506c52a6dbcd0b6ea8c624ed42a69785abd3e5e9cdd17 +size 157163 diff --git a/libqb.changes b/libqb.changes index cbc935b..4a477f8 100644 --- a/libqb.changes +++ b/libqb.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Fri Apr 15 12:47:35 UTC 2016 - ygao@suse.com + +- further avoid magic in qblog.h by using named constants +- defs: add wrappers over preprocessor operators +- Upstream version cs: 6f2b3e85d0315288ee76869b99369e2b1f2f1b71 + +------------------------------------------------------------------- +Fri Apr 1 13:35:04 UTC 2016 - ygao@suse.com + +- Update to version 1.0.0 +- build: update library soname to 0.18.0 +- build: enable syslog tests when configuring in spec +- log: allow changing the identifier for syslog (+tests) +- ipc: return -errno when getsockopt/setsockopt fail +- ipc: set socket buffer size used by ipcs service +- ipc: set socket receive buffer +- includes: format __attribute__ func. annotations in qblog.h +- spec cleanup: get rid of redundant %clean section +- ipc: set gid on unix sockets +- lib: store server peer credentials in qb_ipcc_connection +- lib: create mmap files in socket directory +- includes: Fix format string +- ipc: Prevent fd and memory leaks in handle_new_connection() (bsc#947341) + * Drop bug-947341_libqb-ipc-fd-memory-leaks.patch which has been merged upstream + +- Upstream version cs: 6fc24f855bfc8dadb4c84bf823b225680670b1c3 (v1.0) + ------------------------------------------------------------------- Thu Oct 8 13:18:22 UTC 2015 - ygao@suse.com diff --git a/libqb.spec b/libqb.spec index 7c17b48..65c6d24 100644 --- a/libqb.spec +++ b/libqb.spec @@ -1,7 +1,7 @@ # # spec file for package libqb # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,8 +16,11 @@ # +%bcond_without check +%bcond_without syslog_tests + Name: libqb -Version: 0.17.2+git20151001.1a7ea3b +Version: 1.0.0+git20160407.6f2b3e8 Release: 0 Summary: An IPC library for high performance servers License: LGPL-2.1+ @@ -26,7 +29,6 @@ Url: https://github.com/ClusterLabs/libqb Source0: %{name}-%{version}.tar.bz2 Source1: baselibs.conf Patch1: libqb-configure-package-version.patch -Patch2: bug-947341_libqb-ipc-fd-memory-leaks.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf @@ -69,13 +71,14 @@ tracing, ipc, and poll. %prep %setup -q -n %{name}-%{version} %patch1 -p1 -%patch2 -p1 %build ./autogen.sh -%configure --disable-static +%configure --disable-static \ + %{?with_syslog_tests:--enable-syslog-tests} make %{?_smp_mflags} +%if 0%{?with_check} %check # Tests require writable /dev/shm and /var/run # TODO: This test might not be quite right -- it seems to fail on OBS, @@ -84,15 +87,13 @@ make %{?_smp_mflags} if [ -w /dev/shm -a -w /var/run ] ; then make check fi +%endif %install %make_install find %{buildroot} -name '*.la' -exec rm -f {} ';' rm -rf %{buildroot}%{_datadir}/doc -%clean -rm -rf %{buildroot} - %post -n libqb0 -p /sbin/ldconfig %postun -n libqb0 -p /sbin/ldconfig