On 09/01/2026 10:54, Bruno Haible via Gnulib discussion list wrote:
In commit 0da738b4e9a145405ee77d8fd1ac243877499579, instructions were added
to 'announce-gen' for how to verify SHA3-256 checksums. But they don't work,
since the --check option requires a filename and a checksum on each line,
which is not the format that we produce here.


2026-01-09  Bruno Haible  <[email protected]>

        announce-gen: Fix instructions for verifying the SHA3-256 checksums.
        * build-aux/announce-gen (print_checksums): Use quotes. Fix cksum
        invocation for hex SHA3-256 checksum.

diff --git a/build-aux/announce-gen b/build-aux/announce-gen
index b74bc2fd9b..7b1d774071 100755
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -202,9 +202,9 @@ sub print_checksums ($@)
            print '  ', digest_file_base64_wrap ($f, "SHA-256"), "\n";
            print '  ', digest_file_base64_wrap ($f, "SHA3-256"), "\n";
          }
-      print "\nVerify the base64 SHA256 checksum with cksum -a sha256 
--check\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";
-      print "\nVerify the base64 SHA3-256 checksum with cksum -a sha3 
--check\n";
+      print "\nVerify the base64 SHA3-256 checksum with 'cksum -a sha3 
--check'\n";
        print "from coreutils-9.8.\n\n";
      }
    else
@@ -217,8 +217,8 @@ sub print_checksums ($@)
            print "\n";
          }
        print "Verify the SHA256 checksum with either sha256sum, sha256, or\n";
-      print "shasum -a 256.\n";
-      print "\nVerify the SHA3-256 checksum with cksum -a sha3 --check\n";
+      print "'shasum -a 256'.\n";
+      print "\nVerify the SHA3-256 checksum with 'cksum -a sha3 -l 256 
--base64'\n";
        print "from coreutils-9.8.\n\n";
      }
  }

Note in coreutils 9.9 we improved this. From the NEWS:

 'cksum --check' now supports base64 encoded input in untagged format:    - for 
all length adjustable algorithms (blake2b, sha2, sha3),
    - if that base64 input starts with a tag like "SHA1" etc.
  Previously an error was given, about invalid input format.
  [bug introduced in coreutils-9.2]

cheers,
Padraig

Reply via email to