Hello community, here is the log from the commit of package perl-Module-Signature for openSUSE:Factory checked in at 2011-12-25 17:38:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Module-Signature (Old) and /work/SRC/openSUSE:Factory/.perl-Module-Signature.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Module-Signature", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Module-Signature/perl-Module-Signature.changes 2011-09-23 12:38:08.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Module-Signature.new/perl-Module-Signature.changes 2011-12-25 17:39:01.000000000 +0100 @@ -1,0 +2,24 @@ +Mon Dec 19 08:35:22 UTC 2011 - cfarr...@suse.com + +- license update: CC0-1.0 and (GPL-1.0+ or Artistic-1.0) + License purports to be CC zero, not CC-BY. Also, see the script/cpansign + and Module/Signature (line 88+) files for Perl licenses + +------------------------------------------------------------------- +Thu Dec 15 09:56:56 UTC 2011 - co...@suse.com + +- regenerate with cpanspec to fix requires/buildrequires + +------------------------------------------------------------------- +Wed Dec 14 12:14:47 UTC 2011 - co...@suse.com + +- update to 0.68 + * Fix breakage introduced by 0.67 (Andreas König). + * Better handling of \r (Andreas König, Zefram) + +------------------------------------------------------------------- +Wed Dec 14 12:12:55 UTC 2011 - co...@suse.com + +- fix license to be in spdx.org format + +------------------------------------------------------------------- Old: ---- Module-Signature-0.66.tar.gz New: ---- Module-Signature-0.68.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Module-Signature.spec ++++++ --- /var/tmp/diff_new_pack.cCIaPY/_old 2011-12-25 17:39:02.000000000 +0100 +++ /var/tmp/diff_new_pack.cCIaPY/_new 2011-12-25 17:39:02.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package perl-Module-Signature (Version 0.66) +# spec file for package perl-Module-Signature # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,64 +15,65 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: perl-Module-Signature +Version: 0.68 +Release: 0 %define cpan_name Module-Signature Summary: Module signature file manipulation -Version: 0.66 -Release: 2 -License: CC0 1.0 (creative commons 1.0) +License: CC0-1.0 and (GPL-1.0+ or Artistic-1.0) Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Module-Signature/ -Source: http://www.cpan.org/modules/by-module/Module/Module-Signature-%{version}.tar.gz +Source: http://www.cpan.org/authors/id/F/FL/FLORA/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build -%{perl_requires} -BuildRequires: gpg BuildRequires: perl BuildRequires: perl-macros -BuildRequires: perl(Digest::SHA) -BuildRequires: perl(IO::Socket::INET) -# +BuildRequires: perl(IPC::Run) +# MANUAL BEGIN +BuildRequires: gpg Requires: gpg -Requires: perl(Digest::SHA) -Requires: perl(IO::Socket::INET) +# MANUAL END +%{perl_requires} %description -Module::Signature adds cryptographic authentications to CPAN distributions, -via the special SIGNATURE file. +*Module::Signature* adds cryptographic authentications to CPAN +distributions, via the special _SIGNATURE_ file. -Authors: --------- - Audrey Tang <c...@audreyt.org> +If you are a module user, all you have to do is to remember to run +'cpansign -v' (or just 'cpansign') before issuing 'perl Makefile.PL' or +'perl Build.PL'; that will ensure the distribution has not been tampered +with. + +Module authors can easily add the _SIGNATURE_ file to the distribution +tarball; see the /NOTES manpage below for how to do it as part of 'make +dist'. + +If you _really_ want to sign a distribution manually, simply add +'SIGNATURE' to _MANIFEST_, then type 'cpansign -s' immediately before 'make +dist'. Be sure to delete the _SIGNATURE_ file afterwards. + +Please also see the /NOTES manpage about _MANIFEST.SKIP_ issues, especially +if you are using *Module::Build* or writing your own _MANIFEST.SKIP_. %prep %setup -q -n %{cpan_name}-%{version} +find . -type f -print0 | xargs -0 chmod 644 %build %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{?_smp_mflags} %check -#TEST_SIGNATURE=1 %{__make} test %{__make} test %install %perl_make_install -# do not perl_process_packlist (noarch) -# remove .packlist file -%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch -# remove perllocal.pod file -%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib +%perl_process_packlist %perl_gen_filelist -%clean -%{__rm} -rf $RPM_BUILD_ROOT - %files -f %{name}.files -%defattr(-,root,root,-) +%defattr(-,root,root,755) %doc AUDREY2006.pub AUTHORS Changes PAUSE2003.pub README %changelog ++++++ Module-Signature-0.66.tar.gz -> Module-Signature-0.68.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-Signature-0.66/Changes new/Module-Signature-0.68/Changes --- old/Module-Signature-0.66/Changes 2010-09-06 22:52:45.000000000 +0200 +++ new/Module-Signature-0.68/Changes 2011-05-13 11:52:10.000000000 +0200 @@ -1,3 +1,11 @@ +[Changes for 0.68 - Fri, 13 May 2011 11:51:50 +0200] + +* Fix breakage introduced by 0.67 (Andreas König). + +[Changes for 0.67 - Sun, 17 Apr 2011 16:29:23 +0200] + +* Better handling of \r (Andreas König, Zefram) (Closes RT#46339). + [Changes for 0.66 - Fri, 6 Sep 2010 22:51:37 +0200] * Fix incompatibility with EU::Manifest 1.54 to 1.57 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-Signature-0.66/MANIFEST new/Module-Signature-0.68/MANIFEST --- old/Module-Signature-0.66/MANIFEST 2010-09-06 22:56:59.000000000 +0200 +++ new/Module-Signature-0.68/MANIFEST 2011-05-13 11:52:29.000000000 +0200 @@ -15,6 +15,7 @@ lib/Module/Signature.pm Makefile.PL MANIFEST This list of files +MANIFEST.SKIP META.yml PAUSE2003.pub README @@ -23,3 +24,6 @@ t/0-signature.t t/1-basic.t t/2-cygwin.t +t/3-verify.t +t/wrap.pl +t/wrapped-tests.bin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-Signature-0.66/MANIFEST.SKIP new/Module-Signature-0.68/MANIFEST.SKIP --- old/Module-Signature-0.66/MANIFEST.SKIP 1970-01-01 01:00:00.000000000 +0100 +++ new/Module-Signature-0.68/MANIFEST.SKIP 2011-05-13 11:46:24.000000000 +0200 @@ -0,0 +1,61 @@ + +#!start included /home/src/perl/repoperls/installed-perls/perl/v5.14.0-RC2/1df5/lib/5.14.0/ExtUtils/MANIFEST.SKIP +# Avoid version control files. +\bRCS\b +\bCVS\b +\bSCCS\b +,v$ +\B\.svn\b +\B\.git\b +\B\.gitignore\b +\b_darcs\b +\B\.cvsignore$ + +# Avoid VMS specific MakeMaker generated files +\bDescrip.MMS$ +\bDESCRIP.MMS$ +\bdescrip.mms$ + +# Avoid Makemaker generated and utility files. +\bMANIFEST\.bak +\bMakefile$ +\bblib/ +\bMakeMaker-\d +\bpm_to_blib\.ts$ +\bpm_to_blib$ +\bblibdirs\.ts$ # 6.18 through 6.25 generated this + +# Avoid Module::Build generated and utility files. +\bBuild$ +\b_build/ +\bBuild.bat$ +\bBuild.COM$ +\bBUILD.COM$ +\bbuild.com$ + +# Avoid temp and backup files. +~$ +\.old$ +\#$ +\b\.# +\.bak$ +\.tmp$ +\.# +\.rej$ + +# Avoid OS-specific files/dirs +# Mac OSX metadata +\B\.DS_Store +# Mac OSX SMB mount metadata files +\B\._ + +# Avoid Devel::Cover and Devel::CoverX::Covered files. +\bcover_db\b +\bcovered\b + +# Avoid MYMETA files +^MYMETA\. +#!end included /home/src/perl/repoperls/installed-perls/perl/v5.14.0-RC2/1df5/lib/5.14.0/ExtUtils/MANIFEST.SKIP + +\.tar\.gz$ +t/test-dat.*/(MANIFEST|README|SIGNATURE|42.gz)$ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-Signature-0.66/META.yml new/Module-Signature-0.68/META.yml --- old/Module-Signature-0.66/META.yml 2010-09-06 22:56:58.000000000 +0200 +++ new/Module-Signature-0.68/META.yml 2011-05-13 11:52:26.000000000 +0200 @@ -4,6 +4,7 @@ - '唐鳳 <c...@audreyt.org>' build_requires: ExtUtils::MakeMaker: 6.42 + IPC::Run: 0 Test::More: 0 configure_requires: ExtUtils::MakeMaker: 6.42 @@ -23,4 +24,4 @@ perl: 5.005 resources: repository: http://github.com/audreyt/module-signature -version: 0.66 +version: 0.68 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-Signature-0.66/Makefile.PL new/Module-Signature-0.68/Makefile.PL --- old/Module-Signature-0.66/Makefile.PL 2010-09-03 21:35:03.000000000 +0200 +++ new/Module-Signature-0.68/Makefile.PL 2011-05-13 11:46:24.000000000 +0200 @@ -8,7 +8,7 @@ readme_from 'lib/Module/Signature.pm'; repository 'http://github.com/audreyt/module-signature'; install_script 'script/cpansign'; -build_requires 'Test::More'; +build_requires 'Test::More', 0, 'IPC::Run', 0; # On Win32 (excluding cygwin) we know that IO::Socket::INET, # which is needed for keyserver stuff, doesn't work. In fact @@ -175,6 +175,6 @@ } else { # Forget about it... print "Module::Signature is not wanted on this host.\n"; - exit(255); + exit(0); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-Signature-0.66/SIGNATURE new/Module-Signature-0.68/SIGNATURE --- old/Module-Signature-0.66/SIGNATURE 2010-09-06 22:57:27.000000000 +0200 +++ new/Module-Signature-0.68/SIGNATURE 2011-05-13 11:53:28.000000000 +0200 @@ -1,5 +1,5 @@ This file contains message digests of all files listed in MANIFEST, -signed via the Module::Signature module, version 0.65. +signed via the Module::Signature module, version 0.68. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: @@ -16,10 +16,11 @@ SHA1 0b722678d07c66ef6992f2cc2c9e9acf3bef0ecb AUDREY2006.pub SHA1 1e2b550757ebdf3ef2c0e8d1d06bcbb9c6b62a6f AUTHORS -SHA1 5c58d739b5f59bdb261ce0d30ec68549ebf2e45e Changes -SHA1 7341f3cbf8e4e34aba8066763eb638a6e1421d42 MANIFEST -SHA1 ce553cc4b962f4fc47f1dae64c311501db3f96e4 META.yml -SHA1 d9dfdaad0b2205fc074a218c52319259e5438b4c Makefile.PL +SHA1 9dcc6558459cdbe474dcf325eb9e8eeb68815897 Changes +SHA1 366ad23151d9113e37f4a9edd4d3304ecc30b9d6 MANIFEST +SHA1 af1667da11736451592aeba46d34e38c47a7201c MANIFEST.SKIP +SHA1 f38db924b0216aaff4ccf18247a62997acb447ce META.yml +SHA1 0024aa3f23ac84a928c4063e9435ca1607984e7e Makefile.PL SHA1 37e858c51409a297ef5d3fb35dc57cd3b57f9a4d PAUSE2003.pub SHA1 955ba924e9cd1bafccb4d6d7bd3be25c3ce8bf75 README SHA1 7305dbe2904416e28decb05396988a5d51d578be inc/Module/Install.pm @@ -29,19 +30,22 @@ SHA1 bf0a3e1977effc2832d7a813a76dce3f31b437b6 inc/Module/Install/Fetch.pm SHA1 b721c93ca5bc9a6aa863b49af15f1b1de6125935 inc/Module/Install/Makefile.pm SHA1 026cc0551a0ad399d195e395b46bdf842e115192 inc/Module/Install/Metadata.pm -SHA1 4a3a72dc019bf2c82013c47fcaf0f20581d011ce inc/Module/Install/ReadmeFromPod.pm +SHA1 d3a33569b41077d6a836f95bb63484c51e9d0a52 inc/Module/Install/ReadmeFromPod.pm SHA1 d3a4c720c6ec7f8fce7df37002fbc9177fb77050 inc/Module/Install/Scripts.pm SHA1 5457015ea5a50e93465bf2dafa29feebd547f85b inc/Module/Install/Win32.pm SHA1 051e7fa8063908befa3440508d0584a2497b97db inc/Module/Install/WriteAll.pm -SHA1 27008cd26948a367ca947c48154cc94ca8aba6ce lib/Module/Signature.pm +SHA1 e37281f2715f3a73c830d0408461fc0e3e43d419 lib/Module/Signature.pm SHA1 0882c50213a28b7a30fc91fd58c19015f33348d0 script/cpansign SHA1 3ec6171779122b0bdc69937c283be11b2a15dd89 t/0-signature.t SHA1 307a744384e704d94031df73233f24174b843bc8 t/1-basic.t SHA1 0177dcafa00571440541d6495fce6d3b61f81039 t/2-cygwin.t +SHA1 a3bea1f17370e89ccb1c3becf5c1d072d6857fd4 t/3-verify.t +SHA1 69614dfba33a1ef498a2161f9e4718092652857c t/wrap.pl +SHA1 61377898e9d7cb06d370f45167a925e16736de70 t/wrapped-tests.bin -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.10 (GNU/Linux) +Version: GnuPG v1.4.11 (GNU/Linux) -iEYEARECAAYFAkyFVbUACgkQdC8qQo5jWl6F3QCeJFh5Vbwr1mr1UNbnVA85Zqfg -b4wAn1Reop5VT3cEVVM2zW4ubezik+vo -=XjLa +iEYEARECAAYFAk3M/5gACgkQdC8qQo5jWl6ejwCfYy2EE94jsoe1oY2w7Na3jSnX +1fwAnRgS45SDoKjbLSH1+6z37NL/MpGI +=NYb6 -----END PGP SIGNATURE----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-Signature-0.66/inc/Module/Install/ReadmeFromPod.pm new/Module-Signature-0.68/inc/Module/Install/ReadmeFromPod.pm --- old/Module-Signature-0.66/inc/Module/Install/ReadmeFromPod.pm 2010-09-06 22:56:55.000000000 +0200 +++ new/Module-Signature-0.68/inc/Module/Install/ReadmeFromPod.pm 2011-05-13 11:52:24.000000000 +0200 @@ -1,36 +1,48 @@ #line 1 package Module::Install::ReadmeFromPod; +use 5.006; use strict; use warnings; use base qw(Module::Install::Base); use vars qw($VERSION); -$VERSION = '0.10'; +$VERSION = '0.12'; sub readme_from { my $self = shift; - return unless $Module::Install::AUTHOR; - my $file = shift || return; + return unless $self->is_admin; + + my $file = shift || $self->_all_from + or die "Can't determine file to make readme_from"; my $clean = shift; + + print "Writing README from $file\n"; + require Pod::Text; my $parser = Pod::Text->new(); open README, '> README' or die "$!\n"; $parser->output_fh( *README ); $parser->parse_file( $file ); - return 1 unless $clean; - $self->postamble(<<"END"); -distclean :: license_clean - -license_clean: -\t\$(RM_F) README -END + if ($clean) { + $self->clean_files('README'); + } return 1; } +sub _all_from { + my $self = shift; + return unless $self->admin->{extensions}; + my ($metadata) = grep { + ref($_) eq 'Module::Install::Metadata'; + } @{$self->admin->{extensions}}; + return unless $metadata; + return $metadata->{values}{all_from} || ''; +} + 'Readme!'; __END__ -#line 94 +#line 112 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-Signature-0.66/lib/Module/Signature.pm new/Module-Signature-0.68/lib/Module/Signature.pm --- old/Module-Signature-0.66/lib/Module/Signature.pm 2010-09-06 22:55:45.000000000 +0200 +++ new/Module-Signature-0.68/lib/Module/Signature.pm 2011-05-13 11:47:41.000000000 +0200 @@ -1,5 +1,5 @@ package Module::Signature; -$Module::Signature::VERSION = '0.66'; +$Module::Signature::VERSION = '0.68'; use 5.005; use strict; @@ -51,6 +51,18 @@ $AutoKeyRetrieve = 1; $CanKeyRetrieve = undef; +sub _cipher_map { + my($sigtext) = @_; + my @lines = split /\015?\012/, $sigtext; + my %map; + for my $line (@lines) { + my($cipher,$digest,$file) = split " ", $line, 3; + return unless defined $file; + $map{$file} = [$cipher, $digest]; + } + return \%map; +} + sub verify { my %args = ( skip => 1, @_ ); my $rv; @@ -65,12 +77,12 @@ return SIGNATURE_MALFORMED; }; - (my ($cipher) = ($sigtext =~ /^(\w+) /)) or do { + (my ($cipher_map) = _cipher_map($sigtext)) or do { warn "==> MALFORMED Signature file! <==\n"; return SIGNATURE_MALFORMED; }; - (defined(my $plaintext = _mkdigest($cipher))) or do { + (defined(my $plaintext = _mkdigest($cipher_map))) or do { warn "==> UNKNOWN Cipher format! <==\n"; return CIPHER_UNKNOWN; }; @@ -489,7 +501,7 @@ } sub _mkdigest { - my $digest = _mkdigest_files(undef, @_) or return; + my $digest = _mkdigest_files(@_) or return; my $plaintext = ''; foreach my $file (sort keys %$digest) { @@ -500,13 +512,8 @@ return $plaintext; } -sub _mkdigest_files { - my $p = shift; - my $algorithm = shift || $Cipher; - my $dosnames = (defined(&Dos::UseLFN) && Dos::UseLFN()==0); - my $read = ExtUtils::Manifest::maniread() || {}; - my $found = ExtUtils::Manifest::manifind($p); - my(%digest) = (); +sub _digest_object { + my($algorithm) = @_; my $obj = eval { Digest->new($algorithm) } || eval { my ($base, $variant) = ($algorithm =~ /^(\w+?)(\d+)$/g) or die; require "Digest/$base.pm"; "Digest::$base"->new($variant) @@ -523,8 +530,35 @@ } and return } or do { warn "Unknown cipher: $algorithm, please install Digest::$algorithm\n"; return; }; + $obj; +} - foreach my $file (sort keys %$read){ +sub _mkdigest_files { + my $verify_map = shift; + my $dosnames = (defined(&Dos::UseLFN) && Dos::UseLFN()==0); + my $read = ExtUtils::Manifest::maniread() || {}; + my $found = ExtUtils::Manifest::manifind(); + my(%digest) = (); + my($default_obj) = _digest_object($Cipher); + FILE: foreach my $file (sort keys %$read){ + next FILE if $file eq $SIGNATURE; + my($obj,$this_cipher,$this_hexdigest,$verify_digest); + if ($verify_map) { + if (my $vmf = $verify_map->{$file}) { + ($this_cipher,$verify_digest) = @$vmf; + if ($this_cipher eq $Cipher) { + $obj = $default_obj; + } else { + $obj = _digest_object($this_cipher); + } + } else { + $this_cipher = $Cipher; + $obj = $default_obj; + } + } else { + $this_cipher = $Cipher; + $obj = $default_obj; + } warn "Debug: collecting digest from $file\n" if $Debug; if ($dosnames){ $file = lc $file; @@ -540,23 +574,43 @@ if (-B $file) { binmode(F); $obj->addfile(*F); - } - elsif ($] >= 5.006) { - binmode(F, ':crlf'); - $obj->addfile(*F); + $this_hexdigest = $obj->hexdigest; } elsif ($^O eq 'MSWin32') { $obj->addfile(*F); + $this_hexdigest = $obj->hexdigest; } else { # Normalize by hand... local $/; binmode(F); my $input = <F>; - $input =~ s/\015?\012/\n/g; - $obj->add($input); + VERIFYLOOP: for my $eol ("","\015\012","\012") { + my $lax_input = $input; + if (! length $eol) { + # first try is binary + } else { + my @lines = split /$eol/, $input, -1; + if (grep /[\015\012]/, @lines) { + # oops, apparently not a text file, treat as binary, forget @lines + } else { + my $other_eol = $eol eq "\012" ? "\015\012" : "\012"; + $lax_input = join $other_eol, @lines; + } + } + $obj->add($lax_input); + $this_hexdigest = $obj->hexdigest; + if ($verify_digest) { + if ($this_hexdigest eq $verify_digest) { + last VERIFYLOOP; + } + $obj->reset; + } else { + last VERIFYLOOP; + } + } } - $digest{$file} = [$algorithm, $obj->hexdigest]; + $digest{$file} = [$this_cipher, $this_hexdigest]; $obj->reset; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-Signature-0.66/t/3-verify.t new/Module-Signature-0.68/t/3-verify.t --- old/Module-Signature-0.66/t/3-verify.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Module-Signature-0.68/t/3-verify.t 2011-05-13 11:46:24.000000000 +0200 @@ -0,0 +1,22 @@ +#!perl + +use strict; +use File::Spec; +use Test::More; +use IPC::Run qw(run); +plan tests => 4; + +$|=1; +sub _f ($) {File::Spec->catfile(split /\//, shift);} +0 == system $^X, _f"t/wrap.pl", "-x" or die; +for my $tdir (glob("t/test-dat*")) { + chdir $tdir or die; + my @system = ($^X, "-I../../lib/", "../../script/cpansign", "-v"); + my($in,$out,$err); + run \@system, \$in, \$out, \$err; + my $ret = $?; + close $out; + my $diff = join "\n", grep /^.SHA1/, split /\n/, $out; + ok(0==$ret, "dir[$tdir]system[@system]ret[$ret]out[$out]err[$err]diff[$diff]"); + chdir "../../" or die; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-Signature-0.66/t/wrap.pl new/Module-Signature-0.68/t/wrap.pl --- old/Module-Signature-0.66/t/wrap.pl 1970-01-01 01:00:00.000000000 +0100 +++ new/Module-Signature-0.68/t/wrap.pl 2011-05-13 11:46:24.000000000 +0200 @@ -0,0 +1,154 @@ +#!/usr/bin/perl + +# use 5.010; +use strict; +use warnings; + +=head1 NAME + + + +=head1 SYNOPSIS + + t/wrap.pl -c # for create + + t/wrap.pl -x # for extract + +=head1 OPTIONS + +=over 8 + +=cut + +my @opt = <<'=back' =~ /B<-(\S+)>/g; + +=item B<-c> + +Wrap the test files into wrapper file + +=item B<-f> + +Path to the wrapper file. Defaults to t/wrapped-tests.bin. + +=item B<-help|h!> + +This help + +=item B<-x> + +Unwrap the test files from the wrapper file + +=back + +=head1 DESCRIPTION + +The t/ directory contains tests for different line endings. To +distribute these tests we wrap them into a Data::Dumper file to avoid +problems on distribution verification. + +Called with -c we create the wrapping file. Called with -x we unwrap +the files and install them into place. + +The test t/3-verify.t calls us with -x. + +When anything changes that breaks 3-verify.t, then the procedure to +create new test files is something like the following: + +(1) call wrap.pl -x + +(2) edit files in t/test*; take care that the files in test-datlf* + have Unix line endings and the files in test-datcrlf* have DOS + line endings. Apart from that keep the files identical + +(3) sign in t/test-datlf-sigold/ with an old version of Module::Signature + +(4) copy the signature over to t/test-datcrlf-sigold/ + +(5) sign in t/test-datlf-signew/ with the upcoming version of + Module::Signature + +(6) copy the signature over to t/test-datcrlf-signew/ + +(7) call wrap.pl -c + +=cut + + +use FindBin; +use lib "$FindBin::Bin/../lib"; +BEGIN { + push @INC, qw( ); +} + +use Data::Dumper; +use File::Basename qw(dirname); +use File::Path qw(mkpath); +use File::Spec; +use Getopt::Long; +use Pod::Usage; + +our %Opt; +GetOptions(\%Opt, + @opt, + ) or pod2usage(1); + +$Opt{f} ||= "t/wrapped-tests.bin"; + +sub _f ($) {File::Spec->catfile(split /\//, shift);} + +my @files = qw(t/test-datcrlf-signew/MANIFEST +t/test-datcrlf-signew/README +t/test-datcrlf-signew/42.gz +t/test-datcrlf-signew/SIGNATURE +t/test-datcrlf-sigold/MANIFEST +t/test-datcrlf-sigold/README +t/test-datcrlf-sigold/42.gz +t/test-datcrlf-sigold/SIGNATURE +t/test-datlf-signew/MANIFEST +t/test-datlf-signew/README +t/test-datlf-signew/42.gz +t/test-datlf-signew/SIGNATURE +t/test-datlf-sigold/MANIFEST +t/test-datlf-sigold/README +t/test-datlf-sigold/42.gz +t/test-datlf-sigold/SIGNATURE +); +my @paths = map { _f($_) } @files; + +if ($Opt{c}) { + my $VAR; + for my $i (0..$#files) { + open my $fh, "<", $paths[$i] or die "Could not open '$paths[$i]': $!"; + binmode $fh; + local $/; + $VAR->{$files[$i]} = <$fh>; + } + my $d = Data::Dumper->new([$VAR]); + $d->Useqq(1)->Sortkeys(1); + open my $fh, ">", _f($Opt{f}) or die "Could not open $Opt{f}: $!"; + binmode $fh; + print $fh $d->Dump; +} elsif ($Opt{x}) { + open my $fh, "<", _f($Opt{f}) or die "Could not open $Opt{f}: $!"; + binmode $fh; + local $/; + my $VAR1; + eval <$fh>; + close $fh; + for my $i (0..$#files) { + mkpath dirname $paths[$i]; + open my $fh, ">", $paths[$i] or die "Could not open '$paths[$i]': $!"; + binmode $fh; + local $\; + print $fh $VAR1->{$files[$i]}; + close $fh or die "Could not write $paths[$i]: $!"; + } +} else { + warn "Either of the options -x or -c must be specified"; + pod2usage(1); +} + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Module-Signature-0.66/t/wrapped-tests.bin new/Module-Signature-0.68/t/wrapped-tests.bin --- old/Module-Signature-0.66/t/wrapped-tests.bin 1970-01-01 01:00:00.000000000 +0100 +++ new/Module-Signature-0.68/t/wrapped-tests.bin 2011-05-13 11:46:24.000000000 +0200 @@ -0,0 +1,18 @@ +$VAR1 = { + "t/test-datcrlf-signew/42.gz" => "\37\213\b\b\336\0343:\2\00342\00031\342\2\0001)\206\321\3\0\0\0", + "t/test-datcrlf-signew/MANIFEST" => "MANIFEST\r\nREADME\r\nSIGNATURE\r\n42.gz\r\n", + "t/test-datcrlf-signew/README" => "If this file in in a *datlf*/ directory it should be in Unix format.\r\nIn a *datcrlf*/ directory it should be in DOS format.\r\n", + "t/test-datcrlf-signew/SIGNATURE" => "This file contains message digests of all files listed in MANIFEST,\nsigned via the Module::Signature module, version 0.67.\n\nTo verify the content in this distribution, first make sure you have\nModule::Signature installed, then type:\n\n % cpansign -v\n\nIt will check each file's integrity, as well as the signature's\nvalidity. If \"==> Signature verified OK! <==\" is not displayed,\nthe distribution may already have been compromised, and you should\nnot run its Makefile.PL or Build.PL.\n\n-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nSHA1 51e1c061bc02e9a38948a5d8e3ca7352830f0fac 42.gz\nSHA1 794d166f65491a45e3a2302d9f7afc2c2220517f MANIFEST\nSHA1 e6687057436325f3cf38d3f5c9adb8f45f79b9b4 README\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.10 (GNU/Linux)\n\niEYEARECAAYFAk3HrSEACgkQ7IA58KMXwV07YACgkZc8HxRHWMhsbMnrxn/gCV7I\nFsoAoIG0JZLzpno/V4PpQBNaw0wqEvsB\n=io4w\n-----END PGP SIGNATURE-----\n", + "t/test-datcrlf-sigold/42.gz" => "\37\213\b\b\336\0343:\2\00342\00031\342\2\0001)\206\321\3\0\0\0", + "t/test-datcrlf-sigold/MANIFEST" => "MANIFEST\r\nREADME\r\nSIGNATURE\r\n42.gz\r\n", + "t/test-datcrlf-sigold/README" => "If this file in in a *datlf*/ directory it should be in Unix format.\r\nIn a *datcrlf*/ directory it should be in DOS format.\r\n", + "t/test-datcrlf-sigold/SIGNATURE" => "This file contains message digests of all files listed in MANIFEST,\nsigned via the Module::Signature module, version 0.63.\n\nTo verify the content in this distribution, first make sure you have\nModule::Signature installed, then type:\n\n % cpansign -v\n\nIt will check each file's integrity, as well as the signature's\nvalidity. If \"==> Signature verified OK! <==\" is not displayed,\nthe distribution may already have been compromised, and you should\nnot run its Makefile.PL or Build.PL.\n\n-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nSHA1 51e1c061bc02e9a38948a5d8e3ca7352830f0fac 42.gz\nSHA1 794d166f65491a45e3a2302d9f7afc2c2220517f MANIFEST\nSHA1 e6687057436325f3cf38d3f5c9adb8f45f79b9b4 README\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.10 (GNU/Linux)\n\niEYEARECAAYFAk3HrD8ACgkQ7IA58KMXwV3vsACfXu9Z1yCErjXA4wdAaN4B/Dc9\nG8AAoJini6NfED9pJmWGcX6efvqHl1qB\n=XXLY\n-----END PGP SIGNATURE-----\n", + "t/test-datlf-signew/42.gz" => "\37\213\b\b\336\0343:\2\00342\00031\342\2\0001)\206\321\3\0\0\0", + "t/test-datlf-signew/MANIFEST" => "MANIFEST\nREADME\nSIGNATURE\n42.gz\n", + "t/test-datlf-signew/README" => "If this file in in a *datlf*/ directory it should be in Unix format.\nIn a *datcrlf*/ directory it should be in DOS format.\n", + "t/test-datlf-signew/SIGNATURE" => "This file contains message digests of all files listed in MANIFEST,\nsigned via the Module::Signature module, version 0.67.\n\nTo verify the content in this distribution, first make sure you have\nModule::Signature installed, then type:\n\n % cpansign -v\n\nIt will check each file's integrity, as well as the signature's\nvalidity. If \"==> Signature verified OK! <==\" is not displayed,\nthe distribution may already have been compromised, and you should\nnot run its Makefile.PL or Build.PL.\n\n-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nSHA1 51e1c061bc02e9a38948a5d8e3ca7352830f0fac 42.gz\nSHA1 794d166f65491a45e3a2302d9f7afc2c2220517f MANIFEST\nSHA1 e6687057436325f3cf38d3f5c9adb8f45f79b9b4 README\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.10 (GNU/Linux)\n\niEYEARECAAYFAk3HrSEACgkQ7IA58KMXwV07YACgkZc8HxRHWMhsbMnrxn/gCV7I\nFsoAoIG0JZLzpno/V4PpQBNaw0wqEvsB\n=io4w\n-----END PGP SIGNATURE-----\n", + "t/test-datlf-sigold/42.gz" => "\37\213\b\b\336\0343:\2\00342\00031\342\2\0001)\206\321\3\0\0\0", + "t/test-datlf-sigold/MANIFEST" => "MANIFEST\nREADME\nSIGNATURE\n42.gz\n", + "t/test-datlf-sigold/README" => "If this file in in a *datlf*/ directory it should be in Unix format.\nIn a *datcrlf*/ directory it should be in DOS format.\n", + "t/test-datlf-sigold/SIGNATURE" => "This file contains message digests of all files listed in MANIFEST,\nsigned via the Module::Signature module, version 0.63.\n\nTo verify the content in this distribution, first make sure you have\nModule::Signature installed, then type:\n\n % cpansign -v\n\nIt will check each file's integrity, as well as the signature's\nvalidity. If \"==> Signature verified OK! <==\" is not displayed,\nthe distribution may already have been compromised, and you should\nnot run its Makefile.PL or Build.PL.\n\n-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nSHA1 51e1c061bc02e9a38948a5d8e3ca7352830f0fac 42.gz\nSHA1 794d166f65491a45e3a2302d9f7afc2c2220517f MANIFEST\nSHA1 e6687057436325f3cf38d3f5c9adb8f45f79b9b4 README\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.10 (GNU/Linux)\n\niEYEARECAAYFAk3HrD8ACgkQ7IA58KMXwV3vsACfXu9Z1yCErjXA4wdAaN4B/Dc9\nG8AAoJini6NfED9pJmWGcX6efvqHl1qB\n=XXLY\n-----END PGP SIGNATURE-----\n" + }; -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org