Merge "Drop switch between dnf and yum"

This commit is contained in:
Zuul 2024-09-23 16:05:25 +00:00 committed by Gerrit Code Review
commit 28f3825e93
4 changed files with 12 additions and 18 deletions

View File

@ -42,9 +42,9 @@ print_header 'Start (all-in-one.sh)'
if is_fedora; then
print_header 'Setup (RedHat based)'
sudo -E $YUM -y remove facter puppet rdo-release
sudo -E $YUM -y install libxml2-devel libxslt-devel ruby-devel rubygems wget qemu-img
sudo -E $YUM -y groupinstall "Development Tools"
sudo -E dnf -y remove facter puppet rdo-release
sudo -E dnf -y install libxml2-devel libxslt-devel ruby-devel rubygems wget qemu-img
sudo -E dnf -y groupinstall "Development Tools"
DASHBOARD="dashboard"
elif uses_debs; then
print_header 'Setup (Debian based)'

View File

@ -338,14 +338,14 @@ if [ `command -v apt` ]; then
apt-cache policy > $LOG_DIR/apt-cache-policy.txt
sudo cp -r /etc/apt $LOG_DIR/etc/apt
fi
if [ `command -v rpm` ]; then
if is_fedora; then
rpm -qa |sort > $LOG_DIR/rpm-qa.txt
sudo $YUM repolist -v > $LOG_DIR/repolist.txt
sudo $YUM list installed > $LOG_DIR/installed-packages.txt
sudo cp -r /etc/yum.repos.d $LOG_DIR/etc/yum.repos.d
fi
if [ `command -v dnf` ]; then
sudo dnf repolist -v > $LOG_DIR/repolist.txt
sudo dnf list installed > $LOG_DIR/installed-packages.txt
sudo dnf module list > $LOG_DIR/modulelist.txt
sudo cp -r /etc/yum.repos.d $LOG_DIR/etc/yum.repos.d
mkdir $LOG_DIR/dnf
sudo cp /var/log/dnf.log $LOG_DIR/dnf
sudo cp /var/log/dnf.rpm.log $LOG_DIR/dnf

View File

@ -161,12 +161,6 @@ uses_debs() {
type "apt-get" 2>/dev/null
}
if type "dnf" 2>/dev/null;then
export YUM=dnf
else
export YUM=yum
fi
print_header() {
if [ -n "$(set | grep xtrace)" ]; then
set +x
@ -224,7 +218,7 @@ install_puppet() {
fi
fi
elif is_fedora; then
$SUDO $YUM install -y ${PUPPET_PKG}
$SUDO dnf install -y ${PUPPET_PKG}
fi
}

View File

@ -166,7 +166,7 @@ fi
if uses_debs; then
$SUDO apt-get install -y dstat ebtables iotop sysstat
elif is_fedora; then
$SUDO $YUM install -y dstat setools setroubleshoot audit iotop sysstat
$SUDO dnf install -y dstat setools setroubleshoot audit iotop sysstat
$SUDO systemctl start auditd
# SElinux in permissive mode so later we can catch alerts
$SUDO selinuxenabled && $SUDO setenforce 0
@ -224,7 +224,7 @@ if [ "${MANAGE_REPOS,,}" = true ]; then
fi
print_header 'Updating packages'
if is_fedora; then
$SUDO $YUM update -y
$SUDO dnf update -y
update_ret=$?
elif uses_debs; then
export DEBIAN_FRONTEND=noninteractive