0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-10 10:52:31 -05:00

guix: Make all.SHA256SUMS rather than codesigned.SHA256SUMS

This commit is contained in:
Andrew Chow 2021-07-22 17:42:59 -04:00
parent 5d83e7d714
commit 33455c7696

View file

@ -207,8 +207,8 @@ mkdir -p "$outsigdir"
exit 1 exit 1
fi fi
temp_codesigned="$(mktemp)" temp_all="$(mktemp)"
trap 'rm -rf -- "$temp_codesigned"' EXIT trap 'rm -rf -- "$temp_all"' EXIT
if (( ${#codesigned_fragments[@]} )); then if (( ${#codesigned_fragments[@]} )); then
# Note: all.SHA256SUMS attests to all of $sha256sum_fragments, but is # Note: all.SHA256SUMS attests to all of $sha256sum_fragments, but is
@ -218,18 +218,18 @@ mkdir -p "$outsigdir"
| sort -k2 \ | sort -k2 \
| sed 's/$/\r/' \ | sed 's/$/\r/' \
| rfc4880_normalize_document \ | rfc4880_normalize_document \
> "$temp_codesigned" > "$temp_all"
if [ -e codesigned.SHA256SUMS ]; then if [ -e all.SHA256SUMS ]; then
# The SHA256SUMS already exists, make sure it's exactly what we # The SHA256SUMS already exists, make sure it's exactly what we
# expect, error out if not # expect, error out if not
if diff -u all.SHA256SUMS "$temp_codesigned"; then if diff -u all.SHA256SUMS "$temp_all"; then
echo "An all.SHA256SUMS file already exists for '${VERSION}' and is up-to-date." echo "An all.SHA256SUMS file already exists for '${VERSION}' and is up-to-date."
else else
shasum_already_exists all.SHA256SUMS shasum_already_exists all.SHA256SUMS
exit 1 exit 1
fi fi
else else
mv "$temp_codesigned" codesigned.SHA256SUMS mv "$temp_all" all.SHA256SUMS
fi fi
else else
# It is fine to have the codesigned outputs be missing (perhaps the # It is fine to have the codesigned outputs be missing (perhaps the