Source: lcov
Version: 1.12-1
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 the "reproducible builds" effort [1], we have noticed
that lcov could not be built reproducibly.
The manpages are updated with a timezone-dependent timestamp.

The attached patch fixes this by using UTC for the time.

Regards,
 Reiner

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

diff --git a/debian/patches/reproducible-manpage.patch b/debian/patches/reproducible-manpage.patch
new file mode 100644
index 0000000..55d8715
--- /dev/null
+++ b/debian/patches/reproducible-manpage.patch
@@ -0,0 +1,16 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Use UTC to get date independent of timezone
+
+Index: lcov-1.12/bin/updateversion.pl
+===================================================================
+--- lcov-1.12.orig/bin/updateversion.pl
++++ lcov-1.12/bin/updateversion.pl
+@@ -83,7 +83,7 @@ sub get_file_info($)
+ 
+ 	return (0, 0, 0) if (!-e $filename);
+ 	@stat = stat($filename);
+-	($sec, $min, $hour, $day, $month, $year) = localtime($stat[9]);
++	($sec, $min, $hour, $day, $month, $year) = gmtime($stat[9]);
+ 	$year += 1900;
+ 	$month += 1;
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 7badc0e..fae37a5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ example_build.patch
 handle-equals-signs.patch
 # demangle-fixup.patch
 fix-undef-behaviour.patch
+reproducible-manpage.patch

Attachment: signature.asc
Description: OpenPGP digital 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