[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#782233: cwirc: please make the build reproducible



Source: cwirc
Version: 2.0.0-7
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-CC: reproducible-builds@lists.alioth.debian.org

Hi!

While working on Debian's “reproducible builds” effort [1], we have
noticed that cwirc doesn't build reproducibly.
It embeds the current date into the manpage.

The attached patch fixes this by using the last changelog date
as a timestamp that will be embedded.

Regards,
 Reiner

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



















diff --git a/debian/patches/reproducible_build.patch b/debian/patches/reproducible_build.patch
new file mode 100644
index 0000000..8f7713f
--- /dev/null
+++ b/debian/patches/reproducible_build.patch
@@ -0,0 +1,16 @@
+Author: Reiner Herrmann <reiner@reiner-h.de>
+Description: Remove timestamp from binary to enable reproducible builds.
+
+Index: cwirc-2.0.0/gui.c
+===================================================================
+--- cwirc-2.0.0.orig/gui.c
++++ cwirc-2.0.0/gui.c
+@@ -1175,7 +1175,7 @@ int cwirc_ui(int ext_shmid)
+ 
+   /* Create the general information label inside the table */
+   label=gtk_label_new("CWirc - IRC Morse code chat application\n"
+-		"Version: " VERSION ", build date: " __DATE__ "\n"
++		"Version: " VERSION "\n"
+ 		"(c) Pierre-Philippe Coupard <pcoupard@skynet.be>\n\n"
+ 		"This program is distributed under the terms of the GNU "
+ 				"General Public License");
diff --git a/debian/patches/series b/debian/patches/series
index 71dc940..d731607 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0000-fix-ftbfs-with-ld-as-needed.patch
 makefile-adoptions-for-hardening.patch
+reproducible_build.patch
diff --git a/debian/pod2man.mk b/debian/pod2man.mk
index 64bc797..f878a28 100644
--- a/debian/pod2man.mk
+++ b/debian/pod2man.mk
@@ -34,9 +34,10 @@ endif
 PACKAGE		?= package
 
 # Optional variables to set
+BUILD_DATE	?= $$(dpkg-parsechangelog -S Date -lchangelog)
 MANSECT		?= 1
 PODCENTER 	?= User Commands
-PODDATE		= $$(date "+%Y-%m-%d")
+PODDATE		= $$(date -u "+%Y-%m-%d" -d "$(BUILD_DATE)")
 
 # Directories
 MANSRC		=

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: