Compare commits

...

No commits in common. 'c9' and 'cs10' have entirely different histories.
c9 ... cs10

2
.gitignore vendored

@ -1 +1 @@
SOURCES/libqb-2.0.6.tar.xz
SOURCES/libqb-2.0.8.tar.xz

@ -1 +1 @@
a2983bcaf2d5d7faf780db9c964a149eeb5715c0 SOURCES/libqb-2.0.6.tar.xz
d15cae54508d05c4bf909724f442492a3788363f SOURCES/libqb-2.0.8.tar.xz

@ -1,46 +0,0 @@
commit 5594d377ac73d37c06bbad1798e87a65f9a12e07
Author: Chrissie Caulfield <ccaulfie@redhat.com>
Date: Fri Nov 25 07:38:20 2022 +0000
ipc: Retry receiving credentials if the the message is short (#476)
ipc: Retry receiving credentials if the the message is short
rhbz#2111711 refers
diff --git a/lib/ipc_setup.c b/lib/ipc_setup.c
index 0ef9bb6..0de7115 100644
--- a/lib/ipc_setup.c
+++ b/lib/ipc_setup.c
@@ -473,11 +473,15 @@ qb_ipcc_us_setup_connect(struct qb_ipcc_connection *c,
return 0;
}
+#define AUTH_RECV_MAX_RETRIES 10
+#define AUTH_RECV_SLEEP_TIME_US 100
+
/* Called from ipcc_connect_continue() when async connect socket is active */
int qb_ipcc_setup_connect_continue(struct qb_ipcc_connection *c, struct qb_ipc_connection_response *r)
{
struct ipc_auth_data *data;
int32_t res;
+ int retry_count = 0;
#ifdef QB_LINUX
int off = 0;
#endif
@@ -486,8 +490,14 @@ int qb_ipcc_setup_connect_continue(struct qb_ipcc_connection *c, struct qb_ipc_c
qb_ipcc_us_sock_close(c->setup.u.us.sock);
return -ENOMEM;
}
-
+retry:
res = qb_ipc_us_recv_msghdr(data);
+ if (res == -EAGAIN && ++retry_count < AUTH_RECV_MAX_RETRIES) {
+ struct timespec ts = {0, AUTH_RECV_SLEEP_TIME_US*QB_TIME_NS_IN_USEC};
+ struct timespec ts_left = {0, 0};
+ nanosleep(&ts, &ts_left);
+ goto retry;
+ }
#ifdef QB_LINUX
setsockopt(c->setup.u.us.sock, SOL_SOCKET, SO_PASSCRED, &off,

@ -1,51 +0,0 @@
commit 1bbaa929b77113532785c408dd1b41cd0521ffc8
Author: Chrissie Caulfield <ccaulfie@redhat.com>
Date: Thu Jul 20 07:19:01 2023 +0100
log: fix potential overflow with long log messages (#490)
qb_vsnprintf_serialize was called with 'max_size' as the
limiting number for the length of the formatted log
message. But the buffer also needs to contain the
log header (given by 'actual_size'), so we now pass
't->max_line_length' as the maximum length of the
formatted log message to limit space to the actual
bytes left
Also added error checks to the blackbox calls at
the end of the test, as these now provide a proper
test that the BB is functioning. Before they were
masking failures.
diff --git a/lib/log_blackbox.c b/lib/log_blackbox.c
index 3e30504..8519a48 100644
--- a/lib/log_blackbox.c
+++ b/lib/log_blackbox.c
@@ -110,8 +110,8 @@ _blackbox_vlogger(int32_t target,
chunk += sizeof(uint32_t);
/* log message */
- msg_len = qb_vsnprintf_serialize(chunk, max_size, cs->format, ap);
- if (msg_len >= max_size) {
+ msg_len = qb_vsnprintf_serialize(chunk, t->max_line_length, cs->format, ap);
+ if (msg_len >= t->max_line_length) {
chunk = msg_len_pt + sizeof(uint32_t); /* Reset */
/* Leave this at QB_LOG_MAX_LEN so as not to overflow the blackbox */
diff --git a/tests/check_log.c b/tests/check_log.c
index 039a4bb..e5abf40 100644
--- a/tests/check_log.c
+++ b/tests/check_log.c
@@ -832,8 +832,10 @@ START_TEST(test_log_long_msg)
qb_log(LOG_INFO, "Message %d %d - %s", lpc, lpc%600, buffer);
}
- qb_log_blackbox_write_to_file("blackbox.dump");
- qb_log_blackbox_print_from_file("blackbox.dump");
+ rc = qb_log_blackbox_write_to_file("blackbox.dump");
+ ck_assert_int_gt(rc, 0);
+ rc = qb_log_blackbox_print_from_file("blackbox.dump");
+ ck_assert_int_le(rc, 0);
unlink("blackbox.dump");
qb_log_fini();
}

@ -0,0 +1,21 @@
commit c7528139dc8a6999fea65d94f7b8fbb424a6bd06
Author: Chrissie Caulfield <ccaulfie@redhat.com>
Date: Mon Nov 20 12:15:21 2023 +0000
doxygen2man: Include libxml/parser.h (#494)
This seems to be needed for newer versions of libxml
but shouldn't break older ones (CI to confirm!)
diff --git a/doxygen2man/doxygen2man.c b/doxygen2man/doxygen2man.c
index 3dab47d..a90fefb 100644
--- a/doxygen2man/doxygen2man.c
+++ b/doxygen2man/doxygen2man.c
@@ -31,6 +31,7 @@
#include <errno.h>
#include <ctype.h>
#include <libxml/tree.h>
+#include <libxml/parser.h>
#include <qb/qblist.h>
#include <qb/qbmap.h>
#include "cstring.h"

@ -1,17 +1,15 @@
%bcond_without check
%bcond_without testsrpm
%bcond_with check
Name: libqb
Version: 2.0.6
Release: 4%{?dist}
Version: 2.0.8
Release: 6%{?dist}
Summary: Library providing high performance logging, tracing, ipc, and poll
License: LGPLv2+
License: LGPL-2.1-or-later
URL: https://github.com/ClusterLabs/libqb
Source0: https://github.com/ClusterLabs/libqb/releases/download/v%{version}/%{name}-%{version}.tar.xz
Patch0: bz2149647-connretry-recv.patch
Patch1: bz2236171-fix-bb-overflow.patch
Patch0: include-libxml-parser.patch
BuildRequires: autoconf automake libtool
BuildRequires: check-devel
@ -32,15 +30,12 @@ architecture, such as logging, tracing, inter-process communication (IPC),
and polling.
%prep
%autosetup -p1
%setup -q -n %{name}-%{version}
%patch -P0 -p1 -b .include-libxml-parser.patch
%build
./autogen.sh
%configure \
%if %{with testsrpm}
--enable-install-tests \
%endif
--disable-static
%configure --disable-static
%{make_build}
%if 0%{?with_check}
@ -77,25 +72,12 @@ developing applications that use %{name}.
%{_libdir}/pkgconfig/libqb.pc
%{_mandir}/man3/qb*3*
%if %{with testsrpm}
%package tests
Summary: Test suite for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%files tests
%doc COPYING
%{_libdir}/libqb/tests/*
%description tests
The %{name}-tests package contains the %{name} test suite.
%endif
%package -n doxygen2man
Summary: Program to create nicely-formatted man pages from Doxygen XML files
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n doxygen2man
This package contains a program to create nicely-formatted man pages from Doxygen XML files
@ -105,50 +87,68 @@ This package contains a program to create nicely-formatted man pages from Doxyge
%changelog
* Fri Sep 8 2023 Christine Caulfield <ccaulfie@redhat.com> 2.0.6-4
- bump rpm version for rhel-exception build
Resolves: rhbz#2230712
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2.0.8-6
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Sep 1 2023 Christine Caulfield <ccaulfie@redhat.com> 2.0.6-3
- blackbox: fix buffer overflow with long log lines
Resolves: rhbz#2236171
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.0.8-5
- Bump release for June 2024 mass rebuild
* Thu Dec 1 2022 Christine Caulfield <ccaulfie@redhat.com> 2.0.6-1
- ipc: Retry receiving credentials if the the message is short
Resolves: rhbz2149647
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Apr 20 2022 Christine Caulfield <ccaulfie@redhat.com> 2.0.6-1
- Rebase to 2.0.6
Resolves: rhbz#2072903
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Dec 4 2023 Christine Caulfield <ccaulfie@redhat.com> 2.0.8-2
- update doxygen2man for latest libXML2 - include parser.h
* Thu Mar 3 2022 Christine Caulfield <ccaulfie@redhat.com> 2.0.3-8
- Fix negative errno in qb_ipcc_connect (introduced in 2.0.3-4)
Resolves: rhbz#2057527
* Fri Jul 21 2023 Christine Caulfield <ccaulfie@redhat.com> 2.0.8-1
- rebase to v2.0.8
* Wed Jan 19 2022 Christine Caulfield <ccaulfie@redhat.com> 2.0.3-7
- Bump soname for async-connect API addition
Resolves: rhbz#bz2031865
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jun 07 2023 Christine Caulfield <ccaulfie@redhat.com> 2.0.7-1
- rebase to v2.0.7
* Tue Jun 06 2023 Jan Friesse <jfriesse@redhat.com> - 2.0.6-6
- migrated to SPDX license
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Dec 02 2022 Christine Caulfield <ccaulfie@redhat.com> 2.0.6-4
ipc: Retry receiving credentials if the the message is short
* Wed Aug 03 2022 Christine Caulfield <ccaulfie@redhat.com> 2.0.6-3
Don't run tests on Fedora. We have a local CI and it just loads
up the Fedora build system (and occasionally fails for loading reasons)
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Mar 23 2022 Christine Caulfield <ccaulfie@redhat.com> 2.0.6-1
- Rebase to 2.0.6
Don't run ipc_sock test when non-root, and fix RPM building
* Mon Jan 10 2022 Christine Caulfield <ccaulfie@redhat.com> 2.0.3-6
- Fix gating.yaml for RHEL-9
Resolves: rhbz#bz2031865
* Mon Mar 21 2022 Christine Caulfield <ccaulfie@redhat.com> 2.0.5-1
- Rebase to version 2.0.5
* Mon Jan 10 2022 Christine Caulfield <ccaulfie@redhat.com> 2.0.3-5
- Add gating.yaml from RHEL
Resolves: rhbz#bz2031865
* Thu Mar 3 2022 Christine Caulfield <ccaulfie@redhat.com> 2.0.4-4
- Fix negative errno value returned from qb_ipcc_connect().
Introduced with qb_ipcc_async_connect()
* Fri Jan 7 2022 Christine Caulfield <ccaulfie@redhat.com> 2.0.3-4
- Add async connect call for Pacemaker
Resolves: rhbz#bz2031865
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.0.3-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Nov 15 2021 Christine Caulfield <ccaulfie@redhat.com> 2.0.4-1
- Rebase to version 2.0.4
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.0.3-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Mar 3 2021 Christine Caulfield <ccaulfie@redhat.com> 2.0.3
* Wed Mar 3 2021 Christine Caulfield <ccaulfie@redhat.com> 2.0.3-1
- Rebase to version 2.0.3
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-3

Loading…
Cancel
Save