Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cksum interface divergence #8984

@pixelb

Description

@pixelb

I had a quick look at uutils' cksum interface and am worried about the divergence in interface,
and that it may confuse users and cause portability issues between Linux systems.

GNU coreutils has avoided adding new *sum commands for a long time, since there is no end to the digests available,
and instead followed the NetBSD and OpenBSD lead in adding the -a option to cksum (in GNU coreutils 9.0 (2021)) to consolidate all future digest additions. This resulted in no new command, and better interop with those BSDs at least.

Considering a specific example of getting the sha3 of a file,
there seems to be all these interfaces in uutils:

  • sha3sum --bits
  • sha3-224sum
  • sha3-256sum
  • sha3-384sum
  • sha3-512sum
  • cksum -a sha3 --bits ###
  • cksum -a sha3 -l ### <- GNU's interface
  • hashsum --sha3 --bits ###
  • hashsum --sha3-224
  • hashsum --sha3-256
  • hashsum --sha3-384
  • hashsum --sha3-512

This is confusing to me at least, and IMHO a net negative for users.
Would it be feasible to add the hashsum and other sha3*sum commands to a separate optional package or something?
Doing this sooner will make it easier, before there are bazillions of scripts using the sha3*sum commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions