From a61b1c9851fb98b5b256bc8c0a8473e470d45b39 Mon Sep 17 00:00:00 2001 From: illuminatus Date: Wed, 15 Nov 2023 09:27:54 -0800 Subject: [PATCH 1/2] Use DISTRO and VERSION_ID, not or for CRB --- scripts/cnode-helper-scripts/guild-deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cnode-helper-scripts/guild-deploy.sh b/scripts/cnode-helper-scripts/guild-deploy.sh index 8ef4c9aa0..ba1f2b38f 100755 --- a/scripts/cnode-helper-scripts/guild-deploy.sh +++ b/scripts/cnode-helper-scripts/guild-deploy.sh @@ -216,9 +216,9 @@ os_dependencies() { if [[ "${DISTRO}" =~ Rocky ]]; then #RockyLinux 8/9 pkg_list="${pkg_list} --enablerepo=devel,crb libusbx ncurses-compat-libs pkgconf-pkg-config" - elif [[ "${DISTRO}" =~ "Red Hat" ]] || [[ "${VERSION_ID}" =~ "8" ]]; then + elif [[ "${DISTRO}" =~ "Red Hat" ]] && [[ "${VERSION_ID}" =~ "8" ]]; then pkg_list="${pkg_list} --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms libusbx ncurses-compat-libs pkgconf-pkg-config" - elif [[ "${DISTRO}" =~ "Red Hat" ]] || [[ "${VERSION_ID}" =~ "9" ]]; then + elif [[ "${DISTRO}" =~ "Red Hat" ]] && [[ "${VERSION_ID}" =~ "9" ]]; then pkg_list="${pkg_list} --enablerepo=codeready-builder-for-rhel-9-x86_64-rpms libusbx ncurses-compat-libs pkgconf-pkg-config" fi elif [[ "${DISTRO}" =~ Fedora ]]; then From ecdffaf8db9dfd44b3c961d06700a8e7c7c738b9 Mon Sep 17 00:00:00 2001 From: RdLrT <3169068+rdlrt@users.noreply.github.com> Date: Thu, 16 Nov 2023 10:15:35 +1100 Subject: [PATCH 2/2] Update Version Check condition VERSION_ID is already being filtered for 8/9 on L213, so we can simply take major version release from variable itself --- scripts/cnode-helper-scripts/guild-deploy.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/cnode-helper-scripts/guild-deploy.sh b/scripts/cnode-helper-scripts/guild-deploy.sh index ba1f2b38f..900d109ee 100755 --- a/scripts/cnode-helper-scripts/guild-deploy.sh +++ b/scripts/cnode-helper-scripts/guild-deploy.sh @@ -216,10 +216,8 @@ os_dependencies() { if [[ "${DISTRO}" =~ Rocky ]]; then #RockyLinux 8/9 pkg_list="${pkg_list} --enablerepo=devel,crb libusbx ncurses-compat-libs pkgconf-pkg-config" - elif [[ "${DISTRO}" =~ "Red Hat" ]] && [[ "${VERSION_ID}" =~ "8" ]]; then - pkg_list="${pkg_list} --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms libusbx ncurses-compat-libs pkgconf-pkg-config" - elif [[ "${DISTRO}" =~ "Red Hat" ]] && [[ "${VERSION_ID}" =~ "9" ]]; then - pkg_list="${pkg_list} --enablerepo=codeready-builder-for-rhel-9-x86_64-rpms libusbx ncurses-compat-libs pkgconf-pkg-config" + elif [[ "${DISTRO}" =~ "Red Hat" ]]; then + pkg_list="${pkg_list} --enablerepo=codeready-builder-for-rhel-${VERSION_ID/.*/}-x86_64-rpms libusbx ncurses-compat-libs pkgconf-pkg-config" fi elif [[ "${DISTRO}" =~ Fedora ]]; then #Fedora