Bug#764988: javahelper: please insert jh_installlibs after dh_link instead of before dh_compress
Package: javahelper Version: 0.47 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: toolchain Hi! As part of the Reproducible Builds effort [1], we have developed a new debhelper add-on, dh_strip_nondeterminism, that strips non-deterministic data from builds to make them reproducible. It needs to run after files are installed, but before they are compressed, so we are inserting it in the dh sequence before dh_compress. However, javahelper inserts jh_installlibs before dh_compress too, and consequentially, jh_installlibs runs after dh_strip_nondeterminism, preventing dh_strip_nondeterminism from stripping non-determinism from JAR files installed by jh_installlibs. The attached patch instead inserts jh_installlibs after dh_link, which currently comes right before dh_compress in the standard dh sequence. This will ensure the correct ordering vis-a-vis dh_strip_nondeterminism. Could this patch be applied to javahelper? (Alternatively, you could insert jh_installlibs after dh_install, which seems more logical to me and also seems to be popular among other debhelper add-ons[2], but this is a more radical change so I leave it to your discretion.) Thanks, Andrew [1] https://wiki.debian.org/ReproducibleBuilds [2] http://codesearch.debian.net/search?q=insert_after\%28[%22%27]dh_install[%22%27] diff -ruN javatools-0.47.orig/javahelper.pm javatools-0.47/javahelper.pm --- javatools-0.47.orig/javahelper.pm 2014-09-10 12:33:53.0 -0700 +++ javatools-0.47/javahelper.pm 2014-10-12 12:02:57.860291000 -0700 @@ -8,7 +8,7 @@ use Debian::Debhelper::Dh_Lib; -insert_before('dh_compress', 'jh_installlibs'); +insert_after('dh_link', 'jh_installlibs'); insert_after('jh_installlibs', 'jh_classpath'); insert_after('jh_classpath', 'jh_manifest'); insert_after('jh_manifest', 'jh_exec'); __ This is the maintainer address of Debian's Java team http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers. Please use debian-j...@lists.debian.org for discussions and questions.
Bug#764988: javahelper: please insert jh_installlibs after dh_link instead of before dh_compress
Hi Andrew, How does dh_strip_nondeterminism affect the jar files exactly? I understand that it normalizes the timestamps of the zip entries, but what date is used? Emmanuel Bourg __ This is the maintainer address of Debian's Java team http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers. Please use debian-j...@lists.debian.org for discussions and questions.
Bug#764988: javahelper: please insert jh_installlibs after dh_link instead of before dh_compress
On Sun, 12 Oct 2014 21:59:44 +0200 Emmanuel Bourg ebo...@apache.org wrote: How does dh_strip_nondeterminism affect the jar files exactly? I understand that it normalizes the timestamps of the zip entries, but what date is used? Hi Emmanuel, dh_strip_nondeterminism does the following: * Sets the timestamp of every Zip entry to January 1, 1980 (the earliest date that can be represented in a Zip archive). * Lexicographically sorts the Zip entries by filename, while keeping META-INF/ and META-INF/MANIFEST.MF at the beginning. * Removes the timestamp comment from Javadoc-generated .html files in the Jar file. -- Andrew __ This is the maintainer address of Debian's Java team http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers. Please use debian-j...@lists.debian.org for discussions and questions.
Bug#764988: javahelper: please insert jh_installlibs after dh_link instead of before dh_compress
Le 12/10/2014 22:14, Andrew Ayer a écrit : * Sets the timestamp of every Zip entry to January 1, 1980 (the earliest date that can be represented in a Zip archive). Would it be possible to set the timestamp to the release date in debian/changelog instead please? Sometimes when debugging tricky issues I have found useful to know the build time of a jar. Note that some java packages also produces jar files with the .war and .hpi extension, you may want to extend your processing to them. * Lexicographically sorts the Zip entries by filename, while keeping META-INF/ and META-INF/MANIFEST.MF at the beginning. Ok Regarding the MANIFEST.MF file, you may want to remove the Bnd-LastModified field (another timestamp) and the Built-By field (it contains the system username). * Removes the timestamp comment from Javadoc-generated .html files in the Jar file. I was planning to add the -notimestamp option to the javadoc calls, but this solution is fine. I just hope it doesn't slow the build too much. __ This is the maintainer address of Debian's Java team http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers. Please use debian-j...@lists.debian.org for discussions and questions.