diff --git a/booth.spec b/booth.spec index 38dd2544d402e63abd0136f53ff480e6e09d0a1f..ec505c572e6e7193affadcdf30cd5b9fa66be50e 100644 --- a/booth.spec +++ b/booth.spec @@ -24,7 +24,7 @@ %bcond_with run_build_tests %bcond_with include_unit_test -%global release 3 +%global release 4 ## User and group to use for nonprivileged services (should be in sync with pacemaker) %global uname hacluster @@ -50,6 +50,7 @@ Url: https://github.com/%{github_owner}/%{name} Source0: https://github.com/%{github_owner}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz Patch0: Remove-const-warning.patch Patch1: pacemaker-Don-t-add-explicit-error-prefix-in-log.patch +Patch2: pacemaker-Use-long-format-for-crm_ticket-v.patch # direct build process dependencies BuildRequires: autoconf @@ -298,6 +299,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Thu Feb 29 2024 bizhiyuan - 1.1-4 +- pacemaker: Use long format for crm_ticket -v + * Thu Feb 29 2024 bizhiyuan - 1.1-3 - pacemaker: Don't add explicit error prefix in log diff --git a/pacemaker-Use-long-format-for-crm_ticket-v.patch b/pacemaker-Use-long-format-for-crm_ticket-v.patch new file mode 100644 index 0000000000000000000000000000000000000000..a94da7f4331d9f64325020560cb1492fb868f00c --- /dev/null +++ b/pacemaker-Use-long-format-for-crm_ticket-v.patch @@ -0,0 +1,54 @@ +From d649490dfb30e89dd725d200283f0b9848d24f61 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Thu, 29 Feb 2024 16:42:28 +0800 +Subject: [PATCH] pacemaker: Use long format for crm_ticket -v + +--- + src/pacemaker.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/pacemaker.c b/src/pacemaker.c +index cef8c41..8ad3c69 100644 +--- a/src/pacemaker.c ++++ b/src/pacemaker.c +@@ -46,7 +46,7 @@ enum atomic_ticket_supported atomicity = UNKNOWN; + + + +-#define COMMAND_MAX 1024 ++#define COMMAND_MAX 2048 + + + /** Determines whether the installed crm_ticket can do atomic ticket grants, +@@ -126,14 +126,14 @@ static int pcmk_write_ticket_atomic(struct ticket_config *tk, int grant) + int rv; + + +- /* The values are appended to "-v", so that NO_ONE +- * (which is -1) isn't seen as another option. */ ++ /* The long format (--attr-value=) for attribute value is used instead of "-v", ++ * so that NO_ONE (which is -1) isn't seen as another option. */ + snprintf(cmd, COMMAND_MAX, + "crm_ticket -t '%s' " + "%s --force " +- "-S owner -v%" PRIi32 " " +- "-S expires -v%" PRIi64 " " +- "-S term -v%" PRIi64, ++ "-S owner --attr-value=%" PRIi32 " " ++ "-S expires --attr-value=%" PRIi64 " " ++ "-S term --attr-value=%" PRIi64, + tk->name, + (grant > 0 ? "-g" : + grant < 0 ? "-r" : +@@ -232,7 +232,7 @@ static int pcmk_set_attr(struct ticket_config *tk, const char *attr, const char + char cmd[COMMAND_MAX]; + + snprintf(cmd, COMMAND_MAX, +- "crm_ticket -t '%s' -S '%s' -v '%s'", ++ "crm_ticket -t '%s' -S '%s' --attr-value='%s'", + tk->name, attr, val); + return _run_crm_ticket(cmd); + } +-- +2.25.1 +