1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-20 18:04:03 +03:00

Sort input file list

so that /usr/lib/systemd/tests/unit-tests/test-libsystemd-sym
builds in a reproducible way
in spite of non-deterministic filesystem readdir order

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

This patch was done while working on reproducible builds for openSUSE.
This commit is contained in:
Bernhard M. Wiedemann 2024-01-25 05:48:35 +01:00 committed by Luca Boccassi
parent 6b7309b6fb
commit ac0054e686

View File

@ -66,7 +66,7 @@ print(''' {}
}, symbols_from_source[] = {''')
for dirpath, _, filenames in sorted(os.walk(sys.argv[2])):
for filename in filenames:
for filename in sorted(filenames):
if not filename.endswith(".c") and not filename.endswith(".h"):
continue
with open(os.path.join(dirpath, filename), "r") as f: