Merge "Support RHEL 9"

This commit is contained in:
Zuul 2023-07-21 12:35:17 +00:00 committed by Gerrit Code Review
commit 9845128969
3 changed files with 8 additions and 2 deletions

View File

@ -6,9 +6,11 @@ gcc
gcc-c++ gcc-c++
gettext # used for compiling message catalogs gettext # used for compiling message catalogs
git-core git-core
glibc-langpack-en # dist:rhel9
graphviz # needed only for docs graphviz # needed only for docs
httpd httpd
httpd-devel httpd-devel
iptables-nft # dist:rhel9
iptables-services iptables-services
java-1.8.0-openjdk-headless java-1.8.0-openjdk-headless
libffi-devel libffi-devel

View File

@ -412,9 +412,9 @@ function _ensure_lsb_release {
# - os_VENDOR # - os_VENDOR
# - os_PACKAGE # - os_PACKAGE
function GetOSVersion { function GetOSVersion {
# CentOS Stream 9 does not provide lsb_release # CentOS Stream 9 and RHEL 9 do not provide lsb_release
source /etc/os-release source /etc/os-release
if [[ "${ID}${VERSION}" == "centos9" ]]; then if [[ "${ID}${VERSION}" == "centos9" ]] || [[ "${ID}${VERSION}" =~ "rhel9" ]]; then
os_RELEASE=${VERSION_ID} os_RELEASE=${VERSION_ID}
os_CODENAME="n/a" os_CODENAME="n/a"
os_VENDOR=$(echo $NAME | tr -d '[:space:]') os_VENDOR=$(echo $NAME | tr -d '[:space:]')
@ -520,6 +520,7 @@ function is_fedora {
[ "$os_VENDOR" = "openEuler" ] || \ [ "$os_VENDOR" = "openEuler" ] || \
[ "$os_VENDOR" = "RedHatEnterpriseServer" ] || \ [ "$os_VENDOR" = "RedHatEnterpriseServer" ] || \
[ "$os_VENDOR" = "RedHatEnterprise" ] || \ [ "$os_VENDOR" = "RedHatEnterprise" ] || \
[ "$os_VENDOR" = "RedHatEnterpriseLinux" ] || \
[ "$os_VENDOR" = "Rocky" ] || \ [ "$os_VENDOR" = "Rocky" ] || \
[ "$os_VENDOR" = "CentOS" ] || [ "$os_VENDOR" = "CentOSStream" ] || \ [ "$os_VENDOR" = "CentOS" ] || [ "$os_VENDOR" = "CentOSStream" ] || \
[ "$os_VENDOR" = "AlmaLinux" ] || \ [ "$os_VENDOR" = "AlmaLinux" ] || \

View File

@ -406,7 +406,10 @@ if [[ $DISTRO == "rhel8" ]]; then
# Patch: https://github.com/rpm-software-management/dnf/pull/1448 # Patch: https://github.com/rpm-software-management/dnf/pull/1448
echo "[]" | sudo tee /var/cache/dnf/expired_repos.json echo "[]" | sudo tee /var/cache/dnf/expired_repos.json
elif [[ $DISTRO == "rhel9" ]]; then elif [[ $DISTRO == "rhel9" ]]; then
# for CentOS Stream 9 repository
sudo dnf config-manager --set-enabled crb sudo dnf config-manager --set-enabled crb
# for RHEL 9 repository
sudo dnf config-manager --set-enabled codeready-builder-for-rhel-9-x86_64-rpms
# rabbitmq and other packages are provided by RDO repositories. # rabbitmq and other packages are provided by RDO repositories.
_install_rdo _install_rdo