From 81581f9719bc56f01d5aa08952671d65fda9867a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 May 2023 18:27:08 +0200 Subject: Merging upstream version 1.39.0. Signed-off-by: Daniel Baumann --- .github/scripts/pkg-test.sh | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to '.github/scripts/pkg-test.sh') diff --git a/.github/scripts/pkg-test.sh b/.github/scripts/pkg-test.sh index e3bc3e7d4..45b8c320b 100755 --- a/.github/scripts/pkg-test.sh +++ b/.github/scripts/pkg-test.sh @@ -13,6 +13,7 @@ install_debian_like() { apt-get update # Install Netdata + # Strange quoting is required here so that glob matching works. apt-get install -y /netdata/artifacts/netdata_"${VERSION}"*_*.deb || exit 1 # Install testing tools @@ -27,8 +28,13 @@ install_fedora_like() { pkg_version="$(echo "${VERSION}" | tr - .)" + if [ "${PKGMGR}" = "dnf" ]; then + opts="--allowerasing" + fi + # Install Netdata - "$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm + # Strange quoting is required here so that glob matching works. + "$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm || exit 1 # Install testing tools "$PKGMGR" install -y curl nc jq || exit 1 @@ -50,9 +56,29 @@ install_centos() { "$PKGMGR" install -y epel-release || exit 1 # Install Netdata - "$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm + # Strange quoting is required here so that glob matching works. + "$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm || exit 1 # Install testing tools + # shellcheck disable=SC2086 + "$PKGMGR" install -y ${opts} curl nc jq || exit 1 +} + +install_amazon_linux() { + PKGMGR="$( (command -v dnf > /dev/null && echo "dnf") || echo "yum")" + + pkg_version="$(echo "${VERSION}" | tr - .)" + + if [ "${PKGMGR}" = "dnf" ]; then + opts="--allowerasing" + fi + + # Install Netdata + # Strange quoting is required here so that glob matching works. + "$PKGMGR" install -y /netdata/artifacts/netdata-"${pkg_version}"-*.rpm || exit 1 + + # Install testing tools + # shellcheck disable=SC2086 "$PKGMGR" install -y ${opts} curl nc jq || exit 1 } @@ -63,7 +89,8 @@ install_suse_like() { pkg_version="$(echo "${VERSION}" | tr - .)" # Install Netdata - zypper install -y --allow-unsigned-rpm /netdata/artifacts/netdata-"${pkg_version}"-*.rpm + # Strange quoting is required here so that glob matching works. + zypper install -y --allow-unsigned-rpm /netdata/artifacts/netdata-"${pkg_version}"-*.rpm || exit 1 # Install testing tools zypper install -y --no-recommends curl netcat-openbsd jq || exit 1 @@ -114,6 +141,9 @@ case "${DISTRO}" in centos | rockylinux | almalinux) install_centos ;; + amazonlinux) + install_amazon_linux + ;; opensuse) install_suse_like ;; -- cgit v1.2.3