From 425b875e7c390cacc22ae8654f10fcabd9c7412a Mon Sep 17 00:00:00 2001 From: Frankie Dintino Date: Mon, 1 Jul 2024 10:43:13 -0400 Subject: [PATCH] fix(ci): replace mirrorlist.centos with vault --- wheelbuild/build.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/wheelbuild/build.sh b/wheelbuild/build.sh index fc85fa3..e94408d 100755 --- a/wheelbuild/build.sh +++ b/wheelbuild/build.sh @@ -23,6 +23,32 @@ if [[ "$MB_PYTHON_VERSION" == "2.7" ]]; then fi fi +for file in $(grep -l mirrorlist /etc/yum.repos.d/CentOS-*);do + if [[ "$file" == "/etc/yum.repos.d/CentOS-CR.repo" ]];then + echo "Enabling vault.centos.org in $file" + sed -i 's/baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file + else + echo "Disabling mirrorlist.centos.org in $file" + sed -i 's/mirrorlist\=/\#mirrorlist\=/g' $file + echo "Enabling vault.centos.org in $file" + sed -i 's/\#baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file + fi +done + +for file in $(grep -l mirrorlist /etc/yum.repos.d/CentOS-SCLo*);do + echo "Disabling mirrorlist.centos.org in $file" + sed -i 's/mirrorlist\=/\#mirrorlist\=/g' $file + if [[ "$file" == "/etc/yum.repos.d/CentOS-SCLo-scl.repo" ]];then + echo "Enabling vault.centos.org in scl." + sed -i 's/\#\ baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file + elif [[ "$file" == "/etc/yum.repos.d/CentOS-SCLo-scl-rh.repo" ]];then + echo "Enabling vault.centos.org in scl-rh" + sed -i 's/\#baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file + else + echo "Not a SCL repo file" + fi +done + echo "::group::Install a virtualenv" source multibuild/common_utils.sh source multibuild/travis_steps.sh