From 39317a2f232bd73737b2fb7ac21d79993f784420 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Thu, 25 Jan 2024 05:48:35 +0100 Subject: [PATCH] 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. Gbp-Pq: Name Sort-input-file-list.patch --- src/test/generate-sym-test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/generate-sym-test.py b/src/test/generate-sym-test.py index e97b6bbb..028d108b 100755 --- a/src/test/generate-sym-test.py +++ b/src/test/generate-sym-test.py @@ -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: -- 2.30.2