diff --git a/docker/build_scripts/fixup-mirrors.sh b/docker/build_scripts/fixup-mirrors.sh index a490eac2..719fe0fb 100755 --- a/docker/build_scripts/fixup-mirrors.sh +++ b/docker/build_scripts/fixup-mirrors.sh @@ -3,3 +3,13 @@ # Stop at any error, show all commands set -exuo pipefail +if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] && [ "${AUDITWHEEL_ARCH}" != "s390x" ]; then + # Centos 7 is EOL and is no longer available from the usual mirrors, so switch + # to https://vault.centos.org + sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf + sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*.repo + sed -i 's;^.*baseurl=http://mirror;baseurl=https://vault;g' /etc/yum.repos.d/*.repo + if [ "${AUDITWHEEL_ARCH}" == "aarch64" ] || [ "${AUDITWHEEL_ARCH}" == "ppc64le" ]; then + sed -i 's;/centos/7/;/altarch/7/;g' /etc/yum.repos.d/*.repo + fi +fi diff --git a/docker/build_scripts/install-runtime-packages.sh b/docker/build_scripts/install-runtime-packages.sh index 469fd563..2c5d0959 100755 --- a/docker/build_scripts/install-runtime-packages.sh +++ b/docker/build_scripts/install-runtime-packages.sh @@ -66,9 +66,9 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then echo "skip_missing_names_on_install=False" >> /etc/yum.conf # Make sure that locale will not be removed sed -i '/^override_install_langs=/d' /etc/yum.conf - # Exclude mirror holding broken package metadata - echo "exclude = d36uatko69830t.cloudfront.net" >> /etc/yum/pluginconf.d/fastestmirror.conf + fixup-mirrors yum -y update + fixup-mirrors yum -y install yum-utils curl yum-config-manager --enable extras 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 # Install mayeut/devtoolset-10 repo to get devtoolset-10 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 fi + fixup-mirrors elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then PACKAGE_MANAGER=dnf BASETOOLS="${BASETOOLS} curl glibc-locale-source glibc-langpack-en hardlink hostname libcurl libnsl libxcrypt which"