GNU bug report logs - #26263
sha256sum does not correctly parse file with PGP message header (coreutils 8.26)

Previous Next

Package: coreutils;

Reported by: Toby Kelsey <toby.kelsey <at> gmail.com>

Date: Sun, 26 Mar 2017 10:20:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Toby Kelsey <toby.kelsey <at> gmail.com>
Subject: bug#26263: closed (Re: bug#26263: sha256sum does not correctly
 parse file with PGP message header (coreutils 8.26))
Date: Mon, 27 Mar 2017 00:15:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#26263: sha256sum does not correctly parse file with PGP message header (coreutils 8.26)

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 26263 <at> debbugs.gnu.org.

-- 
26263: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26263
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Toby Kelsey <toby.kelsey <at> gmail.com>, 26263-done <at> debbugs.gnu.org
Subject: Re: bug#26263: sha256sum does not correctly parse file with PGP
 message header (coreutils 8.26)
Date: Sun, 26 Mar 2017 17:13:56 -0700
[Message part 3 (text/plain, inline)]
On 26/03/17 03:09, Toby Kelsey wrote:
> I notice sha256sum does not correctly parse a file with a PGP header. Here is a script log:

> toby <at> toby-pc:/tmp/test$ sha256sum -c hashes.txt
> 
> sha256sum: ' monero-win-x64-v0.10.3.0.zip': No such file or directory
>   monero-win-x64-v0.10.3.0.zip: FAILED open or read

> There is a spurious extra space at the start of filenames in the larger file.
> If I just extract the hash lines it works:

> The hash file is from <https://getmonero.org/downloads/hashes.txt>

The attached should fix this issue.

thanks,
Pádraig

