Source: ayttm
Version: 0.6.3-3.1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: locale
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that ayttm could not be built reproducibly.
Some object files are sorted differently depending on locale.

The attached patch fixes this.

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..c9218e4
--- /dev/null
+++ b/debian/patches/reproducible-build.patch
@@ -0,0 +1,66 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: sort object files for deterministic linking order
+
+--- a/modules/irc/Makefile.am
++++ b/modules/irc/Makefile.am
+@@ -14,6 +14,6 @@
+ irc_la_SOURCES = irc.c
+ 
+ irc_la_LDFLAGS = -module -avoid-version $(WIN32_LDFLAGS)
+-irc_la_LIBADD = libirc/*.lo $(WIN32_LIBADD)
++irc_la_LIBADD = `LC_ALL=C ls libirc/*.lo` $(WIN32_LIBADD)
+ # Gets rid of the datarootdir warning
+ datarootdir=@datarootdir@
+--- a/modules/jabber/Makefile.am
++++ b/modules/jabber/Makefile.am
+@@ -13,6 +13,6 @@
+ jabber_la_SOURCES = jabber.c libEBjabber.c 
+ 
+ jabber_la_LDFLAGS = -module -avoid-version $(WIN32_LDFLAGS)
+-jabber_la_LIBADD = libjabber/*.lo libxode/*.lo $(WIN32_LIBADD)
++jabber_la_LIBADD = `LC_ALL=C ls libjabber/*.lo libxode/*.lo` $(WIN32_LIBADD)
+ # Gets rid of the datarootdir warning
+ datarootdir=@datarootdir@
+--- a/modules/msn2/Makefile.am
++++ b/modules/msn2/Makefile.am
+@@ -13,6 +13,6 @@
+ msn2_la_SOURCES = msn.c
+ 
+ msn2_la_LDFLAGS = -module -avoid-version $(WIN32_LDFLAGS)
+-msn2_la_LIBADD = libmsn2/*.lo $(WIN32_LIBADD)
++msn2_la_LIBADD = `LC_ALL=C ls libmsn2/*.lo` $(WIN32_LIBADD)
+ # Gets rid of the datarootdir warning
+ datarootdir=@datarootdir@
+--- a/modules/irc/Makefile.in
++++ b/modules/irc/Makefile.in
+@@ -327,7 +327,7 @@
+ @MINGW32_TRUE@WIN32_LIBADD = -L../../src -layttm -lintl -lglib-2.0 -lws2_32 -lgtk
+ irc_la_SOURCES = irc.c
+ irc_la_LDFLAGS = -module -avoid-version $(WIN32_LDFLAGS)
+-irc_la_LIBADD = libirc/*.lo $(WIN32_LIBADD)
++irc_la_LIBADD = `LC_ALL=C ls libirc/*.lo` $(WIN32_LIBADD)
+ all: all-recursive
+ 
+ .SUFFIXES:
+--- a/modules/jabber/Makefile.in
++++ b/modules/jabber/Makefile.in
+@@ -325,7 +325,7 @@
+ pkglib_LTLIBRARIES = jabber.la
+ jabber_la_SOURCES = jabber.c libEBjabber.c 
+ jabber_la_LDFLAGS = -module -avoid-version $(WIN32_LDFLAGS)
+-jabber_la_LIBADD = libjabber/*.lo libxode/*.lo $(WIN32_LIBADD)
++jabber_la_LIBADD = `LC_ALL=C ls libjabber/*.lo libxode/*.lo` $(WIN32_LIBADD)
+ all: all-recursive
+ 
+ .SUFFIXES:
+--- a/modules/msn2/Makefile.in
++++ b/modules/msn2/Makefile.in
+@@ -324,7 +324,7 @@
+ pkglib_LTLIBRARIES = msn2.la
+ msn2_la_SOURCES = msn.c
+ msn2_la_LDFLAGS = -module -avoid-version $(WIN32_LDFLAGS)
+-msn2_la_LIBADD = libmsn2/*.lo $(WIN32_LIBADD)
++msn2_la_LIBADD = `LC_ALL=C ls libmsn2/*.lo` $(WIN32_LIBADD)
+ all: all-recursive
+ 
+ .SUFFIXES:
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..55077d0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+reproducible-build.patch

Attachment: signature.asc
Description: Digital signature

Reply via email to