From 130cd1e5ef4d51a623d88e11f66b2fe8bb7f2ebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20Mar=C3=A9chal?= <45510813+JasonMarechal25@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:59:07 +0200 Subject: [PATCH] Use devtoolset 11 for CentOS (#911) Update to devtoolset 11 --- .github/workflows/build_centos7.yml | 6 +++--- .github/workflows/publish_centos_docker.yml | 2 +- docker/centos7-system-deps | 18 +++++++++++++----- src/cpp/helpers/ArchiveReader.cpp | 3 +-- src/cpp/helpers/ArchiveWriter.cpp | 5 +++-- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_centos7.yml b/.github/workflows/build_centos7.yml index 32c86126b..e5bcaa93c 100644 --- a/.github/workflows/build_centos7.yml +++ b/.github/workflows/build_centos7.yml @@ -40,7 +40,7 @@ jobs: workdir: docker dockerfile: centos7-system-deps cache: false - tags: latest,1.0.0 + tags: latest,1.1.0 versions: runs-on: ubuntu-latest @@ -89,7 +89,7 @@ jobs: steps: - run: | - source /opt/rh/devtoolset-10/enable + source /opt/rh/devtoolset-11/enable echo $PATH >> $GITHUB_PATH - name: Get release if: github.event_name == 'release' && github.event.action == 'created' @@ -161,7 +161,7 @@ jobs: - name: Configure run: | - source /opt/rh/devtoolset-10/enable + source /opt/rh/devtoolset-11/enable cmake -B _build -S . \ -DBUILD_TESTING=ON \ -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/deps \ diff --git a/.github/workflows/publish_centos_docker.yml b/.github/workflows/publish_centos_docker.yml index 53284c09d..2dbd51b6d 100644 --- a/.github/workflows/publish_centos_docker.yml +++ b/.github/workflows/publish_centos_docker.yml @@ -24,4 +24,4 @@ jobs: workdir: docker dockerfile: centos7-system-deps cache: false - tags: latest,1.0.0 \ No newline at end of file + tags: latest,1.1.0 \ No newline at end of file diff --git a/docker/centos7-system-deps b/docker/centos7-system-deps index cf2e7b824..29dc1a6dd 100644 --- a/docker/centos7-system-deps +++ b/docker/centos7-system-deps @@ -1,14 +1,22 @@ FROM centos:7 -# Install requirements: update repo -RUN yum update -y - # Install requirements : install epel -RUN yum install -y epel-release + +RUN 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 update -y + +#not a typo, centos-release-scl is needed to install devtoolset-10 but introduce deprecated mirror +RUN yum install -y epel-release centos-release-scl + +RUN 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 RUN \ yum install -y wget git epel-release redhat-lsb-core gcc gcc-c++ make centos-release-scl scl-utils &&\ - yum install -y devtoolset-10-gcc* environment-modules rpm-build zlib-devel &&\ + yum install -y devtoolset-11-gcc* environment-modules rpm-build zlib-devel &&\ yum install -y doxygen graphviz &&\ yum install -y install python3-devel && \ yum install -y libuuid-devel diff --git a/src/cpp/helpers/ArchiveReader.cpp b/src/cpp/helpers/ArchiveReader.cpp index eb8491d6d..4561e700b 100644 --- a/src/cpp/helpers/ArchiveReader.cpp +++ b/src/cpp/helpers/ArchiveReader.cpp @@ -1,10 +1,9 @@ #include "ArchiveReader.h" -#include #include -#include #include #include +#include #include "LogUtils.h" diff --git a/src/cpp/helpers/ArchiveWriter.cpp b/src/cpp/helpers/ArchiveWriter.cpp index 7ccc8f1a7..8f8ba622d 100644 --- a/src/cpp/helpers/ArchiveWriter.cpp +++ b/src/cpp/helpers/ArchiveWriter.cpp @@ -1,12 +1,13 @@ #include "ArchiveWriter.h" -#include - +#include #include #include #include +#include #include "LogUtils.h" + ArchiveWriter::ArchiveWriter(const std::filesystem::path& archivePath) : ArchiveIO(archivePath) { Create();