[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#829000: fracplanet: please make the build reproducible



Source: fracplanet
Version: 0.4.0-3
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 fracplanet could not be built reproducibly.
It lists source and header files without considering the locale, which
causes e.g. a non-deterministic linking order.

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..8e33fdb
--- /dev/null
+++ b/debian/patches/reproducible-build.patch
@@ -0,0 +1,18 @@
+Author: Reiner Herrmann <reiner@reiner-h.de>
+Description: Use C locale for sorting source and header files
+ Under different locales the order is different, which causes different
+ linking orders.
+
+--- a/fracplanet.pro
++++ b/fracplanet.pro
+@@ -6,8 +6,8 @@
+ 
+ PRECOMPILED_HEADER = precompiled.h
+ 
+-HEADERS += $$system(ls *.h)
+-SOURCES += $$system(ls *.cpp)
++HEADERS += $$system(LC_ALL=C ls *.h)
++SOURCES += $$system(LC_ALL=C ls *.cpp)
+ LIBS += -lboost_program_options -lGLU
+ 
+ DEFINES += QT_DLL
diff --git a/debian/patches/series b/debian/patches/series
index 21e94e7..a9045c0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 qt4.8_headers.patch
+reproducible-build.patch

Attachment: signature.asc
Description: Digital signature


Reply to: