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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26263 in the body.
You can then email your comments to 26263 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#26263; Package coreutils. (Sun, 26 Mar 2017 10:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Toby Kelsey <toby.kelsey <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sun, 26 Mar 2017 10:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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 1 (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)]

Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Mon, 27 Mar 2017 00:15:01 GMT) Full text and rfc822 format available.

Notification sent to Toby Kelsey <toby.kelsey <at> gmail.com>:
bug acknowledged by developer. (Mon, 27 Mar 2017 00:15:01 GMT) Full text and rfc822 format available.

Message #10 received at 26263-done <at> debbugs.gnu.org (full text, mbox):

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 1 (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)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 24 Apr 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 15 days ago.

Previous Next


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