From f0e4635dfda897e1b4ab7ce2f8ebd2e97f1714f3 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Sat, 24 Mar 2018 20:47:21 +0100 Subject: Sort input file list so that the swift-im openSUSE package builds in a reproducible way in spite of indeterministic filesystem readdir order See https://reproducible-builds.org/ for why this is good. License: This patch is BSD licensed - see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Builds on different machines should no longer have differences in Swiften.h Change-Id: I8066a66db83c7d7ff10858196cb72b13af3f6008 diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 70bffbc..55b604b 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -707,6 +707,8 @@ if ARGUMENTS.get("replace_pragma_once", False) : return path[i+1:] for actual_root, dirs, files in os.walk(root) : + dirs.sort() + files.sort() if "3rdParty" in actual_root : continue for file in files : @@ -733,14 +735,14 @@ if ARGUMENTS.get("dump_trace", False) : # Modules modules = [] if os.path.isdir(Dir("#/3rdParty").abspath) : - for dir in os.listdir(Dir("#/3rdParty").abspath) : + for dir in sorted(os.listdir(Dir("#/3rdParty").abspath)) : full_dir = os.path.join(Dir("#/3rdParty").abspath, dir) if not os.path.isdir(full_dir) : continue sconscript = os.path.join(full_dir, "SConscript") if os.path.isfile(sconscript) : modules.append("3rdParty/" + dir) -for dir in os.listdir(Dir("#").abspath) : +for dir in sorted(os.listdir(Dir("#").abspath)) : full_dir = os.path.join(Dir("#").abspath, dir) if not os.path.isdir(full_dir) : continue diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index 3cd3228..8ee82e4 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -10,6 +10,8 @@ def generateQRCTheme(dir, prefix) : #skip the Noto emoji fonts in Windows. No need to package them since they aren't used if "Noto" in path and not env["PLATFORM"] == "linux" : continue + dirs.sort() + files.sort() for file in files : filePath = os.path.join(path,file) result += "%(path)s" % { diff --git a/Swiften/SConscript b/Swiften/SConscript index db08225..4deddaf 100644 --- a/Swiften/SConscript +++ b/Swiften/SConscript @@ -593,6 +593,8 @@ if env["SCONS_STAGE"] == "build" : swiften_public_includes = [] top_path = env.Dir("..").abspath for root, dirs, files in os.walk(env.Dir(".").abspath) : + dirs.sort() + files.sort() if root.endswith("UnitTest") : continue for file in files : -- cgit v0.10.2-6-g49f6