From 3a29a7e3520877c0abc36f9d21a3d00426174aa0 Mon Sep 17 00:00:00 2001 From: Fantix King Date: Tue, 8 Oct 2024 13:01:09 -0400 Subject: [PATCH] Fix centos:8: yum-plugin-fastestmirror is not installed by default (#112) Co-authored-by: Elvis Pranskevichus --- integration/linux/build/Dockerfile-centos.template | 2 +- integration/linux/build/centos-7/Dockerfile | 2 +- integration/linux/build/centos-8/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/integration/linux/build/Dockerfile-centos.template b/integration/linux/build/Dockerfile-centos.template index 9da0162..e9f0c3e 100644 --- a/integration/linux/build/Dockerfile-centos.template +++ b/integration/linux/build/Dockerfile-centos.template @@ -20,7 +20,7 @@ ENV GCC_VERSION 11 # baseurl. Switch to the archive.kernel.org mirror while we are at it. RUN set -ex \ && ulimit -n 1024 \ - && sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf \ + && ( [ -e /etc/yum/pluginconf.d/fastestmirror.conf ] && sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf || true ) \ && sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ && sed -i 's|# \?baseurl=http://mirror.centos.org|baseurl=https://archive.kernel.org/centos-vault/|g' /etc/yum.repos.d/CentOS-* \ && yum update -y \ diff --git a/integration/linux/build/centos-7/Dockerfile b/integration/linux/build/centos-7/Dockerfile index ab94782..a7cb053 100644 --- a/integration/linux/build/centos-7/Dockerfile +++ b/integration/linux/build/centos-7/Dockerfile @@ -24,7 +24,7 @@ ENV GCC_VERSION 11 # baseurl. Switch to the archive.kernel.org mirror while we are at it. RUN set -ex \ && ulimit -n 1024 \ - && sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf \ + && ( [ -e /etc/yum/pluginconf.d/fastestmirror.conf ] && sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf || true ) \ && sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ && sed -i 's|# \?baseurl=http://mirror.centos.org|baseurl=https://archive.kernel.org/centos-vault/|g' /etc/yum.repos.d/CentOS-* \ && yum update -y \ diff --git a/integration/linux/build/centos-8/Dockerfile b/integration/linux/build/centos-8/Dockerfile index 489222e..4b40198 100644 --- a/integration/linux/build/centos-8/Dockerfile +++ b/integration/linux/build/centos-8/Dockerfile @@ -23,7 +23,7 @@ ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib" # baseurl. Switch to the archive.kernel.org mirror while we are at it. RUN set -ex \ && ulimit -n 1024 \ - && sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf \ + && ( [ -e /etc/yum/pluginconf.d/fastestmirror.conf ] && sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf || true ) \ && sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ && sed -i 's|# \?baseurl=http://mirror.centos.org|baseurl=https://archive.kernel.org/centos-vault/|g' /etc/yum.repos.d/CentOS-* \ && yum update -y \