Source: tunnelx Version: 20160713-3 Severity: wishlist Tags: patch User: [email protected] Usertags: randomness X-Debbugs-Cc: [email protected]
Hi, While working on the "reproducible builds" effort [1], we have noticed that tunnelx could not be built reproducibly. During the build, two files called 'listdir.txt' containing the list of files in a directory are created. These files are created with: `ls $x | LC_ALL=C sort > $x/listdir.txt` I believe there is a data race between the creation of the listdir.txt file and the listing of the directory $x$ by 'ls', causing the listdir.txt entry to appear sometimes in the file and sometimes not. The attached patch fixes this by using a temporary hidden '.listdir.txt' file that is then renamed to 'listdirtxt'. Once applied, tunnelx can be built reproducibly in our current experimental framework. [1]: https://wiki.debian.org/ReproducibleBuilds Regards, -- Dhole
diff -Nru tunnelx-20160713/debian/changelog tunnelx-20160713/debian/changelog --- tunnelx-20160713/debian/changelog 2016-11-13 16:28:13.000000000 +0100 +++ tunnelx-20160713/debian/changelog 2017-02-06 12:07:09.000000000 +0100 @@ -1,3 +1,11 @@ +tunnelx (20160713-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix datarace in the generation of listdir.txt files, making the package + build reproducible. + + -- Eduard Sanou <[email protected]> Mon, 06 Feb 2017 12:07:09 +0100 + tunnelx (20160713-3) unstable; urgency=medium * Make rebuild reproducible (Closes: #843698) diff -Nru tunnelx-20160713/debian/rules tunnelx-20160713/debian/rules --- tunnelx-20160713/debian/rules 2016-11-13 16:25:41.000000000 +0100 +++ tunnelx-20160713/debian/rules 2017-02-06 12:07:09.000000000 +0100 @@ -25,6 +25,7 @@ dh_install set -e; for x in symbols tutorials; do \ rm -f $$x/listdir.txt; \ - ls $$x | LC_ALL=C sort > $$x/listdir.txt; \ + ls $$x | LC_ALL=C sort > $$x/.listdir.txt; \ + mv $$x/.listdir.txt $$x/listdir.txt; \ done jar uMf debian/tunnelx/usr/share/tunnelx/tunnelx.jar symbols/* tutorials/*
signature.asc
Description: PGP signature

