]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Sort input file list
authorBernhard M. Wiedemann <bwiedemann@suse.de>
Thu, 25 Jan 2024 04:48:35 +0000 (05:48 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 25 Jan 2024 10:34:56 +0000 (10:34 +0000)
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.

src/test/generate-sym-test.py

index e97b6bbbd524975a693b7d4e6af50662e6ad2851..028d108bb5e6e6a8e510b93497434992cfe32795 100755 (executable)
@@ -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: