use dnf rather than yum for newer redhat distros

This commit is contained in:
Andrew Bauer committed 2020-01-05 14:30:33 -06:00
1 parent 0fb806d9d7
commit 2956e5e156
1 file changed
+6 -1
+6 -1
View File
@@ -9,7 +9,7 @@
# General sanity checks
checksanity () {
# Check to see if this script has access to all the commands it needs
for CMD in set echo curl git ln mkdir rmdir cat patch; do
for CMD in set echo curl git ln mkdir rmdir cat patch sed; do
type $CMD 2>&1 > /dev/null
if [ $? -ne 0 ]; then
@@ -298,6 +298,11 @@ if [ "${OS}" == "el" ] || [ "${OS}" == "fedora" ]; then
commonprep
echo "Begin Redhat build..."
# Newer Redhat distros use dnf package manager rather than yum
if [ "${DIST}" -gt "7" ]; then
sed -i 's\yum\dnf\' utils/packpack/redhat_package.mk
fi
setrpmpkgname
ln -sfT distros/redhat rpm