Revert "skip gpg check for RC and BETA (#2186)" (#2187)

This reverts commit bb2736c64e.
This commit is contained in:
Daniel Hansson 2022-01-17 11:55:25 +01:00 коммит произвёл GitHub
Родитель bb2736c64e
Коммит 60f5f3a42d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 21 добавлений и 24 удалений

43
lib.sh
Просмотреть файл

@ -1264,32 +1264,27 @@ else
msg_box "There seems to be an issue with your network, please try again later.\nThis script will now exit."
exit 1
fi
if ! [ -f /tmp/prerelease.version ]
# Checksum of the downloaded file
print_text_in_color "$ICyan" "Checking SHA256 checksum..."
mkdir -p "$SHA256_DIR"
curl_to_dir "$NCREPO" "$STABLEVERSION.tar.bz2.sha256" "$SHA256_DIR"
SHA256SUM="$(tail "$SHA256_DIR"/"$STABLEVERSION".tar.bz2.sha256 | awk '{print$1}')"
if ! echo "$SHA256SUM" "$STABLEVERSION.tar.bz2" | sha256sum -c
then
# Checksum of the downloaded file
print_text_in_color "$ICyan" "Checking SHA256 checksum..."
mkdir -p "$SHA256_DIR"
curl_to_dir "$NCREPO" "$STABLEVERSION.tar.bz2.sha256" "$SHA256_DIR"
SHA256SUM="$(tail "$SHA256_DIR"/"$STABLEVERSION".tar.bz2.sha256 | awk '{print$1}')"
if ! echo "$SHA256SUM" "$STABLEVERSION.tar.bz2" | sha256sum -c
then
msg_box "The SHA256 checksums of $STABLEVERSION.tar.bz2 didn't match, please try again."
exit 1
fi
# integrity of the downloaded file
print_text_in_color "$ICyan" "Checking GPG integrity..."
install_if_not gnupg
mkdir -p "$GPGDIR"
curl_to_dir "$NCREPO" "$STABLEVERSION.tar.bz2.asc" "$GPGDIR"
chmod -R 600 "$GPGDIR"
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys "$OpenPGP_fingerprint"
gpg --verify "$GPGDIR/$STABLEVERSION.tar.bz2.asc" "$HTML/$STABLEVERSION.tar.bz2"
rm -r "$SHA256_DIR"
rm -r "$GPGDIR"
rm -f releases
rm -f /tmp/prerelease.version
msg_box "The SHA256 checksums of $STABLEVERSION.tar.bz2 didn't match, please try again."
exit 1
fi
# integrity of the downloaded file
print_text_in_color "$ICyan" "Checking GPG integrity..."
install_if_not gnupg
mkdir -p "$GPGDIR"
curl_to_dir "$NCREPO" "$STABLEVERSION.tar.bz2.asc" "$GPGDIR"
chmod -R 600 "$GPGDIR"
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys "$OpenPGP_fingerprint"
gpg --verify "$GPGDIR/$STABLEVERSION.tar.bz2.asc" "$HTML/$STABLEVERSION.tar.bz2"
rm -r "$SHA256_DIR"
rm -r "$GPGDIR"
rm -f releases
}
# call like: download_script folder_variable name_of_script

Просмотреть файл

@ -704,11 +704,13 @@ as it's not currently possible to downgrade.\n\nPlease only continue if you have
NCREPO="https://download.nextcloud.com/server/prereleases"
NCVERSION=$(curl -s -m 900 $NCREPO/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | sort --version-sort | tail -1)
STABLEVERSION="nextcloud-$NCVERSION"
rm -f /tmp/prerelease.version
elif grep -q RC /tmp/prerelease.version
then
NCREPO="https://download.nextcloud.com/server/prereleases"
NCVERSION=$(cat /tmp/prerelease.version)
STABLEVERSION="nextcloud-$NCVERSION"
rm -f /tmp/prerelease.version
fi
fi
fi