From fe17d8d498952eb25aa6edb8fa24730a6e778f5e Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Thu, 11 Jul 2019 09:12:13 +0200 Subject: [PATCH] make.py:sort files to maintain consistency across platforms Sort input file list so that the boswars binary builds in a reproducible way in spite of indeterministic filesystem readdir order. See https://reproducible-builds.org/ for why this is good. --- make.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/make.py b/make.py index a4037e92..f2cd86a6 100755 --- a/make.py +++ b/make.py @@ -41,6 +41,8 @@ def find(startdir, pattern): import fnmatch results = [] for dirpath,dirnames,files in os.walk(startdir): + dirnames.sort() + files.sort() for f in files: # Ignore dot files. GNU Emacs especially creates lock files # with names like ".#script.cpp". Don't try to compile those.