Skip to content

Commit

Permalink
Update builds for deprecated CentOS 7
Browse files Browse the repository at this point in the history
- Update README with yum workaround
- Update dockerfiles to apply workaround
  • Loading branch information
velomatt committed Jan 10, 2025
1 parent 674a9e4 commit 98a0196
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 11 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 9 additions & 3 deletions scripts/docker/DSS.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 && \
Expand Down
10 changes: 8 additions & 2 deletions scripts/docker/aws-sdk.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
7 changes: 5 additions & 2 deletions scripts/docker/gcc.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
7 changes: 5 additions & 2 deletions scripts/docker/kernel.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
7 changes: 5 additions & 2 deletions scripts/docker/mlnx.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down

0 comments on commit 98a0196

Please sign in to comment.