From 8544fafe716897b8557f77c95154a2617a6bf780 Mon Sep 17 00:00:00 2001 From: Jonas Scharpf Date: Tue, 17 Oct 2023 08:24:56 +0200 Subject: [PATCH] Reland "Handle almalinux in CMK package installation script" - import GPG in Almalinux with gpg instead of rpm - install OS packages with --allowerasing to upgrade required system packages This reverts commit fffe79d74d9029b7fbdc05346dfb2c48b9fe315b. CMK-9078 Change-Id: Idb31eeb8d9b0a4d61c45d67f7728260b7b6301d5 --- .../build-nodes/scripts/install-cmk-dependencies.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/buildscripts/infrastructure/build-nodes/scripts/install-cmk-dependencies.sh b/buildscripts/infrastructure/build-nodes/scripts/install-cmk-dependencies.sh index 20ce3ab07c4..1aefc548fce 100755 --- a/buildscripts/infrastructure/build-nodes/scripts/install-cmk-dependencies.sh +++ b/buildscripts/infrastructure/build-nodes/scripts/install-cmk-dependencies.sh @@ -42,6 +42,11 @@ case "$DISTRO" in # shellcheck disable=SC2046 # we want word splitting here yum install -y $(cat "$TARGET_DIR"/needed-packages) ;; + almalinux-*) + gpg --import "$TARGET_DIR"/Check_MK-pubkey.gpg + # shellcheck disable=SC2046 # we want word splitting here + yum install -y --allowerasing $(cat "$TARGET_DIR"/needed-packages) + ;; sles-*) add_gpg_key # shellcheck disable=SC2046 # we want word splitting here @@ -52,6 +57,10 @@ case "$DISTRO" in # shellcheck disable=SC2046 # we want word splitting here apt-get install -y $(cat "$TARGET_DIR"/needed-packages) ;; + *) + echo "ERROR: Unhandled DISTRO: $DISTRO" + exit 1 + ;; esac cleanup