Source: glib2.0
Version: 2.46.2-3
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: locale

Hi!

While working on the “reproducible builds” effort [1], we have noticed
that glib2.0 could not be built reproducibly.

The attached patch ensure that functions are sorted using the C locale
when giotypefuncs.c is generated.

Once applied, glib2.0 can be built reproducibly in our current
experimental framework.

-- 
Lunar                                .''`. 
lu...@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
diff -Nru glib2.0-2.46.2/debian/patches/locale-independent-sort-for-giotypefuncs.patch glib2.0-2.46.2/debian/patches/locale-independent-sort-for-giotypefuncs.patch
--- glib2.0-2.46.2/debian/patches/locale-independent-sort-for-giotypefuncs.patch	1970-01-01 01:00:00.000000000 +0100
+++ glib2.0-2.46.2/debian/patches/locale-independent-sort-for-giotypefuncs.patch	2016-01-27 14:33:11.000000000 +0100
@@ -0,0 +1,13 @@
+Index: glib2.0-2.46.2/gio/tests/Makefile.am
+===================================================================
+--- glib2.0-2.46.2.orig/gio/tests/Makefile.am
++++ glib2.0-2.46.2/gio/tests/Makefile.am
+@@ -558,7 +558,7 @@ giotypefuncs.c: Makefile
+ 	  ${CPP} $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) xgen-giosrc.c | \
+ 	  $(GREP) -o '\bg_[A-Za-z0-9_]*_get_type\b' | \
+ 	  $(GREP) -v 'g_io_extension_get_type\|g_variant_get_type' | \
+-	  sort | uniq | \
++	  LC_ALL=C sort | uniq | \
+ 	  $(SED) -e 's/^/*tp++ = /' -e 's/$$/ ();/' >> xgen-gio && \
+ 	  cp xgen-gio $@ # && rm -f xgen-gio xgen-giosrc.c
+ 
diff -Nru glib2.0-2.46.2/debian/patches/series glib2.0-2.46.2/debian/patches/series
--- glib2.0-2.46.2/debian/patches/series	2015-12-23 17:08:41.000000000 +0100
+++ glib2.0-2.46.2/debian/patches/series	2016-01-27 14:31:36.000000000 +0100
@@ -14,3 +14,4 @@
 0001-Fix-trashing-on-overlayfs.patch
 bug712848-volume-monitor-deadlock-kfreebsd.patch
 disable-failing-test-for-pcre838.patch
+locale-independent-sort-for-giotypefuncs.patch

Attachment: signature.asc
Description: Digital signature

Reply via email to