From 75fb796fa0a57b457183aafc48d1cf52b26cc069 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 23 Oct 2018 01:38:49 +0200 Subject: [PATCH] Use DNF instead of YUM. Yum is deprecated and since Fedora 30 it is removed entirely (its binary). --- 1minutetip/run1minutetip.sh | 2 +- common/functions.sh | 8 ++++---- packages/common-scripts/install-all-pkgs/run.sh | 2 +- packages/common-scripts/install/run.sh | 4 ++-- packages/common-scripts/uninstall/run.sh | 2 +- .../upstream-tests/upstream-tests.sh | 2 +- packages/mysql-common/basic-galera/deploy-galera.sh | 2 +- .../multiple-instances/run_multiple_instances | 6 +++--- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/1minutetip/run1minutetip.sh b/1minutetip/run1minutetip.sh index 27c3f88..8a08cd2 100755 --- a/1minutetip/run1minutetip.sh +++ b/1minutetip/run1minutetip.sh @@ -24,7 +24,7 @@ cat >${test_dir}/runtest.sh </tmp/1minutetip.result -yum -y install koji createrepo wget vim +dnf -y install koji createrepo wget vim pushd db-ci-tests tar xfz db-ci-tests.tar.gz diff --git a/common/functions.sh b/common/functions.sh index 7b08c33..889d712 100644 --- a/common/functions.sh +++ b/common/functions.sh @@ -33,7 +33,7 @@ get_all_packages_in_repo() { fi } -# generate a yum repo file for downloaded data and write it to stdout +# generate a dnf repo file for downloaded data and write it to stdout # accepts these possitional arguments: # * package name # * el_version (24, 25, ...), optional @@ -48,7 +48,7 @@ generate_repo() { el_version="${2-`os_major_version`}" repo_name=$(get_repo_name "${el_version}" "${repotype}") if [ "$repotype" == "mirror" ] ; then - yum -y install fedora-repos-${el_version} + dnf -y install fedora-repos-${el_version} else repofile=/etc/yum.repos.d/${REPOFILE-db-ci.repo} repodir=/var/tmp/db-ci-test-repo @@ -69,7 +69,7 @@ gpgcheck=0 enabled=1 EOM - yum clean all --disablerepo=\* --enablerepo=${repo_name} + dnf clean all --disablerepo=\* --enablerepo=${repo_name} fi } @@ -85,7 +85,7 @@ exit_fail() { # install basic tools that are usually needed for building other SW install_build_tools() { - yum -y install \ + dnf -y install \ bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep \ gzip info make patch redhat-rpm-config rpm-build sed shadow-utils \ tar unzip util-linux-ng wget which iso-codes diff --git a/packages/common-scripts/install-all-pkgs/run.sh b/packages/common-scripts/install-all-pkgs/run.sh index 8fb9c38..cb933f8 100755 --- a/packages/common-scripts/install-all-pkgs/run.sh +++ b/packages/common-scripts/install-all-pkgs/run.sh @@ -9,5 +9,5 @@ source ${THISDIR}/../../../common/functions.sh source ${THISDIR}/../include.sh set -e -yum -y install `get_all_packages_in_repo "${PACKAGE}"` +dnf -y install `get_all_packages_in_repo "${PACKAGE}"` diff --git a/packages/common-scripts/install/run.sh b/packages/common-scripts/install/run.sh index 8c55910..10be131 100755 --- a/packages/common-scripts/install/run.sh +++ b/packages/common-scripts/install/run.sh @@ -10,7 +10,7 @@ source ${THISDIR}/../include.sh generate_repo "$PACKAGE" -yum remove -y ${INSTALL_PKGS} +dnf remove -y ${INSTALL_PKGS} -yum install -y ${INSTALL_PKGS} +dnf install -y ${INSTALL_PKGS} exit $? diff --git a/packages/common-scripts/uninstall/run.sh b/packages/common-scripts/uninstall/run.sh index d652812..b7abd29 100755 --- a/packages/common-scripts/uninstall/run.sh +++ b/packages/common-scripts/uninstall/run.sh @@ -9,4 +9,4 @@ source ${THISDIR}/../../../common/functions.sh source ${THISDIR}/../include.sh set -e -yum -y remove `get_all_packages_in_repo "${PACKAGE}"` +dnf -y remove `get_all_packages_in_repo "${PACKAGE}"` diff --git a/packages/mariadb-java-client-common/upstream-tests/upstream-tests.sh b/packages/mariadb-java-client-common/upstream-tests/upstream-tests.sh index 348d90b..dcf416d 100755 --- a/packages/mariadb-java-client-common/upstream-tests/upstream-tests.sh +++ b/packages/mariadb-java-client-common/upstream-tests/upstream-tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -yum install -y mariadb-java-client mariadb-java-client-tests hamcrest junit mariadb-server unzip +dnf install -y mariadb-java-client mariadb-java-client-tests hamcrest junit mariadb-server unzip # list all available test classes MARIADB_TESTS="$(unzip -Z1 $JAVA_LIBRARY_TESTS | grep 'Test.class' | cut -d'.' -f1 | tr '/' '.' | sort)" diff --git a/packages/mysql-common/basic-galera/deploy-galera.sh b/packages/mysql-common/basic-galera/deploy-galera.sh index 04d3011..3645c1c 100755 --- a/packages/mysql-common/basic-galera/deploy-galera.sh +++ b/packages/mysql-common/basic-galera/deploy-galera.sh @@ -18,7 +18,7 @@ GARBD_CONFIG=${SYSCONF_DIR}/sysconfig/garb IPS=$(hostname -I) IP=${IPS%% *} -yum -y install ${GALERA_PKGS} +dnf -y install ${GALERA_PKGS} cat >"${CONFIG_DIR}"/my-galera.cnf <