From f15d0d34e1c308a4c7a5f59391c2c89d3a86622f Mon Sep 17 00:00:00 2001 From: Aveen Ismail Date: Fri, 27 Sep 2024 17:28:31 +0200 Subject: [PATCH] Githubactions: Centos7: Replace repo mirror --- .github/workflows/build_centos.yml | 48 ++++++++++++++++-------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build_centos.yml b/.github/workflows/build_centos.yml index 8892bc74..17359da5 100644 --- a/.github/workflows/build_centos.yml +++ b/.github/workflows/build_centos.yml @@ -13,9 +13,6 @@ jobs: - environment: "centos:7" cc: "gcc" upload_for_test: "false" - - environment: "centos:8" - cc: "gcc" - upload_for_test: "false" name: build on ${{ matrix.environment }} runs-on: ubuntu-latest @@ -25,14 +22,21 @@ jobs: - name: Setup OS run: | - curl https://vault.centos.org/7.9.2009/os/x86_64/RPM-GPG-KEY-CentOS-7 > centos7.key - pwd - ls - ls /etc/yum.repos.d + + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo + + yum -y update + yum -y install epel-release + + yum -y install gcc gcc-c++ cmake gengetopt openssl openssl-devel libedit-devel libcurl-devel libusbx-devel pcsc-lite-devel help2man chrpath rpm-build redhat-rpm-config + + yum install -y checksec procps-ng jq file which curl - cat /etc/yum.repos.d/CentOS-Base.repo - echo "--------------" - cat /etc/yum.repos.d/CentOS-Vault.repo + GENGETOPT_VER=2.23 + curl -o gengetopt-${GENGETOPT_VER}.rpm https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/g/gengetopt-2.23-1.el7.x86_64.rpm + yum -y install ./gengetopt-${GENGETOPT_VER}.rpm - name: clone the Yubico/yubihsm-shell repository run: | @@ -63,18 +67,18 @@ jobs: PLATFORM=$(echo -n "$DOCKER_IMAGE" | sed -E 's/[^a-zA-Z0-9]//g') echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV - - name: install dependencies - env: - PLATFORM: ${{ env.PLATFORM }} - run: | - cd yubihsm-shell/resources/release/linux - ./install_redhat_dependencies.sh $PLATFORM - - if [ $PLATFORM = "centos7" ]; then - # enable the epel repository for centos - yum install -y epel-release - fi - yum install -y checksec procps-ng jq file which curl +# - name: install dependencies +# env: +# PLATFORM: ${{ env.PLATFORM }} +# run: | +# cd yubihsm-shell/resources/release/linux +# ./install_redhat_dependencies.sh $PLATFORM +# +# if [ $PLATFORM = "centos7" ]; then +# # enable the epel repository for centos +# yum install -y epel-release +# fi +# yum install -y checksec procps-ng jq file which curl - name: build release working-directory: yubihsm-shell