From 67490414857d2681d2e454820d6bb493c4332254 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Wed, 2 Sep 2020 19:54:31 -0500 Subject: [PATCH] Simplify whirlpool upgrade and follow new version pattern --- rootfs/standard/usr/bin/mynode_post_upgrade.sh | 18 ++++++++---------- setup/setup_device.sh | 17 ++++++++--------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/rootfs/standard/usr/bin/mynode_post_upgrade.sh b/rootfs/standard/usr/bin/mynode_post_upgrade.sh index 75d587cc..25e94630 100755 --- a/rootfs/standard/usr/bin/mynode_post_upgrade.sh +++ b/rootfs/standard/usr/bin/mynode_post_upgrade.sh @@ -414,13 +414,14 @@ fi # Install Whirlpool WHIRLPOOL_VERSION="0.10.8" -WHIRLPOOL_HASH="62e17b6020d0821a98e99ebb773b46191770ec186ceaa3e616a428f5cafe9f49" -WHIRLPOOL_UPGRADE_URL=https://code.samourai.io/whirlpool/whirlpool-client-cli/uploads/7998ea5a9bb180451616809bc346b9ac/whirlpool-client-cli-$WHIRLPOOL_VERSION-run.jar -WHIRLPOOL_SIG_URL=https://code.samourai.io/whirlpool/whirlpool-client-cli/uploads/8d919af2d97657a835195a928e7646bc/whirlpool-client-cli-$WHIRLPOOL_VERSION-run.jar.sig.asc -WHIRLPOOL_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.whirlpool_url +WHIRLPOOL_UPLOAD_FILE_ID="7998ea5a9bb180451616809bc346b9ac" +WHIRLPOOL_UPLOAD_SIG_ID="8d919af2d97657a835195a928e7646bc" +WHIRLPOOL_UPGRADE_URL=https://code.samourai.io/whirlpool/whirlpool-client-cli/uploads/$WHIRLPOOL_UPLOAD_FILE_ID/whirlpool-client-cli-$WHIRLPOOL_VERSION-run.jar +WHIRLPOOL_SIG_URL=https://code.samourai.io/whirlpool/whirlpool-client-cli/uploads/$WHIRLPOOL_UPLOAD_SIG_ID/whirlpool-client-cli-$WHIRLPOOL_VERSION-run.jar.sig.asc +WHIRLPOOL_VERSION_FILE=/home/bitcoin/.mynode/whirlpool_version CURRENT="" -if [ -f $WHIRLPOOL_UPGRADE_URL_FILE ]; then - CURRENT=$(cat $WHIRLPOOL_UPGRADE_URL_FILE) +if [ -f $WHIRLPOOL_VERSION_FILE ]; then + CURRENT=$(cat $WHIRLPOOL_VERSION_FILE) fi if [ "$CURRENT" != "$WHIRLPOOL_UPGRADE_URL" ]; then sudo -u bitcoin mkdir -p /opt/mynode/whirlpool @@ -428,13 +429,10 @@ if [ "$CURRENT" != "$WHIRLPOOL_UPGRADE_URL" ]; then sudo rm -rf *.jar sudo -u bitcoin wget -O whirlpool.jar $WHIRLPOOL_UPGRADE_URL - echo "$WHIRLPOOL_HASH whirlpool.jar" > /tmp/whirlpool.shasum - sha256sum --check /tmp/whirlpool.shasum - rm /tmp/whirlpool.shasum wget -O whirlpool.asc $WHIRLPOOL_SIG_URL gpg --verify whirlpool.asc - echo $WHIRLPOOL_UPGRADE_URL > $WHIRLPOOL_UPGRADE_URL_FILE + echo $WHIRLPOOL_VERSION > $WHIRLPOOL_VERSION_FILE fi diff --git a/setup/setup_device.sh b/setup/setup_device.sh index de2edb8f..350a8a0a 100755 --- a/setup/setup_device.sh +++ b/setup/setup_device.sh @@ -507,13 +507,14 @@ fi # Install Whirlpool WHIRLPOOL_VERSION="0.10.8" -WHIRLPOOL_HASH="62e17b6020d0821a98e99ebb773b46191770ec186ceaa3e616a428f5cafe9f49" -WHIRLPOOL_UPGRADE_URL=https://code.samourai.io/whirlpool/whirlpool-client-cli/uploads/7998ea5a9bb180451616809bc346b9ac/whirlpool-client-cli-$WHIRLPOOL_VERSION-run.jar -WHIRLPOOL_SIG_URL=https://code.samourai.io/whirlpool/whirlpool-client-cli/uploads/8d919af2d97657a835195a928e7646bc/whirlpool-client-cli-$WHIRLPOOL_VERSION-run.jar.sig.asc -WHIRLPOOL_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.whirlpool_url +WHIRLPOOL_UPLOAD_FILE_ID="7998ea5a9bb180451616809bc346b9ac" +WHIRLPOOL_UPLOAD_SIG_ID="8d919af2d97657a835195a928e7646bc" +WHIRLPOOL_UPGRADE_URL=https://code.samourai.io/whirlpool/whirlpool-client-cli/uploads/$WHIRLPOOL_UPLOAD_FILE_ID/whirlpool-client-cli-$WHIRLPOOL_VERSION-run.jar +WHIRLPOOL_SIG_URL=https://code.samourai.io/whirlpool/whirlpool-client-cli/uploads/$WHIRLPOOL_UPLOAD_SIG_ID/whirlpool-client-cli-$WHIRLPOOL_VERSION-run.jar.sig.asc +WHIRLPOOL_VERSION_FILE=/home/bitcoin/.mynode/whirlpool_version CURRENT="" -if [ -f $WHIRLPOOL_UPGRADE_URL_FILE ]; then - CURRENT=$(cat $WHIRLPOOL_UPGRADE_URL_FILE) +if [ -f $WHIRLPOOL_VERSION_FILE ]; then + CURRENT=$(cat $WHIRLPOOL_VERSION_FILE) fi if [ "$CURRENT" != "$WHIRLPOOL_UPGRADE_URL" ]; then sudo -u bitcoin mkdir -p /opt/mynode/whirlpool @@ -521,12 +522,10 @@ if [ "$CURRENT" != "$WHIRLPOOL_UPGRADE_URL" ]; then sudo rm -rf *.jar sudo -u bitcoin wget -O whirlpool.jar $WHIRLPOOL_UPGRADE_URL - echo "$WHIRLPOOL_HASH whirlpool.jar" > WHIRLPOOL_SHASUM - sha256sum --check WHIRLPOOL_SHASUM wget -O whirlpool.asc $WHIRLPOOL_SIG_URL gpg --verify whirlpool.asc - echo $WHIRLPOOL_UPGRADE_URL > $WHIRLPOOL_UPGRADE_URL_FILE + echo $WHIRLPOOL_VERSION > $WHIRLPOOL_VERSION_FILE fi