[md5sum-bad-bsd-r.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Toby Kelsey <toby.kelsey <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: sha256sum does not correctly parse file with PGP message header
 (coreutils 8.26)
Date: Sun, 26 Mar 2017 11:09:10 +0100
[Message part 6 (text/plain, inline)]
I notice sha256sum does not correctly parse a file with a PGP header. Here is a script log:

toby <at> toby-pc:/tmp/test$ ls -l
total 57068
-rw-r--r-- 1 toby toby     2046 Mar 26 10:30 hashes.txt
-rw-r--r-- 1 toby toby 58432932 Mar 26 10:30 monero-linux-x64-v0.10.3.0.tar.bz2

toby <at> toby-pc:/tmp/test$ grep linux-x64 hashes.txt > single.txt

toby <at> toby-pc:/tmp/test$ cat single.txt
f164112bea75dfd3eaaa905d21129820a996bbe6e5d65cb194609c672a71c3fe  monero-linux-x64-v0.10.3.0.tar.bz2

toby <at> toby-pc:/tmp/test$ sha256sum -c single.txt
monero-linux-x64-v0.10.3.0.tar.bz2: OK

toby <at> toby-pc:/tmp/test$ sha256sum -c hashes.txt

sha256sum: ' monero-win-x64-v0.10.3.0.zip': No such file or directory
 monero-win-x64-v0.10.3.0.zip: FAILED open or read
sha256sum: ' monero-win-x86-v0.10.3.0.zip': No such file or directory
 monero-win-x86-v0.10.3.0.zip: FAILED open or read
sha256sum: ' monero-mac-x64-v0.10.3.0.tar.bz2': No such file or directory
 monero-mac-x64-v0.10.3.0.tar.bz2: FAILED open or read
sha256sum: ' monero-linux-x64-v0.10.3.0.tar.bz2': No such file or directory
 monero-linux-x64-v0.10.3.0.tar.bz2: FAILED open or read
sha256sum: ' monero-linux-x86-v0.10.3.0.tar.bz2': No such file or directory
 monero-linux-x86-v0.10.3.0.tar.bz2: FAILED open or read
sha256sum: ' monero-linux-armv7-v0.10.3.0.tar.bz2': No such file or directory
 monero-linux-armv7-v0.10.3.0.tar.bz2: FAILED open or read
sha256sum: ' monero-linux-armv8-v0.10.3.0.tar.bz2': No such file or directory
 monero-linux-armv8-v0.10.3.0.tar.bz2: FAILED open or read
sha256sum: ' monero-freebsd-x64-v0.10.3.0.tar.bz2': No such file or directory
 monero-freebsd-x64-v0.10.3.0.tar.bz2: FAILED open or read
sha256sum: ' monero-dragonflybsd-x64-v0.10.3.0.tar.bz2': No such file or directory
 monero-dragonflybsd-x64-v0.10.3.0.tar.bz2: FAILED open or read
sha256sum: ' monero.gui.win.x64.beta.zip': No such file or directory
 monero.gui.win.x64.beta.zip: FAILED open or read
sha256sum: ' monero.gui.mac.x64.beta.tar.bz2': No such file or directory
 monero.gui.mac.x64.beta.tar.bz2: FAILED open or read
sha256sum: ' monero.gui.linux.x64.beta.tar.bz2': No such file or directory
 monero.gui.linux.x64.beta.tar.bz2: FAILED open or read
sha256sum: ' monero.gui.linux.x86.beta.tar.bz2': No such file or directory
 monero.gui.linux.x86.beta.tar.bz2: FAILED open or read
sha256sum: WARNING: 22 lines are improperly formatted
sha256sum: WARNING: 13 listed files could not be read


There is a spurious extra space at the start of filenames in the larger file.
If I just extract the hash lines it works:


toby <at> toby-pc:/tmp/test$ egrep zip\|bz2 hashes.txt > hashes1.txt

toby <at> toby-pc:/tmp/test$ sha256sum -c hashes1.txt

sha256sum: monero-win-x64-v0.10.3.0.zip: No such file or directory
monero-win-x64-v0.10.3.0.zip: FAILED open or read
sha256sum: monero-win-x86-v0.10.3.0.zip: No such file or directory
monero-win-x86-v0.10.3.0.zip: FAILED open or read
sha256sum: monero-mac-x64-v0.10.3.0.tar.bz2: No such file or directory
monero-mac-x64-v0.10.3.0.tar.bz2: FAILED open or read
monero-linux-x64-v0.10.3.0.tar.bz2: OK
sha256sum: monero-linux-x86-v0.10.3.0.tar.bz2: No such file or directory
monero-linux-x86-v0.10.3.0.tar.bz2: FAILED open or read
sha256sum: monero-linux-armv7-v0.10.3.0.tar.bz2: No such file or directory
monero-linux-armv7-v0.10.3.0.tar.bz2: FAILED open or read
sha256sum: monero-linux-armv8-v0.10.3.0.tar.bz2: No such file or directory
monero-linux-armv8-v0.10.3.0.tar.bz2: FAILED open or read
sha256sum: monero-freebsd-x64-v0.10.3.0.tar.bz2: No such file or directory
monero-freebsd-x64-v0.10.3.0.tar.bz2: FAILED open or read
sha256sum: monero-dragonflybsd-x64-v0.10.3.0.tar.bz2: No such file or directory
monero-dragonflybsd-x64-v0.10.3.0.tar.bz2: FAILED open or read
sha256sum: monero.gui.win.x64.beta.zip: No such file or directory
monero.gui.win.x64.beta.zip: FAILED open or read
sha256sum: monero.gui.mac.x64.beta.tar.bz2: No such file or directory
monero.gui.mac.x64.beta.tar.bz2: FAILED open or read
sha256sum: monero.gui.linux.x64.beta.tar.bz2: No such file or directory
monero.gui.linux.x64.beta.tar.bz2: FAILED open or read
sha256sum: monero.gui.linux.x86.beta.tar.bz2: No such file or directory
monero.gui.linux.x86.beta.tar.bz2: FAILED open or read
sha256sum: WARNING: 12 listed files could not be read

The hash file is from <https://getmonero.org/downloads/hashes.txt>

Regards,
Toby
[hashes.txt (text/plain, attachment)]

This bug report was last modified 8 years and 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.