Update package to version 2.1.6

This commit is contained in:
bizhiyuan 2023-05-31 15:34:56 +08:00
parent 6b1f9d4dbf
commit 23b0d9d974
4 changed files with 75 additions and 74 deletions

View File

@ -1,35 +0,0 @@
From 9853f4d05a376062d60f2e4c90938e587992237b Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Mon, 27 Jun 2022 12:06:24 -0400
Subject: [PATCH] Fix: tools: Don't output "(null)" in crm_attribute's quiet
mode.
If the attribute queried for has no value, simply do not output
anything.
Regression in 2.1.3 introduced by 8c03553bbf
Fixes T502
See: rhbz#2099331
---
tools/crm_attribute.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/crm_attribute.c b/tools/crm_attribute.c
index 0bd9dee..b1463f9 100644
--- a/tools/crm_attribute.c
+++ b/tools/crm_attribute.c
@@ -56,7 +56,9 @@ attribute_text(pcmk__output_t *out, va_list args)
char *host G_GNUC_UNUSED = va_arg(args, char *);
if (out->quiet) {
- pcmk__formatted_printf(out, "%s\n", value);
+ if (value != NULL) {
+ pcmk__formatted_printf(out, "%s\n", value);
+ }
} else {
out->info(out, "%s%s %s%s %s%s value=%s",
scope ? "scope=" : "", scope ? scope : "",
--
1.8.3.1

BIN
pacemaker-6fdc9deea.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -16,11 +16,11 @@
## Upstream pacemaker version, and its package version (specversion ## Upstream pacemaker version, and its package version (specversion
## can be incremented to build packages reliably considered "newer" ## can be incremented to build packages reliably considered "newer"
## than previously built packages with the same pcmkversion) ## than previously built packages with the same pcmkversion)
%global pcmkversion 2.1.4 %global pcmkversion 2.1.6
%global specversion 1 %global specversion 1
## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build ## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
%global commit dc6eb4362e67c1497a413434eba097063bf1ef83 %global commit 6fdc9deea294bbad629b003c6ae036aaed8e3ee0
## Since git v2.11, the extent of abbreviation is autoscaled by default ## Since git v2.11, the extent of abbreviation is autoscaled by default
## (used to be constant of 7), so we need to convey it for non-tags, too. ## (used to be constant of 7), so we need to convey it for non-tags, too.
@ -54,7 +54,7 @@
## Add option to prefix package version with "0." ## Add option to prefix package version with "0."
## (so later "official" packages will be considered updates) ## (so later "official" packages will be considered updates)
%bcond_without pre_release %bcond_with pre_release
## NOTE: skip --with upstart_job ## NOTE: skip --with upstart_job
@ -71,24 +71,14 @@
# Define globals for convenient use later # Define globals for convenient use later
## Workaround to use parentheses in other globals
%global lparen (
%global rparen )
## Whether this is a tagged release (final or release candidate)
%define tag_release %(c=%{commit}; case ${c} in Pacemaker-*%{rparen} echo 1 ;;
*%{rparen} echo 0 ;; esac)
## Portion of export/dist tarball name after "pacemaker-", and release version ## Portion of export/dist tarball name after "pacemaker-", and release version
%if 0%{tag_release}
%define archive_version %(c=%{commit}; echo ${c:10})
%define archive_github_url %{commit}#/%{name}-%{archive_version}.tar.gz
%else
%define archive_version %(c=%{commit}; echo ${c:0:%{commit_abbrev}}) %define archive_version %(c=%{commit}; echo ${c:0:%{commit_abbrev}})
%define archive_github_url %{archive_version}#/%{name}-%{archive_version}.tar.gz %define archive_github_url %{archive_version}#/%{name}-%{archive_version}.tar.gz
%endif %if %{with pre_release}
### Always use a simple release number %define pcmk_release 0.%{specversion}
%else
%define pcmk_release %{specversion} %define pcmk_release %{specversion}
%endif
## Base GnuTLS cipher priorities (presumably only the initial, required keyword) ## Base GnuTLS cipher priorities (presumably only the initial, required keyword)
## overridable with "rpmbuild --define 'pcmk_gnutls_priorities PRIORITY-SPEC'" ## overridable with "rpmbuild --define 'pcmk_gnutls_priorities PRIORITY-SPEC'"
@ -149,20 +139,18 @@
%endif %endif
Name: pacemaker Name: pacemaker
Summary: Scalable High-Availability cluster resource manager Summary: Scalable High-Availability cluster resource manager
Version: %{pcmkversion} Version: %{pcmkversion}
Release: %{pcmk_release} Release: %{pcmk_release}
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
Url: https://www.clusterlabs.org Url: https://www.clusterlabs.org/
# You can use "spectool -s 0 pacemaker.spec" (rpmdevtools) to show final URL. # You can use "spectool -s 0 pacemaker.spec" (rpmdevtools) to show final URL.
Source0: https://codeload.github.com/%{github_owner}/%{name}/tar.gz/%{archive_github_url} Source0: https://codeload.github.com/%{github_owner}/%{name}/tar.gz/%{archive_github_url}
Source1: https://codeload.github.com/%{github_owner}/%{nagios_name}/tar.gz/%{nagios_archive_github_url} Source1: https://codeload.github.com/%{github_owner}/%{nagios_name}/tar.gz/%{nagios_archive_github_url}
# upstream commits # upstream commits
Patch0: 0001-Fix-tools-Don-t-output-null-in-crm_attribute-s-quiet.patch
Requires: resource-agents Requires: resource-agents
Requires: %{pkgname_pcmk_libs} = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
@ -172,6 +160,7 @@ Requires: %{name}-cli = %{version}-%{release}
Requires: %{python_path} Requires: %{python_path}
BuildRequires: %{python_name}-devel BuildRequires: %{python_name}-devel
BuildRequires: %{python_name}-setuptools
# Pacemaker requires a minimum libqb functionality # Pacemaker requires a minimum libqb functionality
Requires: libqb >= 0.17.0 Requires: libqb >= 0.17.0
@ -223,6 +212,8 @@ BuildRequires: corosync-devel >= 2.0.0
BuildRequires: %{pkgname_glue_libs}-devel BuildRequires: %{pkgname_glue_libs}-devel
%endif %endif
# Booth requires this
Provides: pacemaker-ticket-support = 2.0
Provides: pcmk-cluster-manager = %{version}-%{release} Provides: pcmk-cluster-manager = %{version}-%{release}
Provides: pcmk-cluster-manager = %{version}-%{release} Provides: pcmk-cluster-manager = %{version}-%{release}
@ -242,10 +233,10 @@ when related resources fail and can be configured to periodically check
resource health. resource health.
Available rpmbuild rebuild options: Available rpmbuild rebuild options:
--with(out) : cibsecrets coverage doc hardening pre_release profiling --with(out) : cibsecrets hardening nls pre_release profiling stonithd
%package cli %package cli
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
Summary: Command line tools for controlling Pacemaker clusters Summary: Command line tools for controlling Pacemaker clusters
Requires: %{pkgname_pcmk_libs} = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Recommends: pcmk-cluster-manager = %{version}-%{release} Recommends: pcmk-cluster-manager = %{version}-%{release}
@ -255,6 +246,7 @@ Recommends: bzip2
Requires: perl-TimeDate Requires: perl-TimeDate
Requires: %{pkgname_procps} Requires: %{pkgname_procps}
Requires: psmisc Requires: psmisc
Requires: %{python_name}-psutil
Requires(post):coreutils Requires(post):coreutils
%description cli %description cli
@ -266,7 +258,7 @@ to query and control the cluster from machines that may, or may not,
be part of the cluster. be part of the cluster.
%package -n %{pkgname_pcmk_libs} %package -n %{pkgname_pcmk_libs}
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
Summary: Core Pacemaker libraries Summary: Core Pacemaker libraries
Requires(pre): %{pkgname_shadow_utils} Requires(pre): %{pkgname_shadow_utils}
Requires: %{name}-schemas = %{version}-%{release} Requires: %{name}-schemas = %{version}-%{release}
@ -285,7 +277,7 @@ The %{pkgname_pcmk_libs} package contains shared libraries needed for cluster
nodes and those just running the CLI tools. nodes and those just running the CLI tools.
%package cluster-libs %package cluster-libs
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
Summary: Cluster Libraries used by Pacemaker Summary: Cluster Libraries used by Pacemaker
Requires: %{pkgname_pcmk_libs} = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
@ -296,11 +288,26 @@ manager.
The %{name}-cluster-libs package contains cluster-aware shared The %{name}-cluster-libs package contains cluster-aware shared
libraries needed for nodes that will form part of the cluster nodes. libraries needed for nodes that will form part of the cluster nodes.
%package -n %{python_name}-%{name}
License: LGPL-2.1-or-later
Summary: Python libraries for Pacemaker
Requires: %{python_path}
Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
BuildArch: noarch
%description -n %{python_name}-%{name}
Pacemaker is an advanced, scalable High-Availability cluster resource
manager.
The %{python_name}-%{name} package contains a Python library that can be used
to interface with Pacemaker.
%package remote %package remote
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
Summary: Pacemaker remote executor daemon for non-cluster nodes Summary: Pacemaker remote executor daemon for non-cluster nodes
Requires: %{pkgname_pcmk_libs} = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Requires: %{name}-cli = %{version}-%{release} Requires: %{name}-cli = %{version}-%{release}
Requires: %{python_name}-%{name} = %{version}-%{release}
Requires: resource-agents Requires: resource-agents
# -remote can be fully independent of systemd # -remote can be fully independent of systemd
%{?systemd_ordering}%{!?systemd_ordering:%{?systemd_requires}} %{?systemd_ordering}%{!?systemd_ordering:%{?systemd_requires}}
@ -316,7 +323,7 @@ which is capable of extending pacemaker functionality to remote
nodes not running the full corosync/cluster stack. nodes not running the full corosync/cluster stack.
%package -n %{pkgname_pcmk_libs}-devel %package -n %{pkgname_pcmk_libs}-devel
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
Summary: Pacemaker development package Summary: Pacemaker development package
Requires: %{pkgname_pcmk_libs} = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Requires: %{name}-cluster-libs = %{version}-%{release} Requires: %{name}-cluster-libs = %{version}-%{release}
@ -339,7 +346,7 @@ The %{pkgname_pcmk_libs}-devel package contains headers and shared libraries
for developing tools for Pacemaker. for developing tools for Pacemaker.
%package cts %package cts
License: GPLv2+ and LGPLv2+ License: GPL-2.0-or-later AND LGPL-2.1-or-later
Summary: Test framework for cluster-related technologies like Pacemaker Summary: Test framework for cluster-related technologies like Pacemaker
Requires: %{python_path} Requires: %{python_path}
Requires: %{pkgname_pcmk_libs} = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
@ -368,7 +375,7 @@ Pacemaker is an advanced, scalable High-Availability cluster resource
manager. manager.
%package schemas %package schemas
License: GPLv2+ License: GPL-2.0-or-later
Summary: Schemas and upgrade stylesheets for Pacemaker Summary: Schemas and upgrade stylesheets for Pacemaker
BuildArch: noarch BuildArch: noarch
@ -443,6 +450,10 @@ export LDFLAGS_HARDENED_LIB="%{?_hardening_ldflags}"
make %{_smp_mflags} V=1 make %{_smp_mflags} V=1
pushd python
%py3_build
popd
%check %check
make %{_smp_mflags} check make %{_smp_mflags} check
{ cts/cts-scheduler --run load-stopped-loop \ { cts/cts-scheduler --run load-stopped-loop \
@ -460,6 +471,10 @@ make install \
DESTDIR=%{buildroot} V=1 docdir=%{pcmk_docdir} \ DESTDIR=%{buildroot} V=1 docdir=%{pcmk_docdir} \
%{?_python_bytecompile_extra:%{?py_byte_compile:am__py_compile=true}} %{?_python_bytecompile_extra:%{?py_byte_compile:am__py_compile=true}}
pushd python
%py3_install
popd
mkdir -p %{buildroot}%{_datadir}/pacemaker/nagios/plugins-metadata mkdir -p %{buildroot}%{_datadir}/pacemaker/nagios/plugins-metadata
for file in $(find %{nagios_name}-%{nagios_hash}/metadata -type f); do for file in $(find %{nagios_name}-%{nagios_hash}/metadata -type f); do
install -m 644 $file %{buildroot}%{_datadir}/pacemaker/nagios/plugins-metadata install -m 644 $file %{buildroot}%{_datadir}/pacemaker/nagios/plugins-metadata
@ -475,12 +490,6 @@ find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f
rm -f %{buildroot}/%{_sbindir}/fence_legacy rm -f %{buildroot}/%{_sbindir}/fence_legacy
rm -f %{buildroot}/%{_mandir}/man8/fence_legacy.* rm -f %{buildroot}/%{_mandir}/man8/fence_legacy.*
# For now, don't package the servicelog-related binaries built only for
# ppc64le when certain dependencies are installed. If they get more exercise by
# advanced users, we can reconsider.
rm -f %{buildroot}/%{_sbindir}/notifyServicelogEvent
rm -f %{buildroot}/%{_sbindir}/ipmiservicelogd
# Byte-compile Python sources where suitable and the distro procedures known # Byte-compile Python sources where suitable and the distro procedures known
%if %{defined py_byte_compile} %if %{defined py_byte_compile}
%{py_byte_compile %{python_path} %{buildroot}%{_datadir}/pacemaker/tests} %{py_byte_compile %{python_path} %{buildroot}%{_datadir}/pacemaker/tests}
@ -640,18 +649,25 @@ exit 0
%dir %{ocf_root}/resource.d %dir %{ocf_root}/resource.d
%{ocf_root}/resource.d/pacemaker %{ocf_root}/resource.d/pacemaker
%doc %{_mandir}/man7/* %doc %{_mandir}/man7/*pacemaker*
%exclude %{_mandir}/man7/pacemaker-controld.* %exclude %{_mandir}/man7/pacemaker-controld.*
%exclude %{_mandir}/man7/pacemaker-schedulerd.* %exclude %{_mandir}/man7/pacemaker-schedulerd.*
%exclude %{_mandir}/man7/pacemaker-fenced.* %exclude %{_mandir}/man7/pacemaker-fenced.*
%exclude %{_mandir}/man7/ocf_pacemaker_controld.* %exclude %{_mandir}/man7/ocf_pacemaker_controld.*
%exclude %{_mandir}/man7/ocf_pacemaker_o2cb.* %exclude %{_mandir}/man7/ocf_pacemaker_o2cb.*
%exclude %{_mandir}/man7/ocf_pacemaker_remote.* %exclude %{_mandir}/man7/ocf_pacemaker_remote.*
%doc %{_mandir}/man8/* %doc %{_mandir}/man8/crm*.8.gz
%exclude %{_mandir}/man8/crm_master.* %exclude %{_mandir}/man8/crm_master.*
%doc %{_mandir}/man8/attrd_updater.*
%doc %{_mandir}/man8/cibadmin.*
%if %{with cibsecrets}
%doc %{_mandir}/man8/cibsecret.*
%endif
%exclude %{_mandir}/man8/fence_watchdog.* %exclude %{_mandir}/man8/fence_watchdog.*
%exclude %{_mandir}/man8/pacemakerd.* %exclude %{_mandir}/man8/pacemakerd.*
%exclude %{_mandir}/man8/pacemaker-remoted.* %exclude %{_mandir}/man8/pacemaker-remoted.*
%doc %{_mandir}/man8/iso8601.*
%doc %{_mandir}/man8/stonith_admin.*
%license licenses/GPLv2 %license licenses/GPLv2
%doc COPYING %doc COPYING
@ -682,6 +698,14 @@ exit 0
%doc COPYING %doc COPYING
%doc ChangeLog %doc ChangeLog
%files -n %{python_name}-%{name}
%{python3_sitelib}/pacemaker/
%{python3_sitelib}/pacemaker-*.egg-info
%exclude %{python3_sitelib}/pacemaker/_cts/
%license licenses/LGPLv2.1
%doc COPYING
%doc ChangeLog
%files remote %files remote
%config(noreplace) %{_sysconfdir}/sysconfig/pacemaker %config(noreplace) %{_sysconfdir}/sysconfig/pacemaker
# state directory is shared between the subpackets # state directory is shared between the subpackets
@ -703,6 +727,7 @@ exit 0
%files cts %files cts
%{python_site}/cts %{python_site}/cts
%{python3_sitelib}/pacemaker/_cts/
%{_datadir}/pacemaker/tests %{_datadir}/pacemaker/tests
%{_libexecdir}/pacemaker/cts-log-watcher %{_libexecdir}/pacemaker/cts-log-watcher
@ -714,8 +739,16 @@ exit 0
%files -n %{pkgname_pcmk_libs}-devel %files -n %{pkgname_pcmk_libs}-devel
%{_includedir}/pacemaker %{_includedir}/pacemaker
%{_libdir}/*.so %{_libdir}/libcib.so
%{_libdir}/pkgconfig/*.pc %{_libdir}/liblrmd.so
%{_libdir}/libcrmservice.so
%{_libdir}/libcrmcommon.so
%{_libdir}/libpe_status.so
%{_libdir}/libpe_rules.so
%{_libdir}/libpacemaker.so
%{_libdir}/libstonithd.so
%{_libdir}/libcrmcluster.so
%{_libdir}/pkgconfig/*pacemaker*.pc
%license licenses/LGPLv2.1 %license licenses/LGPLv2.1
%doc COPYING %doc COPYING
%doc ChangeLog %doc ChangeLog
@ -736,6 +769,9 @@ exit 0
%license %{nagios_name}-%{nagios_hash}/COPYING %license %{nagios_name}-%{nagios_hash}/COPYING
%changelog %changelog
* Wed May 31 2023 bizhiyuan <bizhiyuan@kylinos.cn> - 2.1.6-1
- Update package to version 2.1.6
* Mon Feb 06 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 2.1.4-1 * Mon Feb 06 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 2.1.4-1
- Update package to version 2.1.4 - Update package to version 2.1.4