Projet

Général

Profil

0001-Sort-input-file-lists.patch

Bernhard M. Wiedemann, 05 mars 2020 12:13

Télécharger (1,83 ko)

Voir les différences:

Subject: [PATCH] Sort input file lists

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>
 bindings/bindings.py   | 2 ++
 lasso/extract_types.py | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
bindings/bindings.py
571 571
    if not binding.options.idwsf:
572 572
        exclusion += ( 'idwsf_strings.h', )
573 573
    for base, dirnames, filenames in os.walk(srcdir):
574
        dirnames.sort()
575
        filenames.sort()
574 576
        bname = os.path.basename(base)
575 577
        if bname == '.svn':
576 578
            # ignore svn directories
lasso/extract_types.py
32 32
six.print_(u"", file=fd)
33 33

  
34 34
header_files = []
35
for header_file in glob.glob('%s/*/*.h' % srcdir) + glob.glob('%s/*/*/*.h' % srcdir):
35
for header_file in sorted(glob.glob('%s/*/*.h' % srcdir) + glob.glob('%s/*/*/*.h' % srcdir)):
36 36
    if ('/id-wsf/' in header_file or '/id-wsf-2.0' in header_file) and not enable_wsf:
37 37
        continue
38 38
    header_files.append(header_file)
39
-