From 9638c8533be897b9acd98f024705f799889aa676 Mon Sep 17 00:00:00 2001 From: "Christian I. Nilsson" Date: Sat, 3 Jun 2023 14:08:48 +0200 Subject: [PATCH] Remove .asc from .DIGESTS Fixes #66 --- get_minimal_cd.sh | 8 ++++---- install.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/get_minimal_cd.sh b/get_minimal_cd.sh index b8e26f2..408802d 100644 --- a/get_minimal_cd.sh +++ b/get_minimal_cd.sh @@ -4,7 +4,7 @@ DISTBASE=${DISTMIRROR}/releases/amd64/autobuilds/current-install-amd64-minimal/ FILE=$(wget -q $DISTBASE -O - | grep -o -e "install-amd64-minimal-\w*.iso" | uniq) wget -c $DISTBASE$FILE || exit 1 -wget -c $DISTBASE$FILE.DIGESTS.asc || exit 2 +wget -c $DISTBASE$FILE.DIGESTS || exit 2 # https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Media#Linux_based_verification #wget -O- https://gentoo.org/.well-known/openpgpkey/hu/wtktzo4gyuhzu8a4z5fdj3fgmr1u6tob?l=releng | gpg --import @@ -14,14 +14,14 @@ wget -c $DISTBASE$FILE.DIGESTS.asc || exit 2 # Download key if missing gpg --locate-key releng@gentoo.org # Verify DIGESTS -gpg --verify $FILE.DIGESTS.asc || exit 2 +gpg --verify $FILE.DIGESTS || exit 2 echo "Verifying SHA512 ..." # grab SHA512 lines and line after, then filter out line that ends with iso -echo "$(grep -A1 SHA512 $FILE.DIGESTS.asc | grep iso$)" | sha512sum -c || exit 2 +echo "$(grep -A1 SHA512 $FILE.DIGESTS | grep iso$)" | sha512sum -c || exit 2 echo "Verifying BLAKE2 ..." # grab BLAK2 lines and line after, then filter out line that ends with iso -blake2line=$(grep -A1 BLAKE2 $FILE.DIGESTS.asc | grep iso$) +blake2line=$(grep -A1 BLAKE2 $FILE.DIGESTS | grep iso$) # remove /var/tmp*.../ part of filename echo "${blake2line/\/*\//}" | b2sum -c || exit 2 echo " - Awesome! everything looks good." diff --git a/install.sh b/install.sh index 1452bb9..98298d6 100644 --- a/install.sh +++ b/install.sh @@ -129,14 +129,14 @@ FILE=$(wget -q $DISTBASE -O - | grep -o -E 'stage3-amd64-openrc-20\w*\.tar\.(bz2 [ -z "$FILE" ] && echo No stage3 found on $DISTBASE && exit 1 echo download latest stage file $FILE wget $DISTBASE$FILE || bash -wget $DISTBASE$FILE.DIGESTS.asc || bash +wget $DISTBASE$FILE.DIGESTS || bash wait $pid_gpg -gpg --verify $FILE.DIGESTS.asc || bash +gpg --verify $FILE.DIGESTS || bash echo "Verifying stage3 SHA512 ..." # grab SHA512 lines and line after, then filter out line that ends with iso -echo "$(grep -A1 SHA512 $FILE.DIGESTS.asc | grep $FILE\$)" | sha512sum -c || bash +echo "$(grep -A1 SHA512 $FILE.DIGESTS | grep $FILE\$)" | sha512sum -c || bash echo " - Awesome! stage3 verification looks good." -rm $FILE.DIGESTS.asc +rm $FILE.DIGESTS time tar xpf $FILE --xattrs-include='*.*' --numeric-owner wait || exit 1