Package: libglib-perl
Version: 3:1.305-2
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: toolchain randomness

Hi!

While working on the “reproducible builds” effort [1], we have noticed that
libgtk2-perl, libgoo-canvas-perl, and libgnome2-perl could not be built
reproducibly because the pod files generated by libglib-perl contain signal
lists in random order.

The attached patch sorts the result of Glib::Type->list_signals by signal name
before generating the pod.  

Cheers, akira

 [1]: https://wiki.debian.org/ReproducibleBuilds
diff -Nru libglib-perl-1.305/debian/changelog libglib-perl-1.305/debian/changelog
--- libglib-perl-1.305/debian/changelog	2014-08-29 23:59:39.000000000 +0200
+++ libglib-perl-1.305/debian/changelog	2015-02-07 11:17:21.000000000 +0100
@@ -1,3 +1,11 @@
+libglib-perl (3:1.305-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Added patch sort_podify_signals to make the generated pod signal 
+    documentation not random.
+
+ -- akira <marival...@gmail.com>  Sat, 07 Feb 2015 11:15:46 +0100
+
 libglib-perl (3:1.305-2) unstable; urgency=medium
 
   [ Salvatore Bonaccorso ]
diff -Nru libglib-perl-1.305/debian/patches/series libglib-perl-1.305/debian/patches/series
--- libglib-perl-1.305/debian/patches/series	2014-08-29 23:59:39.000000000 +0200
+++ libglib-perl-1.305/debian/patches/series	2015-02-07 10:28:27.000000000 +0100
@@ -1,3 +1,4 @@
 fix-gtks-whatis
 remove-version-checking
 fix-man-pages
+sort_podify_signals
diff -Nru libglib-perl-1.305/debian/patches/sort_podify_signals libglib-perl-1.305/debian/patches/sort_podify_signals
--- libglib-perl-1.305/debian/patches/sort_podify_signals	1970-01-01 01:00:00.000000000 +0100
+++ libglib-perl-1.305/debian/patches/sort_podify_signals	2015-02-07 10:45:11.000000000 +0100
@@ -0,0 +1,21 @@
+Description: sort the output of podify_signals
+ The output of Glib::Type->list_signals is unsorted. This results in the 
+ generated pod files to be in random order which makes packages using signals 
+ compile not reproducibly [1]. It was suggested to Glib upstream [2] to sort
+ the output of g_signal_list_ids but it got rejected. Thus the change has to 
+ be made here. 
+ [1] https://wiki.debian.org/ReproducibleBuilds/About
+ [2] https://bugzilla.gnome.org/show_bug.cgi?id=743863  
+Author: akira <marival...@gmail.com>
+
+--- libglib-perl-1.305.orig/lib/Glib/GenPod.pm
++++ libglib-perl-1.305/lib/Glib/GenPod.pm
+@@ -716,7 +716,7 @@ sub podify_signals {
+ 	my @sigs = Glib::Type->list_signals (shift);
+ 	return undef unless @sigs;
+ 	$str = "=over\n\n";
+-	foreach (@sigs) {
++	foreach (sort {$a->{signal_name} cmp $b->{signal_name} } @sigs) {
+ 		$str .= '=item ';
+ 		$str .= convert_type ($_->{return_type}).' = '
+ 			if exists $_->{return_type};
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to