diff --git a/schutzbot/deploy.sh b/schutzbot/deploy.sh index 50a0809af..9e57e1741 100755 --- a/schutzbot/deploy.sh +++ b/schutzbot/deploy.sh @@ -31,6 +31,15 @@ sudo rm -f /etc/yum.repos.d/fedora*modular* # dnf operations. echo -e "fastestmirror=1\ninstall_weak_deps=0" | sudo tee -a /etc/dnf/dnf.conf +# Ensure we are using the latest dnf since early revisions of Fedora 31 had +# some dnf repo priority bugs like BZ 1733582. +# NOTE(mhayden): We can exclude kernel updates here to save time with dracut +# and module updates. The system will not be rebooted in CI anyway, so a +# kernel update is not needed. +if [[ $ID == fedora ]]; then + sudo dnf -y upgrade --exclude kernel --exclude kernel-core +fi + # Add osbuild team ssh keys. cat schutzbot/team_ssh_keys.txt | tee -a ~/.ssh/authorized_keys > /dev/null diff --git a/schutzbot/mockbuild.sh b/schutzbot/mockbuild.sh index 1979825e0..883a9df64 100755 --- a/schutzbot/mockbuild.sh +++ b/schutzbot/mockbuild.sh @@ -10,7 +10,7 @@ function greenprint { source /etc/os-release # Mock is only available in EPEL for RHEL. -if [[ $ID == rhel ]]; then +if [[ $ID == rhel ]] && ! rpm -q epel-release; then greenprint "📦 Setting up EPEL repository" curl -Ls --retry 5 --output /tmp/epel.rpm \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm