From 2021081d88576aa6ff6f9d7411e8a9610054e899 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Wed, 1 Jul 2026 09:36:12 -0400 Subject: [PATCH 1/4] Build: Increase build dependencies for 3.1.0. The bump in the gettext requirement in particular silences a lot of warnings I've been seeing for years when running ./autogen.sh. Fixes T1021 --- INSTALL.md | 50 +++++++++++++++++++++---------------------- configure.ac | 25 ++++++++++------------ rpm/pacemaker.spec.in | 30 +++++++++++++------------- 3 files changed, 51 insertions(+), 54 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index cc6334201d8..bae2c2db208 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -4,21 +4,21 @@ | Version | Fedora-based | Suse-based | Debian-based | |:---------------:|:------------------:|:------------------:|:--------------:| -| 1.13 or later | automake | automake | automake | -| 2.64 or later | autoconf | autoconf | autoconf | +| 1.16 or later | automake | automake | automake | +| 2.71 or later | autoconf | autoconf | autoconf | | | libtool | libtool | libtool | | | libtool-ltdl-devel | | libltdl-dev | | | libuuid-devel | libuuid-devel | uuid-dev | -| 0.28 or later | pkgconfig | pkgconfig | pkg-config | -| 2.42.0 or later | glib2-devel | glib2-devel | libglib2.0-dev | -| 2.9.2 or later | libxml2-devel | libxml2-devel | libxml2-dev | +| 2.1.0 or later | pkgconf-pkg-config | pkgconfig | pkg-config | +| 2.80.0 or later | glib2-devel | glib2-devel | libglib2.0-dev | +| 2.12.5 or later | libxml2-devel | libxml2-devel | libxml2-dev | | | libxslt-devel | libxslt-devel | libxslt-dev | | | bzip2-devel | libbz2-devel | libbz2-dev | -| 1.0.1 or later | libqb-devel | libqb-devel | libqb-dev | -| 3.6 or later | python3 | python3 | python3 | -| 0.18 or later | gettext-devel | gettext-tools | gettext | +| 2.0.8 or later | libqb-devel | libqb-devel | libqb-dev | +| 3.12.11 or later| python3 | python3 | python3 | +| 0.22 or later | gettext-devel | gettext-tools | gettext | | 0.18 or later | | | autopoint | -| 3.4.6 or later | gnutls-devel | libgnutls-devel | libgnutls-dev | +| 3.8.9 or later | gnutls-devel | libgnutls-devel | libgnutls-dev | Also: * make must be GNU (or compatible) (setting MAKE=gmake might also work but is @@ -31,8 +31,8 @@ Also: | Version | Fedora-based | Suse-based | Debian-based | |:---------------:|:------------------:|:------------------:|:--------------:| -| 2.0.0 or later | corosynclib | libcorosync | corosync | -| 2.0.0 or later | corosynclib-devel | libcorosync-devel | | +| 3.1.9 or later | corosynclib | libcorosync | corosync | +| 3.1.9 or later | corosynclib-devel | libcorosync-devel | | | | | | libcfg-dev | | | | | libcpg-dev | | | | | libcmap-dev | @@ -40,20 +40,20 @@ Also: ### Optional Build Dependencies -| Feature Enabled | Version | Fedora-based | Suse-based | Debian-based | -|:-----------------------------------------------:|:--------------:|:-----------------------:|:-----------------------:|:-----------------------:| -| encrypted remote CIB admin | | pam-devel | pam-devel | libpam0g-dev | -| interactive crm_mon | | ncurses-devel | ncurses-devel | ncurses-dev | -| systemd support | | systemd-devel | systemd-devel | libsystemd-dev | -| systemd resource support | 1.5.12 or later| dbus-devel | dbus-devel | libdbus-1-dev | -| Linux-HA style fencing agents | | cluster-glue-libs-devel | libglue-devel | cluster-glue-dev | -| documentation | | help2man | help2man | help2man | -| documentation | | docbook-style-xsl | docbook-xsl-stylesheets | docbook-xsl | -| documentation | | python3-sphinx | python3-sphinx | python3-sphinx | -| documentation (PDF) | | latexmk texlive texlive-capt-of texlive-collection-xetex texlive-fncychap texlive-framed texlive-multirow texlive-needspace texlive-tabulary texlive-titlesec texlive-threeparttable texlive-upquote texlive-wrapfig texlive-xetex | texlive texlive-latex | texlive texlive-latex-extra | -| annotated source code as HTML via "make global" | | global | global | global | -| RPM packages via "make rpm" | 4.14 or later | rpm | rpm | (n/a) | -| unit tests | 1.1.0 or later | libcmocka-devel | libcmocka-devel | libcmocka-dev | +| Feature Enabled | Version | Fedora-based | Suse-based | Debian-based | +|:-----------------------------------------------:|:---------------:|:-----------------------:|:-----------------------:|:-----------------------:| +| encrypted remote CIB admin | | pam-devel | pam-devel | libpam0g-dev | +| interactive crm_mon | | ncurses-devel | ncurses-devel | ncurses-dev | +| systemd support | | systemd-devel | systemd-devel | libsystemd-dev | +| systemd resource support | 1.14.10 or later| dbus-devel | dbus-devel | libdbus-1-dev | +| Linux-HA style fencing agents | | cluster-glue-libs-devel | libglue-devel | cluster-glue-dev | +| documentation | | help2man | help2man | help2man | +| documentation | | docbook-style-xsl | docbook-xsl-stylesheets | docbook-xsl | +| documentation | | python3-sphinx | python3-sphinx | python3-sphinx | +| documentation (PDF) | | latexmk texlive texlive-capt-of texlive-collection-xetex texlive-fncychap texlive-framed texlive-multirow texlive-needspace texlive-tabulary texlive-titlesec texlive-threeparttable texlive-upquote texlive-wrapfig texlive-xetex | texlive texlive-latex | texlive texlive-latex-extra | +| annotated source code as HTML via "make global" | | global | global | global | +| RPM packages via "make rpm" | 4.19.1 or later | rpm | rpm | (n/a) | +| unit tests | 1.1.0 or later | libcmocka-devel | libcmocka-devel | libcmocka-dev | ## Optional Testing Dependencies * procps and psmisc (if running CTS lab) diff --git a/configure.ac b/configure.ac index a05bb0bad08..099bf44eb1a 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ dnl Bootstrap autotools dnl ============================================== # Require a minimum version of autoconf itself -AC_PREREQ(2.64) +AC_PREREQ(2.71) dnl AC_CONFIG_MACRO_DIR is deprecated as of autoconf 2.70 (2020-12-08). dnl Once we can require that version, we can simplify this, and no longer @@ -47,14 +47,14 @@ dnl - Should not include HAVE_* defines dnl - Safe to include anywhere AC_CONFIG_HEADERS([include/config.h include/crm_config.h]) -dnl 1.13: minimum automake version required +dnl 1.16: minimum automake version required dnl foreign: don't require GNU-standard top-level files dnl tar-ustar: use (older) POSIX variant of generated tar rather than v7 dnl subdir-objects: keep .o's with their .c's (no-op in 2.0+) -AM_INIT_AUTOMAKE([1.13 foreign tar-ustar subdir-objects]) +AM_INIT_AUTOMAKE([1.16 foreign tar-ustar subdir-objects]) dnl Require minimum version of pkg-config -PKG_PROG_PKG_CONFIG(0.28) +PKG_PROG_PKG_CONFIG(2.1.0) AS_IF([test x"${PKG_CONFIG}" != x""], [], [AC_MSG_FAILURE([Could not find required build tool pkg-config (0.28 or later)])]) PKG_INSTALLDIR @@ -71,9 +71,6 @@ AC_PROG_CC dnl C++ is needed only to run maintainer utilities, not to build AC_PROG_CXX -dnl Use at least C99 if possible (automatic for autoconf >= 2.70) -m4_version_prereq([2.70], [:], [AC_PROG_CC_STDC]) - # cc_supports_flag # Return success if the C compiler supports the given flag cc_supports_flag() { @@ -261,7 +258,7 @@ AC_DEFUN([AM_NLS], AC_SUBST([USE_NLS])] ) AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.18]) +AM_GNU_GETTEXT_VERSION([0.22]) dnl --with-* options: external software support, and custom values @@ -517,7 +514,7 @@ dnl If PYTHON was specified, ensure it is an absolute path AS_IF([test x"${PYTHON}" != x""], [AC_PATH_PROG([PYTHON], [$PYTHON])]) dnl Require a minimum Python version -AM_PATH_PYTHON([3.6]) +AM_PATH_PYTHON([3.12.11]) AC_PROG_LN_S AC_PROG_MKDIR_P @@ -1072,14 +1069,14 @@ PKG_CHECK_MODULES([UUID], [uuid], LIBS="${LIBS} ${UUID_LIBS}"]) # Require minimum glib version -PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.42.0], +PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.80.0], [CPPFLAGS="${CPPFLAGS} ${GLIB_CFLAGS}" LIBS="${LIBS} ${GLIB_LIBS}"]) # Check whether high-resolution sleep function is available AC_CHECK_FUNCS([nanosleep usleep]) -PKG_CHECK_MODULES(LIBXML2, [libxml-2.0 >= 2.9.2], +PKG_CHECK_MODULES(LIBXML2, [libxml-2.0 >= 2.12.5], [CPPFLAGS="${CPPFLAGS} ${LIBXML2_CFLAGS}" LIBS="${LIBS} ${LIBXML2_LIBS}"]) @@ -1400,7 +1397,7 @@ dnl ======================================================================== dnl Cluster infrastructure - LibQB dnl ======================================================================== -PKG_CHECK_MODULES([libqb], [libqb >= 1.0.1]) +PKG_CHECK_MODULES([libqb], [libqb >= 2.0.8]) CPPFLAGS="$libqb_CFLAGS $CPPFLAGS" LIBS="$libqb_LIBS $LIBS" @@ -1443,7 +1440,7 @@ dnl =============================== HAVE_dbus=0 PC_NAME_DBUS="" -PKG_CHECK_MODULES([DBUS],[dbus-1 >= 1.5.12], +PKG_CHECK_MODULES([DBUS],[dbus-1 >= 1.14.10], [ HAVE_dbus=1 PC_NAME_DBUS="dbus-1" @@ -1608,7 +1605,7 @@ dnl ======================================================================== dnl GnuTLS dnl ======================================================================== -PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.4.6], +PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.8.9], [CPPFLAGS="${CPPFLAGS} ${GNUTLS_CFLAGS}" LIBS="${LIBS} ${GNUTLS_LIBS}"]) diff --git a/rpm/pacemaker.spec.in b/rpm/pacemaker.spec.in index ad7a22fe309..a2fef99164a 100644 --- a/rpm/pacemaker.spec.in +++ b/rpm/pacemaker.spec.in @@ -1,5 +1,5 @@ # -# Copyright 2008-2025 the Pacemaker project contributors +# Copyright 2008-2026 the Pacemaker project contributors # # The version control history for this file may have further details. # @@ -266,11 +266,11 @@ BuildRequires: %{python_name}-devel BuildRequires: %{python_name}-setuptools # Pacemaker requires a minimum libqb functionality -Requires: libqb >= 1.0.1 -BuildRequires: pkgconfig(libqb) >= 1.0.1 +Requires: libqb >= 2.0.8 +BuildRequires: pkgconfig(libqb) >= 2.0.8 # Required basic build tools -BuildRequires: autoconf +BuildRequires: autoconf >= 2.71 BuildRequires: automake BuildRequires: coreutils BuildRequires: findutils @@ -281,32 +281,32 @@ BuildRequires: libtool BuildRequires: %{?pkgname_libtool_devel} %endif BuildRequires: make -BuildRequires: pkgconfig >= 0.28 +BuildRequires: pkgconfig >= 2.1.0 BuildRequires: sed # Required for core functionality -BuildRequires: pkgconfig(glib-2.0) >= 2.42 -BuildRequires: pkgconfig(gnutls) >= 3.4.6 -BuildRequires: pkgconfig(libxml-2.0) >= 2.9.2 +BuildRequires: pkgconfig(glib-2.0) >= 2.80 +BuildRequires: pkgconfig(gnutls) >= 3.8.9 +BuildRequires: pkgconfig(libxml-2.0) >= 2.12.5 BuildRequires: pkgconfig(systemd) BuildRequires: libxslt-devel BuildRequires: pkgconfig(uuid) BuildRequires: %{pkgname_bzip2_devel} # Enables optional functionality -BuildRequires: pkgconfig(dbus-1) >= 1.5.12 +BuildRequires: pkgconfig(dbus-1) >= 1.14.10 BuildRequires: %{pkgname_docbook_xsl} BuildRequires: help2man BuildRequires: ncurses-devel BuildRequires: pam-devel -BuildRequires: %{pkgname_gettext} >= 0.18 +BuildRequires: %{pkgname_gettext} >= 0.22 # Required for "make check" BuildRequires: libcmocka-devel >= 1.1.0 BuildRequires: %{python_name}-psutil -Requires: corosync >= 2.0.0 -BuildRequires: corosync-devel >= 2.0.0 +Requires: corosync >= 3.1.9 +BuildRequires: corosync-devel >= 3.1.9 %if %{with linuxha} BuildRequires: %{pkgname_glue_libs}-devel @@ -426,14 +426,14 @@ Summary: Pacemaker development package Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release} Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release} Requires: %{pkgname_bzip2_devel}%{?_isa} -Requires: corosync-devel >= 2.0.0 +Requires: corosync-devel >= 3.1.9 Requires: glib2-devel%{?_isa} -Requires: libqb-devel%{?_isa} >= 1.0.1 +Requires: libqb-devel%{?_isa} >= 2.0.8 %if %{defined pkgname_libtool_devel_arch} Requires: %{?pkgname_libtool_devel_arch} %endif Requires: libuuid-devel%{?_isa} -Requires: libxml2-devel%{?_isa} >= 2.9.2 +Requires: libxml2-devel%{?_isa} >= 2.12.5 Requires: libxslt-devel%{?_isa} %description -n %{pkgname_pcmk_libs}-devel From ba25e35fa2219389452a48162a7a8f301c565380 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Thu, 20 Aug 2026 14:52:33 -0400 Subject: [PATCH 2/4] Build: Sync build dependencies between the spec file and configure.ac. --- rpm/pacemaker.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/pacemaker.spec.in b/rpm/pacemaker.spec.in index a2fef99164a..31c18d63007 100644 --- a/rpm/pacemaker.spec.in +++ b/rpm/pacemaker.spec.in @@ -271,7 +271,7 @@ BuildRequires: pkgconfig(libqb) >= 2.0.8 # Required basic build tools BuildRequires: autoconf >= 2.71 -BuildRequires: automake +BuildRequires: automake >= 1.16 BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc @@ -427,7 +427,7 @@ Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release} Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release} Requires: %{pkgname_bzip2_devel}%{?_isa} Requires: corosync-devel >= 3.1.9 -Requires: glib2-devel%{?_isa} +Requires: glib2-devel%{?_isa} >= 2.80.0 Requires: libqb-devel%{?_isa} >= 2.0.8 %if %{defined pkgname_libtool_devel_arch} Requires: %{?pkgname_libtool_devel_arch} From ad33d981f4c118a331e1e9b45cc3c450d0d2e2e9 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Thu, 17 Sep 2026 15:19:05 -0400 Subject: [PATCH 3/4] Build: Remove commit_abbrev block. git 2.11 was released in 2016, so it should be safe to unconditionally specify the commit abbreviation length now. --- rpm/pacemaker.spec.in | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/rpm/pacemaker.spec.in b/rpm/pacemaker.spec.in index 31c18d63007..bcc2f6991c9 100644 --- a/rpm/pacemaker.spec.in +++ b/rpm/pacemaker.spec.in @@ -43,14 +43,6 @@ ## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build %global commit HEAD -## 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} || (0%{?rhel} >= 9) -%global commit_abbrev 9 -%else -%global commit_abbrev 7 -%endif - # Define conditionals so that "rpmbuild --with " and # "rpmbuild --without " can enable and disable specific features @@ -136,7 +128,7 @@ %define pcmk_release %{specversion} %endif %else -%define archive_version %(c=%{commit}; echo ${c:0:%{commit_abbrev}}) +%define archive_version %(c=%{commit}; echo ${c:0:9}) %define archive_github_url %{archive_version}#/%{name}-%{archive_version}.tar.gz %if %{with pre_release} %define pcmk_release 0.%{specversion}.%{archive_version}.git From 4e25733426c2c8f4256fab1f5153bf4594ba0ba1 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Thu, 17 Sep 2026 15:47:16 -0400 Subject: [PATCH 4/4] Build: Use bcond instead of bcond_{with,without}. Now that we require rpm >= 4.19.1, we can use this new macro which is a little less confusing than the old versions. I've tried to simplify these expressions where possible, too, but it's all pretty tricky stuff. Ref T1 --- rpm/pacemaker.spec.in | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/rpm/pacemaker.spec.in b/rpm/pacemaker.spec.in index bcc2f6991c9..0f4ac6169a7 100644 --- a/rpm/pacemaker.spec.in +++ b/rpm/pacemaker.spec.in @@ -47,39 +47,23 @@ # Define conditionals so that "rpmbuild --with " and # "rpmbuild --without " can enable and disable specific features -## Use systemd to create users/groups as required -%if (0%{?fedora} >= 38) -%bcond_without use_sysusers -%else -%bcond_with use_sysusers -%endif +## Use systemd to create users/groups +%bcond use_sysusers %[ 0%{?fedora} >= 38 ] ## Add option for Linux-HA (stonith/external) fencing agent support -%if 0%{?suse_version} -%bcond_without linuxha -%else -%bcond_with linuxha -%endif +%bcond linuxha 0%{?suse_version} ## Add option for whether to support storing sensitive information outside CIB -%if (0%{?fedora} && 0%{?fedora} <= 33) || (0%{?rhel} && 0%{?rhel} <= 8) -%bcond_with cibsecrets -%else -%bcond_without cibsecrets -%endif +%bcond cibsecrets %[ ! ((0%{?fedora} && 0%{?fedora} <= 33) || (0%{?rhel} && 0%{?rhel} <= 8)) ] ## Add option to enable Native Language Support (experimental) -%bcond_with nls +%bcond nls 0 ## Add option to create binaries suitable for use with profiling tools -%bcond_with profiling +%bcond profiling 0 ## Allow deprecated option to skip (or enable, on RHEL) documentation -%if 0%{?rhel} -%bcond_with doc -%else -%bcond_without doc -%endif +%bcond doc %[ ! 0%{?rhel} ] ## Add option to default to start-up synchronization with SBD. ## @@ -88,18 +72,14 @@ ## 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 +%bcond sbd_sync %[ 0%{?rhel} > 8 ] ## Add option to prefix package version with "0." ## (so later "official" packages will be considered updates) -%bcond_with pre_release +%bcond pre_release 0 ## Add option to turn off hardening of libraries and daemon executables -%bcond_without hardening +%bcond hardening 1 # Define globals for convenient use later