]> Savannah Git Hosting - gnulib.git/commitdiff
announce-gen: Show an SHA256 sum that can be verified more easily.
authorBruno Haible <bruno@clisp.org>
Sun, 1 Dec 2024 13:40:34 +0000 (14:40 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 1 Dec 2024 13:40:34 +0000 (14:40 +0100)
* build-aux/announce-gen (print_checksums): Output SHA256 sum in hex,
instead of base64 wrapped.

ChangeLog
build-aux/announce-gen

index 6aee1568e870f8c2c13c09f871a08f8290ac304c..6d6fc991692ceb5ddb99e8a82649aecaf380f73a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-12-01  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        announce-gen: Fix bug when accessing symlinks.
index be17541c8954d1cdabb8edd4dad12365b6ca5082..0ec065a4372c7c399e42423003734d0e8fd41b0a 100755 (executable)
@@ -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<print_news_deltas ($news_file, $prev_version, $curr_version)