Source: leveldb Version: 1.18-2 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 leveldb could not be built reproducibly. A file list is sorted differently depending on the locale. The attached patch fixes this by setting LC_ALL to C before sorting. Regards, Reiner [1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/0002-reproducible_build.patch b/debian/patches/0002-reproducible_build.patch new file mode 100644 index 0000000..c728033 --- /dev/null +++ b/debian/patches/0002-reproducible_build.patch @@ -0,0 +1,13 @@ +Index: leveldb-1.18/build_detect_platform +=================================================================== +--- leveldb-1.18.orig/build_detect_platform ++++ leveldb-1.18/build_detect_platform +@@ -174,7 +174,7 @@ set -f # temporarily disable globbing so + PRUNE_TEST="-name *test*.cc -prune" + PRUNE_BENCH="-name *_bench.cc -prune" + PRUNE_TOOL="-name leveldb_main.cc -prune" +-PORTABLE_FILES=`find $DIRS $PRUNE_TEST -o $PRUNE_BENCH -o $PRUNE_TOOL -o -name '*.cc' -print | sort | sed "s,^$PREFIX/,," | tr "\n" " "` ++PORTABLE_FILES=`find $DIRS $PRUNE_TEST -o $PRUNE_BENCH -o $PRUNE_TOOL -o -name '*.cc' -print | LC_ALL=C sort | sed "s,^$PREFIX/,," | tr "\n" " "` + + set +f # re-enable globbing + diff --git a/debian/patches/series b/debian/patches/series index c12b084..eafed0d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 0112-makefile_install.patch 0113-makefile_memenv.patch 1001-fix_bloom_test.patch +0002-reproducible_build.patch
signature.asc
Description: OpenPGP digital signature