diff --git a/Change-assert-in-ringbuffer-to-a-return-code-492.patch b/Change-assert-in-ringbuffer-to-a-return-code-492.patch new file mode 100644 index 0000000..006b3bd --- /dev/null +++ b/Change-assert-in-ringbuffer-to-a-return-code-492.patch @@ -0,0 +1,34 @@ +From 9297df4e48c45123a5e4103b3fd07df244346636 Mon Sep 17 00:00:00 2001 +From: Chrissie Caulfield +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 + diff --git a/libqb.spec b/libqb.spec index 868881b..f8efb64 100644 --- a/libqb.spec +++ b/libqb.spec @@ -1,11 +1,11 @@ Name: libqb Version: 2.0.8 -Release: 1 +Release: 2 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 BuildRequires: autoconf automake libtool check-devel doxygen gcc procps pkgconfig(glib-2.0) BuildRequires: git-core # For doxygen2man @@ -74,6 +74,11 @@ This package contains a program to create nicely-formatted man pages from Doxyge %{_mandir}/man1/doxygen2man.1.gz %changelog +* Mon Nov 20 2023 bixiaoyan - 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 - 2.0.8-1 - Upgrade to 2.0.8