This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libdebian-copyright-perl.

commit 9cd373ca7c3c3d9e9bf59bc68a232fa20251a921
Author: gregor herrmann <gre...@debian.org>
Date:   Thu Oct 29 21:41:47 2015 +0100

    Add patch to produce reproducible copyright files.
    
    Thanks: Reiner Herrmann for the bug report and patch.
    Closes: #803340
---
 debian/patches/reproducible-copyright.patch | 52 +++++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 2 files changed, 53 insertions(+)

diff --git a/debian/patches/reproducible-copyright.patch 
b/debian/patches/reproducible-copyright.patch
new file mode 100644
index 0000000..b547cae
--- /dev/null
+++ b/debian/patches/reproducible-copyright.patch
@@ -0,0 +1,52 @@
+Description: produce reproducible copyright files
+ This patches fixes the reproducibility issues this by sorting Files
+ sections by path, License sections by name, and "x or y" listings.
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/803340
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Reviewed-by: gregor herrmann <gre...@debian.org>
+Last-Update: 2015-10-29
+Forwarded: https://rt.cpan.org/Ticket/Display.html?id=108121
+Bug: https://rt.cpan.org/Ticket/Display.html?id=108121
+
+--- a/lib/Debian/Copyright.pm
++++ b/lib/Debian/Copyright.pm
+@@ -161,6 +161,9 @@
+ sub write {
+     my ( $self, $file ) = @_;
+ 
++    $self->files->SortByKey;
++    $self->licenses->SortByKey;
++
+     my @stanzas = (
+         $self->header,
+         $self->files->Values,
+--- a/lib/Debian/Copyright/Stanza/OrSeparated.pm
++++ b/lib/Debian/Copyright/Stanza/OrSeparated.pm
+@@ -82,7 +82,7 @@
+ {
+     my $self = shift;
+     my $body = exists $self->{body} ? "\n$self->{body}" : "";
+-    return join( ' or ', @{ $self->{list} } ).$body;
++    return join( ' or ', sort @{ $self->{list} } ).$body;
+ }
+ 
+ =head2 equals
+--- a/t/01.basic.t
++++ b/t/01.basic.t
+@@ -1,4 +1,4 @@
+-use Test::More tests => 36;
++use Test::More tests => 37;
+ 
+ use Debian::Copyright;
+ 
+@@ -61,7 +61,8 @@
+ like($copyright->licenses->Values(0)->License, 
qr/\AArtistic\s+This\sprogram/xms, 'licenses(0)->Files');
+ is($copyright->files->Keys(2), 'test/*', 'key files(2)');
+ is($copyright->files->Values(2)->Files, 'test/*', 'files(2)->Files');
+-is($copyright->licenses->Keys(2), 'BSD', 'key licenses(2)');
++is($copyright->licenses->Keys(1), 'BSD', 'key licenses(1)');
++is($copyright->licenses->Keys(2), 'GPL-2+', 'key licenses(2)');
+ 
+ my $copyright3 = Debian::Copyright->new;
+ isa_ok($copyright3, 'Debian::Copyright');
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d855597
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+reproducible-copyright.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libdebian-copyright-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to