Source: yacas
Version: 1.3.3-2
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 yacas could not be built reproducibly.
The hints file is sorted differently depending on the configured locale.

The attached patch fixes this by setting LC_ALL to C before sorting.

Regards,
 Reiner

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

diff --git a/debian/patches/02_reproducible-build.patch b/debian/patches/02_reproducible-build.patch
new file mode 100644
index 0000000..da6b98c
--- /dev/null
+++ b/debian/patches/02_reproducible-build.patch
@@ -0,0 +1,16 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: normalize locale to get reproducible order
+
+Index: yacas-1.3.3/manmake/Makefile.am
+===================================================================
+--- yacas-1.3.3.orig/manmake/Makefile.am
++++ yacas-1.3.3/manmake/Makefile.am
+@@ -22,7 +22,7 @@ hints: manripper removeduplicates $(REFS
+ 	rm -f hints.unsorted
+ 	for file in ref.book.txt $(REFSOURCES) refprog.book.txt $(REFPROGSOURCES); do \
+ 	./manripper $(srcdir)/"$$file" >> hints.unsorted ; done
+-	sort -t ":" hints.unsorted > hints.sorted
++	LC_ALL=C sort -t ":" hints.unsorted > hints.sorted
+ 	./removeduplicates hints.sorted hints.singlesorted
+ 	echo "::::" > tail.txt
+ 	cat hints.singlesorted tail.txt > hints
diff --git a/debian/patches/series b/debian/patches/series
index f1af840..57cb584 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 01_locchanges.patch
+02_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