Sort input file lists (#40454)

so that lasso.py, lasso/types.c and liblasso.so.3.13.0
build reproducibly
in spite of indeterministic filesystem readdir order.
For some reason, lasso/extract_sections.py lasso/extract_symbols.py
do not need such patches to get a reproducible openSUSE package.

See https://reproducible-builds.org/ for why this is good.

This patch was done while working on reproducible builds for openSUSE.

License: MIT
Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
This commit is contained in:
Bernhard M. Wiedemann 2020-03-03 11:31:56 +01:00 committed by Benjamin Dauvergne
parent af8f88cec5
commit 1b51873ccf
2 changed files with 3 additions and 1 deletions

View File

@ -571,6 +571,8 @@ def parse_headers(srcdir):
if not binding.options.idwsf:
exclusion += ( 'idwsf_strings.h', )
for base, dirnames, filenames in os.walk(srcdir):
dirnames.sort()
filenames.sort()
bname = os.path.basename(base)
if bname == '.svn':
# ignore svn directories

View File

@ -32,7 +32,7 @@ six.print_(u"typedef GType (*type_function) ();", file=fd)
six.print_(u"", file=fd)
header_files = []
for header_file in glob.glob('%s/*/*.h' % srcdir) + glob.glob('%s/*/*/*.h' % srcdir):
for header_file in sorted(glob.glob('%s/*/*.h' % srcdir) + glob.glob('%s/*/*/*.h' % srcdir)):
if ('/id-wsf/' in header_file or '/id-wsf-2.0' in header_file) and not enable_wsf:
continue
header_files.append(header_file)