Source: designate Version: 1:5.0.0-2 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 designate could not be built reproducibly. Patch attached. :) [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/install-missing-files.patch 2017-12-06 21:11:41.986932617 +0000 --- b/debian/patches/install-missing-files.patch 2017-12-06 21:21:04.175034871 +0000 @@ -3,8 +3,8 @@ Forwarded: not-needed Last-Update: 2016-03-25 ---- /dev/null 2016-03-15 18:18:48.046095192 +0100 -+++ b/MANIFEST.in 2016-03-25 11:24:52.877037638 +0100 +--- /dev/null ++++ designate-5.0.0/MANIFEST.in @@ -0,0 +1,5 @@ +recursive-include designate/tests * +recursive-include designate/pool_manager * --- a/debian/patches/reproducible_build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible_build.patch 2017-12-06 21:19:17.986261217 +0000 @@ -0,0 +1,35 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2017-12-06 + +--- designate-5.0.0.orig/designate/__init__.py ++++ designate-5.0.0/designate/__init__.py +@@ -32,8 +32,7 @@ designate_opts = [ + help='Name of this node'), + cfg.StrOpt( + 'pybasedir', +- default=os.path.abspath(os.path.join(os.path.dirname(__file__), +- '../')), ++ default='', + help='Directory where the designate python module is installed' + ), + cfg.StrOpt('state-path', default='/var/lib/designate', +--- designate-5.0.0.orig/designate/utils.py ++++ designate-5.0.0/designate/utils.py +@@ -86,11 +86,13 @@ def find_config(config_path): + :param config_path: Full or relative path to the config. + :returns: List of config paths + """ ++ pybasedir = cfg.CONF.pybasedir or \ ++ os.path.abspath(os.path.join(os.path.dirname(__file__), '../')) + possible_locations = [ + config_path, +- os.path.join(cfg.CONF.pybasedir, "etc", "designate", config_path), +- os.path.join(cfg.CONF.pybasedir, "etc", config_path), +- os.path.join(cfg.CONF.pybasedir, config_path), ++ os.path.join(pybasedir, "etc", "designate", config_path), ++ os.path.join(pybasedir, "etc", config_path), ++ os.path.join(pybasedir, config_path), + "/etc/designate/%s" % config_path, + ] + --- a/debian/patches/series 2017-12-06 21:11:41.986932617 +0000 --- b/debian/patches/series 2017-12-06 21:18:41.773997294 +0000 @@ -1 +1,2 @@ install-missing-files.patch +reproducible_build.patch