From c8c45cdfb4af35a6c7f289c364fc49e3814c246d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sviatoslav=20Sydorenko=20=28=D0=A1=D0=B2=D1=8F=D1=82=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A1=D0=B8=D0=B4=D0=BE=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE=29?= Date: Wed, 3 Jul 2024 19:27:56 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20Switch=20CentOS=207=20yum=20repo?= =?UTF-8?q?=20mirrors=20to=20the=20vault=20(#83523)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The distro itself reached EoL on June 30, 2024, but these repository archives live on and should remain usable for testing. Refs: * https://www.redhat.com/en/topics/linux/centos-linux-eol * https://github.com/ansible/pylibssh/commit/01d3442f * https://gist.github.com/hkneptune/4961532c2df691db79a1c6b72c251b25 * https://vault.centos.org/7.9.2009/ --- test/lib/ansible_test/_util/target/setup/bootstrap.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/lib/ansible_test/_util/target/setup/bootstrap.sh b/test/lib/ansible_test/_util/target/setup/bootstrap.sh index 65673da507e..ef4fa915e96 100644 --- a/test/lib/ansible_test/_util/target/setup/bootstrap.sh +++ b/test/lib/ansible_test/_util/target/setup/bootstrap.sh @@ -430,6 +430,15 @@ bootstrap_docker() { # Required for newer mysql-server packages to install/upgrade on Ubuntu 16.04. rm -f /usr/sbin/policy-rc.d + + # CentOS 7 is EoL and its official repos are down; we need to the archived ones. + if grep -q '^CENTOS_MANTISBT_PROJECT="CentOS-7"$' /etc/os-release + then + sed -i \ + -e 's/mirrorlist/#mirrorlist/g' \ + -e 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' \ + /etc/yum.repos.d/CentOS-* + fi } bootstrap_remote()