Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
4bc262a628
!27 [sync] PR-26: Update package to version 2.1.4
From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
2023-05-16 03:11:13 +00:00
jxy_git
1ad2b3943d Update package to version 2.1.4
(cherry picked from commit cf43b286397d7d88b976dc3f966094ac753e330f)
2023-05-16 10:05:14 +08:00
openeuler-ci-bot
58b7606ee9
!24 [sync] PR-19: update version to 2.1.2
From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
2022-10-21 01:37:49 +00:00
bixiaoyan
50c89e0130 update version to 2.1.2
(cherry picked from commit 4ab8f749159c6d8831c32148beed14ab296e11c1)
2022-10-18 10:11:53 +08:00
openeuler-ci-bot
8d18454c2f
!14 [sync] PR-12: upgrade to 2.0.5
From: @openeuler-sync-bot 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
2022-02-18 02:21:19 +00:00
jiangxinyu
32e7414807 upgrade to 2.0.5
(cherry picked from commit 99a7c1da41645455d377976d9c82e54f36917b8e)
2022-02-18 09:27:39 +08:00
openeuler-ci-bot
4142e0b878 !11 fix build error with gcc 10
From: @wang_yue111
Reviewed-by: @yangzhao_kl
Signed-off-by: @yangzhao_kl
2021-08-09 03:11:16 +00:00
wang_yue111
a87a88ca73 fix build error with gcc 10 2021-08-07 15:13:43 +08:00
openeuler-ci-bot
03c850694a !7 [sync] PR-6: Resolve the failure of time matching in test cases
From: @openeuler-sync-bot
Reviewed-by: @jxy_git
Signed-off-by: @jxy_git
2021-03-23 21:07:46 +08:00
jiangxinyu
2b19975540 Resolve the failure of time matching in test cases
(cherry picked from commit 9e3db2331a40b41291c3f452aaa4a3263cdd6eac)
2021-03-23 21:00:57 +08:00
6 changed files with 290 additions and 247 deletions

View File

@ -0,0 +1,35 @@
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

@ -1,44 +0,0 @@
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

Binary file not shown.

BIN
pacemaker-dc6eb4362.tar.gz Normal file

Binary file not shown.

View File

@ -10,23 +10,64 @@
## GitHub entity that distributes source (for ease of using a fork) ## GitHub entity that distributes source (for ease of using a fork)
%global github_owner ClusterLabs %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 ## 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.0.3 %global pcmkversion 2.1.4
%global specversion 1 %global specversion 1
## Upstream commit (or git tag, such as "Pacemaker-" plus the ## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
## {pcmkversion} macro for an official release) to use for this package %global commit dc6eb4362e67c1497a413434eba097063bf1ef83
%global commit Pacemaker-2.0.3
## 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.
%global commit_abbrev 9 %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 ## Nagios source control identifiers
%global nagios_name nagios-agents-metadata %global nagios_name nagios-agents-metadata
%global nagios_hash 105ab8a7b2c16b9a29cf1c1596b80136eeef332b %global nagios_hash 105ab8a7b2c16b9a29cf1c1596b80136eeef332b
%global nagios_archive_github_url %{nagios_hash}#/%{nagios_name}-%{nagios_hash}.tar.gz
# Define globals for convenient use later # Define globals for convenient use later
@ -34,27 +75,50 @@
%global lparen ( %global lparen (
%global rparen ) %global rparen )
## Short version of git commit ## Whether this is a tagged release (final or release candidate)
%define shortcommit %(c=%{commit}; case ${c} in %define tag_release %(c=%{commit}; case ${c} in Pacemaker-*%{rparen} echo 1 ;;
Pacemaker-*%{rparen} echo ${c:10};; *%{rparen} echo 0 ;; esac)
*%{rparen} echo ${c:0:%{commit_abbrev}};; esac)
## Whether this is a tagged release ## Portion of export/dist tarball name after "pacemaker-", and release version
%define tag_release %([ %{commit} != Pacemaker-%{shortcommit} ]; echo $?) %if 0%{tag_release}
%define archive_version %(c=%{commit}; echo ${c:10})
## Whether this is a release candidate (in case of a tagged release) %define archive_github_url %{commit}#/%{name}-%{archive_version}.tar.gz
%define pre_release %([ "%{tag_release}" -eq 0 ] || { %else
case "%{shortcommit}" in *-rc[[:digit:]]*%{rparen} false;; %define archive_version %(c=%{commit}; echo ${c:0:%{commit_abbrev}})
esac; }; echo $?) %define archive_github_url %{archive_version}#/%{name}-%{archive_version}.tar.gz
%endif
## Heuristic used to infer bleeding-edge deployments that are ### Always use a simple release number
## less likely to have working versions of the documentation tools %define pcmk_release %{specversion}
%define bleeding %(test ! -e /etc/yum.repos.d/fedora-rawhide.repo; echo $?)
## 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'"
%define gnutls_priorities %{?pcmk_gnutls_priorities}%{!?pcmk_gnutls_priorities:@SYSTEM} %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 # Python-related definitions
## Turn off auto-compilation of Python files outside Python specific paths, ## Turn off auto-compilation of Python files outside Python specific paths,
@ -70,41 +134,11 @@
sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g'; }) sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g'; })
%endif %endif
## Values that differ by Python major version ## Prefer Python 3 definitions explicitly, in case 2 is also available
%global python_path /usr/bin/python%{?python3_pkgversion}%{!?python3_pkgversion:3} %global python_name python3
%global python_pkg python3 %global python_path %{__python3}
%global python_min 3.2 %define python_site %{?python3_sitelib}%{!?python3_sitelib:%(
%define py_site %{?python3_sitelib}%{!?python3_sitelib:%( %{python_path} -c 'from distutils.sysconfig import get_python_lib as gpl; print(gpl(1))' 2>/dev/null)}
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 # Keep sane profiling data if requested
%if %{with profiling} %if %{with profiling}
@ -115,72 +149,86 @@
%endif %endif
%define pcmk_release %{specversion}
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: GPLv2+ and LGPLv2+
Url: http://www.clusterlabs.org Url: https://www.clusterlabs.org
# Hint: use "spectool -s 0 pacemaker.spec" (rpmdevtools) to check the final URL # You can use "spectool -s 0 pacemaker.spec" (rpmdevtools) to show final URL.
Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz Source0: https://codeload.github.com/%{github_owner}/%{name}/tar.gz/%{archive_github_url}
Source1: https://github.com/%{github_owner}/%{nagios_name}/archive/%{nagios_hash}/%{nagios_name}-%{nagios_hash}.tar.gz Source1: https://codeload.github.com/%{github_owner}/%{nagios_name}/tar.gz/%{nagios_archive_github_url}
# ---
Patch0: Build-fix-unability-to-build-with-Inkscape-1.0-beta-.patch # upstream commits
Patch0: 0001-Fix-tools-Don-t-output-null-in-crm_attribute-s-quiet.patch
Requires: resource-agents Requires: resource-agents
Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release} Requires: %{name}-cluster-libs = %{version}-%{release}
Requires: %{name}-cli = %{version}-%{release} Requires: %{name}-cli = %{version}-%{release}
%{?systemd_requires} %{?systemd_requires}
# Pacemaker requires a minimum Python functionality Requires: %{python_path}
Requires: %{python_pkg} >= %{python_min} BuildRequires: %{python_name}-devel
BuildRequires: %{python_pkg}-devel >= %{python_min}
# Pacemaker requires a minimum libqb functionality # Pacemaker requires a minimum libqb functionality
Requires: libqb >= 0.13.0 Requires: libqb >= 0.17.0
BuildRequires: libqb-devel >= 0.13.0 BuildRequires: libqb-devel >= 0.17.0
# Basics required for the build (even if usually satisfied through other BRs) # Required basic build tools
BuildRequires: coreutils findutils grep sed 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
# Required for core functionality # Required for core functionality
BuildRequires: automake autoconf gcc libtool pkgconfig libtool-ltdl-devel BuildRequires: pkgconfig(glib-2.0) >= 2.42
BuildRequires: pkgconfig(glib-2.0) >= 2.16 BuildRequires: libxml2-devel
BuildRequires: libxml2-devel libxslt-devel libuuid-devel BuildRequires: libxslt-devel
BuildRequires: bzip2-devel BuildRequires: libuuid-devel
BuildRequires: %{pkgname_bzip2_devel}
# Enables optional functionality # Enables optional functionality
BuildRequires: ncurses-devel docbook-style-xsl BuildRequires: pkgconfig(dbus-1)
BuildRequires: help2man gnutls-devel pam-devel 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: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
Requires: corosync >= 2.0.0 # RH patches are created by git, so we need git to apply them
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 BuildRequires: git
Provides: pcmk-cluster-manager = %{version}-%{release} Requires: corosync >= 2.0.0
Provides: pcmk-cluster-manager%{?_isa} = %{version}-%{release} BuildRequires: corosync-devel >= 2.0.0
# Pacemaker uses the crypto/md5 module from gnulib %if %{with stonithd}
Provides: bundled(gnulib) BuildRequires: %{pkgname_glue_libs}-devel
%endif
Provides: pcmk-cluster-manager = %{version}-%{release}
Provides: pcmk-cluster-manager = %{version}-%{release}
# Bundled bits
## Pacemaker uses the crypto/md5-buffer module from gnulib
Provides: bundled(gnulib) = 20200404
%description %description
Pacemaker is an advanced, scalable High-Availability cluster resource Pacemaker is an advanced, scalable High-Availability cluster resource
@ -194,17 +242,18 @@ 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) : coverage doc hardening pre_release profiling --with(out) : cibsecrets coverage doc hardening pre_release profiling
%package cli %package cli
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Summary: Command line tools for controlling Pacemaker clusters Summary: Command line tools for controlling Pacemaker clusters
Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
%if 0%{?fedora} > 22 || 0%{?rhel} > 7
Recommends: pcmk-cluster-manager = %{version}-%{release} Recommends: pcmk-cluster-manager = %{version}-%{release}
%endif # For crm_report
Recommends: tar
Recommends: bzip2
Requires: perl-TimeDate Requires: perl-TimeDate
Requires: procps-ng Requires: %{pkgname_procps}
Requires: psmisc Requires: psmisc
Requires(post):coreutils Requires(post):coreutils
@ -216,25 +265,29 @@ 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, to query and control the cluster from machines that may, or may not,
be part of the cluster. be part of the cluster.
%package libs %package -n %{pkgname_pcmk_libs}
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Summary: Core Pacemaker libraries Summary: Core Pacemaker libraries
Requires(pre): shadow-utils Requires(pre): %{pkgname_shadow_utils}
Requires: %{name}-schemas = %{version}-%{release} Requires: %{name}-schemas = %{version}-%{release}
# sbd 1.4.0+ supports the libpe_status API for pe_working_set_t # sbd 1.4.0+ supports the libpe_status API for pe_working_set_t
Conflicts: sbd < 1.4.0 # 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
%description libs %description -n %{pkgname_pcmk_libs}
Pacemaker is an advanced, scalable High-Availability cluster resource Pacemaker is an advanced, scalable High-Availability cluster resource
manager. manager.
The %{name}-libs package contains shared libraries needed for cluster 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: GPLv2+ and LGPLv2+
Summary: Cluster Libraries used by Pacemaker Summary: Cluster Libraries used by Pacemaker
Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
%description cluster-libs %description cluster-libs
Pacemaker is an advanced, scalable High-Availability cluster resource Pacemaker is an advanced, scalable High-Availability cluster resource
@ -245,14 +298,14 @@ libraries needed for nodes that will form part of the cluster nodes.
%package remote %package remote
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Summary: Pacemaker remote daemon for non-cluster nodes Summary: Pacemaker remote executor daemon for non-cluster nodes
Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Requires: %{name}-cli = %{version}-%{release} Requires: %{name}-cli = %{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}}
Provides: pcmk-cluster-manager = %{version}-%{release} Provides: pcmk-cluster-manager = %{version}-%{release}
Provides: pcmk-cluster-manager%{?_isa} = %{version}-%{release} Provides: pcmk-cluster-manager = %{version}-%{release}
%description remote %description remote
Pacemaker is an advanced, scalable High-Availability cluster resource Pacemaker is an advanced, scalable High-Availability cluster resource
@ -262,42 +315,51 @@ The %{name}-remote package contains the Pacemaker Remote daemon
which is capable of extending pacemaker functionality to remote 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 libs-devel %package -n %{pkgname_pcmk_libs}-devel
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Summary: Pacemaker development package Summary: Pacemaker development package
Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release} Requires: %{name}-cluster-libs = %{version}-%{release}
Requires: libtool-ltdl-devel libuuid-devel Requires: %{pkgname_bzip2_devel}
Requires: libxml2-devel%{?_isa} libxslt-devel%{?_isa} Requires: corosync-devel >= 2.0.0
Requires: bzip2-devel%{?_isa} glib2-devel%{?_isa} Requires: glib2-devel
Requires: libqb-devel%{?_isa} Requires: libqb-devel
Requires: corosynclib-devel%{?_isa} >= 2.0.0 %if %{defined pkgname_libtool_devel_arch}
Requires: %{?pkgname_libtool_devel_arch}
%endif
Requires: libuuid-devel
Requires: libxml2-devel
Requires: libxslt-devel
%description libs-devel %description -n %{pkgname_pcmk_libs}-devel
Pacemaker is an advanced, scalable High-Availability cluster resource Pacemaker is an advanced, scalable High-Availability cluster resource
manager. manager.
The %{name}-libs-devel package contains headers and shared libraries 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: GPLv2+ and LGPLv2+
Summary: Test framework for cluster-related technologies like Pacemaker Summary: Test framework for cluster-related technologies like Pacemaker
Requires: %{python_pkg} >= %{python_min} Requires: %{python_path}
Requires: %{name}-libs = %{version}-%{release} Requires: %{pkgname_pcmk_libs} = %{version}-%{release}
Requires: procps-ng Requires: %{name}-cli = %{version}-%{release}
Requires: %{pkgname_procps}
Requires: psmisc Requires: psmisc
BuildArch: noarch BuildArch: noarch
Requires: %{python_pkg}-systemd # systemd Python bindings are a separate package in some distros
Requires: %{python_name}-systemd
%description cts %description cts
Test framework for cluster-related technologies like Pacemaker Test framework for cluster-related technologies like Pacemaker
%package doc %package doc
License: CC-BY-SA License: CC-BY-SA-4.0
Summary: Documentation for Pacemaker Summary: Documentation for Pacemaker
BuildArch: noarch BuildArch: noarch
Conflicts: %{name}-libs > %{version}-%{release}
Conflicts: %{name}-libs < %{version}-%{release}
%description doc %description doc
Documentation for Pacemaker. Documentation for Pacemaker.
@ -321,11 +383,11 @@ License: GPLv3
Summary: Pacemaker Nagios Metadata Summary: Pacemaker Nagios Metadata
BuildArch: noarch BuildArch: noarch
# NOTE below are the plugins this metadata uses. # NOTE below are the plugins this metadata uses.
Requires: nagios-plugins-http # Requires: nagios-plugins-http
Requires: nagios-plugins-ldap # Requires: nagios-plugins-ldap
Requires: nagios-plugins-mysql # Requires: nagios-plugins-mysql
Requires: nagios-plugins-pgsql # Requires: nagios-plugins-pgsql
Requires: nagios-plugins-tcp # Requires: nagios-plugins-tcp
Requires: pcmk-cluster-manager Requires: pcmk-cluster-manager
%description nagios-plugins-metadata %description nagios-plugins-metadata
@ -333,16 +395,13 @@ The metadata files required for Pacemaker to execute the nagios plugin
monitor resources. monitor resources.
%prep %prep
%setup -q -a 1 -n %{name}-%{commit} %autosetup -a 1 -n %{name}-%{archive_version} -S git_am -p 1
%global __scm git_am # in f33 s390x complains but shouldn't hurt globally
%__scm_setup_git # as configure.ac is checking for support
%autopatch -p1 sed -i configure.ac -e "s/-Wall/-Wall -Wno-format-truncation/"
%build %build
# Early versions of autotools (e.g. RHEL <= 5) do not support --docdir
export docdir=%{pcmk_docdir}
export systemdsystemunitdir=%{?_unitdir}%{!?_unitdir:no} export systemdsystemunitdir=%{?_unitdir}%{!?_unitdir:no}
%if %{with hardening} %if %{with hardening}
@ -359,29 +418,33 @@ export LDFLAGS_HARDENED_LIB="%{?_hardening_ldflags}"
./autogen.sh ./autogen.sh
# Rawhide glibc doesn't like ftime at all
export CPPFLAGS="-UPCMK_TIME_EMERGENCY_CGT $CPPFLAGS"
%{configure} \ %{configure} \
PYTHON=%{python_path} \ PYTHON=%{python_path} \
%{!?with_hardening: --disable-hardening} \ %{!?with_hardening: --disable-hardening} \
%{!?with_legacy_links: --disable-legacy-links} \ %{?with_legacy_links: --enable-legacy-links} \
%{?with_profiling: --with-profiling} \ %{?with_profiling: --with-profiling} \
%{?with_coverage: --with-coverage} \ %{?with_cibsecrets: --with-cibsecrets} \
%{!?with_doc: --with-brand=} \ %{?with_nls: --enable-nls} \
%{?with_sbd_sync: --with-sbd-sync-default="true"} \
%{?gnutls_priorities: --with-gnutls-priorities="%{gnutls_priorities}"} \ %{?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-initdir=%{_initrddir} \
--with-runstatedir=%{_rundir} \ --with-runstatedir=%{_rundir} \
--localstatedir=%{_var} \ --localstatedir=%{_var} \
--with-version=%{version}-%{release} \ --with-nagios \
--with-bug-url=https://bugz.fedoraproject.org/%{name} \ --with-nagios-metadata-dir=%{_datadir}/pacemaker/nagios/plugins-metadata/ \
--with-nagios \ --with-nagios-plugin-dir=%{_libdir}/nagios/plugins/ \
--with-nagios-metadata-dir=%{_datadir}/pacemaker/nagios/plugins-metadata/ \ --with-version=%{version}-%{release}
--with-nagios-plugin-dir=%{_libdir}/nagios/plugins/
make %{_smp_mflags} V=1 make %{_smp_mflags} V=1
%check %check
make %{_smp_mflags} check
{ cts/cts-scheduler --run load-stopped-loop \ { cts/cts-scheduler --run load-stopped-loop \
&& cts/cts-cli \ && cts/cts-cli \
&& touch .CHECKED && touch .CHECKED
@ -397,10 +460,6 @@ 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}}
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 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
@ -409,11 +468,7 @@ done
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/rpm-state/%{name} mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/rpm-state/%{name}
# These are not actually scripts # Don't package libtool archives
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 find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f
# Do not package these either # Do not package these either
@ -426,28 +481,14 @@ rm -f %{buildroot}/%{_mandir}/man8/fence_legacy.*
rm -f %{buildroot}/%{_sbindir}/notifyServicelogEvent rm -f %{buildroot}/%{_sbindir}/notifyServicelogEvent
rm -f %{buildroot}/%{_sbindir}/ipmiservicelogd 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 # Byte-compile Python sources where suitable and the distro procedures known
%if %{defined py_byte_compile} && %{defined python_path} %if %{defined py_byte_compile}
%{py_byte_compile %{python_path} %{buildroot}%{_datadir}/pacemaker/tests} %{py_byte_compile %{python_path} %{buildroot}%{_datadir}/pacemaker/tests}
%if !%{defined _python_bytecompile_extra} %if !%{defined _python_bytecompile_extra}
%{py_byte_compile %{python_path} %{buildroot}%{py_site}/cts} %{py_byte_compile %{python_path} %{buildroot}%{python_site}/cts}
%endif %endif
%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 %post
%systemd_post pacemaker.service %systemd_post pacemaker.service
@ -494,7 +535,7 @@ fi
%post cli %post cli
%systemd_post crm_mon.service %systemd_post crm_mon.service
if [ "$1" = 2 ]; then if [ "$1" -eq 2 ]; then
# Package upgrade, not initial install: # Package upgrade, not initial install:
# Move any pre-2.0 logs to new location to ensure they get rotated # Move any pre-2.0 logs to new location to ensure they get rotated
{ mv -fbS.rpmsave %{_var}/log/pacemaker.log* %{_var}/log/pacemaker \ { mv -fbS.rpmsave %{_var}/log/pacemaker.log* %{_var}/log/pacemaker \
@ -508,15 +549,14 @@ fi
%postun cli %postun cli
%systemd_postun_with_restart crm_mon.service %systemd_postun_with_restart crm_mon.service
%pre libs %pre -n %{pkgname_pcmk_libs}
# XXX keep an eye on https://fedoraproject.org/wiki/Changes/SystemdSysusers # @TODO Use sysusers.d:
# reopened recently: # https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/AETGESYR4IEQJMA6SKL7OERSDZFWFNEU/ getent group %{gname} >/dev/null || groupadd -r %{gname} -g %{hacluster_id}
getent group %{gname} >/dev/null || groupadd -r %{gname} -g 189 getent passwd %{uname} >/dev/null || useradd -r -g %{gname} -u %{hacluster_id} -s /sbin/nologin -c "cluster user" %{uname}
getent passwd %{uname} >/dev/null || useradd -r -g %{gname} -u 189 -s /sbin/nologin -c "cluster user" %{uname}
exit 0 exit 0
%ldconfig_scriptlets libs %ldconfig_scriptlets -n %{pkgname_pcmk_libs}
%ldconfig_scriptlets cluster-libs %ldconfig_scriptlets cluster-libs
%files %files
@ -531,21 +571,19 @@ exit 0
%exclude %{_libexecdir}/pacemaker/cts-log-watcher %exclude %{_libexecdir}/pacemaker/cts-log-watcher
%exclude %{_libexecdir}/pacemaker/cts-support %exclude %{_libexecdir}/pacemaker/cts-support
%exclude %{_sbindir}/pacemaker-remoted %exclude %{_sbindir}/pacemaker-remoted
%if %{with legacy_links}
%exclude %{_sbindir}/pacemaker_remoted %exclude %{_sbindir}/pacemaker_remoted
%endif
%{_libexecdir}/pacemaker/* %{_libexecdir}/pacemaker/*
%{_sbindir}/crm_attribute
%{_sbindir}/crm_master %{_sbindir}/crm_master
%{_sbindir}/fence_watchdog
%doc %{_mandir}/man7/pacemaker-controld.* %doc %{_mandir}/man7/pacemaker-controld.*
%doc %{_mandir}/man7/pacemaker-schedulerd.* %doc %{_mandir}/man7/pacemaker-schedulerd.*
%doc %{_mandir}/man7/pacemaker-fenced.* %doc %{_mandir}/man7/pacemaker-fenced.*
%doc %{_mandir}/man7/ocf_pacemaker_controld.* %doc %{_mandir}/man7/ocf_pacemaker_controld.*
%doc %{_mandir}/man7/ocf_pacemaker_remote.* %doc %{_mandir}/man7/ocf_pacemaker_remote.*
%doc %{_mandir}/man8/crm_attribute.*
%doc %{_mandir}/man8/crm_master.* %doc %{_mandir}/man8/crm_master.*
%doc %{_mandir}/man8/fence_watchdog.*
%doc %{_mandir}/man8/pacemakerd.* %doc %{_mandir}/man8/pacemakerd.*
%doc %{_datadir}/pacemaker/alerts %doc %{_datadir}/pacemaker/alerts
@ -556,8 +594,8 @@ exit 0
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/cib %dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/cib
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/pengine %dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pacemaker/pengine
/usr/lib/ocf/resource.d/pacemaker/controld %{ocf_root}/resource.d/pacemaker/controld
/usr/lib/ocf/resource.d/pacemaker/remote %{ocf_root}/resource.d/pacemaker/remote
%files cli %files cli
%dir %attr (750, root, %{gname}) %{_sysconfdir}/pacemaker %dir %attr (750, root, %{gname}) %{_sysconfdir}/pacemaker
@ -568,6 +606,10 @@ exit 0
%{_sbindir}/attrd_updater %{_sbindir}/attrd_updater
%{_sbindir}/cibadmin %{_sbindir}/cibadmin
%if %{with cibsecrets}
%{_sbindir}/cibsecret
%endif
%{_sbindir}/crm_attribute
%{_sbindir}/crm_diff %{_sbindir}/crm_diff
%{_sbindir}/crm_error %{_sbindir}/crm_error
%{_sbindir}/crm_failcount %{_sbindir}/crm_failcount
@ -590,13 +632,13 @@ exit 0
# XXX "dirname" is not owned by any prerequisite # XXX "dirname" is not owned by any prerequisite
%{_datadir}/snmp/mibs/PCMK-MIB.txt %{_datadir}/snmp/mibs/PCMK-MIB.txt
%exclude /usr/lib/ocf/resource.d/pacemaker/controld %exclude %{ocf_root}/resource.d/pacemaker/controld
%exclude /usr/lib/ocf/resource.d/pacemaker/o2cb %exclude %{ocf_root}/resource.d/pacemaker/o2cb
%exclude /usr/lib/ocf/resource.d/pacemaker/remote %exclude %{ocf_root}/resource.d/pacemaker/remote
%dir /usr/lib/ocf %dir %{ocf_root}
%dir /usr/lib/ocf/resource.d %dir %{ocf_root}/resource.d
/usr/lib/ocf/resource.d/pacemaker %{ocf_root}/resource.d/pacemaker
%doc %{_mandir}/man7/* %doc %{_mandir}/man7/*
%exclude %{_mandir}/man7/pacemaker-controld.* %exclude %{_mandir}/man7/pacemaker-controld.*
@ -606,9 +648,8 @@ exit 0
%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/*
%exclude %{_mandir}/man8/crm_attribute.*
%exclude %{_mandir}/man8/crm_master.* %exclude %{_mandir}/man8/crm_master.*
%exclude %{_mandir}/man8/fence_legacy.* %exclude %{_mandir}/man8/fence_watchdog.*
%exclude %{_mandir}/man8/pacemakerd.* %exclude %{_mandir}/man8/pacemakerd.*
%exclude %{_mandir}/man8/pacemaker-remoted.* %exclude %{_mandir}/man8/pacemaker-remoted.*
@ -622,7 +663,7 @@ exit 0
%dir %attr (770, %{uname}, %{gname}) %{_var}/log/pacemaker %dir %attr (770, %{uname}, %{gname}) %{_var}/log/pacemaker
%dir %attr (770, %{uname}, %{gname}) %{_var}/log/pacemaker/bundles %dir %attr (770, %{uname}, %{gname}) %{_var}/log/pacemaker/bundles
%files libs %files -n %{pkgname_pcmk_libs} %{?with_nls:-f %{name}.lang}
%{_libdir}/libcib.so.* %{_libdir}/libcib.so.*
%{_libdir}/liblrmd.so.* %{_libdir}/liblrmd.so.*
%{_libdir}/libcrmservice.so.* %{_libdir}/libcrmservice.so.*
@ -650,9 +691,7 @@ exit 0
%{_unitdir}/pacemaker_remote.service %{_unitdir}/pacemaker_remote.service
%{_sbindir}/pacemaker-remoted %{_sbindir}/pacemaker-remoted
%if %{with legacy_links}
%{_sbindir}/pacemaker_remoted %{_sbindir}/pacemaker_remoted
%endif
%{_mandir}/man8/pacemaker-remoted.* %{_mandir}/man8/pacemaker-remoted.*
%license licenses/GPLv2 %license licenses/GPLv2
%doc COPYING %doc COPYING
@ -663,7 +702,7 @@ exit 0
%license licenses/CC-BY-SA-4.0 %license licenses/CC-BY-SA-4.0
%files cts %files cts
%{py_site}/cts %{python_site}/cts
%{_datadir}/pacemaker/tests %{_datadir}/pacemaker/tests
%{_libexecdir}/pacemaker/cts-log-watcher %{_libexecdir}/pacemaker/cts-log-watcher
@ -673,12 +712,9 @@ exit 0
%doc COPYING %doc COPYING
%doc ChangeLog %doc ChangeLog
%files libs-devel %files -n %{pkgname_pcmk_libs}-devel
%{_includedir}/pacemaker %{_includedir}/pacemaker
%{_libdir}/*.so %{_libdir}/*.so
%if %{with coverage}
%{_var}/lib/pacemaker/gcov
%endif
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%license licenses/LGPLv2.1 %license licenses/LGPLv2.1
%doc COPYING %doc COPYING
@ -690,6 +726,7 @@ exit 0
%{_datadir}/pacemaker/*.rng %{_datadir}/pacemaker/*.rng
%{_datadir}/pacemaker/*.xsl %{_datadir}/pacemaker/*.xsl
%{_datadir}/pacemaker/api %{_datadir}/pacemaker/api
%{_datadir}/pacemaker/base
%{_datadir}/pkgconfig/pacemaker-schemas.pc %{_datadir}/pkgconfig/pacemaker-schemas.pc
%files nagios-plugins-metadata %files nagios-plugins-metadata
@ -699,6 +736,21 @@ exit 0
%license %{nagios_name}-%{nagios_hash}/COPYING %license %{nagios_name}-%{nagios_hash}/COPYING
%changelog %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 * Thu Nov 05 2020 jiangxinyu <jiangxinyu@kylinos.cn> - 2.0.3-1
- Upgrade the pacemaker package version to 2.0.3-1 - Upgrade the pacemaker package version to 2.0.3-1