[Reproducible-commits] [pyqt5] 03/03: Added patch which removes embedding of timestamps in generated files, to enable reproducible builds in packages build-depending on pyqt5.

Holger Levsen holger at moszumanska.debian.org
Fri Mar 20 21:42:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch pu/reproducible_builds
in repository pyqt5.

commit d3a1f2a5099ea57239f0d1309580f289ec2ef1f6
Author: Reiner Herrmann <reiner at reiner-h.de>
Date:   Fri Mar 20 22:40:33 2015 +0100

    Added patch which removes embedding of timestamps in generated files, to enable reproducible builds in packages build-depending on pyqt5.
---
 debian/changelog                      |  8 +++++
 debian/patches/remove_timestamps.diff | 59 +++++++++++++++++++++++++++++++++++
 debian/patches/series                 |  1 +
 3 files changed, 68 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 4a86a73..f541d79 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pyqt5 (5.3.2+dfsg-3.0~reproducible1) UNRELEASED; urgency=low
+
+  * Added patch which removes embedding of timestamps in generated
+    files, to enable reproducible builds in packages build-depending
+    on pyqt5.
+
+ -- Reiner Herrmann <reiner at reiner-h.de>  Sat, 03 Jan 2015 17:54:54 +0100
+
 pyqt5 (5.3.2+dfsg-3) unstable; urgency=medium
 
   * Fix a typo in debian/tests/control.
diff --git a/debian/patches/remove_timestamps.diff b/debian/patches/remove_timestamps.diff
new file mode 100644
index 0000000..41f6234
--- /dev/null
+++ b/debian/patches/remove_timestamps.diff
@@ -0,0 +1,59 @@
+Description: prevent embedding of timestamps in files generated by rcc and uic
+ Timestamps in generated files will make packages using those tools no longer
+ build reproducibly, because the files will differ in each build.
+ As those timestamps are no useful information, they can be left out.
+Author: Reiner Herrmann <reiner at reiner-h.de>
+
+Index: pyqt5-5.3.2+dfsg/pyrcc/rcc.cpp
+===================================================================
+--- pyqt5-5.3.2+dfsg.orig/pyrcc/rcc.cpp
++++ pyqt5-5.3.2+dfsg/pyrcc/rcc.cpp
+@@ -45,7 +45,6 @@
+ #include <qfile.h>
+ #include <qfileinfo.h>
+ #include <qlocale.h>
+-#include <qdatetime.h>
+ #include <qtextstream.h>
+ #include <qbytearray.h>
+ #include <qhash.h>
+@@ -421,8 +420,7 @@ RCCResourceLibrary::writeHeader(FILE *ou
+     fprintf(out, "# -*- coding: utf-8 -*-\n\n");
+     fprintf(out, "# Resource object code\n");
+     fprintf(out, "#\n");
+-    fprintf(out, "# Created: %s\n", QDateTime::currentDateTime().toString().toUtf8().constData());
+-    fprintf(out, "#      by: The Resource Compiler for PyQt (Qt v%s)\n", QT_VERSION_STR);
++    fprintf(out, "# Created by: The Resource Compiler for PyQt (Qt v%s)\n", QT_VERSION_STR);
+     fprintf(out, "#\n");
+     fprintf(out, "# WARNING! All changes made in this file will be lost!\n");
+     fprintf(out, "\n");
+Index: pyqt5-5.3.2+dfsg/pyuic/uic/__init__.py
+===================================================================
+--- pyqt5-5.3.2+dfsg.orig/pyuic/uic/__init__.py
++++ pyqt5-5.3.2+dfsg/pyuic/uic/__init__.py
+@@ -47,8 +47,7 @@ _header = """# -*- coding: utf-8 -*-
+ 
+ # Form implementation generated from reading ui file '%s'
+ #
+-# Created: %s
+-#      by: PyQt5 UI code generator %s
++# Created by: PyQt5 UI code generator %s
+ #
+ # WARNING! All changes made in this file will be lost!
+ 
+@@ -149,7 +148,6 @@ def compileUi(uifile, pyfile, execute=Fa
+     module is foo_rc.
+     """
+ 
+-    from time import ctime
+     from PyQt5.QtCore import PYQT_VERSION_STR
+ 
+     try:
+@@ -159,7 +157,7 @@ def compileUi(uifile, pyfile, execute=Fa
+ 
+     indenter.indentwidth = indent
+ 
+-    pyfile.write(_header % (uifname, ctime(), PYQT_VERSION_STR))
++    pyfile.write(_header % (uifname, PYQT_VERSION_STR))
+ 
+     winfo = compiler.UICompiler().compileUi(uifile, pyfile, from_imports, resource_suffix)
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 422cb22..7ca589c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+remove_timestamps.diff
 add_dependency.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/pyqt5.git



More information about the Reproducible-commits mailing list