Source: crawl Version: 0.17.1-1 Severity: wishlist Tags: patch upstream User: reproducible-bui...@lists.alioth.debian.org Usertags: fileordering timestamps X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org
Dear Maintainer, While working on the “reproducible builds” effort [1], we have noticed that 'crawl' could not be built reproducibly. The attached patch fixes the order in which maps are listed, and strips build date from the version string. Once applied, crawl can be built reproducibly in our current experimental framework. Regards, Alexis Bienvenüe. [1]: https://wiki.debian.org/ReproducibleBuilds
diff -Nru crawl-0.17.1/debian/changelog crawl-0.17.1/debian/changelog --- crawl-0.17.1/debian/changelog 2015-12-21 14:06:08.000000000 +0100 +++ crawl-0.17.1/debian/changelog 2016-05-03 21:57:43.000000000 +0200 @@ -1,3 +1,10 @@ +crawl (2:0.17.1-1.0~reproducible1) UNRELEASED; urgency=medium + + * Sort maps list and strip build date from version string, to get + reproducible build. + + -- Alexis Bienvenüe <p...@passoire.fr> Tue, 03 May 2016 21:38:13 +0200 + crawl (2:0.17.1-1) unstable; urgency=medium * New upstream release. diff -Nru crawl-0.17.1/debian/patches/series crawl-0.17.1/debian/patches/series --- crawl-0.17.1/debian/patches/series 2015-09-20 14:54:52.000000000 +0200 +++ crawl-0.17.1/debian/patches/series 2016-05-03 21:56:34.000000000 +0200 @@ -0,0 +1,2 @@ +sort_list_of_maps.patch +strip_build_date diff -Nru crawl-0.17.1/debian/patches/sort_list_of_maps.patch crawl-0.17.1/debian/patches/sort_list_of_maps.patch --- crawl-0.17.1/debian/patches/sort_list_of_maps.patch 1970-01-01 01:00:00.000000000 +0100 +++ crawl-0.17.1/debian/patches/sort_list_of_maps.patch 2016-05-03 21:36:19.000000000 +0200 @@ -0,0 +1,15 @@ +Description: Sort list of maps + Sort list of maps, to get reproducible build. +Author: Alexis Bienvenüe <p...@passoire.fr> + +--- crawl-0.17.1.orig/source/Makefile ++++ crawl-0.17.1/source/Makefile +@@ -1425,7 +1425,7 @@ endif + $(COPY_R) dat/dlua/* $(datadir_fp)/dat/dlua/ + echo "-- Autogenerated list of maps to load and compile:" \ + >$(datadir_fp)/dat/dlua/loadmaps.lua +- find dat -name '*.des'|sed s:dat/::| \ ++ find dat -name '*.des'|LC_ALL=C sort|sed s:dat/::| \ + while read x; \ + do echo "dgn.load_des_file('$$x')"; \ + done >>$(datadir_fp)/dat/dlua/loadmaps.lua diff -Nru crawl-0.17.1/debian/patches/strip_build_date crawl-0.17.1/debian/patches/strip_build_date --- crawl-0.17.1/debian/patches/strip_build_date 1970-01-01 01:00:00.000000000 +0100 +++ crawl-0.17.1/debian/patches/strip_build_date 2016-05-03 21:57:19.000000000 +0200 @@ -0,0 +1,15 @@ +Description: Strip build date + Strip build date from version string, to get reproducible build. +Author: Alexis Bienvenüe <p...@passoire.fr> + +--- crawl-0.17.1.orig/source/version.cc ++++ crawl-0.17.1/source/version.cc +@@ -35,7 +35,7 @@ namespace Version + #endif + + const char* compilation_info = +- "Compiled with " COMPILER " on " __DATE__ " at " __TIME__ "\n" ++ "Compiled with " COMPILER "\n" + "Build platform: " CRAWL_HOST "\n" + "Platform: " CRAWL_ARCH "\n" + "CFLAGS: " CRAWL_CFLAGS "\n"