* Thu Jun 30 2022 Klaus Wenninger <kwenning@redhat.com> - 2.1.4-4

- Fix 2.1.3 regression: Don't output "(null)" in crm_attribute's
  quiet mode (rhbz#2099331)
This commit is contained in:
Klaus Wenninger 2022-06-30 12:02:37 +02:00
parent 74ac7dc07b
commit 075b75e4a1
2 changed files with 41 additions and 2 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

@ -32,7 +32,7 @@
## can be incremented to build packages reliably considered "newer"
## than previously built packages with the same pcmkversion)
%global pcmkversion 2.1.4
%global specversion 3
%global specversion 4
## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
%global commit dc6eb4362e67c1497a413434eba097063bf1ef83
@ -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,6 +217,7 @@ 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
Requires: resource-agents
Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release}
@ -810,6 +811,9 @@ exit 0
%license %{nagios_name}-%{nagios_hash}/COPYING
%changelog
* Thu Jun 30 2022 Klaus Wenninger <kwenning@redhat.com> - 2.1.4-4
- Fix 2.1.3 regression: Don't output "(null)" in crm_attribute's
quiet mode (rhbz#2099331)
* Mon Jun 20 2022 Klaus Wenninger <kwenning@redhat.com> - 2.1.4-3
- Update for new upstream release tarball: Pacemaker-2.1.4,