fix: adapt rhash verify to process digest files with absolute paths

This commit is contained in:
oddlama 2021-10-27 13:06:34 +02:00
parent ab96831953
commit 45719149ae
No known key found for this signature in database
GPG Key ID: 14EFE510775FE39A
1 changed files with 2 additions and 1 deletions

View File

@ -809,7 +809,8 @@ function download_stage3() {
# Check hashes
einfo "Verifying tarball integrity"
rhash -P --check <(grep -B 1 'tar.xz$' "${CURRENT_STAGE3}.DIGESTS.asc") \
# Replace any absolute paths in the digest file with just the stage3 basename, so it will be found by rhash
rhash -P --check <(grep -B 1 'tar.xz$' "${CURRENT_STAGE3}.DIGESTS.asc" | sed -e 's/ .*stage3-/ stage3-/') \
|| die "Checksum mismatch!"
# Create verification file in case the script is restarted