From: Matthew Newton Date: Mon, 8 Jul 2024 12:36:03 +0000 (+0100) Subject: Fixups for CentOS 7 which is now EOL X-Git-Tag: release_3_2_5~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c7ef86cbe1f53ffa34ab5e84d29d43bd14b49ba;p=thirdparty%2Ffreeradius-server.git Fixups for CentOS 7 which is now EOL --- diff --git a/.github/workflows/ci-rpm.yml b/.github/workflows/ci-rpm.yml index 9aa584ac7c7..00c56f9e0e2 100644 --- a/.github/workflows/ci-rpm.yml +++ b/.github/workflows/ci-rpm.yml @@ -15,9 +15,9 @@ jobs: strategy: matrix: env: - - { NAME: "centos-7", OS: "centos:7" } - - { NAME: "rocky-8", OS: "rockylinux/rockylinux:8" } - - { NAME: "rocky-9", OS: "rockylinux/rockylinux:9" } + - { NAME: "centos-7", OS: "centos:7", BADNODE: true } + - { NAME: "rocky-8", OS: "rockylinux/rockylinux:8", BADNODE: false } + - { NAME: "rocky-9", OS: "rockylinux/rockylinux:9", BADNODE: false } fail-fast: false runs-on: ubuntu-latest @@ -28,11 +28,18 @@ jobs: env: HOSTAPD_BUILD_DIR: /tmp/eapol_test.ci HOSTAPD_GIT_TAG: hostapd_2_8 + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: ${{ matrix.env.BADNODE }} name: "RPM build" steps: + - name: Fix up CentOS 7 repositories + if: ${{ matrix.env.NAME == 'centos-7' }} + run: | + sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-* + sed -i "s|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-* + # Required so that the checkout action uses git protocol rather than the GitHub REST API. # make rpm requires the FR directory to be a git repository. - name: Install recent git for CentOS 7 @@ -194,9 +201,9 @@ jobs: strategy: matrix: env: - - { NAME: "centos-7", OS: "centos:7" } - - { NAME: "rocky-8", OS: "rockylinux/rockylinux:8" } - - { NAME: "rocky-9", OS: "rockylinux/rockylinux:9" } + - { NAME: "centos-7", OS: "centos:7", BADNODE: true } + - { NAME: "rocky-8", OS: "rockylinux/rockylinux:8", BADNODE: false } + - { NAME: "rocky-9", OS: "rockylinux/rockylinux:9", BADNODE: false } fail-fast: false runs-on: ubuntu-latest @@ -204,10 +211,19 @@ jobs: container: image: ${{ matrix.env.OS }} + env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: ${{ matrix.env.BADNODE }} + name: "RPM install test" steps: + - name: Fix up CentOS 7 repositories + if: ${{ matrix.env.NAME == 'centos-7' }} + run: | + sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-* + sed -i "s|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-* + - name: Install yum if: ${{ matrix.env.NAME == 'rocky-9'}} run: | diff --git a/scripts/crossbuild/docker/centos7/Dockerfile b/scripts/crossbuild/docker/centos7/Dockerfile index 81188fb44ea..91f25b3738d 100644 --- a/scripts/crossbuild/docker/centos7/Dockerfile +++ b/scripts/crossbuild/docker/centos7/Dockerfile @@ -6,6 +6,13 @@ ARG from=centos:7 FROM ${from} as build +# +# CentOS 7 is now EOL, so we need to fix up the repo source +# +RUN sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-* +RUN sed -i "s|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-* + + # # Install devtools like make and git and the EPEL # repository for freetds and hiredis @@ -18,6 +25,8 @@ RUN yum install -y rpmdevtools openssl epel-release git procps yum-utils \ # Install GCC that has the requisite support for C11 keywords and atomics # RUN yum install -y centos-release-scl +RUN sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-* +RUN sed -i "s|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-* RUN yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++ ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc diff --git a/scripts/crossbuild/m4/Dockerfile.rpm.m4 b/scripts/crossbuild/m4/Dockerfile.rpm.m4 index cd56d34ad1d..714ee6e541c 100644 --- a/scripts/crossbuild/m4/Dockerfile.rpm.m4 +++ b/scripts/crossbuild/m4/Dockerfile.rpm.m4 @@ -1,6 +1,14 @@ ARG from=DOCKER_IMAGE FROM ${from} as build +ifelse(OS_VER, 7, `dnl +# +# CentOS 7 is now EOL, so we need to fix up the repo source +# +RUN sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-* +RUN sed -i "s|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-* +')dnl + ifelse(OS_VER, `9', `dnl # # Install yum @@ -21,6 +29,8 @@ ifelse(OS_VER, `7', `dnl # Install GCC that has the requisite support for C11 keywords and atomics # RUN yum install -y centos-release-scl +RUN sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-* +RUN sed -i "s|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-* RUN yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++ ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc diff --git a/scripts/docker/dists/centos7/Dockerfile b/scripts/docker/dists/centos7/Dockerfile index 3140a15beae..0e266b7eac4 100644 --- a/scripts/docker/dists/centos7/Dockerfile +++ b/scripts/docker/dists/centos7/Dockerfile @@ -6,6 +6,12 @@ ARG from=centos:7 FROM ${from} as build +# +# CentOS 7 is now EOL, so we need to fix up the repo source +# +RUN sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-* +RUN sed -i "s|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-* + # @@ -96,6 +102,12 @@ FROM ${from} COPY --from=build /root/rpms /tmp/ +# +# CentOS 7 is now EOL, so we need to fix up the repo source +# +RUN sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-* +RUN sed -i "s|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-* + # Use LTB's openldap packages intead of the distribution version to avoid linking against NSS RUN echo $'[ltb-project]\n\ diff --git a/scripts/docker/m4/Dockerfile.rpm.m4 b/scripts/docker/m4/Dockerfile.rpm.m4 index 198510a6785..03181e8185e 100644 --- a/scripts/docker/m4/Dockerfile.rpm.m4 +++ b/scripts/docker/m4/Dockerfile.rpm.m4 @@ -1,6 +1,14 @@ ARG from=DOCKER_IMAGE FROM ${from} as build +ifelse(OS_VER, 7, `dnl +# +# CentOS 7 is now EOL, so we need to fix up the repo source +# +RUN sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-* +RUN sed -i "s|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-* +')dnl + ifelse(OS_VER, `7', `', `dnl # # Install yum @@ -120,6 +128,14 @@ FROM ${from} COPY --from=build /root/rpms /tmp/ +ifelse(OS_VER, 7, `dnl +# +# CentOS 7 is now EOL, so we need to fix up the repo source +# +RUN sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/CentOS-* +RUN sed -i "s|#\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-* +')dnl + ifelse(OS_VER, `7', `', `dnl # # Install yum