summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard M. Wiedemann <bwiedemann@suse.de>2020-03-03 10:31:56 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2020-03-05 11:51:17 (GMT)
commit1b51873ccfccf9dde981ef4aecba7656bad4056b (patch)
tree02dbae5147195b98b53ff2026d22ac3d48043842
parentaf8f88cec5c1821d19bb772c3cf5bcdd128e6b2d (diff)
downloadlasso-1b51873ccfccf9dde981ef4aecba7656bad4056b.zip
lasso-1b51873ccfccf9dde981ef4aecba7656bad4056b.tar.gz
lasso-1b51873ccfccf9dde981ef4aecba7656bad4056b.tar.bz2
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>
-rw-r--r--bindings/bindings.py2
-rw-r--r--lasso/extract_types.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/bindings/bindings.py b/bindings/bindings.py
index 07cb067..8a81f54 100644
--- a/bindings/bindings.py
+++ b/bindings/bindings.py
@@ -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
diff --git a/lasso/extract_types.py b/lasso/extract_types.py
index 1359caf..64c7f3c 100644
--- a/lasso/extract_types.py
+++ b/lasso/extract_types.py
@@ -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)