From 7d6b7d0acd5e1095a7ebc3439fd87c612f2b76f7 Mon Sep 17 00:00:00 2001 From: lcipria <93918409+lcipria@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:36:13 +0200 Subject: [PATCH 1/4] Update common.sh support to almalinux --- utils/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/common.sh b/utils/common.sh index 1de6d160..87a16b03 100644 --- a/utils/common.sh +++ b/utils/common.sh @@ -213,7 +213,7 @@ function required_packages() { fedora) dnf install -y python3 python3-devel python3-pip python3-virtualenv newt expect jq "${extra_packages[@]}" &>>"$LOG_FILE" ;; - rocky | centos) + almalinux | rocky | centos) dnf install -y python3 python3-devel python3-pip newt expect jq "${extra_packages[@]}" &>>"$LOG_FILE" ;; opensuse-tumbleweed | opensuse-leap) From e606bd2fdfa30b2569c4a2265fdedfad432ee5a3 Mon Sep 17 00:00:00 2001 From: lcipria <93918409+lcipria@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:53:47 +0200 Subject: [PATCH 2/4] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2fcfde78..f7c8444c 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Then follow the instructions display on screen. | Distribution | Version | | ------------------- | --------- | +| AlmaLinux | `>= 8` | | Arch | `rolling` | | CentOS | `>= 8` | | Debian GNU/Linux | `>= 10` | From 9fb785feb08374d78c59c9f1f715b29b15575d55 Mon Sep 17 00:00:00 2001 From: lcipria <93918409+lcipria@users.noreply.github.com> Date: Tue, 23 Jul 2024 08:48:05 +0200 Subject: [PATCH 3/4] Update packages.bats adding support to almalinux --- tests/bats/packages.bats | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/bats/packages.bats b/tests/bats/packages.bats index 28c26c1d..f56b9f81 100644 --- a/tests/bats/packages.bats +++ b/tests/bats/packages.bats @@ -67,6 +67,15 @@ EOF assert_success } +@test "function_required_packages_almalinux" { + DISTRO_NAME="almalinux" + function dnf() { + exit 0 + } + run required_packages + assert_success +} + @test "function_required_packages_manjaro" { DISTRO_NAME="manjaro" function pacman() { From 86e9c3a4d09ef33257ada0042d5fa6518501d59d Mon Sep 17 00:00:00 2001 From: lcipria <93918409+lcipria@users.noreply.github.com> Date: Tue, 23 Jul 2024 08:59:29 +0200 Subject: [PATCH 4/4] Update packages.bats missing test --- tests/bats/packages.bats | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/bats/packages.bats b/tests/bats/packages.bats index f56b9f81..b8c9da85 100644 --- a/tests/bats/packages.bats +++ b/tests/bats/packages.bats @@ -184,6 +184,15 @@ EOF assert_failure } +@test "function_required_packages_almalinux_fail" { + DISTRO_NAME="almalinux" + function dnf() { + exit 1 + } + run required_packages + assert_failure +} + @test "function_required_packages_manjaro_fail" { DISTRO_NAME="manjaro" function pacman() {