From c92cefef2959c9c7e212ca57c16f624a39a64ba7 Mon Sep 17 00:00:00 2001 From: Amit Prinz Setter Date: Wed, 5 Jun 2024 11:02:17 -0700 Subject: [PATCH] fix default repos for centos8 (#8113) Signed-off-by: Amit Prinz Setter Co-authored-by: Amit Prinz Setter (cherry picked from commit f9a3444e309781d01119ce2dce6181b4bd647fa3) --- src/deploy/NVA_build/builder.Dockerfile | 6 ++++++ src/deploy/NVA_build/fix_centos8_repo.sh | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100755 src/deploy/NVA_build/fix_centos8_repo.sh diff --git a/src/deploy/NVA_build/builder.Dockerfile b/src/deploy/NVA_build/builder.Dockerfile index b347552ef0..b13abd508c 100644 --- a/src/deploy/NVA_build/builder.Dockerfile +++ b/src/deploy/NVA_build/builder.Dockerfile @@ -1,5 +1,7 @@ ARG CENTOS_VER=9 FROM quay.io/centos/centos:stream${CENTOS_VER} +#Needs to reapply ARG, it was cleaned by FROM command. +ARG CENTOS_VER LABEL maintainer="Liran Mauda (lmauda@redhat.com)" ############################################################## @@ -10,6 +12,10 @@ LABEL maintainer="Liran Mauda (lmauda@redhat.com)" ############################################################## # RUN dnf --enablerepo=PowerTools install -y -q nasm && \ # dnf clean all + +COPY ./src/deploy/NVA_build/fix_centos8_repo.sh ./src/deploy/NVA_build/ +#default repos for centos8 are outdated, this will point to new repos +RUN CENTOS_VER=${CENTOS_VER} ./src/deploy/NVA_build/fix_centos8_repo.sh RUN dnf update -y -q --nobest && \ dnf clean all COPY ./src/deploy/NVA_build/install_arrow_build.sh ./src/deploy/NVA_build/install_arrow_build.sh diff --git a/src/deploy/NVA_build/fix_centos8_repo.sh b/src/deploy/NVA_build/fix_centos8_repo.sh new file mode 100755 index 0000000000..3a112dea0c --- /dev/null +++ b/src/deploy/NVA_build/fix_centos8_repo.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +if [ "$CENTOS_VER" == "8" ]; then + 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-* +fi