[Reproducible-builds] Bug#824263: cmake: please sort file lists from file(GLOB ...)
Reiner Herrmann
reiner at reiner-h.de
Sat May 14 10:43:01 UTC 2016
Source: cmake
Version: 3.5.2-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: toolchain fileordering
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org
Forwarded: http://public.kitware.com/pipermail/cmake-developers/2016-May/028392.html
Hi!
Packages using CMake often use file(GLOB ...) to retrieve a list of
source files [1]. As this is based on readdir(), the resulting file list
is unsorted. A common use case is to pass this list directly to
add_executable or add_library. But as the order is unpredictable, the
binaries are not reproducible (because the order in which the objects
are linked will vary).
The attached patch (already sent upstream) will sort the resulting lists
from file(GLOB ...) and help with building reproducible packages.
Regards,
Reiner
[1]: https://codesearch.debian.net/perpackage-results/path%3ACMakeLists.txt%20(file%7CFILE).*(glob%7CGLOB).*(SRC%7CSOURCE%7COBJ)/2/page_0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake.diff
Type: text/x-diff
Size: 1789 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160514/ffe25146/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160514/ffe25146/attachment.sig>
More information about the Reproducible-builds
mailing list