From 3817abe0e4006259626ab496780f90f5f1b86ac6 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Tue, 1 Feb 2022 20:13:17 +0100 Subject: [PATCH] treewide: use almalinux instead of centos8 CentOS Linux 8 is EOL, attempting to install packages in it results in an error. CentOS Linux is a rebuild of RHEL (stable versions). The CentOS projects recommends to use CentOS Stream instead, which is a build of the "public development branch for RHEL". After the early EOL was announced on 2020-12-08, alternative projects AlmaLinux and Rocky Linux have been established as binary compatible forks of RHEL 8 (stable versions). Both Alma and Rocky seem to be solid projects, see related Wikipedia articles and their sources. Pick Alma and adjust the whole tree to use the almalinux:8 docker image instead of centos:centos8. Fix for: Error: Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried Related: SYS#5818 Related: https://www.centos.org/cl-vs-cs/ Related: https://www.centos.org/centos-linux-eol/ Related: https://bugs.centos.org/view.php?id=18394 Related: https://en.wikipedia.org/wiki/AlmaLinux Related: https://en.wikipedia.org/wiki/Rocky_Linux Change-Id: I30e1a773b901b1d2187214445116c7f2aecc4e36 --- centos8-build/Dockerfile | 2 +- centos8-build/Makefile | 2 +- centos8-obs-latest/Dockerfile | 2 +- centos8-obs-latest/Makefile | 2 +- centos8-repo-install-test/Dockerfile | 2 +- jenkins-common.sh | 6 +++--- systemd/Dockerfile | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/centos8-build/Dockerfile b/centos8-build/Dockerfile index e36e3f01..26ef8192 100644 --- a/centos8-build/Dockerfile +++ b/centos8-build/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY=docker.io -ARG UPSTREAM_DISTRO=centos:centos8 +ARG UPSTREAM_DISTRO=almalinux:8 FROM ${REGISTRY}/${UPSTREAM_DISTRO} # Arguments used after FROM must be specified again ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" diff --git a/centos8-build/Makefile b/centos8-build/Makefile index cba5cee8..a18eb5cf 100644 --- a/centos8-build/Makefile +++ b/centos8-build/Makefile @@ -1,3 +1,3 @@ -UPSTREAM_DISTRO:=centos:centos8 +UPSTREAM_DISTRO:=almalinux:8 DISTRO:=centos8 include ../make/Makefile diff --git a/centos8-obs-latest/Dockerfile b/centos8-obs-latest/Dockerfile index 4e180dee..69eeb796 100644 --- a/centos8-obs-latest/Dockerfile +++ b/centos8-obs-latest/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY=docker.io -ARG UPSTREAM_DISTRO=centos:centos8 +ARG UPSTREAM_DISTRO=almalinux:8 FROM ${REGISTRY}/${UPSTREAM_DISTRO} # Arguments used after FROM must be specified again ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" diff --git a/centos8-obs-latest/Makefile b/centos8-obs-latest/Makefile index cba5cee8..a18eb5cf 100644 --- a/centos8-obs-latest/Makefile +++ b/centos8-obs-latest/Makefile @@ -1,3 +1,3 @@ -UPSTREAM_DISTRO:=centos:centos8 +UPSTREAM_DISTRO:=almalinux:8 DISTRO:=centos8 include ../make/Makefile diff --git a/centos8-repo-install-test/Dockerfile b/centos8-repo-install-test/Dockerfile index 27d7a597..2f1c3454 100644 --- a/centos8-repo-install-test/Dockerfile +++ b/centos8-repo-install-test/Dockerfile @@ -1,6 +1,6 @@ ARG USER ARG REGISTRY=docker.io -ARG UPSTREAM_DISTRO=centos:centos8 +ARG UPSTREAM_DISTRO=almalinux:8 FROM ${REGISTRY}/${UPSTREAM_DISTRO} # dnf-utils: for repoquery diff --git a/jenkins-common.sh b/jenkins-common.sh index 1e9435a7..7130fe2f 100644 --- a/jenkins-common.sh +++ b/jenkins-common.sh @@ -39,9 +39,9 @@ docker_distro_from_image_name() { docker_upstream_distro_from_image_name() { case "$1" in osmo-*-centos7) echo "centos:centos7"; ;; - osmo-*-centos8) echo "centos:centos8"; ;; + osmo-*-centos8) echo "almalinux:8"; ;; centos7-*) echo "centos:centos7" ;; - centos8-*) echo "centos:centos8" ;; + centos8-*) echo "almalinux:8" ;; debian9-*) echo "debian:stretch" ;; debian10-*) echo "debian:buster" ;; debian11-*) echo "debian:bullseye" ;; @@ -120,7 +120,7 @@ list_osmo_packages() { # name (e.g. osmo-mgw-master-centos8), it gets removed from the subdir # where the Dockerfile is taken from (e.g. osmo-mgw-master/Dockerfile) # and UPSTREAM_DISTRO and DISTRO are passed accordingly (e.g. -# UPSTREAM_DISTRO=centos:centos8 DISTRO=centos8). This allows one +# UPSTREAM_DISTRO=almalinux:8 DISTRO=centos8). This allows one # Dockerfile for multiple distributions, without duplicating configs for # each distribution. Dependencies listed in docker_depends() are built # automatically too. diff --git a/systemd/Dockerfile b/systemd/Dockerfile index 8f1763de..63d4c40d 100644 --- a/systemd/Dockerfile +++ b/systemd/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY=docker.io -ARG UPSTREAM_DISTRO=centos:centos8 +ARG UPSTREAM_DISTRO=almalinux:8 FROM ${REGISTRY}/${UPSTREAM_DISTRO} # Arguments used after FROM must be specified again ARG DISTRO