Source: lava-dispatcher Version: 2016.11-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: buildpath X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that lava-dispatcher could not be built reproducibly. This was because it parses the build path to determine its version number. Patch attached. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/reproducible_build.py 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible_build.py 2016-11-12 14:32:21.349331815 +0000 @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2016-11-12 + +--- lava-dispatcher-2016.11.orig/version.py ++++ lava-dispatcher-2016.11/version.py +@@ -39,6 +39,8 @@ def version_tag(): + from that. + :return: a version string based on the tag and short hash + """ ++ if os.path.exists('debian/changelog'): ++ return subprocess.check_output(('dpkg-parsechangelog', '--show-field', 'Version')).strip().decode('utf-8') + if not os.path.exists("./.git/"): + base = os.path.basename(os.getcwd()) + name_list = ['grep', 'name=', 'setup.py'] --- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/series 2016-11-12 14:32:16.421293612 +0000 @@ -0,0 +1 @@ +reproducible_build.py