Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-Digest-CRC for openSUSE:Factory
checked in at 2021-01-20 18:28:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Digest-CRC (Old)
and /work/SRC/openSUSE:Factory/.perl-Digest-CRC.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Digest-CRC"
Wed Jan 20 18:28:11 2021 rev:14 rq:864595 version:0.22.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Digest-CRC/perl-Digest-CRC.changes
2015-04-18 10:41:13.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Digest-CRC.new.28504/perl-Digest-CRC.changes
2021-01-20 18:28:42.659588490 +0100
@@ -1,0 +2,11 @@
+Wed Jan 20 09:05:52 UTC 2021 - Stephan Kulow <[email protected]>
+
+- Regenerate with new cpanspec template
+
+-------------------------------------------------------------------
+Wed Jan 6 12:32:13 UTC 2021 - Dirk M??ller <[email protected]>
+
+- update to 0.22.2:
+ - added padding for hex encoded digests
+
+-------------------------------------------------------------------
Old:
----
Digest-CRC-0.21.tar.gz
New:
----
Digest-CRC-0.22.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Digest-CRC.spec ++++++
--- /var/tmp/diff_new_pack.yUrD6j/_old 2021-01-20 18:28:43.691589436 +0100
+++ /var/tmp/diff_new_pack.yUrD6j/_new 2021-01-20 18:28:43.695589439 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-Digest-CRC
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,22 +12,20 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+%define cpan_name Digest-CRC
Name: perl-Digest-CRC
-Version: 0.21
+Version: 0.22.2
Release: 0
#Upstream: CRC algorithm code taken from "A PAINLESS GUIDE TO CRC ERROR
DETECTION ALGORITHMS". the public domain.
-%define cpan_name Digest-CRC
Summary: Generic CRC functions
License: SUSE-Public-Domain
-Group: Development/Libraries/Perl
-Url: http://search.cpan.org/dist/Digest-CRC/
-Source0:
http://www.cpan.org/authors/id/O/OL/OLIMAUL/%{cpan_name}-%{version}.tar.gz
+URL: https://metacpan.org/release/%{cpan_name}
+Source0:
https://cpan.metacpan.org/authors/id/O/OL/OLIMAUL/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
%{perl_requires}
@@ -38,14 +36,14 @@
and CRC-64, as well as the CRC used in OpenPGP's ASCII-armored checksum.
%prep
-%setup -q -n %{cpan_name}-%{version}
+%autosetup -n %{cpan_name}-0.22
%build
-%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
-%{__make} %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
+%make_build
%check
-%{__make} test
+make test
%install
%perl_make_install
@@ -53,7 +51,6 @@
%perl_gen_filelist
%files -f %{name}.files
-%defattr(-,root,root,755)
%doc Changes README
%changelog
++++++ Digest-CRC-0.21.tar.gz -> Digest-CRC-0.22.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Digest-CRC-0.21/Changes new/Digest-CRC-0.22/Changes
--- old/Digest-CRC-0.21/Changes 2015-02-21 13:19:13.000000000 +0100
+++ new/Digest-CRC-0.22/Changes 2017-02-18 17:46:10.000000000 +0100
@@ -68,3 +68,6 @@
0.21 Sat Feb 21 13:18:25 2015
- new() throwing an error if an unsupported type is specified
+
+0.22 Sat Feb 18 17:45:31 2017
+ - added padding for hex encoded digests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Digest-CRC-0.21/META.yml new/Digest-CRC-0.22/META.yml
--- old/Digest-CRC-0.21/META.yml 2015-02-21 13:19:23.000000000 +0100
+++ new/Digest-CRC-0.22/META.yml 2017-02-18 17:53:46.000000000 +0100
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Digest-CRC
-version: 0.21
+version: 0.22
version_from: lib/Digest/CRC.pm
installdirs: site
requires:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Digest-CRC-0.21/README new/Digest-CRC-0.22/README
--- old/Digest-CRC-0.21/README 2015-02-21 13:20:33.000000000 +0100
+++ new/Digest-CRC-0.22/README 2017-02-18 17:45:09.000000000 +0100
@@ -1,4 +1,4 @@
-Digest::CRC version 0.21
+Digest::CRC version 0.22
========================
NAME
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Digest-CRC-0.21/lib/Digest/CRC.pm
new/Digest-CRC-0.22/lib/Digest/CRC.pm
--- old/Digest-CRC-0.21/lib/Digest/CRC.pm 2015-02-21 13:33:47.000000000
+0100
+++ new/Digest-CRC-0.22/lib/Digest/CRC.pm 2017-02-18 18:02:53.000000000
+0100
@@ -18,7 +18,7 @@
crc64_hex crc64_base64
);
-$VERSION = '0.21';
+$VERSION = '0.22';
$XS_VERSION = $VERSION;
#$VERSION = eval $VERSION;
@@ -169,7 +169,7 @@
#########################################
# Private output converter functions:
-sub _encode_hex { sprintf "%x", $_[0] }
+sub _encode_hex { sprintf "%0${_[1]}x", $_[0] }
sub _encode_base64 {
my ($res, $padding, $in) = ("", undef, $_[0]);
@@ -240,7 +240,7 @@
}
sub hexdigest {
- _encode_hex($_[0]->digest)
+ _encode_hex($_[0]->digest, $_[0]->{width}/4)
}
sub b64digest {
@@ -314,31 +314,31 @@
sub crc64 { _crc64($_[0],defined($_[1])?$_[1]:0) }
-sub crc_hex { _encode_hex &crc }
+sub crc_hex { _encode_hex(&crc,2) }
sub crc_base64 { _encode_base64 &crc }
-sub crc8_hex { _encode_hex &crc8 }
+sub crc8_hex { _encode_hex(&crc8,2) }
sub crc8_base64 { _encode_base64 &crc8 }
-sub crcccitt_hex { _encode_hex &crcccitt }
+sub crcccitt_hex { _encode_hex(&crcccitt,4) }
sub crcccitt_base64 { _encode_base64 &crcccitt }
-sub crc16_hex { _encode_hex &crc16 }
+sub crc16_hex { _encode_hex(&crc16,4) }
sub crc16_base64 { _encode_base64 &crc16 }
-sub crcopenpgparmor_hex { _encode_hex &crcopenpgparmor }
+sub crcopenpgparmor_hex { _encode_hex(&crcopenpgparmor,6) }
sub crcopenpgparmor_base64 { _encode_base64 &crcopenpgparmor }
-sub crc32_hex { _encode_hex &crc32 }
+sub crc32_hex { _encode_hex(&crc32,8) }
sub crc32_base64 { _encode_base64 &crc32 }
-sub crc64_hex { _encode_hex &crc64 }
+sub crc64_hex { _encode_hex(&crc64,16) }
sub crc64_base64 { _encode_base64 &crc64 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Digest-CRC-0.21/t/crc.t new/Digest-CRC-0.22/t/crc.t
--- old/Digest-CRC-0.21/t/crc.t 2015-02-21 13:34:40.000000000 +0100
+++ new/Digest-CRC-0.22/t/crc.t 2017-02-19 18:19:45.000000000 +0100
@@ -1,5 +1,5 @@
BEGIN {
- $tests = 21;
+ $tests = 31;
if ($ENV{'WITH_CRC64'}) {
$tests=$tests+2;
}
@@ -21,7 +21,8 @@
ENDEV
}
-use Digest::CRC qw(crc64 crc32 crc16 crcccitt crc8 crcopenpgparmor);
+use Digest::CRC qw(crc64 crc32 crc16 crcccitt crc8 crcopenpgparmor
+ crc64_hex crc32_hex crc16_hex crcccitt_hex crc8_hex
crcopenpgparmor_hex);
ok(1, 'use');
my $input = "123456789";
@@ -57,7 +58,7 @@
$ctx->addfile(F);
close(F);
my $y = $ctx->digest;
-ok($y == 1662879226, 'OO crc32 with addfile '.$y);
+ok($y == 4009136024, 'OO crc32 with addfile '.$y);
# start at offset >0 with previous checksum result
$ctx = Digest::CRC->new(type=>"crc32",cont=>1,init=>460478609);
@@ -106,6 +107,31 @@
ok($crc16 == 0x0220, 'crc16');
ok($crc8 == 0x82, 'crc8');
+# hex digest
+my $hexinput = "ae";
+($crc32,$crc16,$crcccitt,$crc8,$crcopenpgparmor) =
(crc32_hex($hexinput),crc16_hex($hexinput),crcccitt_hex($hexinput),crc8_hex($hexinput),crcopenpgparmor_hex($hexinput));
+ok($crc32 == "00e7ddce", 'crc32_hex'); # width padding to 4 bytes
+ok($crcccitt == "1917", 'crcccitt_hex');
+ok($crc16 == "bbe9", 'crc16_hex');
+ok($crc8 == "dc", 'crc8_hex');
+ok($crcopenpgparmor == "3e653a", 'crcopenpgparmor_hex');
+
+$ctx = Digest::CRC->new(type=>"crc8");
+$ctx->add($hexinput);
+ok($ctx->hexdigest == "dc", 'OO crc8 hex');
+$ctx = Digest::CRC->new(type=>"crc16");
+$ctx->add($hexinput);
+ok($ctx->hexdigest == "bbe9", 'OO crc16 hex');
+$ctx = Digest::CRC->new(type=>"crc32");
+$ctx->add($hexinput);
+ok($ctx->hexdigest == "00e7ddce", 'OO crc32 hex');
+$ctx = Digest::CRC->new(type=>"crcccitt");
+$ctx->add($hexinput);
+ok($ctx->hexdigest == "1917", 'OO crcccitt hex');
+$ctx = Digest::CRC->new(type=>"crcopenpgparmor");
+$ctx->add($hexinput);
+ok($ctx->hexdigest == "3e653a", 'OO crcopenpgparmor hex');
+
# openpgparmor
my $openpgparmor = crcopenpgparmor($input);
ok($openpgparmor == 4874579, 'openpgparmor '.$openpgparmor);