]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
workflow: Install a more recent version of Git for centos 7
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 12 Apr 2023 00:14:25 +0000 (10:14 +1000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 12 Apr 2023 00:30:46 +0000 (10:30 +1000)
.github/workflows/ci-rpm.yml

index bfe860c3134aa0d6ec4814aa2a53be287098c10f..ca7792975a928819ac504e03a47137a762ce1a13 100644 (file)
@@ -74,18 +74,29 @@ jobs:
     name: "RPM build"
 
     steps:
+    - name: Extra repos for CentOS and Rocky Linux
+      run: |
+        echo '[ltb-project]'                                              >  /etc/yum.repos.d/ltb-project.repo
+        echo 'name=LTB project packages'                                  >> /etc/yum.repos.d/ltb-project.repo
+        echo 'baseurl=https://ltb-project.org/rpm/$releasever/$basearch'  >> /etc/yum.repos.d/ltb-project.repo
+        echo 'enabled=1'                                                  >> /etc/yum.repos.d/ltb-project.repo
+        echo 'gpgcheck=1'                                                 >> /etc/yum.repos.d/ltb-project.repo
+        echo 'gpgkey=https://www.ltb-project.org/documentation/_static/RPM-GPG-KEY-LTB-project' >> /etc/yum.repos.d/ltb-project.repo
+        rpm --import https://www.ltb-project.org/documentation/_static/RPM-GPG-KEY-LTB-project
+        yum install -y epel-release
 
-    # 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
-      if: ${{ matrix.env.NAME == 'centos-7' }}
+    - name: Enable PowerTools on CentOS 8
+      if: ${{ matrix.env.NAME == 'stream-8' || matrix.env.NAME == 'rocky-8' }}
       run: |
-        yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/git-core-2.24.1-1.ep7.x86_64.rpm
+        yum install -y yum-utils dnf-plugins-core
+        yum config-manager --enable PowerTools || :
+        yum config-manager --enable powertools || :
 
-    - name: Install distro git for CentOS > 7
-      if: ${{ matrix.env.NAME != 'centos-7' }}
+    # For pkill
+    - name: Enable procps-ng on CentOS 8
+      if: ${{ matrix.env.NAME == 'stream-8' || matrix.env.NAME == 'rocky-8' }}
       run: |
-        yum install -y git-core
+        yum install -y procps-ng
 
     - name: Set up NetworkRADIUS extras repository
       run: |
@@ -99,7 +110,7 @@ jobs:
 
     - name: Install common tools
       run: |
-        yum install -y yum-utils rpm-build openssl make gcc perl
+        yum install -y rpm-build openssl make gcc perl
 
     - name: Install SCL compiler on CentOS 7
       if: ${{ matrix.env.NAME == 'centos-7' }}
@@ -109,32 +120,28 @@ jobs:
         rm -f /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
         rm -f /etc/yum.repos.d/CentOS-SCLo-scl.repo
 
-    - uses: actions/checkout@v3
-      with:
-        path: freeradius
+    # 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: Extra repos for CentOS and Rocky Linux
+    # Centos 7 installs an extremely old version of Git.  This version of git's archive
+    # command is missing --add-file and --add-virtual-file so cannot be used for creating
+    # tarballs.  Here we install a more modern version from a 3rd party repo listed on the
+    # git website.
+    - name: Install recent git for CentOS 7
+      if: ${{ matrix.env.NAME == 'centos-7' }}
       run: |
-        echo '[ltb-project]'                                              >  /etc/yum.repos.d/ltb-project.repo
-        echo 'name=LTB project packages'                                  >> /etc/yum.repos.d/ltb-project.repo
-        echo 'baseurl=https://ltb-project.org/rpm/$releasever/$basearch'  >> /etc/yum.repos.d/ltb-project.repo
-        echo 'enabled=1'                                                  >> /etc/yum.repos.d/ltb-project.repo
-        echo 'gpgcheck=1'                                                 >> /etc/yum.repos.d/ltb-project.repo
-        echo 'gpgkey=https://www.ltb-project.org/documentation/_static/RPM-GPG-KEY-LTB-project' >> /etc/yum.repos.d/ltb-project.repo
-        rpm --import https://www.ltb-project.org/documentation/_static/RPM-GPG-KEY-LTB-project
-        yum install -y epel-release
+        yum remove git
+        rpm -U https://repo.ius.io/ius-release-el7.rpm
+        yum install -y git2*-core
 
-    - name: Enable PowerTools on CentOS 8
-      if: ${{ matrix.env.NAME == 'stream-8' || matrix.env.NAME == 'rocky-8' }}
+    - name: Install distro git for CentOS > 7
+      if: ${{ matrix.env.NAME != 'centos-7' }}
       run: |
-        yum config-manager --enable PowerTools || :
-        yum config-manager --enable powertools || :
+        yum install -y git-core
 
-    # For pkill
-    - name: Enable procps-ng on CentOS 8
-      if: ${{ matrix.env.NAME == 'stream-8' || matrix.env.NAME == 'rocky-8' }}
-      run: |
-        yum install -y procps-ng
+    - uses: actions/checkout@v3
+      with:
+        path: freeradius
 
     #
     #  It has been observed that sometimes not all the dependencies are
@@ -245,7 +252,7 @@ jobs:
     - name: Enable PowerTools on Centos 8
       if: ${{ matrix.env.NAME == 'stream-8' || matrix.env.NAME == 'rocky-8' }}
       run: |
-        yum install -y yum-utils
+        yum install -y yum-utils dnf-plugins-core
         yum config-manager --enable PowerTools || :
         yum config-manager --enable powertools || :