]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix Centos 8 CI build and enable Rocky 8 (#4399)
authorJorge Pereira <jpereira@users.noreply.github.com>
Fri, 4 Mar 2022 14:36:40 +0000 (11:36 -0300)
committerGitHub <noreply@github.com>
Fri, 4 Mar 2022 14:36:40 +0000 (09:36 -0500)
* Fix Centos 8 CI build

* Enable Rocky 8 CI build

As the Centos 8 is EOL. Let's also consider see if the build is ok on
Rocky 8.

.github/workflows/ci-rpm.yml

index c1f1dcaf6e47fa14a9085b1d28f1cec9632632bf..577f6173417e282bd6a61c3d94442676525090c1 100644 (file)
@@ -31,9 +31,9 @@ jobs:
           M=$(cat <<EOF
           {
             "env": [
-              { "NAME": "centos-7", "OS": "centos:7", "DIST": "centos"              },
-              { "NAME": "centos-8", "OS": "centos:8", "DIST": "centos"              },
-              { "NAME": "rocky-8", "OS": "rockylinux/rockylinux:8", "DIST": "rocky" }
+              { "NAME": "centos-7", "OS": "centos:7",                "DIST": "centos" },
+              { "NAME": "centos-8", "OS": "centos:8",                "DIST": "centos" },
+              { "NAME": "rocky-8",  "OS": "rockylinux/rockylinux:8", "DIST": "rocky"  }
             ]
           }
         EOF
@@ -42,7 +42,8 @@ jobs:
           M=$(cat <<EOF
           {
             "env": [
-              { "NAME": "centos-8", "OS": "centos:8", "DIST": "centos"             },
+              { "NAME": "centos-8", "OS": "centos:8",                "DIST": "centos" },
+              { "NAME": "rocky-8",  "OS": "rockylinux/rockylinux:8", "DIST": "rocky"  }
             ]
           }
         EOF
@@ -73,6 +74,22 @@ jobs:
 
     steps:
 
+    #
+    # Centos 8 is EOL, so we need the below tricks to get it to work.
+    #
+    # Converting from CentOS Linux 8 to CentOS Stream 8 is the "official" process
+    # (see centos.org/centos-stream/#centos-stream-8):
+    #
+    - name: Some hacks for CentOS 8 (EOL) to work again.
+      if: ${{ matrix.env.NAME == 'centos-8' }}
+      run: |
+        sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
+        sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*
+        yum upgrade -y
+        yum -y --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos
+        yum clean all && yum makecache
+        yum distro-sync -y --allowerasing
+
     # 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
@@ -129,6 +146,12 @@ jobs:
         yum config-manager --enable PowerTools || :
         yum config-manager --enable powertools || :
 
+    # For pkill
+    - name: Enable procps-ng on Fedora and Centos 8
+      if: ${{ startsWith(matrix.env.NAME, 'fedora-') || startsWith(matrix.env.NAME, 'rocky-8') || startsWith(matrix.env.NAME, 'centos-8') }}
+      run: |
+        yum install -y procps-ng
+
     #
     #  We just patch the SPEC file for Fedora since we want to use the standard
     #  make rpm target which wants to build with LDAP.
@@ -218,6 +241,22 @@ jobs:
 
     steps:
 
+    #
+    # Centos 8 is EOL, so we need the below tricks to get it to work.
+    #
+    # Converting from CentOS Linux 8 to CentOS Stream 8 is the "official" process
+    # (see centos.org/centos-stream/#centos-stream-8):
+    #
+    - name: Some hacks for CentOS 8 (EOL) to work again.
+      if: ${{ matrix.env.NAME == 'centos-8' }}
+      run: |
+        sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
+        sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*
+        yum upgrade -y
+        yum -y --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos
+        yum clean all && yum makecache
+        yum distro-sync -y --allowerasing
+
     - name: Set up NetworkRADIUS extras repository
       run: |
         echo '[networkradius-extras]'                                                               >  /etc/yum.repos.d/networkradius-extras.repo
@@ -249,8 +288,8 @@ jobs:
         yum config-manager --enable powertools || :
 
     # For pkill
-    - name: Enable procps-ng on Fedora
-      if: ${{ startsWith(matrix.env.NAME, 'fedora-') }}
+    - name: Enable procps-ng on Fedora and Centos 8
+      if: ${{ startsWith(matrix.env.NAME, 'fedora-') || startsWith(matrix.env.NAME, 'rocky-8') || startsWith(matrix.env.NAME, 'centos-8') }}
       run: |
         yum install -y procps-ng