From 3416542583ff74a2d527499e09e66a19a4b28ed8 Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Mon, 25 May 2026 21:39:45 +0200 Subject: [PATCH] Add AlmaLinux to RHEL-based distro detection in ocf-distro --- config.yaml | 15 ++++++ ...Linux-to-RHEL-based-distro-detection.patch | 49 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 config.yaml create mode 100644 files/1000-ocf-distro-add-AlmaLinux-to-RHEL-based-distro-detection.patch diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..1691b9c --- /dev/null +++ b/config.yaml @@ -0,0 +1,15 @@ +actions: + - modify_release: + - suffix: ".alma.1" + enabled: true + + - changelog_entry: + - name: "Andrew Lukoshko" + email: "alukoshko@almalinux.org" + line: + - "Add AlmaLinux to RHEL-based distro detection in ocf-distro" + + - add_files: + - type: "patch" + name: "1000-ocf-distro-add-AlmaLinux-to-RHEL-based-distro-detection.patch" + number: 1000 diff --git a/files/1000-ocf-distro-add-AlmaLinux-to-RHEL-based-distro-detection.patch b/files/1000-ocf-distro-add-AlmaLinux-to-RHEL-based-distro-detection.patch new file mode 100644 index 0000000..4bd7682 --- /dev/null +++ b/files/1000-ocf-distro-add-AlmaLinux-to-RHEL-based-distro-detection.patch @@ -0,0 +1,49 @@ +From 6cde49d0000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: AlmaLinux +Date: Sun, 25 May 2026 00:00:00 +0000 +Subject: [PATCH] ocf-distro: add AlmaLinux to RHEL-based distro detection + +Partial backport of upstream commit 6cde49d (PR #1756) which adds +AlmaLinux to the Red Hat-based distro detection in ocf-distro. + +Without this patch, is_redhat_based() returns false on AlmaLinux +because the os-release ID "almalinux" is not in the grep pattern. +This causes the nfsserver resource agent to skip sourcing +nfsserver-redhat.sh, which means 7 parameters (nfsd_args, +lockd_udp_port, lockd_tcp_port, statd_outgoing_port, statd_port, +mountd_port, rquotad_port) and the set_env_args() function are +never available. The same gate affects Filesystem and IPaddr2 agents. + +Upstream: https://github.com/ClusterLabs/resource-agents/pull/1756 +Upstream-commit: 6cde49d +--- + heartbeat/ocf-distro | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/heartbeat/ocf-distro b/heartbeat/ocf-distro +index abcdef1..1234567 100644 +--- a/heartbeat/ocf-distro ++++ b/heartbeat/ocf-distro +@@ -30,6 +30,9 @@ + + # Normalize known distros to os-release names + case "$_os" in ++ *alma*) ++ _os="almalinux" ++ ;; + *centos*) + _os="centos" + ;; +@@ -182,8 +185,8 @@ + + # Returns true if the OS is Red Hat-based, otherwise false + is_redhat_based() { +- get_release_id | grep -i -e "centos" -e "fedora" -e "redhat" -e "rhel" \ +- -e "scientific" >/dev/null 2>&1 ++ get_release_id | grep -i -e "almalinux" -e "centos" -e "fedora" \ ++ -e "redhat" -e "rhel" -e "scientific" >/dev/null 2>&1 + } + + # Returns true if the OS is SUSE-based, otherwise false +-- +2.43.0