Source: htop
Version: 2.0.1-1
Severity: wishlist
Tags: patch upstream
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Dear Maintainer,

While working on the “reproducible builds” effort [1], we have noticed
that 'htop' could not be built reproducibly.

The attached patch honours the SOURCE_DATE_EPOCH environment
variable [2] to get a reproducible copyright year.
Once applied, htop can be built reproducibly in our current
experimental framework.

Regards,
Alexis Bienvenüe.

 [1]: https://wiki.debian.org/ReproducibleBuilds
 [2]: https://reproducible-builds.org/specs/source-date-epoch/

diff -Nru htop-2.0.1/debian/changelog htop-2.0.1/debian/changelog
--- htop-2.0.1/debian/changelog	2016-04-14 10:26:00.000000000 +0200
+++ htop-2.0.1/debian/changelog	2016-04-29 14:59:30.000000000 +0200
@@ -1,3 +1,9 @@
+htop (2.0.1-1.0~reproducible1) UNRELEASED; urgency=medium
+
+  * Honour SOURCE_DATE_EPOCH for copyright year
+
+ -- Alexis Bienvenüe <p...@passoire.fr>  Fri, 29 Apr 2016 14:46:35 +0200
+
 htop (2.0.1-1) unstable; urgency=medium
 
   * New upstream release 2.0.1. (Closes: #814401, #783893, #774930)
diff -Nru htop-2.0.1/debian/patches/003-honour-source-date-epoch.patch htop-2.0.1/debian/patches/003-honour-source-date-epoch.patch
--- htop-2.0.1/debian/patches/003-honour-source-date-epoch.patch	1970-01-01 01:00:00.000000000 +0100
+++ htop-2.0.1/debian/patches/003-honour-source-date-epoch.patch	2016-04-29 14:55:47.000000000 +0200
@@ -0,0 +1,18 @@
+Description: Hounour SOURCE_DATE_EPOCH
+ Honour the SOURCE_DATE_EPOCH environment variable for copyright year.
+Author: Alexis Bienvenüe <p...@passoire.fr>
+
+Index: htop-2.0.1/configure.ac
+===================================================================
+--- htop-2.0.1.orig/configure.ac
++++ htop-2.0.1/configure.ac
+@@ -4,7 +4,8 @@
+ AC_PREREQ(2.65)
+ AC_INIT([htop],[2.0.1],[his...@gobolinux.org])
+ 
+-year=$(date +%Y)
++SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
++year=$(date -u -d "@$SOURCE_DATE_EPOCH" "+%Y" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+%Y" 2>/dev/null || date -u "+%Y")
+ 
+ # The following two lines are required by hwloc scripts
+ AC_USE_SYSTEM_EXTENSIONS
diff -Nru htop-2.0.1/debian/patches/series htop-2.0.1/debian/patches/series
--- htop-2.0.1/debian/patches/series	2016-04-14 10:22:00.000000000 +0200
+++ htop-2.0.1/debian/patches/series	2016-04-29 14:45:00.000000000 +0200
@@ -1,3 +1,4 @@
 001-lintian-warning-fix-man-typo.patch
 002-lintian-warning-fix-desktop-keywords.patch
 601-openvz-new-ctid-vpid.patch
+003-honour-source-date-epoch.patch
_______________________________________________
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