From 303f4120dd4a7527ba2196d10c69e5af985845b3 Mon Sep 17 00:00:00 2001 From: rafie Date: Tue, 15 Aug 2023 19:57:59 +0300 Subject: [PATCH] getepel: refactoring and CI tests (3) --- .github/workflows/redhat-compat.yml | 2 +- bin/getepel | 13 ++++++++----- bin/getpy3 | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/redhat-compat.yml b/.github/workflows/redhat-compat.yml index b00200c..ba3ca2e 100644 --- a/.github/workflows/redhat-compat.yml +++ b/.github/workflows/redhat-compat.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Prerequisites run: | - yum install -y tar + yum install -y tar gzip - uses: actions/checkout@v3 with: submodules: false diff --git a/bin/getepel b/bin/getepel index 94d529d..c264c40 100755 --- a/bin/getepel +++ b/bin/getepel @@ -152,10 +152,15 @@ fi #---------------------------------------------------------------------------------------------- if [[ $os == ol ]]; then + if [[ $EPEL == 7 ]]; then + baseurl="https://yum.oracle.com/repo/OracleLinux/OL${EPEL}/developer_EPEL/\$basearch/" + else + baseurl="https://yum.oracle.com/repo/OracleLinux/OL${EPEL}/developer/EPEL/\$basearch/" + fi tee /etc/yum.repos.d/ol${EPEL}-epel.repo<<-EOF [ol${EPEL}_developer_EPEL] name= Oracle Linux \$releasever EPEL (\$basearch) - baseurl=https://yum.oracle.com/repo/OracleLinux/OL${EPEL}/developer/EPEL/\$basearch/ + baseurl=${baseurl} gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1 @@ -180,10 +185,8 @@ fi if is_command dnf; then runn dnf install -y dnf-plugins-core - runn dnf config-manager -y --set-enabled powertools - if (( EPEL > 8 )); then - runn dnf config-manager -y --set-enabled crb - fi + (( EPEL < 9 )) && runn dnf config-manager -y --set-enabled powertools + (( EPEL > 8 )) && runn dnf config-manager -y --set-enabled crb runn dnf install -y epel-release # runn dnf install -y --allowerasing https://dl.fedoraproject.org/pub/epel/epel-release-latest-${EPEL}.noarch.rpm diff --git a/bin/getpy3 b/bin/getpy3 index 0596288..2a1cad0 100755 --- a/bin/getpy3 +++ b/bin/getpy3 @@ -236,7 +236,7 @@ install_python() { elif is_command dnf; then runn $SUDO dnf install -y python3 elif is_command yum; then - if (( os == amzn && osver > 2 )); then + if [[ $os == amzn && $(echo "$osverid > 2" | bc -l) == 1 ]]; then xinstall python3 else install_modern_python