* Wed Oct 26 2022 Klaus Wenninger <kwenning@redhat.com> - 2.1.5-0.1.rc1

- Update for new upstream tarball for release candidate: Pacemaker-2.1.5-rc1,
  for full details, see included ChangeLog file or
  https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.5-rc1
- add patch to fix 32 bit issue with cmocka
This commit is contained in:
Klaus Wenninger 2022-11-08 21:27:51 +01:00
parent 65d3d0a374
commit 059b7a7411
4 changed files with 122 additions and 47 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,105 @@
From d57379d2a2e0da585b101911abbe7bfbb571ce90 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Mon, 7 Nov 2022 15:31:00 -0500
Subject: [PATCH] Tests: Fix running pcmk__procfs_pid2path_test on i686.
The expect_value/check_expected_ptr combo from cmocka fails on i686, but
only if the pointer in question is a statically declared buffer. In
this case, somewhere in the giant pile of casting that occurs in cmocka,
one of the variable or expected value ends up a 32-bit quantity while
the other ends up a 64-bit quantity. The comparison then fails.
Changing these variables into dynamically allocated buffers makes
everything work out fine. This is necessary to get builds working
again.
---
.../tests/procfs/pcmk__procfs_pid2path_test.c | 27 ++++++++++++++--------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/lib/common/tests/procfs/pcmk__procfs_pid2path_test.c b/lib/common/tests/procfs/pcmk__procfs_pid2path_test.c
index 97c7eb4..4b5e240 100644
--- a/lib/common/tests/procfs/pcmk__procfs_pid2path_test.c
+++ b/lib/common/tests/procfs/pcmk__procfs_pid2path_test.c
@@ -20,61 +20,70 @@
static void
no_exe_file(void **state)
{
- char path[PATH_MAX];
+ size_t len = PATH_MAX;
+ char *path = calloc(len, sizeof(char));
// Set readlink() errno and link contents
pcmk__mock_readlink = true;
expect_string(__wrap_readlink, path, "/proc/1000/exe");
expect_value(__wrap_readlink, buf, path);
- expect_value(__wrap_readlink, bufsize, sizeof(path) - 1);
+ expect_value(__wrap_readlink, bufsize, len - 1);
will_return(__wrap_readlink, ENOENT);
will_return(__wrap_readlink, NULL);
- assert_int_equal(pcmk__procfs_pid2path(1000, path, sizeof(path)), ENOENT);
+ assert_int_equal(pcmk__procfs_pid2path(1000, path, len), ENOENT);
pcmk__mock_readlink = false;
+
+ free(path);
}
static void
contents_too_long(void **state)
{
- char path[10];
+ size_t len = 10;
+ char *path = calloc(len, sizeof(char));
// Set readlink() errno and link contents
pcmk__mock_readlink = true;
expect_string(__wrap_readlink, path, "/proc/1000/exe");
expect_value(__wrap_readlink, buf, path);
- expect_value(__wrap_readlink, bufsize, sizeof(path) - 1);
+ expect_value(__wrap_readlink, bufsize, len - 1);
will_return(__wrap_readlink, 0);
will_return(__wrap_readlink, "/more/than/10/characters");
- assert_int_equal(pcmk__procfs_pid2path(1000, path, sizeof(path)),
+ assert_int_equal(pcmk__procfs_pid2path(1000, path, len),
ENAMETOOLONG);
pcmk__mock_readlink = false;
+
+ free(path);
}
static void
contents_ok(void **state)
{
- char path[PATH_MAX];
+ size_t len = PATH_MAX;
+ char *path = calloc(len, sizeof(char));
// Set readlink() errno and link contents
pcmk__mock_readlink = true;
expect_string(__wrap_readlink, path, "/proc/1000/exe");
expect_value(__wrap_readlink, buf, path);
- expect_value(__wrap_readlink, bufsize, sizeof(path) - 1);
+ expect_value(__wrap_readlink, bufsize, len - 1);
will_return(__wrap_readlink, 0);
will_return(__wrap_readlink, "/ok");
- assert_int_equal(pcmk__procfs_pid2path((pid_t) 1000, path, sizeof(path)),
+ assert_int_equal(pcmk__procfs_pid2path((pid_t) 1000, path, len),
pcmk_rc_ok);
assert_string_equal(path, "/ok");
pcmk__mock_readlink = false;
+
+ free(path);
}
PCMK__UNIT_TEST(NULL, NULL,
--
1.8.3.1

View File

@ -31,11 +31,11 @@
## 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 specversion 4
%global pcmkversion 2.1.5
%global specversion 0.1.rc1
## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
%global commit dc6eb4362e67c1497a413434eba097063bf1ef83
%global commit 844c0640d99780fd7c98ec0f0fa7ccf806cbee24
## 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.
@ -201,7 +201,7 @@
Name: pacemaker
Summary: Scalable High-Availability cluster resource manager
Version: %{pcmkversion}
Release: %{pcmk_release}%{?dist}.1
Release: %{pcmk_release}%{?dist}
License: GPLv2+ and LGPLv2+
Url: https://www.clusterlabs.org/
@ -217,7 +217,8 @@ Source0: https://codeload.github.com/%{github_owner}/%{name}/tar.gz/%{arch
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
Patch0: 0001-Tests-Fix-running-pcmk__procfs_pid2path_test-on-i686.patch
Requires: resource-agents
Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release}
@ -292,6 +293,9 @@ BuildRequires: inkscape
BuildRequires: %{python_name}-sphinx
%endif
# Booth requires this
Provides: pacemaker-ticket-support = 2.0
Provides: pcmk-cluster-manager = %{version}-%{release}
Provides: pcmk-cluster-manager%{?_isa} = %{version}-%{release}
@ -326,6 +330,7 @@ Recommends: bzip2
Requires: perl-TimeDate
Requires: %{pkgname_procps}
Requires: psmisc
Requires: %{python_name}-psutil
Requires(post):coreutils
%description cli
@ -550,12 +555,6 @@ find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f
rm -f %{buildroot}/%{_sbindir}/fence_legacy
rm -f %{buildroot}/%{_mandir}/man8/fence_legacy.*
# For now, don't package the servicelog-related binaries built only for
# ppc64le when certain dependencies are installed. If they get more exercise by
# advanced users, we can reconsider.
rm -f %{buildroot}/%{_sbindir}/notifyServicelogEvent
rm -f %{buildroot}/%{_sbindir}/ipmiservicelogd
# Byte-compile Python sources where suitable and the distro procedures known
%if %{defined py_byte_compile}
%{py_byte_compile %{python_path} %{buildroot}%{_datadir}/pacemaker/tests}
@ -811,6 +810,12 @@ exit 0
%license %{nagios_name}-%{nagios_hash}/COPYING
%changelog
* Wed Oct 26 2022 Klaus Wenninger <kwenning@redhat.com> - 2.1.5-0.1.rc1
- Update for new upstream tarball for release candidate: Pacemaker-2.1.5-rc1,
for full details, see included ChangeLog file or
https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.5-rc1
- add patch to fix 32 bit issue with cmocka
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.4-4.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

View File

@ -1,2 +1,2 @@
SHA512 (nagios-agents-metadata-105ab8a7b2c16b9a29cf1c1596b80136eeef332b.tar.gz) = 11ddeb48a4929e7642b6dfa9c7962aa1d7a1af1c569830f55ed6cd6773abac13377317327bc1db8411c8077884f83f81cc54d746c834b63a99fa6dc219b5caad
SHA512 (pacemaker-dc6eb4362.tar.gz) = 929794db5960eadec63b2da392f1440b9d75e1bddc3d573a6950b141605d2b5d457931d2d21fc3e5f0c84603c619b111e7ad52c6c4a0904e210e1320920f63be
SHA512 (pacemaker-844c0640d.tar.gz) = 5c79e6a30a6b886ee28d75fd10bfaa7c5e606a750716467b20583fb11395a3e6ce077cb40bcdf5124e30c82b83846c7198dffdc8683305b6b87798f02243b766