From c463c45f9b44f6fba0cb8a28519f07b9f495c8fb Mon Sep 17 00:00:00 2001 From: Swissnode <54310929+Swissnode@users.noreply.github.com> Date: Fri, 16 Jun 2023 15:50:38 +0200 Subject: [PATCH] [GENERAL UPDATE] Add variables $VERSION to agility the installing and updating process of the services (#1200) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update lightning-client.md * Update lightning-client.md * Update lightning-client.md removed variable $DISTRO added a missed $VERSION in the manifest gpg command * Update bitcoin-client.md Adding the VERSION and VERSION_CORE variables for easy maintenance * Update bitcoin-client.md Finished the VERSION variable changes * Update bitcoin-client.md updated some errors made * Update guide/bitcoin/bitcoin-client.md Co-authored-by: ⚡️2FakTor⚡️ * Update guide/bitcoin/bitcoin-client.md Co-authored-by: ⚡️2FakTor⚡️ * Update guide/bitcoin/bitcoin-client.md Co-authored-by: ⚡️2FakTor⚡️ * Apply suggestions from code review Co-authored-by: ⚡️2FakTor⚡️ * Apply suggestions from code review Co-authored-by: ⚡️2FakTor⚡️ * Apply suggestions from code review Co-authored-by: ⚡️2FakTor⚡️ * Update guide/lightning/lightning-client.md Co-authored-by: Mynima <62206239+Mynima@users.noreply.github.com> * Update guide/lightning/lightning-client.md Co-authored-by: Mynima <62206239+Mynima@users.noreply.github.com> * Update guide/lightning/lightning-client.md Co-authored-by: Mynima <62206239+Mynima@users.noreply.github.com> * Update bitcoin-client.md --------- Co-authored-by: ⚡️2FakTor⚡️ Co-authored-by: Mynima <62206239+Mynima@users.noreply.github.com> --- guide/bitcoin/bitcoin-client.md | 27 ++++++++++++++++----------- guide/lightning/lightning-client.md | 19 ++++++++++--------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/guide/bitcoin/bitcoin-client.md b/guide/bitcoin/bitcoin-client.md index f3312d2ae..ee42bb0b6 100644 --- a/guide/bitcoin/bitcoin-client.md +++ b/guide/bitcoin/bitcoin-client.md @@ -44,14 +44,17 @@ This is a precaution to make sure that this is an official release and not a mal * Get the latest download links at [bitcoincore.org/en/download](https://bitcoincore.org/en/download){:target="_blank"} (ARM Linux 64 bit), they change with each update. ```sh + # set up some version variables for easier maintenance later on + $ VERSION="25.0" + # download Bitcoin Core binary - $ wget https://bitcoincore.org/bin/bitcoin-core-25.0/bitcoin-25.0-aarch64-linux-gnu.tar.gz + $ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/bitcoin-$VERSION-aarch64-linux-gnu.tar.gz # download the list of cryptographic checksum - $ wget https://bitcoincore.org/bin/bitcoin-core-25.0/SHA256SUMS + $ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/SHA256SUMS # download the signatures attesting to validity of the checksums - $ wget https://bitcoincore.org/bin/bitcoin-core-25.0/SHA256SUMS.asc + $ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/SHA256SUMS.asc ``` ### Checksum check @@ -116,8 +119,8 @@ Expected output: * If you're satisfied with the checkum, signature and timestamp checks, extract the Bitcoin Core binaries, install them and check the version. ```sh - $ tar -xvf bitcoin-25.0-aarch64-linux-gnu.tar.gz - $ sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-25.0/bin/* + $ tar -xvf bitcoin-$VERSION-aarch64-linux-gnu.tar.gz + $ sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-$VERSION/bin/* $ bitcoind --version > Bitcoin Core version v25.0.0 > [...] @@ -525,11 +528,13 @@ When upgrading, there might be breaking changes, or changes in the data structur * Get the latest download links at [bitcoincore.org/en/download](https://bitcoincore.org/en/download){:target="_blank"} (ARM Linux 64 bit), they change with each update. This page tends to lag the Github releases page linked above. ```sh + # set up some version variables for easier maintenance later on + $ VERSION="25.0" # download Bitcoin Core binary, checksums, signature file, and timestamp file - $ wget https://bitcoincore.org/bin/bitcoin-core-25.0/bitcoin-25.0-aarch64-linux-gnu.tar.gz - $ wget https://bitcoincore.org/bin/bitcoin-core-25.0/SHA256SUMS - $ wget https://bitcoincore.org/bin/bitcoin-core-25.0/SHA256SUMS.asc - $ wget https://bitcoincore.org/bin/bitcoin-core-25.0/SHA256SUMS.ots + $ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/bitcoin-$VERSION-aarch64-linux-gnu.tar.gz + $ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/SHA256SUMS + $ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/SHA256SUMS.asc + $ wget https://bitcoincore.org/bin/bitcoin-core-$VERSION/SHA256SUMS.ots ``` * Verify the new version against its checksums @@ -592,8 +597,8 @@ Now, just check that the timestamp date is close to the [release](https://github * If you're satisfied with the checksum, signature and timestamp checks, extract the Bitcoin Core binaries, install them and check the version. ```sh - $ tar -xvf bitcoin-25.0-aarch64-linux-gnu.tar.gz - $ sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-25.0/bin/* + $ tar -xvf bitcoin-$VERSION-aarch64-linux-gnu.tar.gz + $ sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-$VERSION/bin/* ``` * Check the new version diff --git a/guide/lightning/lightning-client.md b/guide/lightning/lightning-client.md index 7319b35a5..bc5671811 100644 --- a/guide/lightning/lightning-client.md +++ b/guide/lightning/lightning-client.md @@ -32,10 +32,11 @@ We'll download, verify and install LND. ```sh $ cd /tmp - $ wget https://github.com/lightningnetwork/lnd/releases/download/v0.16.3-beta/lnd-linux-arm64-v0.16.3-beta.tar.gz - $ wget https://github.com/lightningnetwork/lnd/releases/download/v0.16.3-beta/manifest-v0.16.3-beta.txt - $ wget https://github.com/lightningnetwork/lnd/releases/download/v0.16.3-beta/manifest-roasbeef-v0.16.3-beta.sig - $ wget https://github.com/lightningnetwork/lnd/releases/download/v0.16.3-beta/manifest-roasbeef-v0.16.3-beta.sig.ots + $ VERSION="0.16.3" + $ wget https://github.com/lightningnetwork/lnd/releases/download/v$VERSION-beta/lnd-linux-arm64-v$VERSION-beta.tar.gz + $ wget https://github.com/lightningnetwork/lnd/releases/download/v$VERSION-beta/manifest-v$VERSION-beta.txt + $ wget https://github.com/lightningnetwork/lnd/releases/download/v$VERSION-beta/manifest-roasbeef-v$VERSION-beta.sig + $ wget https://github.com/lightningnetwork/lnd/releases/download/v$VERSION-beta/manifest-roasbeef-v$VERSION-beta.sig.ots ``` ### Checksum check @@ -43,7 +44,7 @@ We'll download, verify and install LND. * Verify the signed checksum against the actual checksum of your download ```sh - $ sha256sum --check manifest-v0.16.3-beta.txt --ignore-missing + $ sha256sum --check manifest-v$VERSION-beta.txt --ignore-missing > lnd-linux-arm64-v0.16.3-beta.tar.gz: OK ``` @@ -63,7 +64,7 @@ Now that we've verified the integrity of the downloaded binary, we need to check * Verify the signature of the text file containing the checksums for the application ```sh - $ gpg --verify manifest-roasbeef-v0.16.3-beta.sig manifest-v0.16.3-beta.txt + $ gpg --verify manifest-roasbeef-v$VERSION-beta.sig manifest-v$VERSION-beta.txt > gpg: Signature made Tue Jun 6 04:57:08 2023 EEST > gpg: using RSA key 60A1FA7DA5BFF08BDCBBE7903BBD59E99B280306 > gpg: Good signature from "Olaoluwa Osuntokun " [unknown] @@ -80,7 +81,7 @@ We can also check that the manifest file was in existence around the time of the * Let's verify the timestamp of the file matches the release date. ```sh - $ ots verify manifest-roasbeef-v0.16.3-beta.sig.ots -f manifest-roasbeef-v0.16.3-beta.sig + $ ots --no-cache verify manifest-roasbeef-v$VERSION-beta.sig.ots -f manifest-roasbeef-v$VERSION-beta.sig > [...] > Success! Bitcoin block 793048 attests existence as of 2023-06-06 EEST ``` @@ -94,8 +95,8 @@ Having verified the integrity and authenticity of the release binary, we can saf * Install LND ```sh - $ tar -xzf lnd-linux-arm64-v0.16.3-beta.tar.gz - $ sudo install -m 0755 -o root -g root -t /usr/local/bin lnd-linux-arm64-v0.16.3-beta/* + $ tar -xvf lnd-linux-arm64-v$VERSION-beta.tar.gz + $ sudo install -m 0755 -o root -g root -t /usr/local/bin lnd-linux-arm64-v$VERSION-beta/* $ lnd --version > lnd version v0.16.3-beta commit=v0.16.3-beta ```