Skip to content

Commit

Permalink
tools: make utils.SearchFiles deterministic
Browse files Browse the repository at this point in the history
`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

PR-URL: #44496
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
  • Loading branch information
brjsp authored and BethGriggs committed Mar 27, 2023
1 parent 56cbc7f commit 768e562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 768e562

Please sign in to comment.