From b2be47db2c7117d18d6af862d3ab1d1eab2aeb9a Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Tue, 2 Jul 2024 17:49:43 -0700 Subject: [PATCH] Fix centos 7 (#91) Though we should probably also stop using it soon --- integration/linux/build/Dockerfile-centos.template | 2 +- integration/linux/build/Dockerfile-linux.template | 7 +++++++ integration/linux/build/centos-7/Dockerfile | 2 +- integration/linux/build/centos-8/Dockerfile | 2 +- integration/linux/build/linux-aarch64/Dockerfile | 7 +++++++ integration/linux/build/linux-x86_64/Dockerfile | 7 +++++++ 6 files changed, 24 insertions(+), 3 deletions(-) diff --git a/integration/linux/build/Dockerfile-centos.template b/integration/linux/build/Dockerfile-centos.template index b0f6774..44eb8ac 100644 --- a/integration/linux/build/Dockerfile-centos.template +++ b/integration/linux/build/Dockerfile-centos.template @@ -11,7 +11,7 @@ ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib" RUN (echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf \ && source /etc/os-release; \ - [ "$VERSION" = "8" ] && (cd /etc/yum.repos.d/ \ + [ "$VERSION" = "7" || "$VERSION" = "8" ] && (cd /etc/yum.repos.d/ \ && sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \ && yum update -y) || true) diff --git a/integration/linux/build/Dockerfile-linux.template b/integration/linux/build/Dockerfile-linux.template index 3b1f526..2247252 100644 --- a/integration/linux/build/Dockerfile-linux.template +++ b/integration/linux/build/Dockerfile-linux.template @@ -20,6 +20,13 @@ ENV NODE_VERSION %%PLACEHOLDER%% ENV YARN_VERSION %%PLACEHOLDER%% ENV GCC_VERSION 11 +RUN (echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf \ + && source /etc/os-release; \ + [ "$VERSION" = "7" || "$VERSION" = "8" ] && (cd /etc/yum.repos.d/ \ + && sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ + && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \ + && yum update -y) || true) + # rpm on centos 7 iterates over all fds up to the limit, which is # extremely slow. Force it to be small. RUN ulimit -n 1024 \ diff --git a/integration/linux/build/centos-7/Dockerfile b/integration/linux/build/centos-7/Dockerfile index a5ced9d..39974de 100644 --- a/integration/linux/build/centos-7/Dockerfile +++ b/integration/linux/build/centos-7/Dockerfile @@ -17,7 +17,7 @@ ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib" RUN (echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf \ && source /etc/os-release; \ - [ "$VERSION" = "8" ] && (cd /etc/yum.repos.d/ \ + [ "$VERSION" = "7" || "$VERSION" = "8" ] && (cd /etc/yum.repos.d/ \ && sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \ && yum update -y) || true) diff --git a/integration/linux/build/centos-8/Dockerfile b/integration/linux/build/centos-8/Dockerfile index bfb9a92..13be45b 100644 --- a/integration/linux/build/centos-8/Dockerfile +++ b/integration/linux/build/centos-8/Dockerfile @@ -17,7 +17,7 @@ ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib" RUN (echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf \ && source /etc/os-release; \ - [ "$VERSION" = "8" ] && (cd /etc/yum.repos.d/ \ + [ "$VERSION" = "7" || "$VERSION" = "8" ] && (cd /etc/yum.repos.d/ \ && sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \ && yum update -y) || true) diff --git a/integration/linux/build/linux-aarch64/Dockerfile b/integration/linux/build/linux-aarch64/Dockerfile index 1e17222..3042e95 100644 --- a/integration/linux/build/linux-aarch64/Dockerfile +++ b/integration/linux/build/linux-aarch64/Dockerfile @@ -26,6 +26,13 @@ ENV NODE_VERSION 16.16.0 ENV YARN_VERSION 1.22.19 ENV GCC_VERSION 10 +RUN (echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf \ + && source /etc/os-release; \ + [ "$VERSION" = "7" || "$VERSION" = "8" ] && (cd /etc/yum.repos.d/ \ + && sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ + && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \ + && yum update -y) || true) + # rpm on centos 7 iterates over all fds up to the limit, which is # extremely slow. Force it to be small. RUN ulimit -n 1024 \ diff --git a/integration/linux/build/linux-x86_64/Dockerfile b/integration/linux/build/linux-x86_64/Dockerfile index 9acd88b..63bc0b3 100644 --- a/integration/linux/build/linux-x86_64/Dockerfile +++ b/integration/linux/build/linux-x86_64/Dockerfile @@ -26,6 +26,13 @@ ENV NODE_VERSION 16.16.0 ENV YARN_VERSION 1.22.19 ENV GCC_VERSION 11 +RUN (echo precedence ::ffff:0:0/96 100 >> /etc/gai.conf \ + && source /etc/os-release; \ + [ "$VERSION" = "7" || "$VERSION" = "8" ] && (cd /etc/yum.repos.d/ \ + && sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \ + && sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \ + && yum update -y) || true) + # rpm on centos 7 iterates over all fds up to the limit, which is # extremely slow. Force it to be small. RUN ulimit -n 1024 \