This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: debian-live-500-i386-rescue.iso: FAILED


Greg Chicares wrote:
> The asterisk is okay; it should be ignored with '--check'.

Thanks for the help.  :-)


> Try testing that file directly:
> echo "b02c3606a3f35f160a591fe1154aa362  debian-live-500-i386-rescue.is
> o" \
> | md5sum --check --warn

2009-04-12 21:20:57 dpchrist@p43400e /cygdrive/h/data/iso/debian
$ echo "b02c3606a3f35f160a591fe1154aa362  debian-live-500-i386-rescue.is
o" | md5sum --check --warn
debian-live-500-i386-rescue.iso: FAILED
md5sum: WARNING: 1 of 1 computed checksum did NOT match


> And this (with an asterisk) should give the same result:
> echo "b02c3606a3f35f160a591fe1154aa362 *debian-live-500-i386-rescue.is
> o" \
> | md5sum --check --warn

2009-04-12 21:21:22 dpchrist@p43400e /cygdrive/h/data/iso/debian
$ echo "b02c3606a3f35f160a591fe1154aa362 *debian-live-500-i386-rescue.is
o" | md5sum --check --warn
debian-live-500-i386-rescue.iso: OK


So, the asterisk does matter to Cygwin md5sum when checking.


> It would be interesting if this native 'md5sum' works as expected
where Cygwin's doesn't:
>
http://downloads.activestate.com/contrib/md5sum/Windows/md5sum.exe#!md5!
eb574b236133e60c989c6f472f07827b

H:\data\iso\debian>h:\data\download\a\activestate\md5sum.exe -c MD5SUMS
...
debian-live-500-i386-rescue.iso: OK
debian-live-500-i386-rescue.iso.list: OK
debian-live-500-i386-rescue.iso.log: OK
debian-live-500-i386-rescue.iso.packages: OK


> And I suppose it's worth showing the result of `which md5sum`,
> just in case you've got a rogue copy on $PATH, even though you
> seem not to.

2009-04-12 21:23:13 dpchrist@p43400e /cygdrive/h/data/iso/debian
$ which md5sum
/usr/bin/md5sum


> A wild idea based on this report:
> http://bugs.centos.org/view.php?id=2961
> would be to run the test repeatedly and see if the result changes.

http://www.quotationspage.com/quote/26032.html


I wonder if line endings of the MD5SUMS file has anything to do with it?

2009-04-12 21:27:42 dpchrist@p43400e /cygdrive/h/data/iso/debian
$ file MD5SUMS
MD5SUMS: ASCII text

2009-04-12 21:29:44 dpchrist@p43400e /cygdrive/h/data/iso/debian
$ cp MD5SUMS MD5SUMS.dos

2009-04-12 21:30:18 dpchrist@p43400e /cygdrive/h/data/iso/debian
$ unix2dos MD5SUMS.dos
MD5SUMS.dos: done.

2009-04-12 21:43:48 dpchrist@p43400e /cygdrive/h/data/iso/debian
$ file MD5SUMS.dos
MD5SUMS.dos: ASCII text, with CRLF line terminators

2009-04-12 21:43:54 dpchrist@p43400e /cygdrive/h/data/iso/debian
$ md5sum --check --warn MD5SUMS.dos 2>&1 | grep rescue
debian-live-500-i386-rescue.iso: FAILED
debian-live-500-i386-rescue.iso.list: OK
debian-live-500-i386-rescue.iso.log: OK
debian-live-500-i386-rescue.iso.packages: OK

Nope.


I wonder if it's because my Cygwin is installed to use DOS line endings?
Switch it to Unix line endings and try again:

2009-04-12 21:51:39 dpchrist@p43400e /cygdrive/h/data/iso/debian
$ md5sum --check --warn MD5SUMS 2>&1 | grep rescue
debian-live-500-i386-rescue.iso: OK
debian-live-500-i386-rescue.iso.list: OK
debian-live-500-i386-rescue.iso.log: OK
debian-live-500-i386-rescue.iso.packages: OK

Yup.  I wonder if this is a bug or a feature?


David


--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]