Source: python-pygraphviz
Version: 1.3~rc2-3
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi,

While working on the "reproducible builds" effort [1], we have noticed
that python-pygraphviz could not be built reproducibly.

The attached patch replaces varying timestamps from the docs with
a deterministic one. Once applied, python-pygraphviz can be built
reproducibly in our reproducible toolchain.

 [1]: https://wiki.debian.org/ReproducibleBuilds


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/debian/rules b/debian/rules
index f8586c2..4e53a9e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,9 @@
 PYTHON2=$(shell pyversions -r)
 PYTHON3=$(shell py3versions -r)
 
+BUILD_DATE = $(shell dpkg-parsechangelog --show-field Date)
+BUILD_DATE_FORMATTED = $(shell LC_ALL=C date --utc --date="$(BUILD_DATE)" "+%B 
%d, %Y")
+
 %:
        dh  $@ --with python2,python3,sphinxdoc
 
@@ -23,7 +26,7 @@ override_dh_auto_build:
                $$python setup.py build; \
                $$python-dbg setup.py build; \
        done
-       PYTHONPATH=$(CURDIR)/`python -c "from distutils.command.build import 
build ; from distutils.core import Distribution ; b = build(Distribution()) ; 
b.finalize_options() ; print (b.build_platlib)"` $(MAKE) -C doc html
+       PYTHONPATH=$(CURDIR)/`python -c "from distutils.command.build import 
build ; from distutils.core import Distribution ; b = build(Distribution()) ; 
b.finalize_options() ; print (b.build_platlib)"` $(MAKE) SPHINXOPTS="-D 
today="$(BUILD_DATE_FORMATTED)"" -C doc html
 
 override_dh_strip:
 ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to