From 145ad0424959221be7f310bd8815b0e9e9b27272 Mon Sep 17 00:00:00 2001 From: Bruno Pitrus Date: Fri, 2 Sep 2022 10:32:27 +0200 Subject: [PATCH] tools: make utils.SearchFiles deterministic glob.glob on Linux returns files in the order returned by the filesystem driver, and the output from this function is stuffed by the Electron build process straight into the config.gypi header, causing non-reproducible builds. See this log for an example of the nondeterminism: https://rb.zq1.de/compare.factory-20220901/diffs/nodejs-electron-compare.out --- tools/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/utils.py b/tools/utils.py index 9d53bd56bd1036..d6dce5f7a52137 100644 --- a/tools/utils.py +++ b/tools/utils.py @@ -112,4 +112,4 @@ def SearchFiles(dir, ext): list = glob.glob(dir+ '/**/*.' + ext, recursive=True) if sys.platform == 'win32': list = [ x.replace('\\', '/')for x in list] - return list + return sorted(list)