From 0e5918d22f478ebc8a8c4bed93d5a25f83088676 Mon Sep 17 00:00:00 2001
From: Clemens Lange <clemens.lange@cern.ch>
Date: Wed, 15 May 2024 16:41:46 +0200
Subject: [PATCH] Move CentOS 8 image to AlmaLinux 8

---
 .gitlab-ci.yml                 |  2 +-
 README.md                      | 14 +++++++-------
 {c8-cms => al8-cms}/Dockerfile | 16 ++++++++--------
 {c8-cms => al8-cms}/eos.repo   |  0
 check.sh                       |  2 +-
 5 files changed, 17 insertions(+), 17 deletions(-)
 rename {c8-cms => al8-cms}/Dockerfile (88%)
 rename {c8-cms => al8-cms}/eos.repo (100%)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0040a5e..799dd05 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,7 +8,7 @@ stages:
 check_changes_pipeline:
   stage: check
   rules:
-    - changes: [al9-cms/*, c8-cms/*, c8-cvmfs/*, cc7-cms/*, cc7-cvmfs/*, slc6-cms/*, slc6-cvmfs/*, slc5-cms/*, standalone/*]
+    - changes: [al9-cms/*, al8-cms/*, c8-cvmfs/*, cc7-cms/*, cc7-cvmfs/*, slc6-cms/*, slc6-cvmfs/*, slc5-cms/*, standalone/*]
       if: $CI_PIPELINE_SOURCE == 'push' # Trigger if push (for test on branches)
   script:
     - echo "Pipeline source - $CI_PIPELINE_SOURCE"
diff --git a/README.md b/README.md
index 39c6545..9b5be91 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ There are different sets of Dockerfiles in this repository:
 - [cc7-cvmfs](cc7-cvmfs)-based images [![cc7-cvmfs container badge](https://images.microbadger.com/badges/image/cmscloud/cc7-cmssw-cvmfs.svg)](https://microbadger.com/images/cmscloud/cc7-cvmfs) [![cc7-cvmfs container version](https://images.microbadger.com/badges/version/cmscloud/cc7-cvmfs.svg)](https://microbadger.com/images/cmscloud/cc7-cvmfs)
 - [slc6-cvmfs](slc6-cvmfs)-based images [![slc6-cvmfs container badge](https://images.microbadger.com/badges/image/cmscloud/slc6-cvmfs.svg)](https://microbadger.com/images/cmscloud/slc6-cvmfs) [![slc6-cvmfs container version](https://images.microbadger.com/badges/version/cmscloud/slc6-cvmfs.svg)](https://microbadger.com/images/cmscloud/slc6-cvmfs)
 - [al9-cms](al9-cms) images
-- [c8-cms](c8-cms) images
+- [al8-cms](al8-cms) images
 - [cc7-cms](cc7-cms) images [![cc7-cms container badge](https://images.microbadger.com/badges/image/cmscloud/cc7-cms.svg)](https://microbadger.com/images/cmscloud/cc7-cms) [![cc7-cms container version](https://images.microbadger.com/badges/version/cmscloud/cc7-cms.svg)](https://microbadger.com/images/cmscloud/cc7-cms)
 - [slc6-cms](slc6-cms) images [![slc6-cms container badge](https://images.microbadger.com/badges/image/cmscloud/slc6-cms.svg)](https://microbadger.com/images/cmscloud/slc6-cms) [![slc6-cms container version](https://images.microbadger.com/badges/version/cmscloud/slc6-cms.svg)](https://microbadger.com/images/cmscloud/slc6-cms)
 - [slc5-cms](slc5-cms) images [![slc5-cms container badge](https://images.microbadger.com/badges/image/cmscloud/slc5-cms.svg)](https://microbadger.com/images/cmscloud/slc5-cms) [![slc5-cms container version](https://images.microbadger.com/badges/version/cmscloud/slc5-cms.svg)](https://microbadger.com/images/cmscloud/slc5-cms)
@@ -21,8 +21,8 @@ The images are based on different sets of CERN Linux distributions:
 - [Scientific Linux 5 (SLC5)](https://linux-archive.web.cern.ch/scientific/).
 - [Scientific Linux 6 (SLC5)](http://linux.web.cern.ch/linux/scientific6/).
 - [CERN CentOS 7 (CC7)](http://linux.web.cern.ch/linux/centos7/).
-- [CERN CentOS 8 (C8)](https://linux.web.cern.ch/centos8/).
-- [CERN AlmaLinux 9 (AL8)](https://linux.web.cern.ch/almalinux/alma9intro/).
+- [CERN AlmaLinux 8 (AL8)](http://linux.web.cern.ch/almalinux/alma8/).
+- [CERN AlmaLinux 9 (AL9)](https://linux.web.cern.ch/almalinux/alma9intro/).
 
 ## Building containers
 
@@ -74,11 +74,11 @@ make docker_push DIST=c8-cvmfs
 
 ### Building SLC5/SLC6/CC7-CMS/C8-CMS/AL9-CMS versions
 
-These images do not know about CMSSW, they are only an SLC5/SLC6/CC7/C8 image with some additional packages installed. More information on Linux@CERN see the [CERN IT Linux webpage](http://linuxsoft.cern.ch/). CVMFS needs to be mounted as volume (see below):
+These images do not know about CMSSW, they are only an SLC5/SLC6/CC7/AL8/AL9 image with some additional packages installed. More information on Linux@CERN see the [CERN IT Linux webpage](http://linuxsoft.cern.ch/). CVMFS needs to be mounted as volume (see below):
 
 ```shell
-make DIST=c8-cms
-make docker_push DIST=c8-cms
+make DIST=al8-cms
+make docker_push DIST=al8-cms
 ```
 
 ## Running containers
@@ -125,7 +125,7 @@ sudo setenforce 0
 
 This can be changed permanently by editing `/etc/selinux/config`, setting `SELINUX` to `permissive` or `disabled`.
 
-### Running the SLC5/SLC6/CC7/C8-only version
+### Running the SLC5/SLC6/CC7/AL8/AL9-only version
 
 On a machine that has `/cvmfs` mounted (and available to the docker process):
 
diff --git a/c8-cms/Dockerfile b/al8-cms/Dockerfile
similarity index 88%
rename from c8-cms/Dockerfile
rename to al8-cms/Dockerfile
index f5d2e19..4428878 100644
--- a/c8-cms/Dockerfile
+++ b/al8-cms/Dockerfile
@@ -1,11 +1,11 @@
-# CC8 OS capable of using/running CMS software release(s).
+# AlmaLinux 8 OS capable of using/running CMS software release(s).
 
 # Make the base image configurable:
 
-# Use Centos Stream 8
-ARG BASEIMAGE=gitlab-registry.cern.ch/linuxsupport/cs8-base:20220601-1.x86_64
+# Use CERN AlmaLinux 8
+ARG BASEIMAGE=gitlab-registry.cern.ch/linuxsupport/alma8-base:latest
 
-# Set up the C8 CMSSW base:
+# Set up the AlmaLinux 8 CMSSW base:
 FROM ${BASEIMAGE}
 
 LABEL maintainer="CMS Data Preservation and Open Access Group <cms-dpoa-coordinators@cern.ch>"
@@ -16,8 +16,8 @@ ARG VCS_REF
 ARG VCS_URL
 ARG VERSION
 LABEL   org.label-schema.build-date=$BUILD_DATE \
-        org.label-schema.name="C8 CMS base OS" \
-        org.label-schema.description="C8 OS capable of using/running CMS software release(s)." \
+        org.label-schema.name="AlmaLinux 8 CMS base OS" \
+        org.label-schema.description="AlmaLinux8 OS capable of using/running CMS software release(s)." \
         org.label-schema.url="http://cms-sw.github.io/" \
         org.label-schema.vcs-ref=$VCS_REF \
         org.label-schema.vcs-url=$VCS_URL \
@@ -46,7 +46,7 @@ RUN     yum install -y libX11-devel libXext-devel mesa-libGLU-devel \
         yum clean -y all
 
 # Note the second-to-last line (beginning with echo command) is needed for now since the
-# new LSC file configuration for C8 provides only the lsc files but not the vomses configs
+# new LSC file configuration for EL8 provides only the lsc files but not the vomses configs
 # See https://twiki.cern.ch/twiki/bin/view/LCG/VOMSLSCfileConfiguration for more information
 RUN     wget http://repository.egi.eu/sw/production/cas/1/current/repo-files/egi-trustanchors.repo && \
         mv egi-trustanchors.repo /etc/yum.repos.d/ && \
@@ -61,7 +61,7 @@ RUN     wget http://repository.egi.eu/sw/production/cas/1/current/repo-files/egi
 	echo '"cms" "voms-cms-auth.app.cern.ch" "443" "/DC=ch/DC=cern/OU=computers/CN=cms-auth.web.cern.ch" "cms"' > /etc/vomses/voms-cms-auth.app.cern.ch.vomses && \ 
         yum clean -y all
 
-ADD 	c8-cms/eos.repo /etc/yum.repos.d/eos.repo
+ADD 	al8-cms/eos.repo /etc/yum.repos.d/eos.repo
 RUN 	yum --enablerepo=extras install -y epel-release && \
 	yum install -y voms-clients-cpp && \
 	yum install -y eos-client && \
diff --git a/c8-cms/eos.repo b/al8-cms/eos.repo
similarity index 100%
rename from c8-cms/eos.repo
rename to al8-cms/eos.repo
diff --git a/check.sh b/check.sh
index 58a61f3..51f79ba 100755
--- a/check.sh
+++ b/check.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 files=$(git diff-tree --no-commit-id --name-only -r -m $CI_COMMIT_SHA) # Get path to files changed in commit
-regexp="al9-cms\|c8-cms\|c8-cvmfs\|cc7-cms\|cc7-cvmfs\|slc6-cms\|slc6-cvmfs\|slc5-cms"
+regexp="al9-cms\|al8-cms\|c8-cvmfs\|cc7-cms\|cc7-cvmfs\|slc6-cms\|slc6-cvmfs\|slc5-cms"
 if [[ ! -z $CI_COMMIT_BRANCH ]]; then
   regexp="${regexp}\|standalone"
 fi
-- 
GitLab