[Reproducible-builds] Bug#795394: libitpp: please make the build reproducible

Dhole dhole at openmailbox.org
Thu Aug 13 15:56:22 UTC 2015


Source: libitpp
Version: 4.3.1-4
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Hi,

While working on the "reproducible builds" effort [1], we have noticed
that libitpp could not be built reproducibly.

The attached patch replaces the timestamp in the docs with the latest
debian/changelog entry timestamp. Once applied, libitpp can be built
reproducibly in our current experimental framework.

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


Regards,
-- 
Dhole
-------------- next part --------------
diff -Nru libitpp-4.3.1/debian/changelog libitpp-4.3.1/debian/changelog
--- libitpp-4.3.1/debian/changelog	2015-03-01 02:59:24.000000000 +0100
+++ libitpp-4.3.1/debian/changelog	2015-08-12 23:45:14.000000000 +0200
@@ -1,3 +1,11 @@
+libitpp (4.3.1-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Replace man timestamp by SOURCE_DATE_EPOCH to make the package build
+    reproducibly.
+
+ -- Eduard Sanou <dhole at openmailbox.org>  Wed, 12 Aug 2015 23:44:45 +0200
+
 libitpp (4.3.1-4) experimental; urgency=medium
 
   * debian/patches:
diff -Nru libitpp-4.3.1/debian/patches/honour-SOURCE_DATE_EPOCH.diff libitpp-4.3.1/debian/patches/honour-SOURCE_DATE_EPOCH.diff
--- libitpp-4.3.1/debian/patches/honour-SOURCE_DATE_EPOCH.diff	1970-01-01 01:00:00.000000000 +0100
+++ libitpp-4.3.1/debian/patches/honour-SOURCE_DATE_EPOCH.diff	2015-08-12 23:46:53.000000000 +0200
@@ -0,0 +1,20 @@
+Description: Honour SOURCE_DATE_EPOCH in man pages
+ Replace manpage timestamp with SOURCE_DATE_EPOCH only if the variable is 
+ defined, to make the man pages reproducible.
+Author: Eduard Sanou <dhole at openmailbox.org>
+
+--- libitpp-4.3.1.orig/CMakeLists.txt
++++ libitpp-4.3.1/CMakeLists.txt
+@@ -155,7 +155,11 @@ set (PACKAGE_STRING "${PACKAGE_NAME} ${P
+ set (PACKAGE_TARNAME ${PACKAGE})
+ set (PACKAGE_URL "")
+ if (UNIX)
+-  EXECUTE_PROCESS(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE PACKAGE_DATE)
++  if (DEFINED ENV{SOURCE_DATE_EPOCH})
++    EXECUTE_PROCESS(COMMAND "date" "-u" "-d @${SOURCE_DATE_EPOCH}" "+%d/%m/%Y" OUTPUT_VARIABLE PACKAGE_DATE)
++  else()
++    EXECUTE_PROCESS(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE PACKAGE_DATE)
++  endif()
+   string(REGEX REPLACE "(..)/(..)/..(..).*" "\\1/\\2/\\3" PACKAGE_DATE "${PACKAGE_DATE}")
+ else()
+   set(PACKAGE_DATE "")
diff -Nru libitpp-4.3.1/debian/patches/series libitpp-4.3.1/debian/patches/series
--- libitpp-4.3.1/debian/patches/series	2015-02-28 02:31:01.000000000 +0100
+++ libitpp-4.3.1/debian/patches/series	2015-08-12 23:46:00.000000000 +0200
@@ -1,3 +1,4 @@
 741814-FTBFS-fix.diff
 itpp-pc-fix.diff
 delete-sflogo.diff
+honour-SOURCE_DATE_EPOCH.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20150813/4d899a46/attachment.sig>


More information about the Reproducible-builds mailing list