From 4f67b39d262b1997aa96c47585f1d8e8443d0f90 Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Tue, 2 Jul 2024 09:22:17 -0700 Subject: [PATCH] Centos 7 EOL broke mirrors As of July 1st 2024: Could not resolve host: mirrorlist.centos.org This is expected due to EOL dates. --- scripts/rh_linux_deps.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/rh_linux_deps.sh b/scripts/rh_linux_deps.sh index ed60e430..81648d68 100644 --- a/scripts/rh_linux_deps.sh +++ b/scripts/rh_linux_deps.sh @@ -6,10 +6,21 @@ set -ex MACHINE=$(uname -m) if grep -i "centos" /etc/system-release >/dev/null; then + # As of 7/1/2024 mirrorlist.centos.org has been taken offline, so adjust accordingly + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo + # Centos 7 derivatives have too old of a git version to run our generate script # uninstall and ignore failures yum remove -y git yum -y install epel-release centos-release-scl + + # The release packages reinstate the mirrors, undo that again + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo + yum -y install dnf if [ "${MACHINE}" = "x86_64" ]; then yum -y install https://repo.ius.io/ius-release-el7.rpm