File bsc#1250349-0001-Log-tools-Prevent-crm_verify-from-stating-configurat.patch of Package pacemaker

From bf7e621ba4b185f274c513c9cf026b3916158e4a Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Mon, 4 Aug 2025 15:49:08 +0200
Subject: [PATCH] Log: tools: Prevent crm_verify from stating configuration is
 "invalid" if it only has warnings

Configuration warnings generally indicate that users need to pay
attention to their configuration regarding deprecations and so on.
Technically it doesn't mean that the configuration is literally
"invalid". Previously this wording was too harsh and fearsome.
---
 cts/cli/regression.crm_verify.exp | 10 +++++-----
 tools/crm_verify.c                |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

Index: pacemaker-2.1.10+20250718.fdf796ebc8/tools/crm_verify.c
===================================================================
--- pacemaker-2.1.10+20250718.fdf796ebc8.orig/tools/crm_verify.c
+++ pacemaker-2.1.10+20250718.fdf796ebc8/tools/crm_verify.c
@@ -259,9 +259,9 @@ main(int argc, char **argv)
 
     if (rc == pcmk_rc_schema_validation) {
         if (crm_config_error) {
-            failure_type = "Errors found during check: ";
+            failure_type = "Errors found during check: config not valid";
           } else if (crm_config_warning) {
-            failure_type = "Warnings found during check: ";
+            failure_type = "Warnings found during check: config may need attention";
           } else {
             failure_type = "";
           }
@@ -270,10 +270,10 @@ main(int argc, char **argv)
               // User requested no output
 
           } else if (options.verbosity > 0) {
-              out->err(out, "%sconfig not valid", failure_type);
+              out->err(out, "%s", failure_type);
 
           } else {
-              out->err(out, "%sconfig not valid\n-V may provide more details", failure_type);
+              out->err(out, "%s\n-V may provide more details", failure_type);
           }
         }
 
Index: pacemaker-2.1.10+20250718.fdf796ebc8/cts/cli/regression.tools.exp
===================================================================
--- pacemaker-2.1.10+20250718.fdf796ebc8.orig/cts/cli/regression.tools.exp
+++ pacemaker-2.1.10+20250718.fdf796ebc8/cts/cli/regression.tools.exp
@@ -10285,7 +10285,7 @@ crm_shadow: Could not access shadow inst
 * Passed: crm_shadow     - Switch to nonexistent shadow instance (force) (XML)
 =#=#=#= Begin test: Verbosely verify a file-specified configuration with an unallowed fencing level ID =#=#=#=
 warning: Ignoring topology registration with invalid level 10
-Warnings found during check: config not valid
+Warnings found during check: config may need attention
 =#=#=#= End test: Verbosely verify a file-specified configuration with an unallowed fencing level ID - Invalid configuration (78) =#=#=#=
 * Passed: crm_verify     - Verbosely verify a file-specified configuration with an unallowed fencing level ID
 =#=#=#= Begin test: Verify a file-specified invalid configuration (text output) =#=#=#=
openSUSE Build Service is sponsored by