bug-coreutils
[Top][All Lists]
Advanced

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

Re: md5sum and binary vs. text


From: Eric Blake
Subject: Re: md5sum and binary vs. text
Date: Wed, 25 Mar 2009 20:03:31 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Jim Meyering on 3/25/2009 3:57 PM:
>> and the extra * breaks the check.  I'd really like to switch md5sum and
>> friends to match Linux output when O_BINARY, and add a different marker
>> character (but what?) when summing a file in O_TEXT mode, since generally
>> you WANT binary mode to be the default.  Thoughts?
> 
> I see what you mean, but what about people who use -b on Linux.
> They'd still have to get the "*".

People who use -b on Linux would see no change in behavior, because there,
like any other sane system, text and binary mode files are
indistinguishable, so there is no need for a marker.

> Seems like it'd be hard to arrange such a change
> without causing too much disruption.

It seems to me that only platforms like Cygwin would be impacted.  In
fact, one of the commits that impacts binary mode (4d87cd7, back in 2001)
is attributed to Chris Faylor, who was the person responsible for porting
coreutils to cygwin back in the days where the cygwin community was not
very sure about text vs. binary decisions; since then, the cygwin
community has stabilized to preferring binary over text as a default.

For md5sum -c purposes, we will have to continue accepting * in files that
we validate.  But for generation purposes, it seems like we should
generate space (binary, and make it the default on cygwin) or a new marker
(text, when requested, and only on platforms where it matters).  And since
the BSD format is different altogether, it seems like only GNU md5sum
would be impacted by a change in the marker character.

And I've also been meaning to add an escape sequence \r rather than raw
carriage returns, also helpful in the case of text file confusion.  I
guess at this point, patches speak louder than words, so I'll have to
draft something up.  But don't hold up the release of 7.2 for this.

> 
> To address the failure, I'll probably push this tomorrow:
> 
> * maint.mk (NEWS_hash): Remove trailing " -" or " *-".

Thanks - that looks nice.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknK4nIACgkQ84KuGfSFAYBFPQCfWOyfyfD5dn/Idc4QVm0vTmmW
ky0AoKfiz6zYArNTUm2k91kxbJ9uo/jZ
=UVdV
-----END PGP SIGNATURE-----




reply via email to

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