From c7fa40b00d79c56187bbdf79152d0efba5e381a8 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Thu, 25 May 2017 15:49:27 +0200 Subject: [PATCH] Locale independent sorting Some locales sort differently, which causes a different order of files, which leads to an unreproducible build. Sort the files always with the C locale. --- src/leveldb/build_detect_platform | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/leveldb/build_detect_platform b/src/leveldb/build_detect_platform index d7edab1d8..4a200a726 100755 --- a/src/leveldb/build_detect_platform +++ b/src/leveldb/build_detect_platform @@ -176,7 +176,7 @@ set -f # temporarily disable globbing so that our patterns aren't expanded PRUNE_TEST="-name *test*.cc -prune" PRUNE_BENCH="-name *_bench.cc -prune" PRUNE_TOOL="-name leveldbutil.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