Skip to content

Commit

Permalink
getepel: refactoring and CI tests (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafie committed Aug 15, 2023
1 parent f97b108 commit 303f412
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/redhat-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 8 additions & 5 deletions bin/getepel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bin/getpy3
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 303f412

Please sign in to comment.