This is the mail archive of the
mailing list for the Cygwin project.
Re: Did md5sum -c change line end handling?
- From: Eric Blake <ebb9 at byu dot net>
- To: Mark Bohlman <mbohlman at tcicredit dot com>
- Cc: cygwin at cygwin dot com
- Date: Thu, 19 Jan 2006 22:15:36 -0700
- Subject: Re: Did md5sum -c change line end handling?
- References: <43D01182.firstname.lastname@example.org>
-----BEGIN PGP SIGNED MESSAGE-----
According to Mark Bohlman on 1/19/2006 3:24 PM:
> Notice the message ": No such file or directoryz" - that is not a typo but a cut and paste.
> Turns out that the .md5 file has a CR-LF (downloaded from source provider) in it that is no
> longer being read properly. Removing the offending 0x0D from the file .md5 file causes it
> to work properly.
The NEWS file does mention that explicit code changes were made in the
arena of text vs. binary. But it appears that md5sum has always been
outputting CR-LF checksums when on a text mount, in both 5.3.0 and 5.93.
I will definately have to think more about this, and get some opinions
Meanwhile, I think two things should happen - first, md5sum should output
checksums with just LF, even on text mounts (due to the fact that it
becomes ambiguous on managed mounts whether the CR is part of the filename
or the line separator), and second, when a file is marked with * (meaning
that it was read in binary mode on a platform where binary mode matters),
try stripping the trailing CRs if the full filename doesn't exist (since
normally such platforms don't support trailing CRs in filenames). I'll
add this to my list of things to fix in coreutils-5.93-3.
> Was md5sum change in it's handling of CR/LF? Or did I do something screwy in my update like
> select DOS files (although I've never done before it is possible).
You can always run d2u on your md5sum file, and it should only ever break
if you use managed mounts to intentionally create files with trailing CRs
(normally not a good idea).
Life is short - so eat dessert first!
Eric Blake email@example.com
volunteer cygwin coreutils maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html