Source: qmidinet
Version: 0.4.2-1
Severity: wishlist
Tags: patch upstream
User: [email protected]
Usertags: timestamps
X-Debbugs-Cc: [email protected]

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that qmidinet 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/02-reproducible-build.patch b/debian/patches/02-reproducible-build.patch
new file mode 100644
index 0000000..994ff12
--- /dev/null
+++ b/debian/patches/02-reproducible-build.patch
@@ -0,0 +1,28 @@
+Author: Reiner Herrmann <[email protected]>
+Description: Strip build date from version info to make build reproducible
+
+--- a/src/qmidinet.cpp
++++ b/src/qmidinet.cpp
+@@ -298,7 +298,6 @@
+ 	sText += "<b>" QMIDINET_TITLE " - " + tr(QMIDINET_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";
+ #ifndef CONFIG_ALSA_MIDI
+ 	sText += "<small><font color=\"red\">";
+ 	sText += tr("ALSA MIDI support disabled.");
+--- a/src/qmidinetOptions.cpp
++++ b/src/qmidinetOptions.cpp
+@@ -234,10 +234,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(QMIDINET_TITLE)
+-				.arg(CONFIG_BUILD_VERSION)
+-				.arg(CONFIG_BUILD_DATE);
++				.arg(CONFIG_BUILD_VERSION);
+ 			return false;
+ 		}
+ 	}
diff --git a/debian/patches/series b/debian/patches/series
index 4e92aa7..eea9a6e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 01-fix_FTBFS.patch
 03-fix_hardening.patch
+02-reproducible-build.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to