diff --git a/0001-Fix-tools-Don-t-output-null-in-crm_attribute-s-quiet.patch b/0001-Fix-tools-Don-t-output-null-in-crm_attribute-s-quiet.patch deleted file mode 100644 index 6e686299c6efb095e2270ef594cf3ef6379f2c57..0000000000000000000000000000000000000000 --- a/0001-Fix-tools-Don-t-output-null-in-crm_attribute-s-quiet.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 9853f4d05a376062d60f2e4c90938e587992237b Mon Sep 17 00:00:00 2001 -From: Chris Lumens -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 - diff --git a/pacemaker-dc6eb4362.tar.gz b/pacemaker-6fdc9deea.tar.gz similarity index 40% rename from pacemaker-dc6eb4362.tar.gz rename to pacemaker-6fdc9deea.tar.gz index ac62a82a1f6b9ee2b85881339932fe95042395ff..18e51f9d15ee12e0250c41b3b86b790ab0503f9e 100644 Binary files a/pacemaker-dc6eb4362.tar.gz and b/pacemaker-6fdc9deea.tar.gz differ diff --git a/pacemaker.spec b/pacemaker.spec index a22925bd4e598d90e25bdfbde2f40a2c5a4e1e76..51e907055d02293adc870178c4a753eaed5edf8a 100644 --- a/pacemaker.spec +++ b/pacemaker.spec @@ -5,7 +5,11 @@ %global gname haclient ## Where to install Pacemaker documentation +%if 0%{?rhel} +%global pcmk_docdir %{_docdir}/%{name}-doc +%else %global pcmk_docdir %{_docdir}/%{name} +%endif ## GitHub entity that distributes source (for ease of using a fork) %global github_owner ClusterLabs @@ -16,16 +20,17 @@ ## Upstream pacemaker version, and its package version (specversion ## can be incremented to build packages reliably considered "newer" ## than previously built packages with the same pcmkversion) -%global pcmkversion 2.1.4 +%global pcmkversion 2.1.6 %global specversion 1 ## 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 ## (used to be constant of 7), so we need to convey it for non-tags, too. %global commit_abbrev 9 + # Define conditionals so that "rpmbuild --with " and # "rpmbuild --without " can enable and disable specific features @@ -54,7 +59,7 @@ ## Add option to prefix package version with "0." ## (so later "official" packages will be considered updates) -%bcond_without pre_release +%bcond_with pre_release ## NOTE: skip --with upstart_job @@ -71,24 +76,14 @@ # 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 -%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_github_url %{archive_version}#/%{name}-%{archive_version}.tar.gz -%endif -### Always use a simple release number +%if %{with pre_release} +%define pcmk_release 0.%{specversion} +%else %define pcmk_release %{specversion} +%endif ## Base GnuTLS cipher priorities (presumably only the initial, required keyword) ## overridable with "rpmbuild --define 'pcmk_gnutls_priorities PRIORITY-SPEC'" @@ -135,10 +130,23 @@ %endif ## Prefer Python 3 definitions explicitly, in case 2 is also available +%if %{defined __python3} %global python_name python3 %global python_path %{__python3} %define python_site %{?python3_sitelib}%{!?python3_sitelib:%( %{python_path} -c 'from distutils.sysconfig import get_python_lib as gpl; print(gpl(1))' 2>/dev/null)} +%else +%if %{defined python_version} +%global python_name python%(echo %{python_version} | cut -d'.' -f1) +%define python_path %{?__python}%{!?__python:/usr/bin/%{python_name}} +%else +%global python_name python +%global python_path %{?__python}%{!?__python:/usr/bin/python%{?python_pkgversion}} +%endif +%define python_site %{?python_sitelib}%{!?python_sitelib:%( + %{python_name} -c 'from distutils.sysconfig import get_python_lib as gpl; print(gpl(1))' 2>/dev/null)} +%endif + # Keep sane profiling data if requested %if %{with profiling} @@ -149,20 +157,18 @@ %endif - Name: pacemaker Summary: Scalable High-Availability cluster resource manager Version: %{pcmkversion} -Release: %{pcmk_release} -License: GPLv2+ and LGPLv2+ -Url: https://www.clusterlabs.org +Release: %{pcmk_release}%{?dist} +License: GPL-2.0-or-later AND LGPL-2.1-or-later +Url: https://www.clusterlabs.org/ # 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} Source1: https://codeload.github.com/%{github_owner}/%{nagios_name}/tar.gz/%{nagios_archive_github_url} # upstream commits -Patch0: 0001-Fix-tools-Don-t-output-null-in-crm_attribute-s-quiet.patch Requires: resource-agents Requires: %{pkgname_pcmk_libs} = %{version}-%{release} @@ -172,6 +178,7 @@ Requires: %{name}-cli = %{version}-%{release} Requires: %{python_path} BuildRequires: %{python_name}-devel +BuildRequires: %{python_name}-setuptools # Pacemaker requires a minimum libqb functionality Requires: libqb >= 0.17.0 @@ -223,6 +230,9 @@ BuildRequires: corosync-devel >= 2.0.0 BuildRequires: %{pkgname_glue_libs}-devel %endif +# Booth requires this +Provides: pacemaker-ticket-support = 2.0 + Provides: pcmk-cluster-manager = %{version}-%{release} Provides: pcmk-cluster-manager = %{version}-%{release} @@ -242,12 +252,12 @@ when related resources fail and can be configured to periodically check resource health. Available rpmbuild rebuild options: - --with(out) : cibsecrets coverage doc hardening pre_release profiling + --with(out) : cibsecrets hardening nls pre_release profiling stonithd %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 -Requires: %{pkgname_pcmk_libs} = %{version}-%{release} +Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release} Recommends: pcmk-cluster-manager = %{version}-%{release} # For crm_report Recommends: tar @@ -255,6 +265,7 @@ Recommends: bzip2 Requires: perl-TimeDate Requires: %{pkgname_procps} Requires: psmisc +Requires: %{python_name}-psutil Requires(post):coreutils %description cli @@ -266,7 +277,7 @@ to query and control the cluster from machines that may, or may not, be part of the cluster. %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 Requires(pre): %{pkgname_shadow_utils} Requires: %{name}-schemas = %{version}-%{release} @@ -285,7 +296,7 @@ The %{pkgname_pcmk_libs} package contains shared libraries needed for cluster nodes and those just running the CLI tools. %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 Requires: %{pkgname_pcmk_libs} = %{version}-%{release} @@ -296,11 +307,26 @@ manager. The %{name}-cluster-libs package contains cluster-aware shared 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 -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 Requires: %{pkgname_pcmk_libs} = %{version}-%{release} Requires: %{name}-cli = %{version}-%{release} +Requires: %{python_name}-%{name} = %{version}-%{release} Requires: resource-agents # -remote can be fully independent of systemd %{?systemd_ordering}%{!?systemd_ordering:%{?systemd_requires}} @@ -316,7 +342,7 @@ which is capable of extending pacemaker functionality to remote nodes not running the full corosync/cluster stack. %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 Requires: %{pkgname_pcmk_libs} = %{version}-%{release} Requires: %{name}-cluster-libs = %{version}-%{release} @@ -339,7 +365,7 @@ The %{pkgname_pcmk_libs}-devel package contains headers and shared libraries for developing tools for Pacemaker. %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 Requires: %{python_path} Requires: %{pkgname_pcmk_libs} = %{version}-%{release} @@ -368,7 +394,7 @@ Pacemaker is an advanced, scalable High-Availability cluster resource manager. %package schemas -License: GPLv2+ +License: GPL-2.0-or-later Summary: Schemas and upgrade stylesheets for Pacemaker BuildArch: noarch @@ -443,6 +469,10 @@ export LDFLAGS_HARDENED_LIB="%{?_hardening_ldflags}" make %{_smp_mflags} V=1 +pushd python +%py3_build +popd + %check make %{_smp_mflags} check { cts/cts-scheduler --run load-stopped-loop \ @@ -460,6 +490,10 @@ make install \ DESTDIR=%{buildroot} V=1 docdir=%{pcmk_docdir} \ %{?_python_bytecompile_extra:%{?py_byte_compile:am__py_compile=true}} +pushd python +%py3_install +popd + mkdir -p %{buildroot}%{_datadir}/pacemaker/nagios/plugins-metadata for file in $(find %{nagios_name}-%{nagios_hash}/metadata -type f); do install -m 644 $file %{buildroot}%{_datadir}/pacemaker/nagios/plugins-metadata @@ -475,12 +509,6 @@ find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f rm -f %{buildroot}/%{_sbindir}/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 %if %{defined py_byte_compile} %{py_byte_compile %{python_path} %{buildroot}%{_datadir}/pacemaker/tests} @@ -640,18 +668,25 @@ exit 0 %dir %{ocf_root}/resource.d %{ocf_root}/resource.d/pacemaker -%doc %{_mandir}/man7/* +%doc %{_mandir}/man7/*pacemaker* %exclude %{_mandir}/man7/pacemaker-controld.* %exclude %{_mandir}/man7/pacemaker-schedulerd.* %exclude %{_mandir}/man7/pacemaker-fenced.* %exclude %{_mandir}/man7/ocf_pacemaker_controld.* %exclude %{_mandir}/man7/ocf_pacemaker_o2cb.* %exclude %{_mandir}/man7/ocf_pacemaker_remote.* -%doc %{_mandir}/man8/* +%doc %{_mandir}/man8/crm*.8.gz %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/pacemakerd.* %exclude %{_mandir}/man8/pacemaker-remoted.* +%doc %{_mandir}/man8/iso8601.* +%doc %{_mandir}/man8/stonith_admin.* %license licenses/GPLv2 %doc COPYING @@ -682,6 +717,14 @@ exit 0 %doc COPYING %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 %config(noreplace) %{_sysconfdir}/sysconfig/pacemaker # state directory is shared between the subpackets @@ -703,6 +746,7 @@ exit 0 %files cts %{python_site}/cts +%{python3_sitelib}/pacemaker/_cts/ %{_datadir}/pacemaker/tests %{_libexecdir}/pacemaker/cts-log-watcher @@ -714,8 +758,16 @@ exit 0 %files -n %{pkgname_pcmk_libs}-devel %{_includedir}/pacemaker -%{_libdir}/*.so -%{_libdir}/pkgconfig/*.pc +%{_libdir}/libcib.so +%{_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 %doc COPYING %doc ChangeLog @@ -736,6 +788,8 @@ exit 0 %license %{nagios_name}-%{nagios_hash}/COPYING %changelog +* Wed May 31 2023 bizhiyuan - 2.1.6-1 +- Update package to version 2.1.6 * Mon Feb 06 2023 jiangxinyu - 2.1.4-1 - Update package to version 2.1.4