Compare commits
No commits in common. "de57d4c6e5038cb8b5b91368fd546ded49ab8468" and "ed3572c28a76557ff3cdb11aff6041148d2cdf3c" have entirely different histories.
de57d4c6e5
...
ed3572c28a
@ -1,34 +0,0 @@
|
||||
From 9297df4e48c45123a5e4103b3fd07df244346636 Mon Sep 17 00:00:00 2001
|
||||
From: Chrissie Caulfield <ccaulfie@redhat.com>
|
||||
Date: Wed, 15 Nov 2023 09:03:52 +0000
|
||||
Subject: [PATCH] Change assert in ringbuffer to a return code (#492)
|
||||
|
||||
Why just this one?
|
||||
|
||||
There are LOADS of asserts in libqb, some are OK and some may be
|
||||
overkill. This one in particular is causing CI failures
|
||||
and so annoys me more than the rest.
|
||||
---
|
||||
lib/ringbuffer_helper.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/ringbuffer_helper.c b/lib/ringbuffer_helper.c
|
||||
index dbde275..11795ff 100644
|
||||
--- a/lib/ringbuffer_helper.c
|
||||
+++ b/lib/ringbuffer_helper.c
|
||||
@@ -359,7 +359,11 @@ qb_rb_close_helper(struct qb_ringbuffer_s * rb, int32_t unlink_it,
|
||||
truncate_fallback);
|
||||
|
||||
/* the dirname part is assumed to be the same */
|
||||
- assert(!strncmp(dir_path, hdr_path, sep - data_path));
|
||||
+ if (strncmp(dir_path, hdr_path, sep - data_path)) {
|
||||
+ qb_util_perror(LOG_DEBUG,
|
||||
+ "header path is corrupted: %s", hdr_path);
|
||||
+ res = -ENXIO;
|
||||
+ }
|
||||
|
||||
sep = hdr_path + (sep - data_path);
|
||||
/* now, don't touch neither data_path nor hdr_path */
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,133 +0,0 @@
|
||||
From 1070cbc17cbfb415f0bd695f58cdaa4d60c8596c Mon Sep 17 00:00:00 2001
|
||||
From: Ken Gaillot <kgaillot@redhat.com>
|
||||
Date: Wed, 31 Jan 2024 03:44:16 -0600
|
||||
Subject: [PATCH] Make some logs less noisy (#495)
|
||||
|
||||
* log: lower IPC connection issues to info level
|
||||
|
||||
... in handle_new_connection(). The caller has better context for whether a
|
||||
problem merits a warning or error, and the function's return code is
|
||||
sufficiently descriptive to do so. Some problems may be expected or able to be
|
||||
worked around.
|
||||
|
||||
For example, Pacemaker's crm_mon attempts to contact pacemakerd IPC. On a
|
||||
Pacemaker Remote node, that IPC will be unavailable, and crm_mon can check the
|
||||
libqb return code to detect and handle that situation gracefully.
|
||||
|
||||
* log: lower some ringbuffer debug messages to trace level
|
||||
|
||||
They're rather noisy, with every shm-based IPC connection generating multiple
|
||||
obscure messages like:
|
||||
|
||||
debug: shm size:1048589; real_size:1052672; rb->word_size:263168
|
||||
|
||||
and every disconnect generating the rather unhelpful:
|
||||
|
||||
debug: qb_ipcc_disconnect()
|
||||
|
||||
along with multiple messages like:
|
||||
|
||||
debug: Closing ringbuffer: /dev/shm/qb-10986-11014-34-26VRvs/qb-request-cmap-header
|
||||
|
||||
All of these seem appropriate to trace level.
|
||||
---
|
||||
lib/ipc_setup.c | 11 +++++------
|
||||
lib/ipcc.c | 4 ++--
|
||||
lib/ringbuffer.c | 4 ++--
|
||||
lib/ringbuffer_helper.c | 4 ++--
|
||||
4 files changed, 11 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/lib/ipc_setup.c b/lib/ipc_setup.c
|
||||
index 0de7115..73b4e37 100644
|
||||
--- a/lib/ipc_setup.c
|
||||
+++ b/lib/ipc_setup.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (C) 2010,2013 Red Hat, Inc.
|
||||
+ * Copyright 2010-2024 Red Hat, Inc.
|
||||
*
|
||||
* Author: Angus Salkeld <asalkeld@redhat.com>
|
||||
*
|
||||
@@ -765,16 +765,15 @@ send_response:
|
||||
qb_ipcs_connection_unref(c);
|
||||
} else {
|
||||
if (res == -EACCES) {
|
||||
- qb_util_log(LOG_ERR, "Invalid IPC credentials (%s).",
|
||||
+ qb_util_log(LOG_INFO, "IPC connection credentials rejected (%s)",
|
||||
c->description);
|
||||
} else if (res == -EAGAIN) {
|
||||
- qb_util_log(LOG_WARNING, "Denied connection, is not ready (%s)",
|
||||
+ qb_util_log(LOG_INFO, "IPC connection not ready (%s)",
|
||||
c->description);
|
||||
} else {
|
||||
- errno = -res;
|
||||
- qb_util_perror(LOG_ERR,
|
||||
- "Error in connection setup (%s)",
|
||||
+ qb_util_perror(LOG_INFO, "IPC connection setup failed (%s)",
|
||||
c->description);
|
||||
+ errno = -res;
|
||||
}
|
||||
|
||||
if (c->state == QB_IPCS_CONNECTION_INACTIVE) {
|
||||
diff --git a/lib/ipcc.c b/lib/ipcc.c
|
||||
index 4f35ea2..4471f1f 100644
|
||||
--- a/lib/ipcc.c
|
||||
+++ b/lib/ipcc.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (C) 2010 Red Hat, Inc.
|
||||
+ * Copyright 2010-2024 Red Hat, Inc.
|
||||
*
|
||||
* Author: Angus Salkeld <asalkeld@redhat.com>
|
||||
*
|
||||
@@ -480,7 +480,7 @@ qb_ipcc_disconnect(struct qb_ipcc_connection *c)
|
||||
{
|
||||
struct qb_ipc_one_way *ow = NULL;
|
||||
|
||||
- qb_util_log(LOG_DEBUG, "%s()", __func__);
|
||||
+ qb_util_log(LOG_TRACE, "%s(%s)", __func__, (c == NULL)? "NULL" : "");
|
||||
|
||||
if (c == NULL) {
|
||||
return;
|
||||
diff --git a/lib/ringbuffer.c b/lib/ringbuffer.c
|
||||
index b769edf..96a05f1 100644
|
||||
--- a/lib/ringbuffer.c
|
||||
+++ b/lib/ringbuffer.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (C) 2010-2011 Red Hat, Inc.
|
||||
+ * Copyright 2010-2024 Red Hat, Inc.
|
||||
*
|
||||
* Author: Angus Salkeld <asalkeld@redhat.com>
|
||||
*
|
||||
@@ -233,7 +233,7 @@ qb_rb_open_2(const char *name, size_t size, uint32_t flags,
|
||||
goto cleanup_hdr;
|
||||
}
|
||||
|
||||
- qb_util_log(LOG_DEBUG,
|
||||
+ qb_util_log(LOG_TRACE,
|
||||
"shm size:%ld; real_size:%ld; rb->word_size:%d", size,
|
||||
real_size, rb->shared_hdr->word_size);
|
||||
|
||||
diff --git a/lib/ringbuffer_helper.c b/lib/ringbuffer_helper.c
|
||||
index 11795ff..e47b7d5 100644
|
||||
--- a/lib/ringbuffer_helper.c
|
||||
+++ b/lib/ringbuffer_helper.c
|
||||
@@ -334,12 +334,12 @@ qb_rb_close_helper(struct qb_ringbuffer_s * rb, int32_t unlink_it,
|
||||
char *hdr_path = rb->shared_hdr->hdr_path;
|
||||
|
||||
if (unlink_it) {
|
||||
- qb_util_log(LOG_DEBUG, "Free'ing ringbuffer: %s", hdr_path);
|
||||
+ qb_util_log(LOG_TRACE, "Free'ing ringbuffer: %s", hdr_path);
|
||||
if (rb->notifier.destroy_fn) {
|
||||
(void)rb->notifier.destroy_fn(rb->notifier.instance);
|
||||
}
|
||||
} else {
|
||||
- qb_util_log(LOG_DEBUG, "Closing ringbuffer: %s", hdr_path);
|
||||
+ qb_util_log(LOG_TRACE, "Closing ringbuffer: %s", hdr_path);
|
||||
hdr_path = NULL;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,53 +0,0 @@
|
||||
From 40542f314ebe7312fa995677ed5c967150dd5d6a Mon Sep 17 00:00:00 2001
|
||||
From: wferi <wferi@debian.org>
|
||||
Date: Sat, 18 May 2024 17:12:47 +0200
|
||||
Subject: [PATCH 4/5] doxygen2man: Fix typos and inconsistencies in help text
|
||||
(#497)
|
||||
|
||||
---
|
||||
doxygen2man/doxygen2man.c | 18 +++++++++---------
|
||||
1 file changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/doxygen2man/doxygen2man.c b/doxygen2man/doxygen2man.c
|
||||
index a90fefb..3197967 100644
|
||||
--- a/doxygen2man/doxygen2man.c
|
||||
+++ b/doxygen2man/doxygen2man.c
|
||||
@@ -1192,7 +1192,7 @@ static void usage(char *name)
|
||||
printf(" using the name of the generated .xml file. This file will usually be called\n");
|
||||
printf(" something like <include-file>_8h.xml, eg qbipcs_8h.xml\n");
|
||||
printf("\n");
|
||||
- printf(" If you want HTML output then simpy use nroff on the generated files as you\n");
|
||||
+ printf(" If you want HTML output then simply use nroff on the generated files as you\n");
|
||||
printf(" would do with any other man page.\n");
|
||||
printf("\n");
|
||||
printf(" -a Print ASCII dump of man pages to stdout\n");
|
||||
@@ -1200,18 +1200,18 @@ static void usage(char *name)
|
||||
printf(" -P Print PARAMS section\n");
|
||||
printf(" -g Print general man page for the whole header file\n");
|
||||
printf(" -c Use the Copyright date from the header file (if one can be found)\n");
|
||||
- printf(" -O <dir> Directory for the orignal header file. Often needed by -c above\n");
|
||||
- printf(" -s <s> Write man pages into section <s> <default 3)\n");
|
||||
- printf(" -p <package> Use <package> name. default <Package>\n");
|
||||
- printf(" -H <header> Set header (default \"Programmer's Manual\"\n");
|
||||
+ printf(" -O <dir> Directory for the original header file. Often needed by -c above\n");
|
||||
+ printf(" -s <s> Write man pages into section <s> (default: 3)\n");
|
||||
+ printf(" -p <package> Use <package> name (default: Package)\n");
|
||||
+ printf(" -H <header> Set header (default: \"Programmer's Manual\"\n");
|
||||
printf(" -I <include> Set include filename (default taken from xml)\n");
|
||||
- printf(" -i <prefix> Prefix for include files. eg qb/ (default \"\")\n");
|
||||
- printf(" -C <company> Company name in copyright (defaults to Red Hat)\n");
|
||||
+ printf(" -i <prefix> Prefix for include files. eg qb/ (nothing by default)\n");
|
||||
+ printf(" -C <company> Company name in copyright (default: Red Hat)\n");
|
||||
printf(" -D <date> Date to print at top of man pages (format not checked, default: today)\n");
|
||||
printf(" -S <year> Start year to print at end of copyright line (default: 2010)\n");
|
||||
printf(" -Y <year> Year to print at end of copyright line (default: today's year)\n");
|
||||
- printf(" -o <dir> Write all man pages to <dir> (default .)\n");
|
||||
- printf(" -d <dir> Directory for XML files (./xml/)\n");
|
||||
+ printf(" -o <dir> Write all man pages to <dir> (default: .)\n");
|
||||
+ printf(" -d <dir> Directory for XML files (default: ./xml/)\n");
|
||||
printf(" -h Print this usage text\n");
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From c7528139dc8a6999fea65d94f7b8fbb424a6bd06 Mon Sep 17 00:00:00 2001
|
||||
From: Chrissie Caulfield <ccaulfie@redhat.com>
|
||||
Date: Mon, 20 Nov 2023 12:15:21 +0000
|
||||
Subject: [PATCH 2/5] 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!)
|
||||
---
|
||||
doxygen2man/doxygen2man.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
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"
|
||||
--
|
||||
2.25.1
|
||||
|
||||
BIN
libqb-2.0.7.tar.xz
Normal file
BIN
libqb-2.0.7.tar.xz
Normal file
Binary file not shown.
Binary file not shown.
38
libqb.spec
38
libqb.spec
@ -1,14 +1,11 @@
|
||||
Name: libqb
|
||||
Version: 2.0.8
|
||||
Release: 4
|
||||
Version: 2.0.7
|
||||
Release: 1
|
||||
Summary: Library providing high performance logging, tracing, ipc, and poll
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/ClusterLabs/libqb
|
||||
Source0: https://github.com/ClusterLabs/libqb/releases/download/v%{version}/%{name}-%{version}.tar.xz
|
||||
Patch0: Change-assert-in-ringbuffer-to-a-return-code-492.patch
|
||||
Patch1: Make-some-logs-less-noisy-495.patch
|
||||
Patch2: backport-doxygen2man-Include-libxml-parser.h-494.patch
|
||||
Patch3: backport-doxygen2man-Fix-typos-and-inconsistencies-in-help-te.patch
|
||||
|
||||
BuildRequires: autoconf automake libtool check-devel doxygen gcc procps pkgconfig(glib-2.0)
|
||||
BuildRequires: git-core
|
||||
# For doxygen2man
|
||||
@ -19,7 +16,7 @@ architecture, such as logging, tracing, inter-process communication (IPC),
|
||||
and polling.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
%setup -q -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
@ -77,32 +74,7 @@ This package contains a program to create nicely-formatted man pages from Doxyge
|
||||
%{_mandir}/man1/doxygen2man.1.gz
|
||||
|
||||
%changelog
|
||||
* Thu Dec 05 2024 bixiaoyan <bixiaoyan@kylinos.cn> - 2.0.8-4
|
||||
- doxygen2man: Include libxml/parser.h
|
||||
- doxygen2man: Fix typos and inconsistencies in help text
|
||||
|
||||
* Wed Feb 21 2024 bixiaoyan <bixiaoyan@kylinos.cn> - 2.0.8-3
|
||||
- Make some logs less noisy
|
||||
Community Patch Link:
|
||||
https://github.com/ClusterLabs/libqb/pull/495
|
||||
|
||||
* Mon Nov 20 2023 bixiaoyan <bixiaoyan@kylinos.cn> - 2.0.8-2
|
||||
- Change assert in ringbuffer to a return code
|
||||
Community Patch Link:
|
||||
https://github.com/ClusterLabs/libqb/pull/492/commits/88d3eeacc64a059fcb8e2d329ddeafa63b24edfb
|
||||
|
||||
* Tue Oct 31 2023 haomimi <haomimi@uniontech.com> - 2.0.8-1
|
||||
- Upgrade to 2.0.8
|
||||
|
||||
* Wed Oct 18 2023 zouzhimin <zouzhimin@kylinos.cn> - 2.0.7-2
|
||||
- Type:cves
|
||||
- ID:CVE-2023-39976
|
||||
- SUG:NA
|
||||
- DESC:fix CVE-2023-39976
|
||||
Community Patch Link:
|
||||
https://github.com/ClusterLabs/libqb/commit/1bbaa929b77113532785c408dd1b41cd0521ffc8
|
||||
|
||||
* Tue Aug 15 2023 zouzhimin <zouzhimin@kylinos.cn> - 2.0.7-1
|
||||
* Tue Jul 18 2023 zouzhimin <zouzhimin@kylinos.cn> - 2.0.7-1
|
||||
- Upgrade to 2.0.7
|
||||
|
||||
* Mon Aug 14 2023 liningjie <liningjie@xfusion.com> - 2.0.6-2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user