Source: pyexiv2
Version: 0.3.2-8
Severity: wishlist
Tags: patch upstream
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 'pyexiv2' could not be built reproducibly.

The attached patch honours the SOURCE_DATE_EPOCH environment variable
through the ustrftime function, to get a reproducible copyright year.
Once applied, pyexiv2 can be built reproducibly in our current
experimental framework.

Regards,
Alexis Bienvenüe.

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




diff -Nru pyexiv2-0.3.2/debian/changelog pyexiv2-0.3.2/debian/changelog
--- pyexiv2-0.3.2/debian/changelog	2015-04-28 11:26:28.000000000 +0200
+++ pyexiv2-0.3.2/debian/changelog	2016-04-13 11:31:43.000000000 +0200
@@ -1,3 +1,10 @@
+pyexiv2 (0.3.2-8.0~reproducible1) unstable; urgency=medium
+
+  * Get copyright year from ustrftime for documentation, to make the build
+    reproducible.
+
+ -- Alexis Bienvenüe <p...@passoire.fr>  Wed, 13 Apr 2016 11:31:43 +0200
+
 pyexiv2 (0.3.2-8) unstable; urgency=medium
 
   * Adjust Vcs-Svn URL.
diff -Nru pyexiv2-0.3.2/debian/patches/series pyexiv2-0.3.2/debian/patches/series
--- pyexiv2-0.3.2/debian/patches/series	2015-04-28 11:22:29.000000000 +0200
+++ pyexiv2-0.3.2/debian/patches/series	2016-04-13 10:58:31.000000000 +0200
@@ -1 +1,2 @@
 remove-date.patch
+use_source_date_for_copyright.patch
diff -Nru pyexiv2-0.3.2/debian/patches/use_source_date_for_copyright.patch pyexiv2-0.3.2/debian/patches/use_source_date_for_copyright.patch
--- pyexiv2-0.3.2/debian/patches/use_source_date_for_copyright.patch	1970-01-01 01:00:00.000000000 +0100
+++ pyexiv2-0.3.2/debian/patches/use_source_date_for_copyright.patch	2016-04-13 11:00:34.000000000 +0200
@@ -0,0 +1,25 @@
+Description: Use source date for copyright year
+ To get copyright year, use ustrftime, which honours SOURCE_DATE_EPOCH.
+ This makes the build reproducible.
+ See https://reproducible-builds.org/specs/source-date-epoch/
+Author: Alexis Bienvenüe <p...@passoire.fr>
+
+--- pyexiv2-0.3.2.orig/doc/conf.py
++++ pyexiv2-0.3.2/doc/conf.py
+@@ -14,6 +14,7 @@
+ import sys, os
+ import time
+ import pyexiv2
++from sphinx.util.osutil import ustrftime
+ 
+ # 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
+@@ -40,7 +41,7 @@ master_doc = 'index'
+ 
+ # General information about the project.
+ project = u'pyexiv2'
+-copyright = u'2006-%s, Olivier Tilloy' % time.strftime('%Y')
++copyright = u'2006-%s, Olivier Tilloy' % ustrftime('%Y')
+ 
+ # The version info for the project you're documenting, acts as replacement for
+ # |version| and |release|, also used in various other places throughout the
_______________________________________________
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