Source: cython Version: 0.23.4+git4-g7eed8d8-1 Severity: wishlist Tags: patch User: reproducible-builds@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org
Dear Maintainer, While working on the “reproducible builds” effort [1], we have noticed that 'cython' could not be built reproducibly. The attached patch uses debian changelog last entry's year as copyright year in the documentation (through SOURCE_DATE_EPOCH). Once applied, cython can be built reproducibly in our current experimental framework. Regards, Alexis Bienvenüe. [1]: https://wiki.debian.org/ReproducibleBuilds
diff -Nru cython-0.23.4+git4-g7eed8d8/debian/changelog cython-0.23.4+git4-g7eed8d8/debian/changelog --- cython-0.23.4+git4-g7eed8d8/debian/changelog 2016-02-19 16:13:06.000000000 +0100 +++ cython-0.23.4+git4-g7eed8d8/debian/changelog 2016-04-06 12:03:47.000000000 +0200 @@ -1,3 +1,9 @@ +cython (0.23.4+git4-g7eed8d8-1.0~reproducible1) unstable; urgency=medium + + * Fix copyright year in documentation for reproducible build. + + -- Alexis Bienvenüe <p...@passoire.fr> Wed, 06 Apr 2016 12:03:47 +0200 + cython (0.23.4+git4-g7eed8d8-1) unstable; urgency=medium * Fresh upstream post bugfix release snapshot diff -Nru cython-0.23.4+git4-g7eed8d8/debian/patches/honour_SOURCE_DATE_EPOCH_for_copyright_year cython-0.23.4+git4-g7eed8d8/debian/patches/honour_SOURCE_DATE_EPOCH_for_copyright_year --- cython-0.23.4+git4-g7eed8d8/debian/patches/honour_SOURCE_DATE_EPOCH_for_copyright_year 1970-01-01 01:00:00.000000000 +0100 +++ cython-0.23.4+git4-g7eed8d8/debian/patches/honour_SOURCE_DATE_EPOCH_for_copyright_year 2016-04-06 12:02:29.000000000 +0200 @@ -0,0 +1,19 @@ +Description: Honour SOURCE_DATE_EPOCH for copyright year + Uses SOURCE_DATE_EPOCH environment variable (if set) to + set the copyright year in documentation, to get reproducible build. +Author: Alexis Bienvenüe <p...@passoire.fr> + +--- cython-0.23.4+git4-g7eed8d8.orig/docs/conf.py ++++ cython-0.23.4+git4-g7eed8d8/docs/conf.py +@@ -15,7 +15,10 @@ import sys, os, os.path, re + import itertools + import datetime + +-YEAR = datetime.date.today().strftime('%Y') ++if os.environ.has_key('SOURCE_DATE_EPOCH'): ++ YEAR = datetime.datetime.utcfromtimestamp(float(os.environ.get('SOURCE_DATE_EPOCH'))).strftime('%Y') ++else: ++ YEAR = datetime.date.today().strftime('%Y') + + # If extensions (or modules to document with autodoc) are in another directory, + # add these directories to sys.path here. If the directory is relative to the diff -Nru cython-0.23.4+git4-g7eed8d8/debian/patches/series cython-0.23.4+git4-g7eed8d8/debian/patches/series --- cython-0.23.4+git4-g7eed8d8/debian/patches/series 2016-02-19 16:13:06.000000000 +0100 +++ cython-0.23.4+git4-g7eed8d8/debian/patches/series 2016-04-06 12:00:46.000000000 +0200 @@ -1,2 +1,3 @@ deb_disable_googleanalytics deb-reproducible.patch +honour_SOURCE_DATE_EPOCH_for_copyright_year
_______________________________________________ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds