2.0.1-0.1.rc3 - Update for new upstream tarball

...for release candidate: Pacemaker-2.0.1-rc3,
  for full details, see included ChangeLog file or
  https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.0.1-rc3

Adapt spec file more akin to upstream version including:
. split a dedicated, noarch -schemas package (c6a87bd86)
. make static dependencies on inner libraries arch-specific (14bfff68e)
. weak co-dependence of -cli with -remote & pacemaker proper (73e2c94a3)
. declare bundled gnulib (d57aa84c1)

Move stonith_admin to -cli where it belongs, since it doesn't require
  -cluster-libs (considered by upstream)

Apply patches to restore basic buildability (still without much run-time
  reproducibility guarantees compared to what's been customary prior to glib
  v2.59.0+ that may now get run-time linked upon its fresh installation/update,
  but this applies also to whatever older version of pacemaker, and wasn't
  discovered until now; cf. https://github.com/ClusterLabs/pacemaker/pull/1677)

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
This commit is contained in:
Jan Pokorný 2019-01-20 12:01:24 +01:00
parent 1471429b4d
commit 8a22ec78ab
No known key found for this signature in database
GPG Key ID: 61BBB23A9E8F8DE2
4 changed files with 154 additions and 27 deletions

View File

@ -0,0 +1,66 @@
From 286569c1a2359a97ad33f77b3b6b63b04d520b76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
Date: Sat, 19 Jan 2019 22:18:37 +0100
Subject: [PATCH] Revert "Tests: cts-cli: Use extended regular expressions."
This reverts commit 48f59e65223e018f4a639c4c9c155cb62e7806a9, because
while it's true that GNU sed supports -E switch _now_, it wasn't the
case until about v4.1.5+ (silently, see 3a8e165, and explicitly since
v4.3, see 8b65e07), meaning that, for instance, RHEL 7 doesn't
officially supports it (as sad as it is):
https://bugzilla.redhat.com/show_bug.cgi?id=1564789
Also note that while there was an effort to standardize -E switch
in POSIX (http://austingroupbugs.net/view.php?id=528) it may have passed
without any affect so far (speaking of "2018 edition"):
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
Definitely, it wasn't in IEEE Std 1003.1-2008 that, moreover, we don't
take for granted even 10+ years later (cf. ongoing parallel discussion
whether and how to check for %m specifier to scanf(3)), the change at
hand is not anything else but invalid. Also, -E implementation may
have been faulty until sed v4.5:
https://lists.gnu.org/archive/html/info-gnu/2018-04/msg00000.html
Note that one can make do without extended regular expressions, and in
turn, without '+' (or '\+' that is just a GNU-specific extension into
basic regular expressions syntax), since the respective substitute
can be used: "a+" ~ "aa*" (can be hefty for long patterns, but that's
what we reliably have).
---
cts/cts-cli.in | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/cts/cts-cli.in b/cts/cts-cli.in
index e48d644574..34c094e76c 100755
--- a/cts/cts-cli.in
+++ b/cts/cts-cli.in
@@ -924,22 +924,21 @@ for t in $tests; do
eval TMPFILE_$t="$TMPFILE"
test_$t > "$TMPFILE"
- sed -E \
- -e 's/cib-last-written.*>/>/'\
+ sed -e 's/cib-last-written.*>/>/'\
-e 's/ last-run=\"[0-9]*\"//'\
-e 's/crm_feature_set="[^"]*" //'\
-e 's/validate-with="[^"]*" //'\
-e 's/Created new pacemaker-.* configuration/Created new pacemaker configuration/'\
- -e 's/.*(pcmk__.*)@.*.c:[0-9][0-9]*\)/\1/g' \
- -e 's/.*(unpack_.*)@.*.c:[0-9][0-9]*\)/\1/g' \
- -e 's/.*(update_validation)@.*\.c:[0-9][0-9]*\)/\1/g' \
- -e 's/.*(apply_upgrade)@.*\.c:[0-9][0-9]*\)/\1/g' \
+ -e 's/.*\(pcmk__.*\)@.*\.c:[0-9][0-9]*)/\1/g' \
+ -e 's/.*\(unpack_.*\)@.*\.c:[0-9][0-9]*)/\1/g' \
+ -e 's/.*\(update_validation\)@.*\.c:[0-9][0-9]*)/\1/g' \
+ -e 's/.*\(apply_upgrade\)@.*\.c:[0-9][0-9]*)/\1/g' \
-e 's/ last-rc-change=\"[0-9]*\"//'\
-e 's|^/tmp/cts-cli\.validity\.bad.xml\.[^:]*:|validity.bad.xml:|'\
-e 's/^Entity: line [0-9][0-9]*: //'\
- -e 's/(validation \([0-9][0-9]* of )[0-9][0-9]*(\).*)/\1X\2/' \
+ -e 's/\(validation ([0-9][0-9]* of \)[0-9][0-9]*\().*\)/\1X\2/' \
-e 's/^Migration will take effect until: .*/Migration will take effect until:/' \
- -e 's/ end=\"[-: 0123456789]+Z?\"/ end=\"\"/' \
+ -e 's/ end=\"[-: 0123456789]*Z\?\"/ end=\"\"/' \
"$TMPFILE" > "${TMPFILE}.$$"
mv -- "${TMPFILE}.$$" "$TMPFILE"

View File

@ -0,0 +1,27 @@
From 86ba5e63eff051aa01b4872cee97896aecf38ef9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
Date: Sat, 19 Jan 2019 23:17:11 +0100
Subject: [PATCH] Tests: cts-cli: simplify+fix regexp to catch
crm_time_as_string's output
Previously, the cts-cli would only work with a zero-offset time zone
(suggesting that it was only run in the CI that may be expected to
have it like that). Also drop the atypical enumeration of all digits
vs. range capture.
---
cts/cts-cli.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cts/cts-cli.in b/cts/cts-cli.in
index 34c094e76c..093dbcfa3a 100755
--- a/cts/cts-cli.in
+++ b/cts/cts-cli.in
@@ -938,7 +938,7 @@ for t in $tests; do
-e 's/^Entity: line [0-9][0-9]*: //'\
-e 's/\(validation ([0-9][0-9]* of \)[0-9][0-9]*\().*\)/\1X\2/' \
-e 's/^Migration will take effect until: .*/Migration will take effect until:/' \
- -e 's/ end=\"[-: 0123456789]*Z\?\"/ end=\"\"/' \
+ -e 's/ end=\"[0-9][-+: 0-9]*Z\?\"/ end=\"\"/' \
"$TMPFILE" > "${TMPFILE}.$$"
mv -- "${TMPFILE}.$$" "$TMPFILE"

View File

@ -13,12 +13,12 @@
## 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.0.0
%global specversion 4
%global pcmkversion 2.0.1
%global specversion 1
## 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.0
%global commit Pacemaker-2.0.1-rc3
## 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
@ -145,13 +145,13 @@ Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{na
Source1: https://github.com/%{github_owner}/%{nagios_name}/archive/%{nagios_hash}/%{nagios_name}-%{nagios_hash}.tar.gz
# ---
# patches go here
Patch0: rhbz1611631.patch
Patch1: https://github.com/ClusterLabs/pacemaker/commit/9dc14b55077567099a13b71ac87816f608b044a9.patch
Patch0: https://github.com/%{github_owner}/%{name}/pull/1677/commits/286569c1a2359a97ad33f77b3b6b63b04d520b76.patch#/10-Revert-Tests-cts-cli-Use-extended-regular-expression.patch
Patch1: https://github.com/%{github_owner}/%{name}/pull/1677/commits/86ba5e63eff051aa01b4872cee97896aecf38ef9.patch#/11-Tests-cts-cli-simplify-fix-regexp-to-catch-crm_time_.patch
#Patch2: .../pull/1677/commits/ef8bd8d29d34a4cea1460bb3e0837996dc08510d.patch#/12-Build-configure-cts_scheduler-allow-skipping-broken-.patch
Provides: pcmk-cluster-manager
Requires: resource-agents
Requires: %{name}-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}
@ -194,6 +194,12 @@ BuildRequires: asciidoc inkscape publican
# git-style patch application
BuildRequires: git
Provides: pcmk-cluster-manager = %{version}-%{release}
Provides: pcmk-cluster-manager%{?_isa} = %{version}-%{release}
# Pacemaker uses the crypto/md5 module from gnulib
Provides: bundled(gnulib)
%description
Pacemaker is an advanced, scalable High-Availability cluster resource
manager.
@ -212,7 +218,10 @@ Available rpmbuild rebuild options:
License: GPLv2+ and LGPLv2+
Summary: Command line tools for controlling Pacemaker clusters
Group: System Environment/Daemons
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%if 0%{?fedora} > 22 || 0%{?rhel} > 7
Recommends: pcmk-cluster-manager = %{version}-%{release}
%endif
Requires: perl-TimeDate
Requires: procps-ng
Requires: psmisc
@ -231,6 +240,7 @@ License: GPLv2+ and LGPLv2+
Summary: Core Pacemaker libraries
Group: System Environment/Daemons
Requires(pre): shadow-utils
Requires: %{name}-schemas = %{version}-%{release}
%description libs
Pacemaker is an advanced, scalable High-Availability cluster resource
@ -243,7 +253,7 @@ nodes and those just running the CLI tools.
License: GPLv2+ and LGPLv2+
Summary: Cluster Libraries used by Pacemaker
Group: System Environment/Daemons
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description cluster-libs
Pacemaker is an advanced, scalable High-Availability cluster resource
@ -256,12 +266,13 @@ libraries needed for nodes that will form part of the cluster nodes.
License: GPLv2+ and LGPLv2+
Summary: Pacemaker remote daemon for non-cluster nodes
Group: System Environment/Daemons
Provides: pcmk-cluster-manager
Requires: %{name}-libs = %{version}-%{release}
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%{?_isa} = %{version}-%{release}
%description remote
Pacemaker is an advanced, scalable High-Availability cluster resource
@ -275,7 +286,6 @@ nodes not running the full corosync/cluster stack.
License: GPLv2+ and LGPLv2+
Summary: Pacemaker development package
Group: Development/Libraries
Requires: %{name}-cts = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release}
Requires: libtool-ltdl-devel%{?_isa} libuuid-devel%{?_isa}
@ -318,6 +328,17 @@ Documentation for Pacemaker.
Pacemaker is an advanced, scalable High-Availability cluster resource
manager.
%package schemas
License: GPLv2+
Summary: Schemas and upgrade stylesheets for Pacemaker
BuildArch: noarch
%description schemas
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
@ -380,7 +401,7 @@ export LDFLAGS_HARDENED_LIB="%{?_hardening_ldflags}"
make %{_smp_mflags} V=1 all
%check
{ cts/cts-scheduler --run one-or-more-unrunnable-instances \
{ cts/cts-scheduler --run load-stopped-loop \
&& cts/cts-cli \
&& touch .CHECKED
} 2>&1 | sed 's/[fF]ail/faiil/g' # prevent false positives in rpmlint
@ -507,15 +528,6 @@ fi
%postun cli
%systemd_postun_with_restart crm_mon.service
%post cts
%systemd_post pacemaker-cts-dummyd@.service
%preun cts
%systemd_preun pacemaker-cts-dummyd@.service
%postun cts
%systemd_postun_with_restart pacemaker-cts-dummyd@.service
%pre libs
# XXX keep an eye on https://fedoraproject.org/wiki/Changes/SystemdSysusers
# reopened recently:
@ -546,7 +558,6 @@ exit 0
%{_sbindir}/crm_attribute
%{_sbindir}/crm_master
%{_sbindir}/stonith_admin
%doc %{_mandir}/man7/pacemaker-controld.*
%doc %{_mandir}/man7/pacemaker-schedulerd.*
@ -556,7 +567,6 @@ exit 0
%doc %{_mandir}/man8/crm_attribute.*
%doc %{_mandir}/man8/crm_master.*
%doc %{_mandir}/man8/pacemakerd.*
%doc %{_mandir}/man8/stonith_admin.*
%doc %{_datadir}/pacemaker/alerts
@ -592,9 +602,12 @@ exit 0
%{_sbindir}/crm_simulate
%{_sbindir}/crm_report
%{_sbindir}/crm_ticket
%{_sbindir}/stonith_admin
%exclude %{_datadir}/pacemaker/alerts
%exclude %{_datadir}/pacemaker/tests
%{_datadir}/pacemaker
%exclude %{_datadir}/pacemaker/*.rng
%exclude %{_datadir}/pacemaker/*.xsl
%{_datadir}/snmp/mibs/PCMK-MIB.txt
%exclude /usr/lib/ocf/resource.d/pacemaker/controld
@ -618,7 +631,6 @@ exit 0
%exclude %{_mandir}/man8/fence_legacy.*
%exclude %{_mandir}/man8/pacemakerd.*
%exclude %{_mandir}/man8/pacemaker-remoted.*
%exclude %{_mandir}/man8/stonith_admin.*
%license licenses/GPLv2
%doc COPYING
@ -693,12 +705,34 @@ exit 0
%doc COPYING
%doc ChangeLog
%files schemas
%license licenses/GPLv2
%{_datadir}/pacemaker/*.rng
%{_datadir}/pacemaker/*.xsl
%files nagios-plugins-metadata
%dir %{_datadir}/pacemaker/nagios/plugins-metadata
%attr(0644,root,root) %{_datadir}/pacemaker/nagios/plugins-metadata/*
%license %{nagios_name}-%{nagios_hash}/COPYING
%changelog
* Sun Jan 20 2019 Jan Pokorný <jpokorny+rpm-pacemaker@redhat.com> - 2.0.1-0.1.rc3
- Update for new upstream tarball for release candidate: Pacemaker-2.0.1-rc3,
for full details, see included ChangeLog file or
https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.0.1-rc3
- Adapt spec file more akin to upstream version including:
. split a dedicated, noarch -schemas package (c6a87bd86)
. make static dependencies on inner libraries arch-specific (14bfff68e)
. weak co-dependence of -cli with -remote & pacemaker proper (73e2c94a3)
. declare bundled gnulib (d57aa84c1)
- Move stonith_admin to -cli where it belongs, since it doesn't require
-cluster-libs (considered by upstream)
- Apply patches to restore basic buildability (still without much run-time
reproducibility guarantees compared to what's been customary prior to glib
v2.59.0+ that may now get run-time linked upon its fresh installation/update,
but this applies also to whatever older version of pacemaker, and wasn't
discovered until now; cf. https://github.com/ClusterLabs/pacemaker/pull/1677)
* Thu Aug 23 2018 Jan Pokorný <jpokorny+rpm-pacemaker@redhat.com> - 2.0.0-4
- Sanitize/generalize approach to Python byte-compilation, so that also
out-of-Python-path *.py files (%%{_datadir}/pacemaker/tests/cts/CTSlab.py

View File

@ -1,2 +1,2 @@
SHA512 (pacemaker-2.0.0.tar.gz) = 45e6880b06998a0f196e7ce5322bd288bda3801ee3009136b49d463cd85e6b9f4dfa4c83f823a355b92f2d02ff0b1f507f8f6b5f42da86ef0fe7421fbfd0027e
SHA512 (pacemaker-2.0.1-rc3.tar.gz) = a51f65cad2ac24cae675d648ad20d8eb6618373b29b1a78e8d755cb3928429d40b85b965e042d69da5d89bc97437292a930883cabebca6e6c579863a6ff3207a
SHA512 (nagios-agents-metadata-105ab8a7b2c16b9a29cf1c1596b80136eeef332b.tar.gz) = 11ddeb48a4929e7642b6dfa9c7962aa1d7a1af1c569830f55ed6cd6773abac13377317327bc1db8411c8077884f83f81cc54d746c834b63a99fa6dc219b5caad