Source: openttd
Version: 1.6.0-1
Severity: wishlist
Tags: patch upstream
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 openttd could not be built reproducibly.
A list of source files is sorted without considering locales, so it
will be different under differing locales.

The attached patch fixes this.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/deterministic-sort2.patch b/debian/patches/deterministic-sort2.patch
new file mode 100644
index 0000000..e82876d
--- /dev/null
+++ b/debian/patches/deterministic-sort2.patch
@@ -0,0 +1,11 @@
+--- a/configure
++++ b/configure
+@@ -149,7 +149,7 @@
+ 
+ # Read the source.list and process it
+ # Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations
+-SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | $PIPE_SORT`"
++SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | LC_ALL=C $PIPE_SORT`"
+ 
+ OBJS_C="`  echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.c$/   { gsub(\".c$\",   \".o\", $0); print $0; }'`"
+ OBJS_CPP="`echo \"$SRCS\" | $awk ' { ORS = \" \" } /\.cpp$/ { gsub(\".cpp$\", \".o\", $0); print $0; }'`"
diff --git a/debian/patches/series b/debian/patches/series
index c516a40..e526db4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 deterministic-sort.patch
 correct-buildflags-with-dash.patch
+deterministic-sort2.patch

Attachment: signature.asc
Description: 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