From 0be201b7135f39a6badcb06dfd103331eac95ff8 Mon Sep 17 00:00:00 2001 From: Nick Porter Date: Mon, 20 May 2024 09:30:42 +0100 Subject: [PATCH] Ensure yum is installed on Rocky 9 Once CentOS 7 goes EoL, we can switch to dnf --- .github/workflows/ci-rpm.yml | 11 +++++++++++ scripts/crossbuild/docker/rocky9/Dockerfile | 5 +++++ scripts/crossbuild/m4/Dockerfile.rpm.m4 | 7 +++++++ scripts/docker/m4/Dockerfile.rpm.m4 | 7 +++++++ scripts/docker/rocky9/Dockerfile | 5 +++++ 5 files changed, 35 insertions(+) diff --git a/.github/workflows/ci-rpm.yml b/.github/workflows/ci-rpm.yml index 3a8add69a5..9aa584ac7c 100644 --- a/.github/workflows/ci-rpm.yml +++ b/.github/workflows/ci-rpm.yml @@ -40,6 +40,12 @@ jobs: run: | yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/git-core-2.30.1-1.ep7.x86_64.rpm + # Rocky 9 uses dnf by default. CentOS 7 doesn't have dnf. Install yum on Rocky 9 so all distros work + - name: Install yum + if: ${{ matrix.env.NAME == 'rocky-9'}} + run: | + dnf install -y yum + - name: Install distro git for Rocky. if: ${{ startsWith(matrix.env.NAME, 'rocky-') }} run: | @@ -202,6 +208,11 @@ jobs: steps: + - name: Install yum + if: ${{ matrix.env.NAME == 'rocky-9'}} + run: | + dnf install -y yum + - name: LTB repo for CentOS and Rocky 8 if: ${{ startsWith(matrix.env.NAME, 'centos-') || matrix.env.NAME == 'rocky-8' }} run: | diff --git a/scripts/crossbuild/docker/rocky9/Dockerfile b/scripts/crossbuild/docker/rocky9/Dockerfile index e85ee512f6..9936fe461b 100644 --- a/scripts/crossbuild/docker/rocky9/Dockerfile +++ b/scripts/crossbuild/docker/rocky9/Dockerfile @@ -6,6 +6,11 @@ ARG from=rockylinux/rockylinux:9 FROM ${from} as build +# +# Install yum +# +RUN dnf install -y yum + # # Install devtools like make and git and the EPEL # repository for freetds and hiredis diff --git a/scripts/crossbuild/m4/Dockerfile.rpm.m4 b/scripts/crossbuild/m4/Dockerfile.rpm.m4 index 5a33166f68..cd56d34ad1 100644 --- a/scripts/crossbuild/m4/Dockerfile.rpm.m4 +++ b/scripts/crossbuild/m4/Dockerfile.rpm.m4 @@ -1,6 +1,13 @@ ARG from=DOCKER_IMAGE FROM ${from} as build +ifelse(OS_VER, `9', `dnl +# +# Install yum +# +RUN dnf install -y yum +')dnl + # # Install devtools like make and git and the EPEL # repository for freetds and hiredis diff --git a/scripts/docker/m4/Dockerfile.rpm.m4 b/scripts/docker/m4/Dockerfile.rpm.m4 index 20bbf6638e..9f793f0e56 100644 --- a/scripts/docker/m4/Dockerfile.rpm.m4 +++ b/scripts/docker/m4/Dockerfile.rpm.m4 @@ -1,6 +1,13 @@ ARG from=DOCKER_IMAGE FROM ${from} as build +ifelse(OS_VER, `9', `dnl +# +# Install yum +# +RUN dnf install -y yum +')dnl + ifelse(OS_VER, 8, `dnl RUN rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial ')dnl diff --git a/scripts/docker/rocky9/Dockerfile b/scripts/docker/rocky9/Dockerfile index 6e42bd3d27..241be86363 100644 --- a/scripts/docker/rocky9/Dockerfile +++ b/scripts/docker/rocky9/Dockerfile @@ -6,6 +6,11 @@ ARG from=rockylinux/rockylinux:9 FROM ${from} as build +# +# Install yum +# +RUN dnf install -y yum + RUN rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9 # -- 2.47.3