Skip to content

Commit

Permalink
fix: move to vault.centos.org for CentOS 7 mirrors
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Jul 1, 2024
1 parent beb1634 commit 7beb9ae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 10 additions & 0 deletions docker/build_scripts/fixup-mirrors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 3 additions & 2 deletions docker/build_scripts/install-runtime-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit 7beb9ae

Please sign in to comment.