From 2dea5148d905b577c9d128fe96a333e42ab4e32b Mon Sep 17 00:00:00 2001 From: Kieran Date: Fri, 30 Aug 2024 12:51:44 +0100 Subject: [PATCH 1/2] feat(linux): add almalinux support (#211) * feat(linux): add almalinux support Closes #209 * install policycoreutils-python-utils --- templates/linux/setup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/linux/setup.sh b/templates/linux/setup.sh index 746999a..62e2a46 100644 --- a/templates/linux/setup.sh +++ b/templates/linux/setup.sh @@ -77,7 +77,7 @@ identify_os() { # Check for RHEL/CentOS, Fedora, etc. if command -v rpm >/dev/null && [[ -e /etc/redhat-release ]]; then os_type=rhel - el_version=$(rpm -qa '(oraclelinux|sl|redhat|centos|fedora)*release(|-server)' --queryformat '%{VERSION}') + el_version=$(rpm -qa '(oraclelinux|sl|redhat|centos|fedora|alma)*release(|-server)' --queryformat '%{VERSION}') case $el_version in 9*) os_version=9 ;; *) error "Detected RHEL or compatible but version ($el_version) is not supported." "$supported" ;; @@ -272,6 +272,11 @@ install_php_rhel() { dnf -y install php php-fpm php-bcmath php-gd php-mbstring php-mysql php-xml php-imap php-ldap php-zip if [[ -x "$(command -v getenforce)" ]] && [[ "$(getenforce | awk '{ print tolower($0) }')" != "disabled" ]]; then + # Some RHEL (Alma) don't include semanage in the baseos repo. + if [[ ! -x "$(command -v semanage)" ]]; then + dnf -y install policycoreutils-python-utils + fi + semanage fcontext -a -t httpd_var_run_t "${socket_path}" fi From 4480eef174444873da1c9d780dee1749ad57b677 Mon Sep 17 00:00:00 2001 From: Kieran Date: Fri, 30 Aug 2024 13:16:54 +0100 Subject: [PATCH 2/2] feat(linux): add rocky linux support --- templates/linux/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/linux/setup.sh b/templates/linux/setup.sh index 62e2a46..0fce8d3 100644 --- a/templates/linux/setup.sh +++ b/templates/linux/setup.sh @@ -77,7 +77,7 @@ identify_os() { # Check for RHEL/CentOS, Fedora, etc. if command -v rpm >/dev/null && [[ -e /etc/redhat-release ]]; then os_type=rhel - el_version=$(rpm -qa '(oraclelinux|sl|redhat|centos|fedora|alma)*release(|-server)' --queryformat '%{VERSION}') + el_version=$(rpm -qa '(oraclelinux|sl|redhat|centos|fedora|alma|rocky)*release(|-server)' --queryformat '%{VERSION}') case $el_version in 9*) os_version=9 ;; *) error "Detected RHEL or compatible but version ($el_version) is not supported." "$supported" ;;