Recognize Alma Linux and Rocky Linux (Open Source RHEL clones)

This commit is contained in:
Todd C. Miller
2023-01-27 14:44:45 -07:00
parent fd0021ee5c
commit 53389b5743
5 changed files with 11 additions and 9 deletions

View File

@@ -87,7 +87,7 @@ This makes it possible to have all sudo I/O logs on a central server."
# For RedHat the doc dir is expected to include version and release
case "$pp_rpm_distro" in
centos*|rhel*|f[0-9]*)
alma*|centos*|rhel*|rocky*|f[0-9]*)
docdir="${docdir}-${pp_rpm_version}-${pp_rpm_release}"
exampledir="${docdir}/examples"
;;
@@ -131,7 +131,7 @@ This makes it possible to have all sudo I/O logs on a central server."
# Add distro info to release
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,2\}\).*/\1/'`
case "$pp_rpm_distro" in
centos*|rhel*|f[0-9]*)
alma*|centos*|rhel*|rocky*|f[0-9]*)
# CentOS Stream has a single-digit version
if test $osrelease -lt 10; then
osrelease="${osrelease}0"

View File

@@ -47,7 +47,7 @@
# For RedHat the doc dir is expected to include version and release
case "$pp_rpm_distro" in
centos*|rhel*|f[0-9]*)
alma*|centos*|rhel*|rocky*|f[0-9]*)
docdir="${docdir}-${pp_rpm_version}-${pp_rpm_release}"
exampledir="${docdir}/examples"
;;
@@ -87,7 +87,7 @@
# Add distro info to release
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,2\}\).*/\1/'`
case "$pp_rpm_distro" in
centos*|rhel*|f[0-9]*)
alma*|centos*|rhel*|rocky*|f[0-9]*)
# CentOS Stream has a single-digit version
if test $osrelease -lt 10; then
osrelease="${osrelease}0"

View File

@@ -105,7 +105,7 @@ still allow people to get their work done."
# For RedHat the doc dir is expected to include version and release
case "$pp_rpm_distro" in
centos*|rhel*|f[0-9]*)
alma*|centos*|rhel*|rocky*|f[0-9]*)
docdir="${docdir}-${pp_rpm_version}-${pp_rpm_release}"
exampledir="${docdir}/examples"
;;
@@ -162,7 +162,7 @@ still allow people to get their work done."
# Add distro info to release
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,2\}\).*/\1/'`
case "$pp_rpm_distro" in
centos*|rhel*|f[0-9]*)
alma*|centos*|rhel*|rocky*|f[0-9]*)
# CentOS Stream has a single-digit version
if test $osrelease -lt 10; then
osrelease="${osrelease}0"

View File

@@ -165,9 +165,9 @@ with_python=false
# Choose configure options by osversion.
# We use the same configure options as vendor packages when possible.
case "$osversion" in
centos*|rhel*|f[0-9]*)
alma*|centos*|rhel*|rocky*|f[0-9]*)
case "$osversion" in
centos*|rhel*)
alma*|centos*|rhel*|rocky*)
osmajor=`sed -n -e 's/^.*release \([0-9][0-9]*\).*$/\1/p' /etc/redhat-release`
if [ $osmajor -ge 4 ]; then
# RHEL 4 and up support SELinux

View File

@@ -1,6 +1,6 @@
#!/bin/sh
# Copyright 2023 One Identity LLC. ALL RIGHTS RESERVED
pp_revision="20230120"
pp_revision="20230127"
# Copyright 2018 One Identity LLC. ALL RIGHTS RESERVED.
#
# Redistribution and use in source and binary forms, with or without
@@ -5569,6 +5569,8 @@ pp_rpm_detect_distro () {
pp_rpm_distro=`sed -n \
-e 's/^Red Hat Linux.*release \([0-9][0-9\.]*\).*/rh\1/p' \
-e 's/^Red Hat Enterprise Linux.*release \([0-9][0-9\.]*\).*/rhel\1/p' \
-e 's/^Rocky Linux.*release \([0-9][0-9\.]*\).*/rocky\1/p' \
-e 's/^AlmaLinux.*release \([0-9][0-9\.]*\).*/alma\1/p' \
-e 's/^CentOS.*release \([0-9][0-9\.]*\).*/centos\1/p' \
/etc/redhat-release`
elif test -f /etc/SuSE-release; then