From 24e5bc4d433273729e92e6879a51b9e0e1187537 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 | 44 +++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build_centos.yml b/.github/workflows/build_centos.yml index 8892bc74..6fe37dc6 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,17 @@ 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 - cat /etc/yum.repos.d/CentOS-Base.repo - echo "--------------" - cat /etc/yum.repos.d/CentOS-Vault.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 - name: clone the Yubico/yubihsm-shell repository run: | @@ -63,18 +63,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