* Wed Nov 16 2022 Klaus Wenninger <kwenning@redhat.com> - 2.1.5-0.2.rc2

- Update for new upstream tarball for release candidate: Pacemaker-2.1.5-rc2,
  for full details, see included ChangeLog file or
  https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.5-rc2
This commit is contained in:
Klaus Wenninger 2022-11-16 10:20:14 +01:00
parent 059b7a7411
commit 35f9e4e444
3 changed files with 8 additions and 110 deletions

View File

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

@ -32,10 +32,10 @@
## can be incremented to build packages reliably considered "newer"
## than previously built packages with the same pcmkversion)
%global pcmkversion 2.1.5
%global specversion 0.1.rc1
%global specversion 0.2.rc2
## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
%global commit 844c0640d99780fd7c98ec0f0fa7ccf806cbee24
%global commit d3699a6216bdf59de6f416ed73bc1bc9ca727dc2
## 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.
@ -218,8 +218,6 @@ Source1: https://codeload.github.com/%{github_owner}/%{nagios_name}/tar.gz
# upstream commits
Patch0: 0001-Tests-Fix-running-pcmk__procfs_pid2path_test-on-i686.patch
Requires: resource-agents
Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release}
Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release}
@ -810,6 +808,11 @@ exit 0
%license %{nagios_name}-%{nagios_hash}/COPYING
%changelog
* Wed Nov 16 2022 Klaus Wenninger <kwenning@redhat.com> - 2.1.5-0.2.rc2
- Update for new upstream tarball for release candidate: Pacemaker-2.1.5-rc2,
for full details, see included ChangeLog file or
https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.1.5-rc2
* 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

View File

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