Compare commits

..

No commits in common. "4bc262a628723401ecf080bcdfcf8cb2f3f4aa07" and "4ebe55709077300ebcf2d490da0b6d7129493731" have entirely different histories.

6 changed files with 246 additions and 289 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

View File

@ -0,0 +1,44 @@
From 47ecd21b9acb108eb4e024c51cdefadac2d74a64 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
Date: Tue, 26 Nov 2019 20:07:36 +0100
Subject: [PATCH] Build: fix unability to build with Inkscape 1.0 beta
version(s)
...and possibly beyond.
References:
https://gitlab.com/inkscape/inbox/issues/1244
---
doc/Makefile.am | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 257f5cdf5..d8c846830 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -84,14 +84,19 @@ PNGS = $(PNGS_ORIGINAL) $(PNGS_GENERATED)
graphics: $(PNGS)
+
+# two-phased attempts for Inkscape pre-1.0 and 1.0+ (upcoming) discrepancy
%.png: %.svg
- $(AM_V_GEN)$(INKSCAPE) --file=$< --export-dpi=90 -C --export-png=$@ $(PCMK_quiet)
+ $(AM_V_GEN) { $(INKSCAPE) --export-dpi=90 -C --export-png=$@ $< \
+ || $(INKSCAPE) --export-dpi=90 -C --export-file=$@ $<; } $(PCMK_quiet)
%-small.png: %.svg
- $(AM_V_GEN)$(INKSCAPE) --file=$< --export-dpi=45 -C --export-png=$@ $(PCMK_quiet)
+ $(AM_V_GEN) { $(INKSCAPE) --export-dpi=45 -C --export-png=$@ $< \
+ || $(INKSCAPE) --export-dpi=45 -C --export-file=$@ $<; } $(PCMK_quiet)
%-large.png: %.svg
- $(AM_V_GEN)$(INKSCAPE) --file=$< --export-dpi=180 -C --export-png=$@ $(PCMK_quiet)
+ $(AM_V_GEN) { $(INKSCAPE) --export-dpi=180 -C --export-png=$@ $< \
+ || $(INKSCAPE) --export-dpi=180 -C --export-file=$@ $<; } $(PCMK_quiet)
if IS_ASCIIDOC
ASCIIDOC_HTML_ARGS = --unsafe --backend=xhtml11
--
2.24.0

