Source: freeipmi
Version: 1.4.9-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Hi,

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

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

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


Regards,
-- 
Dhole
diff -Nru freeipmi-1.4.9/debian/changelog freeipmi-1.4.9/debian/changelog
--- freeipmi-1.4.9/debian/changelog     2015-07-01 16:09:12.000000000 +0200
+++ freeipmi-1.4.9/debian/changelog     2015-08-06 17:17:47.000000000 +0200
@@ -1,3 +1,12 @@
+freeipmi (1.4.9-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Replace man pages dates with the timestamp from the latest
+    debian/changelog entry using the variable SOURCE_DATE_EPOCH to make the
+    package build reproducibly. 
+
+ -- Eduard Sanou <dh...@openmailbox.org>  Thu, 06 Aug 2015 17:16:40 +0200
+
 freeipmi (1.4.9-1) unstable; urgency=medium
 
   * Fresh upstream release
diff -Nru freeipmi-1.4.9/debian/patches/honour-SOURCE_DATE_EPOCH.patch 
freeipmi-1.4.9/debian/patches/honour-SOURCE_DATE_EPOCH.patch
--- freeipmi-1.4.9/debian/patches/honour-SOURCE_DATE_EPOCH.patch        
1970-01-01 01:00:00.000000000 +0100
+++ freeipmi-1.4.9/debian/patches/honour-SOURCE_DATE_EPOCH.patch        
2015-08-06 17:18:43.000000000 +0200
@@ -0,0 +1,21 @@
+Description: Honour SOURCE_DATE_EPOCH in manpages
+ .
+ freeipmi (1.4.9-1.1) UNRELEASED; urgency=medium
+ .
+   * Non-maintainer upload.
+   * Replace man pages dates with the timestamp from the latest
+     debian/changelog entry using the variable SOURCE_DATE_EPOCH to make the
+     package build reproducibly.
+Author: Eduard Sanou <dh...@openmailbox.org>
+
+--- freeipmi-1.4.9.orig/configure
++++ freeipmi-1.4.9/configure
+@@ -2723,7 +2723,7 @@ ac_config_headers="$ac_config_headers co
+ ac_config_files="$ac_config_files freeipmi.spec Makefile bmc-device/Makefile 
bmc-info/Makefile bmc-watchdog/Makefile common/Makefile 
common/debugutil/Makefile common/miscutil/Makefile common/parsecommon/Makefile 
common/pingtool/Makefile common/portability/Makefile common/toolcommon/Makefile 
contrib/Makefile doc/Makefile etc/Makefile ipmi-chassis/Makefile 
ipmi-config/Makefile ipmi-dcmi/Makefile ipmi-fru/Makefile ipmi-locate/Makefile 
ipmi-oem/Makefile ipmi-pet/Makefile ipmi-raw/Makefile ipmi-sel/Makefile 
ipmi-sensors/Makefile ipmiconsole/Makefile ipmidetect/Makefile 
ipmidetectd/Makefile ipmiping/Makefile ipmipower/Makefile ipmiseld/Makefile 
libfreeipmi/Makefile libfreeipmi/libfreeipmi.pc libfreeipmi/include/Makefile 
libfreeipmi/include/freeipmi/freeipmi.h libipmiconsole/Makefile 
libipmiconsole/ipmiconsole.h libipmiconsole/libipmiconsole.pc 
libipmidetect/Makefile libipmidetect/ipmidetect.h 
libipmidetect/libipmidetect.pc libipmimonitoring/Makefile 
libipmimonitoring/ipmi_monitoring.h libipmimonitoring/libipmimonitoring.pc 
man/Makefile man/bmc-device.8.pre man/bmc-info.8.pre man/bmc-watchdog.8.pre 
man/freeipmi.conf.5.pre man/freeipmi.7.pre man/ipmi-chassis.8.pre 
man/ipmi-config.8.pre man/ipmi-config.conf.5.pre man/ipmi-dcmi.8.pre 
man/ipmi-fru.8.pre man/ipmi-locate.8.pre man/ipmi-oem.8.pre man/ipmi-pet.8.pre 
man/ipmi-raw.8.pre man/ipmi-sel.8.pre man/ipmi-sensors.8.pre 
man/ipmiconsole.8.pre man/ipmidetect.8.pre man/ipmidetect.conf.5.pre 
man/ipmidetectd.8.pre man/ipmidetectd.conf.5.pre man/ipmiping.8.pre 
man/ipmipower.8.pre man/ipmiseld.8.pre man/ipmiseld.conf.5.pre 
man/libfreeipmi.3.pre man/freeipmi_interpret_sensor.conf.5.pre 
man/freeipmi_interpret_sel.conf.5.pre man/libipmiconsole.3.pre 
man/libipmiconsole.conf.5.pre man/libipmidetect.3.pre 
man/libipmimonitoring.3.pre man/rmcpping.8.pre rmcpping/Makefile"
+ 
+ 
+-ISODATE=`date +%Y-%m-%d`
++ISODATE=`date -u -d @$SOURCE_DATE_EPOCH +%Y-%m-%d`
+ 
+ 
+ # libfreeipmi libtool versioning
diff -Nru freeipmi-1.4.9/debian/patches/series 
freeipmi-1.4.9/debian/patches/series
--- freeipmi-1.4.9/debian/patches/series        2015-07-01 16:09:12.000000000 
+0200
+++ freeipmi-1.4.9/debian/patches/series        2015-08-06 17:18:17.000000000 
+0200
@@ -1 +1,2 @@
 deb_bmc-watchdog_noRUN
+honour-SOURCE_DATE_EPOCH.patch
diff -Nru freeipmi-1.4.9/debian/rules freeipmi-1.4.9/debian/rules
--- freeipmi-1.4.9/debian/rules 2015-07-01 16:09:12.000000000 +0200
+++ freeipmi-1.4.9/debian/rules 2015-08-06 17:12:52.000000000 +0200
@@ -1,6 +1,8 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
+export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog --count 1 
-SDate)" +%s)
+
 # --fail-missing for dh_install
 # --link-doc for dh_installdocs
 %:

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to