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

Holger Levsen holger at moszumanska.debian.org
Mon Mar 23 10:04:19 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 python-qt4.

commit bb4b75308ad8bf6f92dffa916d54c1dab3530b7f
Author: Reiner Herrmann <reiner at reiner-h.de>
Date:   Mon Mar 23 10:50:33 2015 +0100

    Added patch which removes embedding of timestamps in generated files, to enable reproducible builds in packages build-depending on python-qt4.
---
 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 2df5e40..43e2fde 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-qt4 (4.11.2+dfsg-1.0~reproducible1) UNRELEASED; urgency=low
+
+  * Added patch which removes embedding of timestamps in generated
+    files, to enable reproducible builds in packages build-depending
+    on python-qt4.
+
+ -- Reiner Herrmann <reiner at reiner-h.de>  Sat, 03 Jan 2015 16:57:18 +0100
+
 python-qt4 (4.11.2+dfsg-1) unstable; urgency=medium
 
   * New upstream bugfix release.
diff --git a/debian/patches/remove_timestamps.diff b/debian/patches/remove_timestamps.diff
new file mode 100644
index 0000000..c60a51d
--- /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: python-qt4-4.11.2+dfsg/pyrcc/rcc.cpp
+===================================================================
+--- python-qt4-4.11.2+dfsg.orig/pyrcc/rcc.cpp
++++ python-qt4-4.11.2+dfsg/pyrcc/rcc.cpp
+@@ -24,7 +24,6 @@
+ #include <qfile.h>
+ #include <qfileinfo.h>
+ #include <qlocale.h>
+-#include <qdatetime.h>
+ #include <qtextstream.h>
+ #include <qbytearray.h>
+ #include <qhash.h>
+@@ -407,8 +406,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: python-qt4-4.11.2+dfsg/pyuic/uic/__init__.py
+===================================================================
+--- python-qt4-4.11.2+dfsg.orig/pyuic/uic/__init__.py
++++ python-qt4-4.11.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: PyQt4 UI code generator %s
++# Created by: PyQt4 UI code generator %s
+ #
+ # WARNING! All changes made in this file will be lost!
+ 
+@@ -160,7 +159,6 @@ def compileUi(uifile, pyfile, execute=Fa
+     module is foo_rc.
+     """
+ 
+-    from time import ctime
+     from PyQt4.QtCore import PYQT_VERSION_STR
+ 
+     try:
+@@ -170,7 +168,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 30a5420..a89a1d2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 debian_configure_changes.diff
 qreal_float_support.diff
 config_flags.diff
+remove_timestamps.diff

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



More information about the Reproducible-commits mailing list