]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: add more redirections from legacy *sum to cksum
authorPádraig Brady <P@draigBrady.com>
Sun, 18 Jan 2026 13:35:17 +0000 (13:35 +0000)
committerPádraig Brady <P@draigBrady.com>
Sun, 18 Jan 2026 14:19:38 +0000 (14:19 +0000)
*  doc/coreutils.texi (md5sum invocation, sha1sum invocation,
b2sum invocation, sha2 utilities): Mention these are legacy interfaces,
and reference 'cksum invocation'.
*  src/cksum.c (usage): Likewise.
*  man/md5sum.x: Redirect to cksum, rather than individual utils.
*  man/sha1sum.x: Likewise.

doc/coreutils.texi
man/md5sum.x
man/sha1sum.x
src/cksum.c

index e324b886dd6d15d2c6c34bfb71da93bd0e60596f..92ff9dec5a608e4325758fc69e14fa3ea8a930d2 100644 (file)
@@ -4203,6 +4203,12 @@ Also file name escaping is not used.
 @command{md5sum} computes a 128-bit checksum (or @dfn{fingerprint} or
 @dfn{message-digest}) for each specified @var{file}.
 
+@macro legacyDigest
+This is a legacy interface to the more modern @command{cksum} utility.
+@xref{cksum invocation}.
+@end macro
+@legacyDigest
+
 @macro weakHash{hash}
 The \hash\ digest is more reliable than a simple CRC (provided by
 the @command{cksum} command) for detecting accidental file corruption,
@@ -4214,7 +4220,6 @@ to modify certain files, including digital certificates, so that they
 appear valid when signed with an \hash\ digest.  For more secure hashes,
 consider using @samp{sha2}, @samp{sha3}, or @samp{blake2b},
 available through the @command{cksum} @option{--algorithm} option.
-@xref{cksum invocation}.
 @end macro
 @weakHash{MD5}
 
@@ -4251,6 +4256,8 @@ The program accepts @ref{cksum common options}.  Also see @ref{Common options}.
 @command{b2sum} computes a 512-bit checksum for each specified
 @var{file}.
 
+@legacyDigest
+
 @checksumUsage{b2sum}
 
 In addition @command{b2sum} supports the following options.
@@ -4282,6 +4289,8 @@ as the length is automatically determined when checking.
 
 @command{sha1sum} computes a 160-bit checksum for each specified @var{file}.
 
+@legacyDigest
+
 @weakHash{SHA-1}
 
 @checksumUsage{sha1sum}
@@ -4289,6 +4298,8 @@ as the length is automatically determined when checking.
 @node sha2 utilities
 @section sha2 utilities: Print or check SHA-2 digests
 
+@legacyDigest
+
 @pindex sha224sum
 @pindex sha256sum
 @pindex sha384sum
index 3f4cc6409adec6ff79299d95141b977feae5f8ae..c8fd8c0ed8fa764135495ae6dfd2f2e58a54757b 100644 (file)
@@ -4,8 +4,7 @@ md5sum \- compute and check MD5 message digest
 .\" Add any additional description here
 [BUGS]
 Do not use the MD5 algorithm for security related purposes.
-Instead, use an SHA\-2 algorithm, implemented in the programs
-sha224sum(1), sha256sum(1), sha384sum(1), sha512sum(1),
-or the BLAKE2 algorithm, implemented in b2sum(1)
+Instead, use an SHA\-2, SHA\-3, or BLAKE2 algorithm,
+implemented in the cksum(1) program.
 [SEE ALSO]
 cksum(1)
index 8fd824f109246e0cabe5c675c0919733f9382ef5..fb285139008a0f144a5a994298d062a03e365b6c 100644 (file)
@@ -3,9 +3,8 @@ sha1sum \- compute and check SHA1 message digest
 [DESCRIPTION]
 .\" Add any additional description here
 [BUGS]
-Do not use the SHA-1 algorithm for security related purposes.
-Instead, use an SHA\-2 algorithm, implemented in the programs
-sha224sum(1), sha256sum(1), sha384sum(1), sha512sum(1),
-or the BLAKE2 algorithm, implemented in b2sum(1)
+Do not use the MD5 algorithm for security related purposes.
+Instead, use an SHA\-2, SHA\-3, or BLAKE2 algorithm,
+implemented in the cksum(1) program.
 [SEE ALSO]
 cksum(1)
index 7d6ff982bc1b76c08822db548daa0d5b2526d8fe..8c9f8ac84b0c99647fdd008fef4e81903397bb1c 100644 (file)
@@ -487,9 +487,14 @@ Usage: %s [OPTION]... [FILE]...\n\
 "), program_name);
 #if HASH_ALGO_CKSUM
     if (legacy_mode)
-      printf (_("\
+      {
+        printf (_("\
 Print or check %s checksums.\n\
 "), DIGEST_TYPE_STRING);
+        fputs (_("\
+Legacy interface to the cksum utility.\n\
+"), stdout);
+      }
     else
       fputs (_("\
 Print or verify checksums.\n\
@@ -501,6 +506,9 @@ Print or check %s (%d-bit) checksums.\n\
 "),
               DIGEST_TYPE_STRING,
               DIGEST_BITS);
+      fputs (_("\
+Legacy interface to the cksum utility.\n\
+"), stdout);
 #endif
 
       emit_stdin_note ();