From 83e804513a62fe312fa5ee7bfe4537c974645c32 Mon Sep 17 00:00:00 2001 From: "Han Verstraete (OpenFaaS Ltd)" Date: Tue, 20 May 2025 17:51:29 +0200 Subject: [PATCH] Fix faasd CE install script for RHEL-based systems This change removes the check-update command. This command is not required and caused the script to exit early if packages are not up to date. In addition DNF is now used to install packages. DNF is the successor of YUM on the latest RHEL-based system. Signed-off-by: Han Verstraete (OpenFaaS Ltd) --- hack/install.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hack/install.sh b/hack/install.sh index 882e946..8f9e534 100755 --- a/hack/install.sh +++ b/hack/install.sh @@ -47,8 +47,8 @@ verify_system() { fi } -has_yum() { - [ -n "$(command -v yum)" ] +has_dnf() { + [ -n "$(command -v dnf)" ] } has_apt_get() { @@ -67,14 +67,16 @@ install_required_packages() { # reference: https://github.com/openfaas/faasd/pull/237 $SUDO apt-get update -y $SUDO apt-get install -y curl runc bridge-utils iptables - elif $(has_yum); then - $SUDO yum check-update -y - $SUDO yum install -y curl runc iptables-services + elif $(has_dnf); then + $SUDO dnf install -y \ + --allowerasing \ + --setopt=install_weak_deps=False \ + curl runc iptables-services bridge-utils elif $(has_pacman); then $SUDO pacman -Syy $SUDO pacman -Sy curl runc bridge-utils else - fatal "Could not find apt-get, yum, or pacman. Cannot install dependencies on this OS." + fatal "Could not find apt-get, dnf, or pacman. Cannot install dependencies on this OS." exit 1 fi }