Source: libgpg-error
Version: 1.16-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertag: timestamps

Hi!

As part of the “reproducible builds” effort [1], it was detected that
libgpg-error could not be built reproducibly.

The build process capture the time of the build. This piece of
information is not really helpful to anyone and prevents the build
process from being deterministic.

The attached patch will instead use the time of the latest
debian/changelog entry. Once applied, libgpg-error can be built
reproducibly! :)

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

-- 
Lunar                                .''`. 
lu...@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
diff -Nru libgpg-error-1.16/debian/changelog libgpg-error-1.16/debian/changelog
--- libgpg-error-1.16/debian/changelog	2014-09-18 16:57:20.000000000 +0200
+++ libgpg-error-1.16/debian/changelog	2014-09-21 22:37:47.000000000 +0200
@@ -1,3 +1,10 @@
+libgpg-error (1.16-1.0~reproducible1) UNRELEASED; urgency=low
+
+  * Use latest entry of debian/changelog as build timestamp in order
+    to get reproducible builds.
+
+ -- Jérémy Bobbio <lu...@debian.org>  Sun, 21 Sep 2014 20:37:15 +0000
+
 libgpg-error (1.16-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru libgpg-error-1.16/debian/patches/series libgpg-error-1.16/debian/patches/series
--- libgpg-error-1.16/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ libgpg-error-1.16/debian/patches/series	2014-09-21 22:36:52.000000000 +0200
@@ -0,0 +1 @@
+use-debian-changelog-date-as-timestamp.diff
diff -Nru libgpg-error-1.16/debian/patches/use-debian-changelog-date-as-timestamp.diff libgpg-error-1.16/debian/patches/use-debian-changelog-date-as-timestamp.diff
--- libgpg-error-1.16/debian/patches/use-debian-changelog-date-as-timestamp.diff	1970-01-01 01:00:00.000000000 +0100
+++ libgpg-error-1.16/debian/patches/use-debian-changelog-date-as-timestamp.diff	2014-09-21 22:36:29.000000000 +0200
@@ -0,0 +1,17 @@
+Description: Use latest entry of debian/changelog as build timestamp
+ In order to make the build reproducible, we use the time of the latest
+ entry in debian/changelog as the build timestamp.
+Author: Jérémy Bobbio <lu...@debian.org>
+Last-Update: 2014-09-21
+
+--- libgpg-error-1.16.orig/configure.ac
++++ libgpg-error-1.16/configure.ac
+@@ -484,7 +484,7 @@ changequote([,])dnl
+ BUILD_FILEVERSION="${BUILD_FILEVERSION}0,mym4_revision_dec"
+ AC_SUBST(BUILD_FILEVERSION)
+ 
+-BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
++BUILD_TIMESTAMP=`date --date="$(dpkg-parsechangelog -SDate)" -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
+ AC_SUBST(BUILD_TIMESTAMP)
+ AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP",
+                    [The time this package was configured for a build])

Attachment: signature.asc
Description: Digital signature

Reply via email to