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
This commit is contained in:
Yan Gao 2016-04-15 14:10:29 +00:00 committed by Git OBS Bridge
parent 581ca04095
commit b0d292f8cb
6 changed files with 43 additions and 44 deletions

View File

@ -8,10 +8,10 @@
To update to a new release, change "revision" to the desired
git commit hash and bump "version" if necessary
<param name="version">0.17.2</param>
<param name="version">1.0.0</param>
-->
<param name="versionformat">0.17.2+git%cd.%h</param>
<param name="revision">1a7ea3b8d8bf9d5ffbbfdc785ace2b81e9f2356d</param>
<param name="versionformat">1.0.0+git%cd.%h</param>
<param name="revision">6f2b3e85d0315288ee76869b99369e2b1f2f1b71</param>
</service>
<service name="recompress" mode="disabled">

View File

@ -1,30 +0,0 @@
commit f5fd0c950ce1bf19fd5186fd2b1f2cc67f5de3ec
Author: Gao,Yan <ygao@suse.com>
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;
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:de88b20e4b29a0d6ceb41f0ddd9a4565c05118b2a318ff7713cd1ce59e1b990e
size 129823

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fbfe430fa1badb9f2cb506c52a6dbcd0b6ea8c624ed42a69785abd3e5e9cdd17
size 157163

View File

@ -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

View File

@ -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