BIN
pacemaker-2.0.3.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -10,64 +10,23 @@
## GitHub entity that distributes source (for ease of using a fork)
%global github_owner ClusterLabs
## What to use as the OCF resource agent root directory
%global ocf_root %{_prefix}/lib/ocf
## 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.0.3
%global specversion 1
## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
%global commit dc6eb4362e67c1497a413434eba097063bf1ef83
## Upstream commit (or git tag, such as "Pacemaker-" plus the
## {pcmkversion} macro for an official release) to use for this package
%global commit Pacemaker-2.0.3
## 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 <feature>" and
# "rpmbuild --without <feature>" can enable and disable specific features
## Add option to enable support for stonith/external fencing agents
%bcond_with stonithd
## Add option for whether to support storing sensitive information outside CIB
%bcond_with cibsecrets
## Add option to enable Native Language Support (experimental)
%bcond_with nls
## Add option to create binaries suitable for use with profiling tools
%bcond_with profiling
%bcond_without doc
## Add option to default to start-up synchronization with SBD.
##
## If enabled, SBD *MUST* be built to default similarly, otherwise data
## corruption could occur. Building both Pacemaker and SBD to default
## 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.
%bcond_without sbd_sync
## Add option to prefix package version with "0."
## (so later "official" packages will be considered updates)
%bcond_without pre_release
## NOTE: skip --with upstart_job
## Add option to turn off hardening of libraries and daemon executables
%bcond_without hardening
## Add option to enable (or disable, on RHEL 8) links for legacy daemon names
%bcond_without legacy_links
## 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
@ -75,50 +34,27 @@
%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)
## Short version of git commit
%define shortcommit %(c=%{commit}; case ${c} in
Pacemaker-*%{rparen} echo ${c:10};;
*%{rparen} echo ${c:0:%{commit_abbrev}};; 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
%define pcmk_release %{specversion}
## Whether this is a tagged release
%define tag_release %([ %{commit} != Pacemaker-%{shortcommit} ]; echo $?)
## Whether this is a release candidate (in case of a tagged release)
%define pre_release %([ "%{tag_release}" -eq 0 ] || {
case "%{shortcommit}" in *-rc[[:digit:]]*%{rparen} false;;
esac; }; echo $?)
## Heuristic used to infer bleeding-edge deployments that are
## less likely to have working versions of the documentation tools
%define bleeding %(test ! -e /etc/yum.repos.d/fedora-rawhide.repo; echo $?)
## 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}
## Different distros name certain packages differently
## (note: corosync libraries also differ, but all provide corosync-devel)
%global pkgname_libtool_devel libtool-ltdl-devel
%global pkgname_libtool_devel_arch libtool-ltdl-devel
%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
%global pkgname_pcmk_libs %{name}-libs
%global hacluster_id 189
## Distro-specific configuration choices
### Use 2.0-style output when other distro packages don't support current output
%global compat20 --enable-compat-2.0
### Default concurrent-fencing to true when distro prefers that
%global concurrent_fencing --with-concurrent-fencing-default=true
### Default resource-stickiness to 1 when distro prefers that
%global resource_stickiness --with-resource-stickiness-default=1
# Python-related definitions
## Turn off auto-compilation of Python files outside Python specific paths,
@ -134,11 +70,41 @@
sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g'; })
%endif
## Prefer Python 3 definitions explicitly, in case 2 is also available
%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)}
## Values that differ by Python major version
%global python_path /usr/bin/python%{?python3_pkgversion}%{!?python3_pkgversion:3}
%global python_pkg python3
%global python_min 3.2
%define py_site %{?python3_sitelib}%{!?python3_sitelib:%(
python3 -c 'from distutils.sysconfig import get_python_lib as gpl; print(gpl(1))' 2>/dev/null)}
# Define conditionals so that "rpmbuild --with <feature>" and
# "rpmbuild --without <feature>" can enable and disable specific features
## NOTE: skip --with stonith
## Add option to create binaries suitable for use with profiling tools
%bcond_with profiling
## Add option to create binaries with coverage analysis
%bcond_with coverage
## Add option to skip generating documentation
## (the build tools aren't available everywhere)
%bcond_without doc
## 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
## Add option to disable links for legacy daemon names
%bcond_without legacy_links
# Keep sane profiling data if requested
%if %{with profiling}
@ -149,86 +115,72 @@
%endif
%define pcmk_release %{specversion}
Name: pacemaker
Summary: Scalable High-Availability cluster resource manager
Version: %{pcmkversion}
Release: %{pcmk_release}
License: GPLv2+ and LGPLv2+
Url: https://www.clusterlabs.org
Url: http://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
# Hint: use "spectool -s 0 pacemaker.spec" (rpmdevtools) to check the final URL
Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
Source1: https://github.com/%{github_owner}/%{nagios_name}/archive/%{nagios_hash}/%{nagios_name}-%{nagios_hash}.tar.gz
# ---
Patch0: Build-fix-unability-to-build-with-Inkscape-1.0-beta-.patch
Requires: resource-agents
Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Requires: %{name}-cluster-libs = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release}
Requires: %{name}-cli = %{version}-%{release}
%{?systemd_requires}
Requires: %{python_path}
BuildRequires: %{python_name}-devel
# Pacemaker requires a minimum Python functionality
Requires: %{python_pkg} >= %{python_min}
BuildRequires: %{python_pkg}-devel >= %{python_min}
# Pacemaker requires a minimum libqb functionality
Requires: libqb >= 0.17.0
BuildRequires: libqb-devel >= 0.17.0
Requires: libqb >= 0.13.0
BuildRequires: libqb-devel >= 0.13.0
# Required basic build tools
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: gcc
BuildRequires: grep
BuildRequires: libtool
%if %{defined pkgname_libtool_devel}
BuildRequires: %{?pkgname_libtool_devel}
%endif
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: sed
# Basics required for the build (even if usually satisfied through other BRs)
BuildRequires: coreutils findutils grep sed
# Required for core functionality
BuildRequires: pkgconfig(glib-2.0) >= 2.42
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: libuuid-devel
BuildRequires: %{pkgname_bzip2_devel}
BuildRequires: automake autoconf gcc libtool pkgconfig libtool-ltdl-devel
BuildRequires: pkgconfig(glib-2.0) >= 2.16
BuildRequires: libxml2-devel libxslt-devel libuuid-devel
BuildRequires: bzip2-devel
# Enables optional functionality
BuildRequires: pkgconfig(dbus-1)
BuildRequires: %{pkgname_docbook_xsl}
BuildRequires: %{pkgname_gnutls_devel}
BuildRequires: help2man
BuildRequires: ncurses-devel
BuildRequires: pam-devel
BuildRequires: %{pkgname_gettext} >= 0.18
# Required for "make check"
BuildRequires: libcmocka-devel
BuildRequires: ncurses-devel docbook-style-xsl
BuildRequires: help2man gnutls-devel pam-devel pkgconfig(dbus-1)
BuildRequires: pkgconfig(systemd)
# RH patches are created by git, so we need git to apply them
Requires: corosync >= 2.0.0
BuildRequires: corosynclib-devel >= 2.0.0
#XXX
#BuildRequires: pkgconfig(libcpg)
#BuildRequires: pkgconfig(libcfg)
## (note no avoiding effect when building through non-customized mock)
#%%if !%%{bleeding}
#%%if %%{with doc}
#BuildRequires: asciidoc inkscape publican
#%%endif
#%%endif
# git-style patch application
BuildRequires: git
Requires: corosync >= 2.0.0
BuildRequires: corosync-devel >= 2.0.0
%if %{with stonithd}
BuildRequires: %{pkgname_glue_libs}-devel
%endif
Provides: pcmk-cluster-manager = %{version}-%{release}
Provides: pcmk-cluster-manager = %{version}-%{release}
Provides: pcmk-cluster-manager%{?_isa} = %{version}-%{release}
# Bundled bits
## Pacemaker uses the crypto/md5-buffer module from gnulib
Provides: bundled(gnulib) = 20200404
# Pacemaker uses the crypto/md5 module from gnulib
Provides: bundled(gnulib)
%description
Pacemaker is an advanced, scalable High-Availability cluster resource
@ -242,18 +194,17 @@ 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) : coverage doc hardening pre_release profiling
%package cli
License: GPLv2+ and LGPLv2+
Summary: Command line tools for controlling Pacemaker clusters
Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%if 0%{?fedora} > 22 || 0%{?rhel} > 7
Recommends: pcmk-cluster-manager = %{version}-%{release}
# For crm_report
Recommends: tar
Recommends: bzip2
%endif
Requires: perl-TimeDate
Requires: %{pkgname_procps}
Requires: procps-ng
Requires: psmisc
Requires(post):coreutils
@ -265,29 +216,25 @@ The %{name}-cli package contains command line tools that can be used
to query and control the cluster from machines that may, or may not,
be part of the cluster.
%package -n %{pkgname_pcmk_libs}
%package libs
License: GPLv2+ and LGPLv2+
Summary: Core Pacemaker libraries
Requires(pre): %{pkgname_shadow_utils}
Requires(pre): shadow-utils
Requires: %{name}-schemas = %{version}-%{release}
# sbd 1.4.0+ supports the libpe_status API for pe_working_set_t
# sbd 1.4.2+ supports startup/shutdown handshake via pacemakerd-api
# and handshake defaults to enabled for rhel builds
# sbd 1.5.0+ handshake defaults to enabled with upstream sbd-release
# implicitly supports handshake defaults to enabled in this spec
Conflicts: sbd < 1.5.0
Conflicts: sbd < 1.4.0
%description -n %{pkgname_pcmk_libs}
%description libs
Pacemaker is an advanced, scalable High-Availability cluster resource
manager.
The %{pkgname_pcmk_libs} package contains shared libraries needed for cluster
The %{name}-libs package contains shared libraries needed for cluster
nodes and those just running the CLI tools.
%package cluster-libs
License: GPLv2+ and LGPLv2+
Summary: Cluster Libraries used by Pacemaker
Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description cluster-libs
Pacemaker is an advanced, scalable High-Availability cluster resource
@ -298,14 +245,14 @@ libraries needed for nodes that will form part of the cluster nodes.
%package remote
License: GPLv2+ and LGPLv2+
Summary: Pacemaker remote executor daemon for non-cluster nodes
Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Summary: Pacemaker remote daemon for non-cluster nodes
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: %{name}-cli = %{version}-%{release}
Requires: resource-agents
# -remote can be fully independent of systemd
%{?systemd_ordering}%{!?systemd_ordering:%{?systemd_requires}}
Provides: pcmk-cluster-manager = %{version}-%{release}
Provides: pcmk-cluster-manager = %{version}-%{release}
Provides: pcmk-cluster-manager%{?_isa} = %{version}-%{release}
%description remote
Pacemaker is an advanced, scalable High-Availability cluster resource
@ -315,51 +262,42 @@ The %{name}-remote package contains the Pacemaker Remote daemon
which is capable of extending pacemaker functionality to remote
nodes not running the full corosync/cluster stack.
%package -n %{pkgname_pcmk_libs}-devel
%package libs-devel
License: GPLv2+ and LGPLv2+
Summary: Pacemaker development package
Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Requires: %{name}-cluster-libs = %{version}-%{release}
Requires: %{pkgname_bzip2_devel}
Requires: corosync-devel >= 2.0.0
Requires: glib2-devel
Requires: libqb-devel
%if %{defined pkgname_libtool_devel_arch}
Requires: %{?pkgname_libtool_devel_arch}
%endif
Requires: libuuid-devel
Requires: libxml2-devel
Requires: libxslt-devel
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release}
Requires: libtool-ltdl-devel libuuid-devel
Requires: libxml2-devel%{?_isa} libxslt-devel%{?_isa}
Requires: bzip2-devel%{?_isa} glib2-devel%{?_isa}
Requires: libqb-devel%{?_isa}
Requires: corosynclib-devel%{?_isa} >= 2.0.0
%description -n %{pkgname_pcmk_libs}-devel
%description libs-devel
Pacemaker is an advanced, scalable High-Availability cluster resource
manager.
The %{pkgname_pcmk_libs}-devel package contains headers and shared libraries
The %{name}-libs-devel package contains headers and shared libraries
for developing tools for Pacemaker.
%package cts
License: GPLv2+ and LGPLv2+
Summary: Test framework for cluster-related technologies like Pacemaker
Requires: %{python_path}
Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Requires: %{name}-cli = %{version}-%{release}
Requires: %{pkgname_procps}
Requires: %{python_pkg} >= %{python_min}
Requires: %{name}-libs = %{version}-%{release}
Requires: procps-ng
Requires: psmisc
BuildArch: noarch
# systemd Python bindings are a separate package in some distros
Requires: %{python_name}-systemd
Requires: %{python_pkg}-systemd
%description cts
Test framework for cluster-related technologies like Pacemaker
%package doc
License: CC-BY-SA-4.0
License: CC-BY-SA
Summary: Documentation for Pacemaker
BuildArch: noarch
Conflicts: %{name}-libs > %{version}-%{release}
Conflicts: %{name}-libs < %{version}-%{release}
%description doc
Documentation for Pacemaker.
@ -383,11 +321,11 @@ 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: 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
@ -395,13 +333,16 @@ 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/"
%setup -q -a 1 -n %{name}-%{commit}
%global __scm git_am
%__scm_setup_git
%autopatch -p1
%build
# Early versions of autotools (e.g. RHEL <= 5) do not support --docdir
export docdir=%{pcmk_docdir}
export systemdsystemunitdir=%{?_unitdir}%{!?_unitdir:no}
%if %{with hardening}
@ -418,33 +359,29 @@ export LDFLAGS_HARDENED_LIB="%{?_hardening_ldflags}"
./autogen.sh
# Rawhide glibc doesn't like ftime at all
export CPPFLAGS="-UPCMK_TIME_EMERGENCY_CGT $CPPFLAGS"
%{configure} \
PYTHON=%{python_path} \
%{!?with_hardening: --disable-hardening} \
%{?with_legacy_links: --enable-legacy-links} \
%{!?with_legacy_links: --disable-legacy-links} \
%{?with_profiling: --with-profiling} \
%{?with_cibsecrets: --with-cibsecrets} \
%{?with_nls: --enable-nls} \
%{?with_sbd_sync: --with-sbd-sync-default="true"} \
%{?with_coverage: --with-coverage} \
%{!?with_doc: --with-brand=} \
%{?gnutls_priorities: --with-gnutls-priorities="%{gnutls_priorities}"} \
%{?bug_url: --with-bug-url=%{bug_url}} \
%{?ocf_root: --with-ocfdir=%{ocf_root}} \
%{?concurrent_fencing} \
%{?resource_stickiness} \
%{?compat20} \
--disable-static \
--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}
--with-version=%{version}-%{release} \
--with-bug-url=https://bugz.fedoraproject.org/%{name} \
--with-nagios \
--with-nagios-metadata-dir=%{_datadir}/pacemaker/nagios/plugins-metadata/ \
--with-nagios-plugin-dir=%{_libdir}/nagios/plugins/
make %{_smp_mflags} V=1
%check
make %{_smp_mflags} check
{ cts/cts-scheduler --run load-stopped-loop \
&& cts/cts-cli \
&& touch .CHECKED
@ -460,6 +397,10 @@ make install \
DESTDIR=%{buildroot} V=1 docdir=%{pcmk_docdir} \
%{?_python_bytecompile_extra:%{?py_byte_compile:am__py_compile=true}}
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
install -m 644 daemons/pacemakerd/pacemaker.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/pacemaker
install -m 644 tools/crm_mon.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/crm_mon
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
@ -468,7 +409,11 @@ done
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/rpm-state/%{name}
# Don't package libtool archives
# These are not actually scripts
find %{buildroot} -name '*.xml' -type f -print0 | xargs -0 chmod a-x
# Don't package static libs
find %{buildroot} -name '*.a' -type f -print0 | xargs -0 rm -f
find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f
# Do not package these either
@ -481,14 +426,28 @@ rm -f %{buildroot}/%{_mandir}/man8/fence_legacy.*
rm -f %{buildroot}/%{_sbindir}/notifyServicelogEvent
rm -f %{buildroot}/%{_sbindir}/ipmiservicelogd
# Don't ship init scripts for systemd based platforms
rm -f %{buildroot}/%{_initrddir}/pacemaker
rm -f %{buildroot}/%{_initrddir}/pacemaker_remote
# Byte-compile Python sources where suitable and the distro procedures known
%if %{defined py_byte_compile}
%if %{defined py_byte_compile} && %{defined python_path}
%{py_byte_compile %{python_path} %{buildroot}%{_datadir}/pacemaker/tests}
%if !%{defined _python_bytecompile_extra}
%{py_byte_compile %{python_path} %{buildroot}%{python_site}/cts}
%{py_byte_compile %{python_path} %{buildroot}%{py_site}/cts}
%endif
%endif
%if %{with coverage}
GCOV_BASE=%{buildroot}/%{_var}/lib/pacemaker/gcov
mkdir -p $GCOV_BASE
find . -name '*.gcno' -type f | while read F ; do
D=`dirname $F`
mkdir -p ${GCOV_BASE}/$D
cp $F ${GCOV_BASE}/$D
done
%endif
%post
%systemd_post pacemaker.service
@ -535,7 +494,7 @@ fi
%post cli
%systemd_post crm_mon.service
if [ "$1" -eq 2 ]; then
if [ "$1" = 2 ]; then
# Package upgrade, not initial install:
# Move any pre-2.0 logs to new location to ensure they get rotated
{ mv -fbS.rpmsave %{_var}/log/pacemaker.log* %{_var}/log/pacemaker \
@ -549,14 +508,15 @@ fi
%postun cli
%systemd_postun_with_restart crm_mon.service
%pre -n %{pkgname_pcmk_libs}
# @TODO Use sysusers.d:
# https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format
getent group %{gname} >/dev/null || groupadd -r %{gname} -g %{hacluster_id}
getent passwd %{uname} >/dev/null || useradd -r -g %{gname} -u %{hacluster_id} -s /sbin/nologin -c "cluster user" %{uname}
%pre libs
# XXX keep an eye on https://fedoraproject.org/wiki/Changes/SystemdSysusers
# reopened recently:
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/AETGESYR4IEQJMA6SKL7OERSDZFWFNEU/
getent group %{gname} >/dev/null || groupadd -r %{gname} -g 189
getent passwd %{uname} >/dev/null || useradd -r -g %{gname} -u 189 -s /sbin/nologin -c "cluster user" %{uname}
exit 0
%ldconfig_scriptlets -n %{pkgname_pcmk_libs}
%ldconfig_scriptlets libs
%ldconfig_scriptlets cluster-libs
%files
@ -571,19 +531,21 @@ exit 0
%exclude %{_libexecdir}/pacemaker/cts-log-watcher
%exclude %{_libexecdir}/pacemaker/cts-support
%exclude %{_sbindir}/pacemaker-remoted
%if %{with legacy_links}
%exclude %{_sbindir}/pacemaker_remoted
%endif
%{_libexecdir}/pacemaker/*
%{_sbindir}/crm_attribute
%{_sbindir}/crm_master
%{_sbindir}/fence_watchdog
%doc %{_mandir}/man7/pacemaker-controld.*
%doc %{_mandir}/man7/pacemaker-schedulerd.*
%doc %{_mandir}/man7/pacemaker-fenced.*
%doc %{_mandir}/man7/ocf_pacemaker_controld.*
%doc %{_mandir}/man7/ocf_pacemaker_remote.*
%doc %{_mandir}/man8/crm_attribute.*
%doc %{_mandir}/man8/crm_master.*
%doc %{_mandir}/man8/fence_watchdog.*
%doc %{_mandir}/man8/pacemakerd.*
%doc %{_datadir}/pacemaker/alerts
@ -594,8 +556,8 @@ exit 0
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/cib
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/pengine
%{ocf_root}/resource.d/pacemaker/controld
%{ocf_root}/resource.d/pacemaker/remote
/usr/lib/ocf/resource.d/pacemaker/controld
/usr/lib/ocf/resource.d/pacemaker/remote
%files cli
%dir %attr (750, root, %{gname}) %{_sysconfdir}/pacemaker
@ -606,10 +568,6 @@ exit 0
%{_sbindir}/attrd_updater
%{_sbindir}/cibadmin
%if %{with cibsecrets}
%{_sbindir}/cibsecret
%endif
%{_sbindir}/crm_attribute
%{_sbindir}/crm_diff
%{_sbindir}/crm_error
%{_sbindir}/crm_failcount
@ -632,13 +590,13 @@ exit 0
# XXX "dirname" is not owned by any prerequisite
%{_datadir}/snmp/mibs/PCMK-MIB.txt
%exclude %{ocf_root}/resource.d/pacemaker/controld
%exclude %{ocf_root}/resource.d/pacemaker/o2cb
%exclude %{ocf_root}/resource.d/pacemaker/remote
%exclude /usr/lib/ocf/resource.d/pacemaker/controld
%exclude /usr/lib/ocf/resource.d/pacemaker/o2cb
%exclude /usr/lib/ocf/resource.d/pacemaker/remote
%dir %{ocf_root}
%dir %{ocf_root}/resource.d
%{ocf_root}/resource.d/pacemaker
%dir /usr/lib/ocf
%dir /usr/lib/ocf/resource.d
/usr/lib/ocf/resource.d/pacemaker
%doc %{_mandir}/man7/*
%exclude %{_mandir}/man7/pacemaker-controld.*
@ -648,8 +606,9 @@ exit 0
%exclude %{_mandir}/man7/ocf_pacemaker_o2cb.*
%exclude %{_mandir}/man7/ocf_pacemaker_remote.*
%doc %{_mandir}/man8/*
%exclude %{_mandir}/man8/crm_attribute.*
%exclude %{_mandir}/man8/crm_master.*
%exclude %{_mandir}/man8/fence_watchdog.*
%exclude %{_mandir}/man8/fence_legacy.*
%exclude %{_mandir}/man8/pacemakerd.*
%exclude %{_mandir}/man8/pacemaker-remoted.*
@ -663,7 +622,7 @@ exit 0
%dir %attr (770, %{uname}, %{gname}) %{_var}/log/pacemaker
%dir %attr (770, %{uname}, %{gname}) %{_var}/log/pacemaker/bundles
%files -n %{pkgname_pcmk_libs} %{?with_nls:-f %{name}.lang}
%files libs
%{_libdir}/libcib.so.*
%{_libdir}/liblrmd.so.*
%{_libdir}/libcrmservice.so.*
@ -691,7 +650,9 @@ exit 0
%{_unitdir}/pacemaker_remote.service
%{_sbindir}/pacemaker-remoted
%if %{with legacy_links}
%{_sbindir}/pacemaker_remoted
%endif
%{_mandir}/man8/pacemaker-remoted.*
%license licenses/GPLv2
%doc COPYING
@ -702,7 +663,7 @@ exit 0
%license licenses/CC-BY-SA-4.0
%files cts
%{python_site}/cts
%{py_site}/cts
%{_datadir}/pacemaker/tests
%{_libexecdir}/pacemaker/cts-log-watcher
@ -712,9 +673,12 @@ exit 0
%doc COPYING
%doc ChangeLog
%files -n %{pkgname_pcmk_libs}-devel
%files libs-devel
%{_includedir}/pacemaker
%{_libdir}/*.so
%if %{with coverage}
%{_var}/lib/pacemaker/gcov
%endif
%{_libdir}/pkgconfig/*.pc
%license licenses/LGPLv2.1
%doc COPYING
@ -726,7 +690,6 @@ exit 0
%{_datadir}/pacemaker/*.rng
%{_datadir}/pacemaker/*.xsl
%{_datadir}/pacemaker/api
%{_datadir}/pacemaker/base
%{_datadir}/pkgconfig/pacemaker-schemas.pc
%files nagios-plugins-metadata
@ -736,21 +699,6 @@ exit 0
%license %{nagios_name}-%{nagios_hash}/COPYING
%changelog
* Mon Feb 06 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 2.1.4-1
- Update package to version 2.1.4
* Tue Jul 26 2022 Bixiaoyan <bixiaoyan@kylinos.cn> - 2.1.2-1
- upgrade to 2.1.2
* Wed Feb 16 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 2.0.5-1
- upgrade to 2.0.5
* Sat Aug 07 2021 wangyue <wangyue92@huawei.com> - 2.0.3-3
- fix build error with gcc 10
* Tue Mar 23 2021 jiangxinyu <jiangxinyu@kylinos.cn> - 2.0.3-2
- Add 'Resolve-the-failure-of-time-matching-in-test-cases.patch' file 2.0.3-2
* Thu Nov 05 2020 jiangxinyu <jiangxinyu@kylinos.cn> - 2.0.3-1
- Upgrade the pacemaker package version to 2.0.3-1