Source: apktool
Version: 2.2.1+dfsg-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that apktool could not be built reproducibly.

This is due to the build system using the build path to determine
it's version, resulting in different filenames in the binary .deb.
For example, with the package built in "/build/apktool-2.2.1+dfsg/"
it would generate:

    /usr/share/apktool/apktool-2.2.1+dfsg.jar

However, if the build directory is "/build/apktool-2.2.1+dfsg/foo",
the same .jar appears at:

    /usr/share/apktool/foo.jar

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/debian/rules b/debian/rules
index 185a11e..b2b51b4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,7 @@ override_dh_auto_build:
 
 override_dh_install:
        mkdir -p debian/apktool/usr/share/apktool
-       find . -name "*.jar" -exec mv {} debian/apktool/usr/share/apktool/ \;
+       find . -name "*.jar" -exec mv {} 
debian/apktool/usr/share/apktool/apktool-$(shell dpkg-parsechangelog 
-SVersion).jar \; -quit
        dh_install
 
 get-orig-source:

Reply via email to