diff --git a/centos_ci_build b/centos_ci_build index 3d81147c..c4879d43 100755 --- a/centos_ci_build +++ b/centos_ci_build @@ -1,6 +1,6 @@ #!/bin/sh # Build steps used in CentOS CI -yum -y update +dnf -y update uname -a SKIP_QA_HARNESS=1 ./runtests.sh diff --git a/runtests.sh b/runtests.sh index 07852495..c7a339ff 100755 --- a/runtests.sh +++ b/runtests.sh @@ -5,7 +5,7 @@ echo -e "\n[+] `date` -> CentOS QA $0 starting." -yum -d0 -y install bind-utils +dnf -d0 -y install bind-utils if [ "$?" -ne "0" ] ;then echo "[+] ERROR : not even able to install bind-utils pkg so all t_functional tests will fail" @@ -21,7 +21,7 @@ LIB_FUNCTIONS='./tests/0_lib/functions.sh' # Human friendly symbols export readonly PASS=0 export readonly FAIL=1 -# set debug level of yum install in t_InstallPackage +# set debug level of dnf install in t_InstallPackage export YUMDEBUG=0 [ -f $LIB_FUNCTIONS ] && source $LIB_FUNCTIONS || { echo -e "\n[+] `date` -> Unable to source functions library. Cannot continue\n"; exit $FAIL; } diff --git a/tests/0_common/15_list_repos.sh b/tests/0_common/15_list_repos.sh index 4f568cae..1a727419 100755 --- a/tests/0_common/15_list_repos.sh +++ b/tests/0_common/15_list_repos.sh @@ -2,6 +2,6 @@ t_Log "Running $0 - Showing the repos we have configured" -yum -d0 repolist -v +dnf -d0 repolist -v t_CheckExitStatus $? diff --git a/tests/0_common/20_upgrade_all.sh b/tests/0_common/20_upgrade_all.sh index 89d10c1d..8eb81653 100755 --- a/tests/0_common/20_upgrade_all.sh +++ b/tests/0_common/20_upgrade_all.sh @@ -10,10 +10,10 @@ fi if [ "$centos_ver" -lt 8 ];then yum -d0 -y install deltarpm fi -yum -d0 -y upgrade +dnf -d0 -y upgrade t_Log "Running $0 - listing all used/available packages" -yum list +dnf list t_CheckExitStatus $? diff --git a/tests/0_lib/functions.sh b/tests/0_lib/functions.sh index 1b7231e4..65f52ff0 100755 --- a/tests/0_lib/functions.sh +++ b/tests/0_lib/functions.sh @@ -26,8 +26,8 @@ function t_InstallPackage mkdir /var/cache/{dnf,yum,system-upgrade} dnf makecache fi - t_Log "Attempting yum install: $*" - /usr/bin/yum -y -d${YUMDEBUG} install "$@" + t_Log "Attempting dnf install: $*" + /usr/bin/dnf -y -d${YUMDEBUG} install "$@" # TODO: add a hook here, to make sure all binary files have ldd run # against them, and that there are no missing linker targets t_CheckExitStatus $? @@ -42,12 +42,12 @@ function t_InstallPackageMinimal t_CheckExitStatus $? } -# Description: call this to perform a yum-based removal of packages +# Description: call this to perform a dnf-based removal of packages # Arguments: a space separated list of package names to remove. function t_RemovePackage { - t_Log "Attempting yum remove: $*" - /usr/bin/yum -y -d0 remove "$@" + t_Log "Attempting dnf remove: $*" + /usr/bin/dnf -y -d0 remove "$@" t_CheckExitStatus $? } diff --git a/tests/p_ipa-server/0-preclean.sh b/tests/p_ipa-server/0-preclean.sh index 3477f861..a0369283 100644 --- a/tests/p_ipa-server/0-preclean.sh +++ b/tests/p_ipa-server/0-preclean.sh @@ -12,7 +12,7 @@ if (t_GetPkgRel basesystem | grep -qE 'el(6|7)') fi if rpm -q httpd &> /dev/null then - /usr/bin/yum -y remove httpd &> /dev/null + /usr/bin/dnf -y remove httpd &> /dev/null rm -rf /etc/httpd fi @@ -23,7 +23,7 @@ if (t_GetPkgRel basesystem | grep -qE 'el(6|7)') fi if rpm -q bind &> /dev/null then - /usr/bin/yum -y remove bind &> /dev/null + /usr/bin/dnf -y remove bind &> /dev/null rm -rf /etc/named /var/named fi @@ -46,14 +46,14 @@ if (t_GetPkgRel basesystem | grep -qE 'el(6|7)') cp /etc/ntp.conf /tmp/ntp.conf.ipa-tests fi - t_Log "Running $0 - Backing up saving yum history id" - /usr/bin/yum history list | awk 'NR == 4 {print $1}' > /tmp/yum-rollback-id.ipa-tests + t_Log "Running $0 - Backing up saving dnf history id" + /usr/bin/dnf history list | awk 'NR == 4 {print $1}' > /tmp/yum-rollback-id.ipa-tests t_Log "Running $0 - Cleaning up hosts file" sed -i "s/127.0.0.1 $(hostname)//" /etc/hosts t_Log "Running $0 - Cleaning previous tomcat/pki instances if any" - yum remove -d0 -y tomcat ipa-server >/dev/null 2>&1 + dnf remove -d0 -y tomcat ipa-server >/dev/null 2>&1 /bin/rm -Rf /var/lib/pki/pki-tomcat/ /etc/sysconfig/pki-tomcat /var/log/pki/pki-tomcat /etc/pki/pki-tomcat /etc/sysconfig/pki/tomcat/pki-tomcat t_Log "Running $0 - Backing up ssh_config" diff --git a/tests/p_ipa-server/99-postclean.sh b/tests/p_ipa-server/99-postclean.sh index 32774794..0c4e242b 100644 --- a/tests/p_ipa-server/99-postclean.sh +++ b/tests/p_ipa-server/99-postclean.sh @@ -29,7 +29,7 @@ if (t_GetPkgRel basesystem | grep -qE 'el(6|7)') && !(t_GetArch | grep -qE 'aarc fi t_Log "Running $0 - Rolling back to yum history id - this will take some time" - /usr/bin/yum -y history rollback $(cat /tmp/yum-rollback-id.ipa-tests) &> /dev/null + /usr/bin/dnf -y history rollback $(cat /tmp/yum-rollback-id.ipa-tests) &> /dev/null t_Log "Running $0 - Restoring ssh_config" ${CP} /etc/ssh/ssh_config.ipa-tests /etc/ssh/ssh_config diff --git a/tests/p_kvdo/kvdo_runtest.sh b/tests/p_kvdo/kvdo_runtest.sh index 57b785ed..532d6881 100755 --- a/tests/p_kvdo/kvdo_runtest.sh +++ b/tests/p_kvdo/kvdo_runtest.sh @@ -88,12 +88,12 @@ rlPhaseEnd rlPhaseStartSetup "Install software" if ! rlCheckRpm kmod-kvdo then - rlRun "yum install -y ${kvdo_pkg}" 0 "Installing kmod-kvdo" || rlDie "Unable to install 'kmod-kvdo' package" + rlRun "dnf install -y ${kvdo_pkg}" 0 "Installing kmod-kvdo" || rlDie "Unable to install 'kmod-kvdo' package" rlAssertRpm kmod-kvdo fi if ! rlCheckRpm vdo then - rlRun "yum install -y ${vdo_pkg}" 0 "Installing vdo" || rlDie "Unable to install 'vdo' package" + rlRun "dnf install -y ${vdo_pkg}" 0 "Installing vdo" || rlDie "Unable to install 'vdo' package" rlAssertRpm vdo fi rlPhaseEnd diff --git a/tests/p_rpm/rpm_remove_pkg_test.sh b/tests/p_rpm/rpm_remove_pkg_test.sh index ab85c7c2..32d524f8 100755 --- a/tests/p_rpm/rpm_remove_pkg_test.sh +++ b/tests/p_rpm/rpm_remove_pkg_test.sh @@ -11,5 +11,5 @@ rpm -q zsh | grep -q 'package zsh is not installed' t_CheckExitStatus $? -t_Log "Clean yum metadata / cache" -yum -y clean all +t_Log "Clean dnf metadata / cache" +dnf -y clean all diff --git a/tests/p_yum/yum_remove_pkg_test.sh b/tests/p_yum/yum_remove_pkg_test.sh index ca1a38f8..91a593d6 100755 --- a/tests/p_yum/yum_remove_pkg_test.sh +++ b/tests/p_yum/yum_remove_pkg_test.sh @@ -6,7 +6,7 @@ t_Log "Running $0 - yum remove package test." # Install zsh pkg t_InstallPackage zsh -yum -d0 -y remove zsh && \ +dnf -d0 -y remove zsh && \ rpm -q zsh | grep -q 'package zsh is not installed' t_CheckExitStatus $?