delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/20/09:11:41

X-Spam-Check-By: sourceware.org
Message-ID: <43D0EF8E.2070600@tcicredit.com>
Date: Fri, 20 Jan 2006 09:11:26 -0500
From: Mark Bohlman <mbohlman AT tcicredit DOT com>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Did md5sum -c change line end handling?
References: <43D01182 DOT 4020301 AT tcicredit DOT com> <43D071F8 DOT 9020004 AT byu DOT net>
In-Reply-To: <43D071F8.9020004@byu.net>
X-Spam: [F=0.0100000000; S=0.010(2005122801)]
X-MAIL-FROM: <mbohlman AT tcicredit DOT com>
X-SOURCE-IP: [65.170.14.181]
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Eric Blake wrote:
> 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
> from upstream.
> 
> 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).

As a check I tested the same md5 file at home on a machine that has not been upgraded in a
while and it works as expected with the CRLF in place.  The d2u of course is a good work
around.  One final note is that I've got only bin mounts, not text.

Thanks Eric, as always, for your efforts.
-- Mark


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019