From 202779cbd2b830e791062ce05971e23417bead78 Mon Sep 17 00:00:00 2001 From: RdLrT <3169068+rdlrt@users.noreply.github.com> Date: Tue, 28 May 2024 16:56:23 +1000 Subject: [PATCH] Minor fixes for guild-deploy (#1773) ## Description Minor fixes for secp and libsodium commit references, move build_libsecp to be part of build dependencies, remove aptitude --- docs/Appendix/postgres.md | 2 +- docs/basics.md | 2 +- files/configs/guild/topology.json | 2 +- files/configs/preprod/topology.json | 2 +- scripts/cnode-helper-scripts/guild-deploy.sh | 11 +++++------ 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/Appendix/postgres.md b/docs/Appendix/postgres.md index ea6585a08..8346b3ec2 100644 --- a/docs/Appendix/postgres.md +++ b/docs/Appendix/postgres.md @@ -19,7 +19,7 @@ if [ -z "${OS_ID##*debian*}" ]; then RELEASE=$(lsb_release -cs) echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}"-pgdg main | sudo tee /etc/apt/sources.list.d/pgdg.list sudo apt-get update - sudo apt-get -y install postgresql-15 postgresql-server-dev-15 postgresql-contrib libghc-hdbc-postgresql-dev + sudo apt-get -y install postgresql-16 postgresql-server-dev-16 postgresql-contrib libghc-hdbc-postgresql-dev sudo systemctl restart postgresql sudo systemctl enable postgresql else diff --git a/docs/basics.md b/docs/basics.md index 180ef2dba..181d29f57 100644 --- a/docs/basics.md +++ b/docs/basics.md @@ -34,7 +34,7 @@ Please familiarise with the syntax of `guild-deploy.sh` before proceeding. The u ``` bash -Usage: guild-deploy.sh [-n ] [-p path] [-t ] [-b ] [-u] [-s [p][b][l][f][d][c][o][w][x]] +Usage: guild-deploy.sh [-n ] [-p path] [-t ] [-b ] [-u] [-s [p][b][l][m][f][d][c][o][w][x]] Set up dependencies for building/using common tools across cardano ecosystem. The script will always update dynamic content from existing scripts retaining existing user variables diff --git a/files/configs/guild/topology.json b/files/configs/guild/topology.json index 0a657c1d6..6905f143b 100644 --- a/files/configs/guild/topology.json +++ b/files/configs/guild/topology.json @@ -10,7 +10,7 @@ }, { "accessPoints": [ - {"address": "209.145.50.190" ,"port": 7001, "name": "rdlrt"}, + {"address": "c.rdlrt.top" ,"port": 7001, "name": "rdlrt"}, {"address": "95.216.188.94" ,"port": 7000, "name": "homer"}, {"address": "relay1-test.ahlnet.nu" ,"port": 2103, "name": "ahl-1"}, {"address": "guild-relay.bluecheesestakehouse.com","port": 7000, "name": "westberg"}, diff --git a/files/configs/preprod/topology.json b/files/configs/preprod/topology.json index f1f22d845..ff12f6581 100644 --- a/files/configs/preprod/topology.json +++ b/files/configs/preprod/topology.json @@ -20,7 +20,7 @@ {"address": "preprod-test.ahlnet.nu", "port": 2101, "pool": "AHL"}, {"address": "154.12.248.114", "port": 6000, "pool": "HOM1"}, {"address": "tn-preprod.psilobyte.io", "port": 4101, "pool": "PSBT"}, - {"address": "209.145.50.190", "port": 18000, "pool": "RDLRT"} + {"address": "c.rdlrt.top", "port": 18000, "pool": "RDLRT"} ], "advertise": false, "trustable": false, diff --git a/scripts/cnode-helper-scripts/guild-deploy.sh b/scripts/cnode-helper-scripts/guild-deploy.sh index bda7c237d..301580944 100755 --- a/scripts/cnode-helper-scripts/guild-deploy.sh +++ b/scripts/cnode-helper-scripts/guild-deploy.sh @@ -73,7 +73,7 @@ usage() { -s Selective Install, only deploy specific components as below: p Install common pre-requisite OS-level Dependencies for most tools on this repo (Default: skip) b Install OS level dependencies for tools required while building cardano-node/cardano-db-sync components (Default: skip) - l Build and Install libsodium + libsecp fork from IO repositories (Default: skip) + l Build and Install libsodium fork from IO repositories (Default: skip) m Download latest (released) binaries for mithril-signer, mithril-client (Default: skip) f Force overwrite entire content of scripts and config files (backups of existing ones will be created) (Default: skip) d Download latest (released) binaries for bech32, cardano-address, cardano-node, cardano-cli, cardano-db-sync and cardano-submit-api (Default: skip) @@ -206,7 +206,7 @@ os_dependencies() { pkgmgrcmd="env NEEDRESTART_MODE=a env DEBIAN_FRONTEND=noninteractive env DEBIAN_PRIORITY=critical apt-get" libncurses_pkg="libncursesw5" [[ -f /etc/debian_version ]] && grep -q trixie /etc/debian_version && libncurses_pkg="libncursesw6" - pkg_list="python3 pkg-config libssl-dev ${libncurses_pkg} libtinfo-dev systemd libsystemd-dev libsodium-dev tmux git jq libtool bc gnupg aptitude libtool secure-delete iproute2 tcptraceroute sqlite3 bsdmainutils libusb-1.0-0-dev libudev-dev unzip llvm clang libnuma-dev libpq-dev build-essential libffi-dev libgmp-dev zlib1g-dev make g++ autoconf automake liblmdb-dev procps xxd" + pkg_list="python3 pkg-config libssl-dev ${libncurses_pkg} libtinfo-dev systemd libsystemd-dev libsodium-dev tmux git jq libtool bc gnupg libtool secure-delete iproute2 tcptraceroute sqlite3 bsdmainutils libusb-1.0-0-dev libudev-dev unzip llvm clang libnuma-dev libpq-dev build-essential libffi-dev libgmp-dev zlib1g-dev make g++ autoconf automake liblmdb-dev procps xxd" elif [[ "${OS_ID}" =~ rhel ]] || [[ "${OS_ID}" =~ fedora ]] || [[ "${DISTRO}" =~ Fedora ]]; then #CentOS/RHEL/Fedora/RockyLinux pkgmgrcmd="dnf" @@ -287,13 +287,14 @@ build_dependencies() { echo -e "\n Installing Cabal v${BOOTSTRAP_HASKELL_CABAL_VERSION}.." ghcup install cabal ${BOOTSTRAP_HASKELL_CABAL_VERSION} >/dev/null 2>&1 || err_exit " Executing \"ghcup install cabal ${BOOTSTRAP_HASKELL_GHC_VERSION}\" failed, please try to diagnose/execute it manually to diagnose!" fi + build_libsecp build_libblst } # Build fork of libsodium build_libsodium() { echo -e "\nBuilding libsodium ..." - SODIUM_REF="$(jq -r '."'${CARDANO_NODE_VERSION}'".secp256k1' <<< ${NODE_DEPS})" + SODIUM_REF="$(jq -r '."'${CARDANO_NODE_VERSION}'".sodium' <<< ${NODE_DEPS})" if ! grep -q "/usr/local/lib:\$LD_LIBRARY_PATH" "${HOME}"/.bashrc; then echo -e "\nexport LD_LIBRARY_PATH=/usr/local/lib:\$LD_LIBRARY_PATH" >> "${HOME}"/.bashrc export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH @@ -309,13 +310,11 @@ build_libsodium() { make > make.log 2>&1 || err_exit " Could not complete \"make\" for libsodium package, please try to run it manually to diagnose!" $sudo make install > install.log 2>&1 echo -e "\nIOG fork of libsodium installed to /usr/local/lib/" - # Cannot verify the version and availability of libsecp256k1 package built previously, hence have to re-install each time - build_libsecp } build_libsecp() { echo -e "\n[Re]-Install libsecp256k1 ..." - SECP256K1_REF="$(jq -r '."'${CARDANO_NODE_VERSION}'".sodium' <<< ${NODE_DEPS})" + SECP256K1_REF="$(jq -r '."'${CARDANO_NODE_VERSION}'".secp256k1' <<< ${NODE_DEPS})" pushd "${HOME}"/git >/dev/null || err_exit [[ ! -d "./secp256k1" ]] && git clone https://github.com/bitcoin-core/secp256k1 &>/dev/null pushd secp256k1 >/dev/null || err_exit