Skip to content

Commit

Permalink
CRB repo installation for RHEL 9 (#1703)
Browse files Browse the repository at this point in the history
## Description
Changes the Line 219 and 221 tests from `||` to `&&`, making the test
for rhel 9 reachable.

## Where should the reviewer start?
Line 219 & 221 changed. Full review requires a Red Hat subscription
(developer subscriptions are fine too) and registering the system via
`subscription-manager` before running `guild-deploy.sh`.

## Motivation and context
Fixing the codeready builder repository for RHEL 9. 

## Which issue it fixes?
Closes #1701 

## How has this been tested?
Fresh RHEL 9 VM created, registered w/ developer subscription enabling
only the initial **rhel-9-for-x86_64-baseos-rpms** and
**rhel-9-for-x86_64-appstream-rpms** default repositories. Then
`./guild-deploy.sh -b rhel-9-crb-repo -s pld` used to test the branch.

```
[guild@rhel92 tmp]$ ./guild-deploy.sh -b rhel-9-crb-repo -s pld

Preparing OS dependency packages for "Red Hat Enterprise Linux" system

  Updating system packages...

  Enabling epel repository...

  Symlink updates not required for ncurse libs, skipping..

  Installing missing prerequisite packages, if any..
Importing GPG key 0x3228467C:
 Userid     : "Fedora (epel9) <[email protected]>"
 Fingerprint: FF8A D134 4597 106E CE81 3B91 8A38 72BF 3228 467C
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-9

Installing Haskell build/compiler dependencies (if missing)...

Installing ghcup (The Haskell Toolchain installer) ..

[Re]-Install libsecp256k1 ...

libsecp256k1 installed to /usr/local/lib/

Building libsodium ...

IOG fork of libsodium installed to /usr/local/lib/

Creating Folder Structure ..

Setting up Environment Variable

Downloading files...

Downloading binaries..

  Downloading Cardano Node archive created from IO CI builds..

  Downloading Github release package for Cardano Wallet

  Downloading Cardano DB Sync archive created from IO CI Builds..
```

---------

Co-authored-by: RdLrT <[email protected]>
  • Loading branch information
TrevorBenson and rdlrt authored Nov 18, 2023
1 parent ec89e1b commit 7f8ca9b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/cnode-helper-scripts/guild-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,8 @@ os_dependencies() {
if [[ "${DISTRO}" =~ Rocky ]]; then
#RockyLinux 8/9
pkg_list="${pkg_list} --enablerepo=devel,crb libusbx ncurses-compat-libs pkgconf-pkg-config"
elif [[ "${DISTRO}" =~ "Red Hat" ]] || [[ "${VERSION_ID}" =~ "8" ]]; then
pkg_list="${pkg_list} --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms libusbx ncurses-compat-libs pkgconf-pkg-config"
elif [[ "${DISTRO}" =~ "Red Hat" ]] || [[ "${VERSION_ID}" =~ "9" ]]; then
pkg_list="${pkg_list} --enablerepo=codeready-builder-for-rhel-9-x86_64-rpms libusbx ncurses-compat-libs pkgconf-pkg-config"
elif [[ "${DISTRO}" =~ "Red Hat" ]]; then
pkg_list="${pkg_list} --enablerepo=codeready-builder-for-rhel-${VERSION_ID/.*/}-x86_64-rpms libusbx ncurses-compat-libs pkgconf-pkg-config"
fi
elif [[ "${DISTRO}" =~ Fedora ]]; then
#Fedora
Expand Down Expand Up @@ -431,7 +429,7 @@ download_ogmios() {
if command -v ogmios >/dev/null; then ogmios_version="$(ogmios --version)"; else ogmios_version="v0.0.0"; fi
rm -rf /tmp/ogmios && mkdir /tmp/ogmios
pushd /tmp/ogmios >/dev/null || err_exit
ogmios_asset_url="$(curl -s https://api.github.com/repos/CardanoSolutions/ogmios/releases | jq -r '.[0].assets[].browser_download_url')"
ogmios_asset_url="$(curl -s https://api.github.com/repos/CardanoSolutions/ogmios/releases | jq -r '.[].assets[].browser_download_url' | grep linux.zip | head -1)"
if curl -sL -f -m ${CURL_TIMEOUT} -o ogmios.zip ${ogmios_asset_url}; then
unzip ogmios.zip &>/dev/null
rm -f ogmios.zip
Expand Down

0 comments on commit 7f8ca9b

Please sign in to comment.