From a8dd16b5b916c744d7f437121159983ba3c068fc Mon Sep 17 00:00:00 2001 From: bizhiyuan Date: Fri, 24 Oct 2025 14:17:19 +0800 Subject: [PATCH] ocf-shellfuncs: set SHELL to default shell if it's set tonologin ocf-shellfuncs: remove extra sleep from curl_retry (#2058) (cherry picked from commit faefe03c30cdbd01b6f4a8e1cf4124a66034a617) --- ...emove-extra-sleep-from-curl_retry-20.patch | 27 +++++++++++++++++++ ...et-SHELL-to-default-shell-if-it-s-se.patch | 26 ++++++++++++++++++ resource-agents.spec | 8 +++++- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 backport-ocf-shellfuncs-remove-extra-sleep-from-curl_retry-20.patch create mode 100644 backport-ocf-shellfuncs-set-SHELL-to-default-shell-if-it-s-se.patch diff --git a/backport-ocf-shellfuncs-remove-extra-sleep-from-curl_retry-20.patch b/backport-ocf-shellfuncs-remove-extra-sleep-from-curl_retry-20.patch new file mode 100644 index 0000000..9ef2a5a --- /dev/null +++ b/backport-ocf-shellfuncs-remove-extra-sleep-from-curl_retry-20.patch @@ -0,0 +1,27 @@ +From 815b59b38f115c6d6651bd8d476369cd2d55084e Mon Sep 17 00:00:00 2001 +From: adamaze +Date: Tue, 1 Jul 2025 06:09:09 -0500 +Subject: [PATCH] ocf-shellfuncs: remove extra sleep from curl_retry (#2058) + +--- + heartbeat/ocf-shellfuncs.in | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in +index cb4d5cac..526be42b 100644 +--- a/heartbeat/ocf-shellfuncs.in ++++ b/heartbeat/ocf-shellfuncs.in +@@ -708,7 +708,9 @@ curl_retry() + [ $? -ne 0 ] && exit $OCF_ERR_GENERIC + args=$(echo "$args" | sed "s/$OLD_TOKEN/$TOKEN/") + fi +- sleep $sleep ++ if [ $try -lt $tries ]; then ++ sleep $sleep ++ fi + done + + if [ $rc -ne 0 ]; then +-- +2.25.1 + diff --git a/backport-ocf-shellfuncs-set-SHELL-to-default-shell-if-it-s-se.patch b/backport-ocf-shellfuncs-set-SHELL-to-default-shell-if-it-s-se.patch new file mode 100644 index 0000000..9458b52 --- /dev/null +++ b/backport-ocf-shellfuncs-set-SHELL-to-default-shell-if-it-s-se.patch @@ -0,0 +1,26 @@ +From e5a101db8fc817f7b46af4709dccdf1f13bd1fb6 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Tue, 10 Jun 2025 11:45:43 +0200 +Subject: [PATCH] ocf-shellfuncs: set SHELL to default shell if it's set to + nologin + +--- + heartbeat/ocf-shellfuncs.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in +index e834ded9..cb4d5cac 100644 +--- a/heartbeat/ocf-shellfuncs.in ++++ b/heartbeat/ocf-shellfuncs.in +@@ -65,6 +65,8 @@ fi + # to make sure that ocf_is_probe() always works + : ${OCF_RESKEY_CRM_meta_interval=0} + ++[ "${SHELL##*/}" = "nologin" ] && SHELL="$SH" ++ + ocf_is_root() { + if [ X`id -u` = X0 ]; then + true +-- +2.25.1 + diff --git a/resource-agents.spec b/resource-agents.spec index 519ac0a..e75a352 100644 --- a/resource-agents.spec +++ b/resource-agents.spec @@ -1,7 +1,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.16.0 -Release: 8 +Release: 9 License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents Source0: https://github.com/ClusterLabs/resource-agents/releases/tag/v%{version}.tar.gz @@ -19,6 +19,8 @@ Patch0010: backport-Filesystem-remove-validate-all-fstype-check-as-the Patch0011: backport-IPaddr2-add-link-status-DOWN-LOWERLAYERDOWN-check.patch Patch0012: backport-findif.sh-fix-to-avoid-duplicate-route-issues.patch Patch0013: backport-mariadb-add-SSL-TLS-Support-2045.patch +Patch0014: backport-ocf-shellfuncs-set-SHELL-to-default-shell-if-it-s-se.patch +Patch0015: backport-ocf-shellfuncs-remove-extra-sleep-from-curl_retry-20.patch Obsoletes: heartbeat-resources <= %{version} Provides: heartbeat-resources = %{version} @@ -117,6 +119,10 @@ export CFLAGS="$(echo '%{optflags}')" %{_mandir}/man8/{ocf-tester.8*,ldirectord.8*} %changelog +* Fri Oct 24 2025 bizhiyuan - 4.16.0-9 +- ocf-shellfuncs: set SHELL to default shell if it's set tonologin +- ocf-shellfuncs: remove extra sleep from curl_retry (#2058) + * Mon Oct 20 2025 bizhiyuan - 4.16.0-8 - findif.sh: fix to avoid duplicate route issues - mariadb: add SSL/TLS-Support -- Gitee