Upgrade to 2.0.0

This commit is contained in:
jxy_git 2022-04-08 11:04:15 +08:00
parent cd028a1a7a
commit 9c817bd5e2
6 changed files with 23 additions and 1839 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +0,0 @@
From bf461b565f24f2c913d913b3889ec7c47b115833 Mon Sep 17 00:00:00 2001
From: Christine Caulfield <ccaulfie@redhat.com>
Date: Fri, 21 Feb 2020 07:53:23 +0000
Subject: [PATCH] list: #include <stddef.h> in qblist.h
Some platforms require it.
---
include/qb/qblist.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/qb/qblist.h b/include/qb/qblist.h
index 8064c874..160417e1 100644
--- a/include/qb/qblist.h
+++ b/include/qb/qblist.h
@@ -28,6 +28,7 @@ extern "C" {
/* *INDENT-ON* */
#include <stdint.h>
+#include <stddef.h>
#include <qb/qbdefs.h>
/**

Binary file not shown.

BIN
libqb-2.0.0.tar.xz Normal file

Binary file not shown.

View File

@ -1,37 +0,0 @@
From 4f0a30f4e05e140e1325784195e79c5ec62c689c Mon Sep 17 00:00:00 2001
From: Christine Caulfield <ccaulfie@redhat.com>
Date: Mon, 17 Feb 2020 16:28:57 +0000
Subject: [PATCH] list: fix list handling for gcc10
---
configure.ac | 1 -
include/qb/qblist.h | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index ec8736cb..108b2f18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -558,7 +558,6 @@
suggest-attribute=noreturn
suggest-attribute=format
strict-prototypes
- pointer-arith
write-strings
cast-align
bad-function-cast
diff --git a/include/qb/qblist.h b/include/qb/qblist.h
index e3ae3f18..8064c874 100644
--- a/include/qb/qblist.h
+++ b/include/qb/qblist.h
@@ -193,8 +193,8 @@ static inline void qb_list_splice_tail(struct qb_list_head *list,
* @param type: the type of the struct this is embedded in.
* @param member: the name of the list_struct within the struct.
*/
-#define qb_list_entry(ptr,type,member)\
- ((type *)((char *)(ptr)-(char*)(&((type *)0)->member)))
+#define qb_list_entry(ptr,type,member) ({ \
+ ((type *)((void*)ptr - offsetof(type, member))); })
/**
* Get the first element from a list

View File

@ -1,32 +1,29 @@
Name: libqb
Version: 1.0.5
Release: 3
Version: 2.0.0
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: IPC-avoid-temporary-channel-priority-loss.patch
Patch1: libqb-fix-list-handling-gcc10.patch
Patch2: fix-corosync-compile-fail.patch
BuildRequires: autoconf automake libtool check-devel doxygen gcc procps pkgconfig(glib-2.0)
BuildRequires: git-core
# For doxygen2man
BuildRequires: libxml2-devel
%description
libqb provides high-performance, reusable features for client-server
architecture, such as logging, tracing, inter-process communication (IPC),
and polling.
%prep
%autosetup -p1
%autosetup -p1 -S git_am
%build
./autogen.sh
%configure --disable-static
%{make_build}
%if 0%{?with_check}
%check
make check V=1 \
&& make -C tests/functional/log_internal check V=1
%endif
make check V=1
%install
%{make_install}
@ -47,22 +44,38 @@ Buildarch: noarch
%description help
help documents for libqb package
%package -n doxygen2man
Summary: Program to create nicely-formatted man pages from Doxygen XML files
Requires: %{name} = %{version}-%{release}
%description -n doxygen2man
This package contains a program to create nicely-formatted man pages from Doxygen XML files
%files
%license COPYING
%{_sbindir}/qb-blackbox
%{_libdir}/libqb.so.*
%{_mandir}/man8/qb-blackbox.8*
%files devel
%doc README.markdown
%{_includedir}/qb/
%{_libdir}/libqb.so
%{_libdir}/pkgconfig/libqb.pc
%{_mandir}/man3/qb*3*
%files help
%{_mandir}/man8/qb-blackbox.8*
%{_mandir}/man3/qb*3*
%files -n doxygen2man
%{_bindir}/doxygen2man
%{_mandir}/man1/doxygen2man.1.gz
%changelog
* Fri Apr 08 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 2.0.0-1
- Upgrade to 2.0.0
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.0.5-3
- DESC: delete -S git_am from %autosetup, and delete BuildRequires git-core