Source: littlewizard
Version: 1.2.2-3
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 littlewizard could not be built reproducibly.
During build a script is generating a C file with a symbol list.
This script sorts the list differently depending on the configured
locale, which results in a differing binary.

The attached patch fixes this by using the C locale in the script
for iterating over the files.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/reproducible_build.patch b/debian/patches/reproducible_build.patch
new file mode 100644
index 0000000..a2b97d1
--- /dev/null
+++ b/debian/patches/reproducible_build.patch
@@ -0,0 +1,15 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: sort symbol files locale-independently
+
+--- a/liblanguage/symbols.cc.sh
++++ b/liblanguage/symbols.cc.sh
+@@ -1,6 +1,9 @@
+ #!/bin/sh
+ AWK=$1
+ 
++# locale-independent sorting
++LC_ALL=C
++
+ cat > symbols.cc <<EOT
+ #include <glib.h>
+ #include "symbols.h"
diff --git a/debian/patches/series b/debian/patches/series
index 7a65a7f..f18b59d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 littlewizard.desktop
+reproducible_build.patch
_______________________________________________
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