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.000000000 -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');