diff -Nru libdigest-sha-perl-6.02/Changes libdigest-sha-perl-6.03/Changes --- libdigest-sha-perl-6.02/Changes 2018-04-20 23:25:30.000000000 +0000 +++ libdigest-sha-perl-6.03/Changes 2022-08-08 18:30:32.000000000 +0000 @@ -1,5 +1,10 @@ Revision history for Perl extension Digest::SHA. +6.03 Mon 08 Aug 2022 11:30:32 AM MST + - corrected addfile to report error when stdin is a directory + -- ref. rt.cpan.org #143899 + -- thanks to Gregor Herrmann for pointing this out + 6.02 Fri Apr 20 16:25:30 MST 2018 - silenced compiler warnings from VS2017 -- ref. rt.cpan.org #124477 diff -Nru libdigest-sha-perl-6.02/debian/changelog libdigest-sha-perl-6.03/debian/changelog --- libdigest-sha-perl-6.02/debian/changelog 2022-07-30 17:35:49.000000000 +0000 +++ libdigest-sha-perl-6.03/debian/changelog 2022-08-13 16:35:16.000000000 +0000 @@ -1,3 +1,12 @@ +libdigest-sha-perl (6.03-1) unstable; urgency=medium + + * Import upstream version 6.03. + Fixes "shasum treats read errors like end of file" + (Closes: #986159) + * Update years of upstream copyright. + + -- gregor herrmann Sat, 13 Aug 2022 18:35:16 +0200 + libdigest-sha-perl (6.02-2) unstable; urgency=medium [ gregor herrmann ] diff -Nru libdigest-sha-perl-6.02/debian/copyright libdigest-sha-perl-6.03/debian/copyright --- libdigest-sha-perl-6.02/debian/copyright 2022-07-30 17:35:49.000000000 +0000 +++ libdigest-sha-perl-6.03/debian/copyright 2022-08-13 16:35:16.000000000 +0000 @@ -4,7 +4,7 @@ Source: https://metacpan.org/release/Digest-SHA Files: * -Copyright: 2003-2018, Mark Shelor +Copyright: 2003-2022, Mark Shelor License: Artistic or GPL-1+ Files: debian/* diff -Nru libdigest-sha-perl-6.02/lib/Digest/SHA.pm libdigest-sha-perl-6.03/lib/Digest/SHA.pm --- libdigest-sha-perl-6.02/lib/Digest/SHA.pm 2018-04-20 23:26:30.000000000 +0000 +++ libdigest-sha-perl-6.03/lib/Digest/SHA.pm 2022-08-08 18:30:32.000000000 +0000 @@ -6,9 +6,10 @@ use warnings; use vars qw($VERSION @ISA @EXPORT_OK $errmsg); use Fcntl qw(O_RDONLY O_RDWR); +use Cwd qw(getcwd); use integer; -$VERSION = '6.02'; +$VERSION = '6.03'; require Exporter; @ISA = qw(Exporter); @@ -120,9 +121,18 @@ ## by attempting to open with mode O_RDWR local *FH; - $file eq '-' and open(FH, '< -') - or sysopen(FH, $file, -d $file ? O_RDWR : O_RDONLY) + if ($file eq '-') { + if (-d STDIN) { + sysopen(FH, getcwd(), O_RDWR) + or _bail('Open failed'); + } + open(FH, '< -') + or _bail('Open failed'); + } + else { + sysopen(FH, $file, -d $file ? O_RDWR : O_RDONLY) or _bail('Open failed'); + } if ($BITS) { my ($n, $buf) = (0, ""); @@ -810,7 +820,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (C) 2003-2018 Mark Shelor +Copyright (C) 2003-2022 Mark Shelor This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff -Nru libdigest-sha-perl-6.02/META.yml libdigest-sha-perl-6.03/META.yml --- libdigest-sha-perl-6.02/META.yml 2018-04-20 23:25:30.000000000 +0000 +++ libdigest-sha-perl-6.03/META.yml 2022-08-08 18:30:32.000000000 +0000 @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Digest-SHA -version: 6.02 +version: 6.03 abstract: Perl extension for SHA-1/224/256/384/512 license: perl author: @@ -10,7 +10,7 @@ provides: Digest::SHA: file: lib/Digest/SHA.pm - version: 6.02 + version: 6.03 meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html diff -Nru libdigest-sha-perl-6.02/README libdigest-sha-perl-6.03/README --- libdigest-sha-perl-6.02/README 2018-04-20 23:25:30.000000000 +0000 +++ libdigest-sha-perl-6.03/README 2022-08-08 18:30:32.000000000 +0000 @@ -1,4 +1,4 @@ -Digest::SHA version 6.02 +Digest::SHA version 6.03 ======================== Digest::SHA is a complete implementation of the NIST Secure Hash @@ -33,7 +33,7 @@ COPYRIGHT AND LICENSE -Copyright (C) 2003-2018 Mark Shelor +Copyright (C) 2003-2022 Mark Shelor This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff -Nru libdigest-sha-perl-6.02/shasum libdigest-sha-perl-6.03/shasum --- libdigest-sha-perl-6.02/shasum 2018-04-20 23:26:30.000000000 +0000 +++ libdigest-sha-perl-6.03/shasum 2022-08-08 18:30:32.000000000 +0000 @@ -2,10 +2,10 @@ ## shasum: filter for computing SHA digests (ref. sha1sum/md5sum) ## - ## Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved + ## Copyright (C) 2003-2022 Mark Shelor, All Rights Reserved ## - ## Version: 6.02 - ## Fri Apr 20 16:25:30 MST 2018 + ## Version: 6.03 + ## Mon 08 Aug 2022 11:30:32 AM MST ## shasum SYNOPSIS adapted from GNU Coreutils sha1sum. Add ## "-a" option for algorithm selection, @@ -97,7 +97,7 @@ =head1 AUTHOR -Copyright (C) 2003-2018 Mark Shelor . +Copyright (C) 2003-2022 Mark Shelor . =head1 SEE ALSO @@ -107,7 +107,7 @@ END_OF_POD -my $VERSION = "6.02"; +my $VERSION = "6.03"; sub usage { my($err, $msg) = @_; diff -Nru libdigest-sha-perl-6.02/src/sha64bit.c libdigest-sha-perl-6.03/src/sha64bit.c --- libdigest-sha-perl-6.02/src/sha64bit.c 2018-04-20 23:25:30.000000000 +0000 +++ libdigest-sha-perl-6.03/src/sha64bit.c 2022-08-08 18:30:32.000000000 +0000 @@ -3,10 +3,10 @@ * * Ref: NIST FIPS PUB 180-4 Secure Hash Standard * - * Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved + * Copyright (C) 2003-2022 Mark Shelor, All Rights Reserved * - * Version: 6.02 - * Fri Apr 20 16:25:30 MST 2018 + * Version: 6.03 + * Mon 08 Aug 2022 11:30:32 AM MST * */ diff -Nru libdigest-sha-perl-6.02/src/sha64bit.h libdigest-sha-perl-6.03/src/sha64bit.h --- libdigest-sha-perl-6.02/src/sha64bit.h 2018-04-20 23:25:30.000000000 +0000 +++ libdigest-sha-perl-6.03/src/sha64bit.h 2022-08-08 18:30:32.000000000 +0000 @@ -3,10 +3,10 @@ * * Ref: NIST FIPS PUB 180-4 Secure Hash Standard * - * Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved + * Copyright (C) 2003-2022 Mark Shelor, All Rights Reserved * - * Version: 6.02 - * Fri Apr 20 16:25:30 MST 2018 + * Version: 6.03 + * Mon 08 Aug 2022 11:30:32 AM MST * * The following macros supply placeholder values that enable the * sha.c module to successfully compile when 64-bit integer types diff -Nru libdigest-sha-perl-6.02/src/sha.c libdigest-sha-perl-6.03/src/sha.c --- libdigest-sha-perl-6.02/src/sha.c 2018-04-20 23:25:30.000000000 +0000 +++ libdigest-sha-perl-6.03/src/sha.c 2022-08-08 18:30:32.000000000 +0000 @@ -3,10 +3,10 @@ * * Ref: NIST FIPS PUB 180-4 Secure Hash Standard * - * Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved + * Copyright (C) 2003-2022 Mark Shelor, All Rights Reserved * - * Version: 6.02 - * Fri Apr 20 16:25:30 MST 2018 + * Version: 6.03 + * Mon 08 Aug 2022 11:30:32 AM MST * */ diff -Nru libdigest-sha-perl-6.02/src/sha.h libdigest-sha-perl-6.03/src/sha.h --- libdigest-sha-perl-6.02/src/sha.h 2018-04-20 23:25:30.000000000 +0000 +++ libdigest-sha-perl-6.03/src/sha.h 2022-08-08 18:30:32.000000000 +0000 @@ -3,10 +3,10 @@ * * Ref: NIST FIPS PUB 180-4 Secure Hash Standard * - * Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved + * Copyright (C) 2003-2022 Mark Shelor, All Rights Reserved * - * Version: 6.02 - * Fri Apr 20 16:25:30 MST 2018 + * Version: 6.03 + * Mon 08 Aug 2022 11:30:32 AM MST * */