From: Arran Cudbard-Bell Date: Wed, 12 Apr 2023 00:14:25 +0000 (+1000) Subject: workflow: Install a more recent version of Git for centos 7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aabbed1d4cb38bf6f03cca56b726e5ef35a2d06e;p=thirdparty%2Ffreeradius-server.git workflow: Install a more recent version of Git for centos 7 --- diff --git a/.github/workflows/ci-rpm.yml b/.github/workflows/ci-rpm.yml index bfe860c313..ca7792975a 100644 --- a/.github/workflows/ci-rpm.yml +++ b/.github/workflows/ci-rpm.yml @@ -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 || :