ppisar pushed to perl-Crypt-CipherSaber (master). "1.01 bump"

notifications at fedoraproject.org notifications at fedoraproject.org
Fri Aug 28 12:41:27 UTC 2015


From a3ebc6b787c221f0a6241ff4547b26ee2cfba8c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
Date: Fri, 28 Aug 2015 14:40:02 +0200
Subject: 1.01 bump


diff --git a/.gitignore b/.gitignore
index c1117c3..71b3366 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 Crypt-CipherSaber-1.00.tar.gz
+/Crypt-CipherSaber-1.01.tar.gz
diff --git a/Crypt-CipherSaber-1.00-Do-not-verify-files-missing-from-MANIFEST.patch b/Crypt-CipherSaber-1.00-Do-not-verify-files-missing-from-MANIFEST.patch
deleted file mode 100644
index d21a31a..0000000
--- a/Crypt-CipherSaber-1.00-Do-not-verify-files-missing-from-MANIFEST.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From aa3a3f5b7f4d15ee3cb30de679f4651f40c09eef Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
-Date: Mon, 13 Apr 2015 15:04:59 +0200
-Subject: [PATCH] Do not verify files missing from MANIFEST
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Module-Signature-0.74 ignores MANIFEST.SKIP by default as a result of
-a security fix. This patch enables the (built-in) skip list again as
-the 0-signature.t is a sanity author test rather than a security check
-which should be performed before executing ./Build.PL or Makefile.PL.
-
-CPAN RT#103485
-
-Signed-off-by: Petr Písař <ppisar at redhat.com>
----
- t/0-signature.t | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/t/0-signature.t b/t/0-signature.t
-index 48bb368..3bf3ec5 100644
---- a/t/0-signature.t
-+++ b/t/0-signature.t
-@@ -5,7 +5,7 @@ use Test::More tests => 1;
- 
- SKIP: {
-     if (eval { require Module::Signature; 1 }) {
--	ok(Module::Signature::verify() == Module::Signature::SIGNATURE_OK()
-+	ok(Module::Signature::verify(skip => 1) == Module::Signature::SIGNATURE_OK()
- 	    => "Valid signature" );
-     }
-     else {
--- 
-2.1.0
-
diff --git a/Crypt-CipherSaber-1.00-Fix-reading-IV-with-new-lines-from-a-file.patch b/Crypt-CipherSaber-1.00-Fix-reading-IV-with-new-lines-from-a-file.patch
deleted file mode 100644
index 7656ea9..0000000
--- a/Crypt-CipherSaber-1.00-Fix-reading-IV-with-new-lines-from-a-file.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From e72a35d3276239d98161f4818e764fc419635bc6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
-Date: Wed, 27 Aug 2014 15:38:54 +0200
-Subject: [PATCH] Fix reading IV with new-lines from a file
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Decrypting filehandle data by fh_crypt() could produce bad decrypted
-data if the initizalization vector read from the filehandle contained
-a new-line character. This caused random failures of 'autogenerating
-and autoreading IV should also round-trip' test in t/fh_encrypt.t.
-
-This patch fixes it by reading first 10 characters regardless of
-current line separator.
-
-CPAN RT #28370
-
-Signed-off-by: Petr Písař <ppisar at redhat.com>
----
- lib/Crypt/CipherSaber.pm | 14 +++++++++-----
- t/fh_encrypt.t           | 40 +++++++++++++++++++++++++++++++++++++++-
- 2 files changed, 48 insertions(+), 6 deletions(-)
-
-diff --git a/lib/Crypt/CipherSaber.pm b/lib/Crypt/CipherSaber.pm
-index 99f362b..2dd91f8 100644
---- a/lib/Crypt/CipherSaber.pm
-+++ b/lib/Crypt/CipherSaber.pm
-@@ -67,6 +67,15 @@ sub fh_crypt
- 		$iv = $self->_gen_iv() if length($iv) == 1;
- 		$self->_setup_key($iv);
- 		print OUT $iv;
-+	} else {
-+		if ( 10 != $in->read($iv, 10) )
-+		{
-+			require Carp;
-+			Carp::carp( 'Could not read IV from input filehandle' );
-+			return;
-+		}
-+		( $iv ) = unpack( "a10", $iv );
-+		$self->_setup_key($iv);
- 	}
- 
- 	my $state = $self->[1];
-@@ -75,11 +84,6 @@ sub fh_crypt
- 
- 	while (<$in>)
- 	{
--		unless ($iv)
--		{
--			( $iv, $_ ) = unpack( "a10a*", $_ );
--			$self->_setup_key($iv);
--		}
- 		my $line;
- 		( $line, $state, @vars ) = _do_crypt( $state, $_, @vars );
- 		print OUT $line;
-diff --git a/t/fh_encrypt.t b/t/fh_encrypt.t
-index 35a74fb..e595ff9 100644
---- a/t/fh_encrypt.t
-+++ b/t/fh_encrypt.t
-@@ -6,7 +6,7 @@ BEGIN
- }
- 
- use strict;
--use Test::More tests => 6;
-+use Test::More tests => 7;
- use_ok( 'Crypt::CipherSaber' );
- 
- # tests the fh_crypt() method
-@@ -114,6 +114,44 @@ while (<SOURCE>)
- 
- ok( ! $status, 'autogenerating and autoreading IV should also round-trip' );
- 
-+# IV retrieved from encrypted file can contain new-line characters. Check that
-+# fh_encrypt can deal with it
-+{
-+	local $/ = "\012";
-+
-+	open( IN, 'smiles.png' )      or die "Cannot read smiles.png: $!";
-+	open( OUT, '> smiles_2.cs1' ) or die "Cannot write to smiles_2.cs1: $!";
-+	binmode( IN );
-+	binmode( OUT );
-+	$cs->fh_crypt( \*IN, \*OUT, $/ x 10 );
-+	close IN;
-+	close OUT;
-+
-+	open( IN, 'smiles_2.cs1'    ) or die "Cannot read smiles_2.cs1: $!";
-+	open( OUT, '> smiles_2.png' ) or die "Cannot write to smiles_2.png $!";
-+	binmode( IN );
-+	binmode( OUT );
-+	$cs->fh_crypt( \*IN, \*OUT );
-+	close IN;
-+	close OUT;
-+
-+	open( SOURCE, 'smiles.png' )   or die "Cannot read smiles.png: $!";
-+	open( DEST,   'smiles_2.png' ) or die "Cannot read smiles_2.png: $!";
-+	binmode SOURCE;
-+	binmode DEST;
-+	$status = 0;
-+	while (<SOURCE>)
-+	{
-+		unless ($_ eq <DEST>)
-+		{
-+			$status = 1;
-+			last;
-+		}
-+	}
-+	ok( ! $status, 'IV with new-lines in the encrypted file' );
-+}
-+
-+
- END
- {
- 	1 while unlink qw( smiles_2.cs1 smiles_2.png outsmiles.cs1 outsmiles.png );
--- 
-1.9.3
-
diff --git a/Crypt-CipherSaber-1.00-Resign-the-distribution.patch b/Crypt-CipherSaber-1.00-Resign-the-distribution.patch
deleted file mode 100644
index f6e23dc..0000000
--- a/Crypt-CipherSaber-1.00-Resign-the-distribution.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From a947adc689b85768b9b65453a6efe8cb5e2040c1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
-Date: Mon, 13 Apr 2015 15:08:47 +0200
-Subject: [PATCH] Resign the distribution
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Petr Písař <ppisar at redhat.com>
----
- SIGNATURE | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/SIGNATURE b/SIGNATURE
-index 1a25cd4..f83f805 100644
---- a/SIGNATURE
-+++ b/SIGNATURE
-@@ -1,5 +1,5 @@
- This file contains message digests of all files listed in MANIFEST,
--signed via the Module::Signature module, version 0.44.
-+signed via the Module::Signature module, version 0.78.
- 
- To verify the content in this distribution, first make sure you have
- Module::Signature installed, then type:
-@@ -12,7 +12,7 @@ the distribution may already have been compromised, and you should
- not run its Makefile.PL or Build.PL.
- 
- -----BEGIN PGP SIGNED MESSAGE-----
--Hash: SHA1
-+Hash: SHA256
- 
- SHA1 80bc94fb6bfcb7c680fb458b55e3b1301e19dc8d Build.PL
- SHA1 8153f68a5a4725476b3e5b1460b1bf6d8c0e9b17 Changes
-@@ -20,23 +20,23 @@ SHA1 a21beaa3ee715f216db0dd42b2a3984f02896c91 MANIFEST
- SHA1 c693376329238a7d4e66df3e5cadfbf8984271a5 META.yml
- SHA1 89badd63f031ee283647f7a60ac24c2bdad4724f Makefile.PL
- SHA1 01ab13d602962b3cece3ee21f4a94fa9f791089e README
--SHA1 195b43a0cf4205d20c39ec9ae3ccf131337fc3dd lib/Crypt/CipherSaber.pm
--SHA1 f35a25f9883738be60f36b3ec2d0aeae9e2a9608 t/0-signature.t
-+SHA1 9d90c8f3765a0867ae50b4da11d5917528684798 lib/Crypt/CipherSaber.pm
-+SHA1 4944e1e962603b97c1eec1cb311313a061c9237d t/0-signature.t
- SHA1 2a24fe5acc19ef82f476a2634856af8c4f02b479 t/CS2.t
- SHA1 77a9031ccfd49486409f119daa5048c34542a29c t/base.t
- SHA1 2bd8b8faa4768bb323a3de9d9d333854b7240d18 t/bigfile.t
- SHA1 c03dcb0143cb728fc51a5bade84fe0b60ed95fbe t/both_long.t
- SHA1 3c9c40b67a46f4cbaf129468dbd55690d9d935cd t/create.t
- SHA1 af740c6407da521170bf9ce67da5017d9952e41e t/encrypt.t
--SHA1 526a6f5c3b05ece813b6f2bb7baf0c12966d5f08 t/fh_encrypt.t
-+SHA1 12587526e1f3d62dcca29c658f81142124c5e904 t/fh_encrypt.t
- SHA1 6da39b48ce64b584e4c3274bff96fc76ff484820 t/pod-coverage.t
- SHA1 0190346d7072d458c8a10a45c19f86db641dcc48 t/pod.t
- SHA1 6e204f97d2188ca6f1c8548fc615e9a797a6dcd5 t/smiles.cs1
- SHA1 86ccaee51907f749d46bfba4ce5aa3ce9623ea7e t/smiles.png
- -----BEGIN PGP SIGNATURE-----
--Version: GnuPG v1.4.1 (GNU/Linux)
-+Version: GnuPG v2
- 
--iD8DBQFC1HEbBd8Wn1wI6cQRAr/qAJ9GyiesUvi1bxn+uodxCHZBfnRTrQCdFNkI
--4dIIEEIP4prHtDe/WPZRux4=
--=swxm
-+iF4EAREIAAYFAlUrv8oACgkQEsnFx2fG+qJW/QEAkjyjL3b6LaVg0/PMsa1gWrj7
-+n6e2svetBBARHno5l00BAJN5h87GIFhvBRbRgqPX7/vNMKOslKzKDlFtoYqBx6cU
-+=5adX
- -----END PGP SIGNATURE-----
--- 
-2.1.0
-
diff --git a/Crypt-CipherSaber-1.01-Fix-reading-IV-with-new-lines-from-a-file.patch b/Crypt-CipherSaber-1.01-Fix-reading-IV-with-new-lines-from-a-file.patch
new file mode 100644
index 0000000..c6780a0
--- /dev/null
+++ b/Crypt-CipherSaber-1.01-Fix-reading-IV-with-new-lines-from-a-file.patch
@@ -0,0 +1,117 @@
+From 399dc2e20b241e772fa16defcc2e2dbe063ac290 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Wed, 27 Aug 2014 15:38:54 +0200
+Subject: [PATCH] Fix reading IV with new-lines from a file
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Decrypting filehandle data by fh_crypt() could produce bad decrypted
+data if the initizalization vector read from the filehandle contained
+a new-line character. This caused random failures of 'autogenerating
+and autoreading IV should also round-trip' test in t/fh_encrypt.t.
+
+This patch fixes it by reading first 10 characters regardless of
+current line separator.
+
+CPAN RT #28370
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ lib/Crypt/CipherSaber.pm | 14 +++++++++-----
+ t/fh_encrypt.t           | 40 +++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 48 insertions(+), 6 deletions(-)
+
+diff --git a/lib/Crypt/CipherSaber.pm b/lib/Crypt/CipherSaber.pm
+index 7cb7cc0..2db153c 100644
+--- a/lib/Crypt/CipherSaber.pm
++++ b/lib/Crypt/CipherSaber.pm
+@@ -67,6 +67,15 @@ sub fh_crypt
+         $iv = $self->_gen_iv() if length($iv) == 1;
+         $self->_setup_key($iv);
+         print OUT $iv;
++    } else {
++        if ( 10 != $in->read($iv, 10) )
++        {
++            require Carp;
++            Carp::carp( 'Could not read IV from input filehandle' );
++            return;
++        }
++        ( $iv ) = unpack( "a10", $iv );
++        $self->_setup_key($iv);
+     }
+ 
+     my $state = $self->[1];
+@@ -75,11 +84,6 @@ sub fh_crypt
+ 
+     while (<$in>)
+     {
+-        unless ($iv)
+-        {
+-            ( $iv, $_ ) = unpack( "a10a*", $_ );
+-            $self->_setup_key($iv);
+-        }
+         my $line;
+         ( $line, $state, @vars ) = _do_crypt( $state, $_, @vars );
+         print OUT $line;
+diff --git a/t/fh_encrypt.t b/t/fh_encrypt.t
+index 35a74fb..e595ff9 100644
+--- a/t/fh_encrypt.t
++++ b/t/fh_encrypt.t
+@@ -6,7 +6,7 @@ BEGIN
+ }
+ 
+ use strict;
+-use Test::More tests => 6;
++use Test::More tests => 7;
+ use_ok( 'Crypt::CipherSaber' );
+ 
+ # tests the fh_crypt() method
+@@ -114,6 +114,44 @@ while (<SOURCE>)
+ 
+ ok( ! $status, 'autogenerating and autoreading IV should also round-trip' );
+ 
++# IV retrieved from encrypted file can contain new-line characters. Check that
++# fh_encrypt can deal with it
++{
++	local $/ = "\012";
++
++	open( IN, 'smiles.png' )      or die "Cannot read smiles.png: $!";
++	open( OUT, '> smiles_2.cs1' ) or die "Cannot write to smiles_2.cs1: $!";
++	binmode( IN );
++	binmode( OUT );
++	$cs->fh_crypt( \*IN, \*OUT, $/ x 10 );
++	close IN;
++	close OUT;
++
++	open( IN, 'smiles_2.cs1'    ) or die "Cannot read smiles_2.cs1: $!";
++	open( OUT, '> smiles_2.png' ) or die "Cannot write to smiles_2.png $!";
++	binmode( IN );
++	binmode( OUT );
++	$cs->fh_crypt( \*IN, \*OUT );
++	close IN;
++	close OUT;
++
++	open( SOURCE, 'smiles.png' )   or die "Cannot read smiles.png: $!";
++	open( DEST,   'smiles_2.png' ) or die "Cannot read smiles_2.png: $!";
++	binmode SOURCE;
++	binmode DEST;
++	$status = 0;
++	while (<SOURCE>)
++	{
++		unless ($_ eq <DEST>)
++		{
++			$status = 1;
++			last;
++		}
++	}
++	ok( ! $status, 'IV with new-lines in the encrypted file' );
++}
++
++
+ END
+ {
+ 	1 while unlink qw( smiles_2.cs1 smiles_2.png outsmiles.cs1 outsmiles.png );
+-- 
+2.4.3
+
diff --git a/perl-Crypt-CipherSaber.spec b/perl-Crypt-CipherSaber.spec
index 450bd60..3b04b93 100644
--- a/perl-Crypt-CipherSaber.spec
+++ b/perl-Crypt-CipherSaber.spec
@@ -1,28 +1,33 @@
 Name:           perl-Crypt-CipherSaber
-Version:        1.00
-Release:        21%{?dist}
+Version:        1.01
+Release:        1%{?dist}
 Summary:        Perl module implementing CipherSaber encryption
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Crypt-CipherSaber/
 Source0:        http://www.cpan.org/modules/by-module/Crypt/Crypt-CipherSaber-%{version}.tar.gz
-Source1:        67C6FAA2.key
 # Fix parsing encrypted file, bug #1104075, CPAN RT#28370
-Patch0:         Crypt-CipherSaber-1.00-Fix-reading-IV-with-new-lines-from-a-file.patch
-# Adjust to changes in Module-Signature-0.74, bug #1211212, CPAN RT#103485
-Patch1:         Crypt-CipherSaber-1.00-Do-not-verify-files-missing-from-MANIFEST.patch
-# Resign the patched distribution, #1104075, #1211212
-Patch2:         Crypt-CipherSaber-1.00-Resign-the-distribution.patch
+Patch0:         Crypt-CipherSaber-1.01-Fix-reading-IV-with-new-lines-from-a-file.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
+BuildRequires:  coreutils
+BuildRequires:  perl
 BuildRequires:  perl(Module::Build)
-BuildRequires:  perl(Test::Simple) >= 0.60
+BuildRequires:  perl(strict)
+BuildRequires:  perl(warnings)
+# Run-time:
+BuildRequires:  perl(Carp)
+BuildRequires:  perl(Scalar::Util) >= 1.4.2
+BuildRequires:  perl(vars)
+# Tests:
+BuildRequires:  perl(File::Spec)
+BuildRequires:  perl(Test::More)
 BuildRequires:  perl(Test::Warn)
-BuildRequires:  perl(Test::Pod)
-BuildRequires:  perl(Test::Pod::Coverage)
-# Optional tests:
-BuildRequires:  perl(Module::Signature)
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires:       perl(Scalar::Util) >= 1.4.2
+
+# Filter under-specified dependencies
+%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Scalar::Util\\)$
 
 %description
 The Crypt::CipherSaber module implements CipherSaber encryption, described
@@ -32,8 +37,6 @@ relatively secure algorithm based on RC4.
 %prep
 %setup -q -n Crypt-CipherSaber-%{version}
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
 
 %build
 %{__perl} Build.PL installdirs=vendor
@@ -41,31 +44,26 @@ relatively secure algorithm based on RC4.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 ./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
-find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
-
 %{_fixperms} $RPM_BUILD_ROOT/*
 
 %check
 # debuginfo generator leaves files that break manifest validation
 rm *.list
-# Import GPG key so we don't try to download it, bug #1109701
-export GNUPGHOME=$(mktemp -d)
-gpg --import '%{SOURCE1}'
 ./Build test
-rm -r "$GNUPGHOME"
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
-%defattr(-,root,root,-)
 %doc Changes README
 %{perl_vendorlib}/*
 %{_mandir}/man3/*
 
 %changelog
+* Fri Aug 28 2015 Petr Pisar <ppisar at redhat.com> - 1.01-1
+- 1.01 bump
+
 * Thu Jun 18 2015 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.00-21
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
 
diff --git a/sources b/sources
index 4b6784a..3ab881e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a00b3e2591cc5f880a110cc53a0b2c7b  Crypt-CipherSaber-1.00.tar.gz
+802f300d7d688427ee661165948bad31  Crypt-CipherSaber-1.01.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/perl-Crypt-CipherSaber.git/commit/?h=master&id=a3ebc6b787c221f0a6241ff4547b26ee2cfba8c3


More information about the perl-devel mailing list