find-debuginfo.sh: sort output of find
authorBernhard M. Wiedemann <bwiedemann@suse.de>
Mon, 30 Jul 2018 17:02:46 +0000 (19:02 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 8 Aug 2018 10:05:30 +0000 (13:05 +0300)
to make build results more reproducible
in spite of indeterministic filesystem readdir order.

For openSUSE, this helped to make squid, openssh, postfix and shadow
packages build reproducibly.

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

scripts/find-debuginfo.sh

index 44d164299ee0135cedc7509ad43de75a7434e824..11397b7e8f0818eb436c34f1bb92f30d080285c2 100755 (executable)
@@ -487,7 +487,7 @@ fi
 # Invoke the DWARF Compressor utility.
 if $run_dwz \
    && [ -d "${RPM_BUILD_ROOT}/usr/lib/debug" ]; then
-  readarray dwz_files < <(cd "${RPM_BUILD_ROOT}/usr/lib/debug"; find -type f -name \*.debug)
+  readarray dwz_files < <(cd "${RPM_BUILD_ROOT}/usr/lib/debug"; find -type f -name \*.debug | LC_ALL=C sort)
   if [ ${#dwz_files[@]} -gt 0 ]; then
     dwz_multifile_name="${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}-${RPM_PACKAGE_RELEASE}.${RPM_ARCH}"
     dwz_multifile_suffix=
This page took 0.05874 seconds and 5 git commands to generate.