Source: gerris
Version: 20131206+dfsg-5
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: locale
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that gerris could not be built reproducibly.
A list is sorted with "sort", which behaves differently depending on the locale.

The attached patch fixes this by sorting with LC_ALL set to C.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds

diff --git a/debian/patches/05_reproducible_build.patch b/debian/patches/05_reproducible_build.patch
new file mode 100644
index 0000000..a7ab224
--- /dev/null
+++ b/debian/patches/05_reproducible_build.patch
@@ -0,0 +1,25 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Sort with C locale to get reproducible results.
+
+Index: gerris-20131206+dfsg/doc/examples/Makefile.am
+===================================================================
+--- gerris-20131206+dfsg.orig/doc/examples/Makefile.am
++++ gerris-20131206+dfsg/doc/examples/Makefile.am
+@@ -27,7 +27,7 @@ CLEANFILES = $(BUILT_SOURCES) Makefile.d
+ pkgdata_DATA = gfs2tex.py gfs.lang gerris.dic gfs-keywords.el gfs-mode.el gfs.sty gfs.hva kaltura.sh gfs.php
+ 
+ gerris.dic: classes modulesyms.sh $(top_srcdir)/modules/Makefile.am modules.list
+-	($(builddir)/classes && sh $(srcdir)/modulesyms.sh $(top_srcdir)/modules $(pkglibdir)) | sort > gerris.dic
++	($(builddir)/classes && sh $(srcdir)/modulesyms.sh $(top_srcdir)/modules $(pkglibdir)) | LC_ALL=C sort > gerris.dic
+ 
+ gfs.lang: gerris.dic
+ 	echo "# Language file for source-highlight" > gfs.lang
+@@ -38,7 +38,7 @@ gfs.lang: gerris.dic
+ 	echo "redef preproc = \"C preprocessor command is not compatible with the use of # as comment character in GTS\"" >> gfs.lang
+ 
+ modules.list: modules $(top_srcdir)/modules/Makefile.am
+-	$(builddir)/modules $(top_srcdir)/modules/*.la $(pkglibdir)/*.so | sort | uniq > modules.list
++	$(builddir)/modules $(top_srcdir)/modules/*.la $(pkglibdir)/*.so | LC_ALL=C sort | uniq > modules.list
+ 
+ gfs-keywords.el: gerris.dic modules.list
+ 	echo "(defvar gfs-abbrevs '(" > gfs-keywords.el
diff --git a/debian/patches/series b/debian/patches/series
index 33d52a5..c27a77f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 02_fix_makefiles.patch
 03_build_funct.patch
 04_replace_ffmpeg_by_avconv.patch
+05_reproducible_build.patch

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
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