Source: qsampler
Version: 0.4.2-1
Severity: wishlist
Tags: patch upstream
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 qsampler could not be built reproducibly.
It embeds the build date into the binary for displaying it with the
version information.
The attached patch strips the build date to allow reproducible building.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/0002-reproducible-build.patch b/debian/patches/0002-reproducible-build.patch
new file mode 100644
index 0000000..57a1dd8
--- /dev/null
+++ b/debian/patches/0002-reproducible-build.patch
@@ -0,0 +1,37 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Strip build date from version info to make build reproducible
+
+--- a/src/qsamplerMainForm.cpp
++++ b/src/qsamplerMainForm.cpp
+@@ -1048,8 +1048,6 @@
+ 	ts << "# " << QSAMPLER_TITLE " - " << tr(QSAMPLER_SUBTITLE) << endl;
+ 	ts << "# " << tr("Version")
+ 	<< ": " CONFIG_BUILD_VERSION << endl;
+-	ts << "# " << tr("Build")
+-	<< ": " CONFIG_BUILD_DATE << endl;
+ 	ts << "#"  << endl;
+ 	ts << "# " << tr("File")
+ 	<< ": " << QFileInfo(sFilename).fileName() << endl;
+@@ -1965,7 +1963,6 @@
+ 	sText += "<b>" QSAMPLER_TITLE " - " + tr(QSAMPLER_SUBTITLE) + "</b><br />\n";
+ 	sText += "<br />\n";
+ 	sText += tr("Version") + ": <b>" CONFIG_BUILD_VERSION "</b><br />\n";
+-	sText += "<small>" + tr("Build") + ": " CONFIG_BUILD_DATE "</small><br />\n";
+ #ifdef CONFIG_DEBUG
+ 	sText += "<small><font color=\"red\">";
+ 	sText += tr("Debugging option enabled.");
+--- a/src/qsamplerOptions.cpp
++++ b/src/qsamplerOptions.cpp
+@@ -339,10 +339,9 @@
+ 		else if (sArg == "-v" || sArg == "--version") {
+ 			out << QObject::tr("Qt: %1\n")
+ 				.arg(qVersion());
+-			out << QObject::tr("%1: %2  (%3)\n")
++			out << QObject::tr("%1: %2\n")
+ 				.arg(QSAMPLER_TITLE)
+-				.arg(CONFIG_BUILD_VERSION)
+-				.arg(CONFIG_BUILD_DATE);
++				.arg(CONFIG_BUILD_VERSION);
+ 		#ifdef CONFIG_LIBGIG
+ 			out << QString("%1: %2\n")
+ 				.arg(gig::libraryName().c_str())
diff --git a/debian/patches/series b/debian/patches/series
index 56aa973..928ffae 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-hardening.patch
+0002-reproducible-build.patch

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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