diff --git a/.gitignore b/.gitignore index b6bd884..e575a77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -SOURCES/nagios-agents-metadata-105ab8a7b2c16b9a29cf1c1596b80136eeef332b.tar.gz -SOURCES/pacemaker-3980678f0.tar.gz +SOURCES/pacemaker-0f6499026.tar.gz diff --git a/.pacemaker.metadata b/.pacemaker.metadata index 2f3097a..6f3ec29 100644 --- a/.pacemaker.metadata +++ b/.pacemaker.metadata @@ -1,2 +1 @@ -2cbec94ad67dfbeba75e38d2c3c5c44961b3cd16 SOURCES/nagios-agents-metadata-105ab8a7b2c16b9a29cf1c1596b80136eeef332b.tar.gz -6742016fd97fec13e5352506c58d2289432b2242 SOURCES/pacemaker-3980678f0.tar.gz +4ee0edfadfa55597b28ac44692a350e9315e13c8 SOURCES/pacemaker-0f6499026.tar.gz diff --git a/SOURCES/001-feature-set.patch b/SOURCES/001-feature-set.patch new file mode 100644 index 0000000..caf5e1d --- /dev/null +++ b/SOURCES/001-feature-set.patch @@ -0,0 +1,34 @@ +From adcb9733e8a2cf637b42949d3c62d46e7a8b9dc4 Mon Sep 17 00:00:00 2001 +From: Chris Lumens +Date: Wed, 16 Oct 2024 15:54:54 -0400 +Subject: [PATCH] Build: Bump CRM_FEATURE_SET and version for scratch build. + +--- + include/crm/crm.h | 2 +- + m4/version.m4 | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/crm/crm.h b/include/crm/crm.h +index f9f7d8d..7839ae4 100644 +--- a/include/crm/crm.h ++++ b/include/crm/crm.h +@@ -63,7 +63,7 @@ extern "C" { + * >=3.2.0: DC supports PCMK_EXEC_INVALID and PCMK_EXEC_NOT_CONNECTED + * >=3.19.0: DC supports PCMK__CIB_REQUEST_COMMIT_TRANSACT + */ +-# define CRM_FEATURE_SET "3.19.7" ++# define CRM_FEATURE_SET "3.20.0" + + /* Pacemaker's CPG protocols use fixed-width binary fields for the sender and + * recipient of a CPG message. This imposes an arbitrary limit on cluster node +diff --git a/m4/version.m4 b/m4/version.m4 +index 96277df..0270051 100644 +--- a/m4/version.m4 ++++ b/m4/version.m4 +@@ -1,2 +1,2 @@ +-m4_define([VERSION_NUMBER], [2.1.9]) ++m4_define([VERSION_NUMBER], [3.0.0]) + m4_define([PCMK_URL], [https://ClusterLabs.org/projects/pacemaker/]) +-- +2.43.0 + diff --git a/SPECS/pacemaker.spec b/SPECS/pacemaker.spec index b726325..add7ab6 100644 --- a/SPECS/pacemaker.spec +++ b/SPECS/pacemaker.spec @@ -15,7 +15,7 @@ %global gname haclient ## Where to install Pacemaker documentation -%if 0%{?rhel} +%if 0%{?rhel} > 7 %global pcmk_docdir %{_docdir}/%{name}-doc %else %global pcmk_docdir %{_docdir}/%{name} @@ -40,22 +40,24 @@ ## 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.8 -%global specversion 3 +%global pcmkversion 3.0.0 +%global specversion 1 ## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build -%global commit 3980678f0372f2c7c294c01f61d63f0b2cafaad1 +%global commit 0f6499026605bbc3518fff323b3b9edd2e79ddb3 ## 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. +%if (0%{?fedora} >= 26) || (0%{?rhel} >= 9) %global commit_abbrev 9 +%endif # Define conditionals so that "rpmbuild --with " and # "rpmbuild --without " can enable and disable specific features -## Add option to enable support for stonith/external fencing agents -%bcond_with stonithd +## Add option for Linux-HA (stonith/external) fencing agent support +%bcond_with linuxha ## Add option for whether to support storing sensitive information outside CIB %if (0%{?fedora} && 0%{?fedora} <= 33) || (0%{?rhel} && 0%{?rhel} <= 8) @@ -84,14 +86,16 @@ ## to synchronization improves safety, without requiring higher-level tools ## to be aware of the setting or requiring users to modify configurations ## after upgrading to versions that support synchronization. +%if 0%{?rhel} && 0%{?rhel} > 8 %bcond_without sbd_sync +%else +%bcond_with sbd_sync +%endif ## Add option to prefix package version with "0." ## (so later "official" packages will be considered updates) %bcond_with pre_release -## NOTE: skip --with upstart_job - ## Add option to turn off hardening of libraries and daemon executables %bcond_without hardening @@ -102,11 +106,6 @@ %bcond_with legacy_links %endif -## Nagios source control identifiers -%global nagios_name nagios-agents-metadata -%global nagios_hash 105ab8a7b2c16b9a29cf1c1596b80136eeef332b -%global nagios_archive_github_url %{nagios_hash}#/%{nagios_name}-%{nagios_hash}.tar.gz - # Define globals for convenient use later ## Portion of export/dist tarball name after "pacemaker-", and release version @@ -118,9 +117,15 @@ %define pcmk_release %{specversion} %endif +%if 0%{?fedora} > 20 || 0%{?rhel} > 7 ## Base GnuTLS cipher priorities (presumably only the initial, required keyword) ## overridable with "rpmbuild --define 'pcmk_gnutls_priorities PRIORITY-SPEC'" %define gnutls_priorities %{?pcmk_gnutls_priorities}%{!?pcmk_gnutls_priorities:@SYSTEM} +%endif + +%if 0%{?fedora} > 22 || 0%{?rhel} > 7 +%global supports_recommends 1 +%endif ## Different distros name certain packages differently ## (note: corosync libraries also differ, but all provide corosync-devel) @@ -129,7 +134,6 @@ %global pkgname_bzip2_devel bzip2-devel %global pkgname_docbook_xsl docbook-style-xsl %global pkgname_gettext gettext-devel -%global pkgname_gnutls_devel gnutls-devel %global pkgname_shadow_utils shadow-utils %global pkgname_procps procps-ng %global pkgname_glue_libs cluster-glue-libs @@ -138,12 +142,12 @@ ## Distro-specific configuration choices ### Use 2.0-style output when other distro packages don't support current output -%if 0%{?fedora} || ( 0%{?rhel} && 0%{?rhel} <= 8 ) +%if ( 0%{?fedora} && 0%{?fedora} <=35 ) || ( 0%{?rhel} && 0%{?rhel} <= 8 ) %global compat20 --enable-compat-2.0 %endif ### Default concurrent-fencing to true when distro prefers that -%if 0%{?rhel} +%if 0%{?rhel} >= 7 %global concurrent_fencing --with-concurrent-fencing-default=true %endif @@ -199,7 +203,7 @@ Name: pacemaker Summary: Scalable High-Availability cluster resource manager Version: %{pcmkversion} -Release: %{pcmk_release}%{?dist} +Release: %{pcmk_release}%{?dist}.1 License: GPL-2.0-or-later AND LGPL-2.1-or-later Url: https://www.clusterlabs.org/ @@ -213,14 +217,17 @@ 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} -Source2: pacemaker.sysusers +Source1: pacemaker.sysusers # upstream commits +Patch001: 001-feature-set.patch Requires: resource-agents Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release} Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release} Requires: %{name}-cli = %{version}-%{release} +%if %{with linuxha} +Requires: %{python_name}-%{name} = %{version}-%{release} +%endif %{?systemd_requires} %if %{defined centos} @@ -236,8 +243,8 @@ BuildRequires: %{python_name}-devel BuildRequires: %{python_name}-setuptools # Pacemaker requires a minimum libqb functionality -Requires: libqb >= 0.17.0 -BuildRequires: libqb-devel >= 0.17.0 +Requires: libqb >= 1.0.1 +BuildRequires: pkgconfig(libqb) >= 1.0.1 # Required basic build tools BuildRequires: autoconf @@ -251,20 +258,20 @@ BuildRequires: libtool BuildRequires: %{?pkgname_libtool_devel} %endif BuildRequires: make -BuildRequires: pkgconfig +BuildRequires: pkgconfig >= 0.28 BuildRequires: sed # Required for core functionality BuildRequires: pkgconfig(glib-2.0) >= 2.42 -BuildRequires: libxml2-devel >= 2.6.0 +BuildRequires: pkgconfig(gnutls) >= 3.1.7 +BuildRequires: pkgconfig(libxml-2.0) >= 2.9.2 BuildRequires: libxslt-devel -BuildRequires: libuuid-devel +BuildRequires: pkgconfig(uuid) BuildRequires: %{pkgname_bzip2_devel} # Enables optional functionality -BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(dbus-1) >= 1.5.12 BuildRequires: %{pkgname_docbook_xsl} -BuildRequires: %{pkgname_gnutls_devel} BuildRequires: help2man BuildRequires: ncurses-devel BuildRequires: pam-devel @@ -272,6 +279,7 @@ BuildRequires: %{pkgname_gettext} >= 0.18 # Required for "make check" BuildRequires: libcmocka-devel >= 1.1.0 +BuildRequires: %{python_name}-psutil BuildRequires: pkgconfig(systemd) @@ -281,7 +289,7 @@ BuildRequires: git Requires: corosync >= 2.0.0 BuildRequires: corosync-devel >= 2.0.0 -%if %{with stonithd} +%if %{with linuxha} BuildRequires: %{pkgname_glue_libs}-devel %endif @@ -301,12 +309,6 @@ Provides: pacemaker-ticket-support = 2.0 Provides: pcmk-cluster-manager = %{version}-%{release} Provides: pcmk-cluster-manager%{?_isa} = %{version}-%{release} -# Bundled bits -## Pacemaker uses the crypto/md5-buffer module from gnulib -%if 0%{?fedora} || 0%{?rhel} -Provides: bundled(gnulib) = 20200404 -%endif - %description Pacemaker is an advanced, scalable High-Availability cluster resource manager. @@ -319,20 +321,21 @@ when related resources fail and can be configured to periodically check resource health. Available rpmbuild rebuild options: - --with(out) : cibsecrets hardening nls pre_release profiling stonithd + --with(out) : cibsecrets hardening linuxha nls pre_release profiling %package cli License: GPL-2.0-or-later AND LGPL-2.1-or-later Summary: Command line tools for controlling Pacemaker clusters Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release} +%if 0%{?supports_recommends} Recommends: pcmk-cluster-manager = %{version}-%{release} # For crm_report Recommends: tar Recommends: bzip2 +%endif Requires: perl-TimeDate Requires: %{pkgname_procps} Requires: psmisc -Requires: %{python_name}-psutil Requires(post):coreutils %description cli @@ -393,7 +396,6 @@ 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}%{?_isa} = %{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}} @@ -416,12 +418,12 @@ Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release} Requires: %{pkgname_bzip2_devel}%{?_isa} Requires: corosync-devel >= 2.0.0 Requires: glib2-devel%{?_isa} -Requires: libqb-devel%{?_isa} +Requires: libqb-devel%{?_isa} >= 1.0.1 %if %{defined pkgname_libtool_devel_arch} Requires: %{?pkgname_libtool_devel_arch} %endif Requires: libuuid-devel%{?_isa} -Requires: libxml2-devel%{?_isa} >= 2.6.0 +Requires: libxml2-devel%{?_isa} >= 2.9.2 Requires: libxslt-devel%{?_isa} %description -n %{pkgname_pcmk_libs}-devel @@ -437,13 +439,15 @@ Summary: Test framework for cluster-related technologies like Pacemaker Requires: %{python_path} Requires: %{pkgname_pcmk_libs} = %{version}-%{release} Requires: %{name}-cli = %{version}-%{release} +Requires: %{python_name}-%{name} = %{version}-%{release} Requires: %{pkgname_procps} Requires: psmisc +Requires: %{python_name}-psutil BuildArch: noarch # systemd Python bindings are a separate package in some distros %if %{defined systemd_requires} -%if %{defined fedora} || %{defined rhel} +%if 0%{?fedora} > 22 || 0%{?rhel} > 7 Requires: %{python_name}-systemd %endif %endif @@ -475,27 +479,8 @@ Schemas and upgrade stylesheets for Pacemaker Pacemaker is an advanced, scalable High-Availability cluster resource manager. -%package nagios-plugins-metadata -License: GPLv3 -Summary: Pacemaker Nagios Metadata -BuildArch: noarch -# NOTE below are the plugins this metadata uses. -# Requires: nagios-plugins-http -# Requires: nagios-plugins-ldap -# Requires: nagios-plugins-mysql -# Requires: nagios-plugins-pgsql -# Requires: nagios-plugins-tcp -Requires: pcmk-cluster-manager - -%description nagios-plugins-metadata -The metadata files required for Pacemaker to execute the nagios plugin -monitor resources. - %prep -%autosetup -a 1 -n %{name}-%{archive_version} -S git_am -p 1 -# in f33 s390x complains but shouldn't hurt globally -# as configure.ac is checking for support -sed -i configure.ac -e "s/-Wall/-Wall -Wno-format-truncation/" +%autosetup -n %{name}-%{archive_version} -S git_am -p 1 %build @@ -533,9 +518,6 @@ export LDFLAGS_HARDENED_LIB="%{?_hardening_ldflags}" --with-initdir=%{_initrddir} \ --with-runstatedir=%{_rundir} \ --localstatedir=%{_var} \ - --with-nagios \ - --with-nagios-metadata-dir=%{_datadir}/pacemaker/nagios/plugins-metadata/ \ - --with-nagios-plugin-dir=%{_libdir}/nagios/plugins/ \ --with-version=%{version}-%{release} make %{_smp_mflags} V=1 @@ -565,14 +547,12 @@ 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 -done - - mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/rpm-state/%{name} +%if %{with nls} +%find_lang %{name} +%endif + # Don't package libtool archives find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f @@ -580,7 +560,7 @@ find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f rm -f %{buildroot}/%{_sbindir}/fence_legacy rm -f %{buildroot}/%{_mandir}/man8/fence_legacy.* -install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/pacemaker.conf +install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/pacemaker.conf %post %systemd_post pacemaker.service @@ -643,7 +623,7 @@ fi %systemd_postun_with_restart crm_mon.service %pre -n %{pkgname_pcmk_libs} -%sysusers_create_compat %{SOURCE2} +%sysusers_create_compat %{SOURCE1} exit 0 %ldconfig_scriptlets -n %{pkgname_pcmk_libs} @@ -652,18 +632,18 @@ exit 0 %files ########################################################### %config(noreplace) %{_sysconfdir}/sysconfig/pacemaker +%config(noreplace) %{_sysconfdir}/logrotate.d/pacemaker %{_sbindir}/pacemakerd %{_unitdir}/pacemaker.service -%exclude %{_datadir}/pacemaker/nagios/plugins-metadata/* - -%exclude %{_libexecdir}/pacemaker/cts-log-watcher %exclude %{_libexecdir}/pacemaker/cts-support %exclude %{_sbindir}/pacemaker-remoted -%exclude %{_sbindir}/pacemaker_remoted %{_libexecdir}/pacemaker/* +%if %{with linuxha} +%{_sbindir}/fence_legacy +%endif %{_sbindir}/fence_watchdog %doc %{_mandir}/man7/pacemaker-based.* @@ -672,6 +652,9 @@ exit 0 %doc %{_mandir}/man7/pacemaker-fenced.* %doc %{_mandir}/man7/ocf_pacemaker_controld.* %doc %{_mandir}/man7/ocf_pacemaker_remote.* +%if %{with linuxha} +%doc %{_mandir}/man8/fence_legacy.* +%endif %doc %{_mandir}/man8/fence_watchdog.* %doc %{_mandir}/man8/pacemakerd.* @@ -688,7 +671,6 @@ exit 0 %files cli %dir %attr (750, root, %{gname}) %{_sysconfdir}/pacemaker -%config(noreplace) %{_sysconfdir}/logrotate.d/pacemaker %config(noreplace) %{_sysconfdir}/sysconfig/crm_mon %{_unitdir}/crm_mon.service @@ -744,9 +726,6 @@ exit 0 %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.* @@ -797,7 +776,6 @@ exit 0 %{_unitdir}/pacemaker_remote.service %{_sbindir}/pacemaker-remoted -%{_sbindir}/pacemaker_remoted %{_mandir}/man8/pacemaker-remoted.* %license licenses/GPLv2 %doc COPYING @@ -811,7 +789,6 @@ exit 0 %{python3_sitelib}/pacemaker/_cts/ %{_datadir}/pacemaker/tests -%{_libexecdir}/pacemaker/cts-log-watcher %{_libexecdir}/pacemaker/cts-support %license licenses/GPLv2 @@ -843,13 +820,15 @@ exit 0 %{_datadir}/pacemaker/base %{_datadir}/pkgconfig/pacemaker-schemas.pc -%files nagios-plugins-metadata -%dir %{_datadir}/pacemaker/nagios -%dir %{_datadir}/pacemaker/nagios/plugins-metadata -%attr(0644,root,root) %{_datadir}/pacemaker/nagios/plugins-metadata/* -%license %{nagios_name}-%{nagios_hash}/COPYING - %changelog +* Wed Oct 30 2024 Chris Lumens - 3.0.0-1 +- Rebase on upstream 3.0.0 prerelease +- Related: RHEL-61383 + +* Tue Oct 29 2024 Troy Dawson - 2.1.8-3.1 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + * Fri Oct 25 2024 MSVSphere Packaging Team - 2.1.8-3 - Rebuilt for MSVSphere 10