Skip to content

Commit 7beb9ae

Browse files
committed
fix: move to vault.centos.org for CentOS 7 mirrors
1 parent beb1634 commit 7beb9ae

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

docker/build_scripts/fixup-mirrors.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,13 @@
33

44
# Stop at any error, show all commands
55
set -exuo pipefail
6+
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] && [ "${AUDITWHEEL_ARCH}" != "s390x" ]; then
7+
# Centos 7 is EOL and is no longer available from the usual mirrors, so switch
8+
# to https://vault.centos.org
9+
sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf
10+
sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*.repo
11+
sed -i 's;^.*baseurl=http://mirror;baseurl=https://vault;g' /etc/yum.repos.d/*.repo
12+
if [ "${AUDITWHEEL_ARCH}" == "aarch64" ] || [ "${AUDITWHEEL_ARCH}" == "ppc64le" ]; then
13+
sed -i 's;/centos/7/;/altarch/7/;g' /etc/yum.repos.d/*.repo
14+
fi
15+
fi

docker/build_scripts/install-runtime-packages.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
6666
echo "skip_missing_names_on_install=False" >> /etc/yum.conf
6767
# Make sure that locale will not be removed
6868
sed -i '/^override_install_langs=/d' /etc/yum.conf
69-
# Exclude mirror holding broken package metadata
70-
echo "exclude = d36uatko69830t.cloudfront.net" >> /etc/yum/pluginconf.d/fastestmirror.conf
69+
fixup-mirrors
7170
yum -y update
71+
fixup-mirrors
7272
yum -y install yum-utils curl
7373
yum-config-manager --enable extras
7474
TOOLCHAIN_DEPS="devtoolset-10-binutils devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-gcc-gfortran"
@@ -86,6 +86,7 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
8686
# Install mayeut/devtoolset-10 repo to get devtoolset-10
8787
curl -fsSLo /etc/yum.repos.d/mayeut-devtoolset-10.repo https://copr.fedorainfracloud.org/coprs/mayeut/devtoolset-10/repo/custom-1/mayeut-devtoolset-10-custom-1.repo
8888
fi
89+
fixup-mirrors
8990
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
9091
PACKAGE_MANAGER=dnf
9192
BASETOOLS="${BASETOOLS} curl glibc-locale-source glibc-langpack-en hardlink hostname libcurl libnsl libxcrypt which"

0 commit comments

Comments
 (0)