From 98a0196f86265e3a7c82526e3836483823ef99f7 Mon Sep 17 00:00:00 2001 From: Matthew Durand Date: Fri, 10 Jan 2025 12:58:04 -0800 Subject: [PATCH] Update builds for deprecated CentOS 7 - Update README with yum workaround - Update dockerfiles to apply workaround --- README.md | 16 ++++++++++++++++ scripts/docker/DSS.Dockerfile | 12 +++++++++--- scripts/docker/aws-sdk.Dockerfile | 10 ++++++++-- scripts/docker/gcc.Dockerfile | 7 +++++-- scripts/docker/kernel.Dockerfile | 7 +++++-- scripts/docker/mlnx.Dockerfile | 7 +++++-- 6 files changed, 48 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 822d9ca..d5ccb85 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,22 @@ Alternatively, DSS can be built natively, but all dependencies must be installed DSS build and runtime is presently supported on CentOS 7.8. +#### Note about CentOS 7 Deprecation + +[CentOS 7 has reached end-of-life.](https://www.redhat.com/en/topics/linux/centos-linux-eol#:~:text=Hat%20Enterprise%20Linux%3F-,Overview,can%20help%20ease%20your%20migration.) + +As such, the YUM repositories that enable dependency download on CentOS 7 are no longer available. + +However, you may work around this situation with the following steps: + +```bash +sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo +sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo +sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo +``` + +When installing some dependencies, this process may need to be repeated to ensure you have access to the archived dependencies. + #### Build package dependencies Install the following packages / modules to build DSS and its external dependencies: diff --git a/scripts/docker/DSS.Dockerfile b/scripts/docker/DSS.Dockerfile index 6aaa94c..253bbf5 100644 --- a/scripts/docker/DSS.Dockerfile +++ b/scripts/docker/DSS.Dockerfile @@ -3,10 +3,16 @@ ENV LANG en_US.UTF-8 ENV LC_ALL en_US.UTF-8 COPY dss-ansible/artifacts/aws-sdk-cpp-*.rpm ./ -RUN set -eux \ - && yum install -y \ +RUN set -eux && \ + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \ + yum install -y \ epel-release \ centos-release-scl-rh && \ + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \ yum install -y \ bc \ bison \ @@ -63,7 +69,7 @@ RUN set -eux \ "ansible>=2.9,<2.10" \ ansible-lint==5.3.2 \ gcovr==5.0 \ - pybind11==2.11.1 \ + pybind11==2.11.1 \ pycodestyle==2.8.0 \ shellcheck-py==0.8.0.3 \ yamllint==1.26.3 && \ diff --git a/scripts/docker/aws-sdk.Dockerfile b/scripts/docker/aws-sdk.Dockerfile index 459feeb..b6ab32c 100644 --- a/scripts/docker/aws-sdk.Dockerfile +++ b/scripts/docker/aws-sdk.Dockerfile @@ -1,10 +1,16 @@ # syntax=docker/dockerfile:1 FROM centos:centos7.8.2003 -RUN set -eux \ - && yum install -y \ +RUN set -eux && \ + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \ + yum install -y \ epel-release \ centos-release-scl-rh && \ + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \ yum install -y \ boost-devel \ cmake3 \ diff --git a/scripts/docker/gcc.Dockerfile b/scripts/docker/gcc.Dockerfile index 8441e83..180f859 100644 --- a/scripts/docker/gcc.Dockerfile +++ b/scripts/docker/gcc.Dockerfile @@ -1,8 +1,11 @@ # syntax=docker/dockerfile:1 FROM centos:centos7.8.2003 -RUN set -eux \ - && yum install -y \ +RUN set -eux && \ + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \ + yum install -y \ epel-release && \ yum install -y \ gcc \ diff --git a/scripts/docker/kernel.Dockerfile b/scripts/docker/kernel.Dockerfile index 74e0add..b7d5822 100644 --- a/scripts/docker/kernel.Dockerfile +++ b/scripts/docker/kernel.Dockerfile @@ -1,8 +1,11 @@ # syntax=docker/dockerfile:1 FROM centos:centos7.8.2003 -RUN set -eux \ - && yum install -y \ +RUN set -eux && \ + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \ + yum install -y \ epel-release && \ yum install -y \ bc \ diff --git a/scripts/docker/mlnx.Dockerfile b/scripts/docker/mlnx.Dockerfile index ed46f2e..2194872 100644 --- a/scripts/docker/mlnx.Dockerfile +++ b/scripts/docker/mlnx.Dockerfile @@ -1,8 +1,11 @@ # syntax=docker/dockerfile:1 FROM centos:centos7.8.2003 -RUN set -eux \ - && yum install -y \ +RUN set -eux && \ + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \ + yum install -y \ git \ make \ python3-devel \