coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH V2] Add support for cksum --algorithm [sm3]


From: Eric Blake
Subject: Re: [PATCH V2] Add support for cksum --algorithm [sm3]
Date: Fri, 17 Sep 2021 12:39:26 -0500
User-agent: NeoMutt/20210205-772-2b4c52

On Tue, Sep 14, 2021 at 01:29:41PM +0100, Pádraig Brady wrote:
> Now the tagged format doesn't support encoding --binary or --text mode,
> but that got me investigating whether cksum should support these at all.
> My conclusion is that it should not, and just use binary everywhere.
> I.e. cksum should not support --binary or --text. Reasons:
> 
>  - cygwin is the main consideration here, and it seems to be defaulting to 
> binary these days
>    - i.e. text/binary is a confusing distraction for the vast majority of 
> cases
>  - The cygwin model seems to be being subsumed by the WSL model anyway
>  - Shared checksum files for text files stored in system native format seems 
> quite edge case
>    - Even then, one can always convert to system native after verification
>  - The functionality is retained in the standalone utils if needed

Agreed.  Particularly given RMS's goal of not adding new features that
work on non-GNU systems but not on the GNU system.  (Yes, --text
"works" on GNU systems in that it is a no-op there, but it was very
confusing that the default output on Cygwin was ever non-binary to
begin with, which was different than the default output being binary
on GNU systems)

> 
> Interestingly one place where we might care about processing in text mode,
> is for the checksum files themselves, but we don't actually handle that at 
> all :/
> Looking back I see many users having issues with \r chars messing up --check.
> Eric Blake had a good suggestion to encode \r in file names and then ignore
> real \r chars in checksum files. I'll implement that now while were working 
> on this.

Thanks for (finally) getting around to my idea from years ago!

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]