From 3db234f9d4de5a7342426648e4ee4c2d3c84c4e9 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 21 Dec 2015 22:19:18 -0500 Subject: [PATCH] Resolve potential reproducible build issues GNU ease.js is a pretty trivial case with respect to reproducibility---not much goes on during the build aside from concatenation and minification. Non-determinism is essentially confined to filesystem operations, which can be rectified by sorting using a static locale's collation sequence (which is done here). This does not resolve any concerns with autoconf-installed scripts (those in tools/), or the distribution tarball file metadata. --- tools/combine | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/combine b/tools/combine index 378c393..4d97a14 100755 --- a/tools/combine +++ b/tools/combine @@ -39,6 +39,7 @@ cat_modules=$( s/[^/\]\+\/\.\.//g; s/\( \|\/\)\.\//\1/g; " \ + | LC_ALL=C sort \ | node tools/combine-order.js \ ) || { echo "Failed to get module list" >&2 @@ -56,7 +57,7 @@ all_modules=$( remain_modules=$( echo "$cat_modules $all_modules" \ - | sort \ + | LC_ALL=C sort \ | uniq -u ) @@ -140,7 +141,7 @@ if [ "$INC_TEST" ]; then # note that not all tests are included TEST_CASES=$( cd "$PATH_TEST"; find . -name '*Test*.js' \ | sed 's/^.\///' \ - | sort \ + | LC_ALL=C sort \ | grep -v '\(Combine\(PreEs5\)\?\|Index\)Test.js' \ ) @@ -189,6 +190,3 @@ fi # output combined file footer tpl_footer - -exit 0 -