From: Bruno Haible Date: Sun, 1 Dec 2024 13:40:34 +0000 (+0100) Subject: announce-gen: Show an SHA256 sum that can be verified more easily. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=5a47221b101d5c1ad22687aaa40640f8283c2df2;p=gnulib.git announce-gen: Show an SHA256 sum that can be verified more easily. * build-aux/announce-gen (print_checksums): Output SHA256 sum in hex, instead of base64 wrapped. --- diff --git a/ChangeLog b/ChangeLog index 6aee1568e8..6d6fc99169 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-12-01 Bruno Haible + + announce-gen: Show an SHA256 sum that can be verified more easily. + * build-aux/announce-gen (print_checksums): Output SHA256 sum in hex, + instead of base64 wrapped. + 2024-12-01 Bruno Haible announce-gen: Fix bug when accessing symlinks. diff --git a/build-aux/announce-gen b/build-aux/announce-gen index be17541c89..0ec065a437 100755 --- a/build-aux/announce-gen +++ b/build-aux/announce-gen @@ -168,6 +168,9 @@ Print the SHA1 and SHA256 signature section for each C<@file>. # This digest function omits the "=" padding that is required by cksum, # so add the 0..2 bytes of padding required for each of Digest's algorithms. +# To verify such a digest, users need +# - a particular command ('cksum -a sha256 --check') +# - and particular tools (coreutils >= 9.2 or OpenBSD's cksum since 2007). sub digest_file_base64_wrap ($$) { my ($file, $alg) = @_; @@ -188,11 +191,11 @@ sub print_checksums (@) foreach my $f (@file) { - print ' ', digest_file_hex ($f, "SHA-1"), " $f\n"; - print ' ', digest_file_base64_wrap ($f, "SHA-256"), " $f\n"; + print " File: $f\n"; + print ' SHA1 sum: ', digest_file_hex ($f, "SHA-1"), "\n"; + print ' SHA256 sum: ', digest_file_hex ($f, "SHA-256"), "\n"; + print "\n"; } - print "\nVerify the base64 SHA256 checksum with cksum -a sha256 --check\n"; - print "from coreutils-9.2 or OpenBSD's cksum since 2007.\n\n"; } =item C