[Reproducible-builds] Bug#794792: freeipmi: please make the build reproducible
Dhole
dhole at openmailbox.org
Tue Aug 11 18:50:32 UTC 2015
On 08/06/2015 07:13 PM, Dhole wrote:
> Source: freeipmi
> Version: 1.4.9-1
> 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 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,
>
>
>
> _______________________________________________
> Reproducible-builds mailing list
> Reproducible-builds at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
>
Hi,
A member of the reproducible builds team (Josh) noticed that the patch I
sent could be improved and gave me some suggestions. I'm attaching an
updated patch with the suggestions addressed, making the patch better.
The modifications are the following:
- In my original patch I was patching `configure` to set a different
ISODATE, but the package freeipmi uses `configure.ac` to generate the
`configure` file. My improved patch now modifies `configure.ac`. For it
to take effect, I have modified how dh is called in debian/rules, to use
autoreconf instead of autotools_dev, so that the `configure` file is
generated during the build from the `configure.ac` file. I suggest you
accept this change as well.
- I have now set the declaration of ISODATE using SOURCE_DATE_EPOCH
conditional, falling back to the old behavior if SOURDE_DATE_EPOCH is
not defined. This way the patch can be sent upstream without breaking
anything.
- Finally, I removed the line to export SOURCE_DATE_EPOCH in
debian/rules since debhelper already exports this variable in our
current experimental framework.
Regards,
--
Dhole
-------------- next part --------------
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-07 17:06:34.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 <dhole at openmailbox.org> Fri, 07 Aug 2015 17:06:03 +0200
+
freeipmi (1.4.9-1) unstable; urgency=medium
* Fresh upstream release
diff -Nru freeipmi-1.4.9/debian/control freeipmi-1.4.9/debian/control
--- freeipmi-1.4.9/debian/control 2015-07-01 16:09:12.000000000 +0200
+++ freeipmi-1.4.9/debian/control 2015-08-07 17:32:01.000000000 +0200
@@ -4,7 +4,7 @@
Maintainer: Debian FreeIPMI Maintainers <pkg-freeipmi-devel at lists.alioth.debian.org>
Uploaders: Yaroslav Halchenko <debian at onerussian.com>, Ferenc Wágner <wferi at niif.hu>, Bernd Zeimetz <bzed at debian.org>
Build-Depends: debhelper (>= 9),
- autotools-dev (>= 20100122.1~),
+ dh-autoreconf,
libgcrypt11-dev,
chrpath
Standards-Version: 3.9.3
diff -Nru freeipmi-1.4.9/debian/patches/0002-Honour-SOURCE_DATE_EPOCH.patch freeipmi-1.4.9/debian/patches/0002-Honour-SOURCE_DATE_EPOCH.patch
--- freeipmi-1.4.9/debian/patches/0002-Honour-SOURCE_DATE_EPOCH.patch 1970-01-01 01:00:00.000000000 +0100
+++ freeipmi-1.4.9/debian/patches/0002-Honour-SOURCE_DATE_EPOCH.patch 2015-08-07 18:07:12.000000000 +0200
@@ -0,0 +1,23 @@
+Description: Honour SOURCE_DATE_EPOCH in manpages
+ 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 <dhole at openmailbox.org>
+
+Index: freeipmi-1.4.9/configure.ac
+===================================================================
+--- freeipmi-1.4.9.orig/configure.ac
++++ freeipmi-1.4.9/configure.ac
+@@ -106,7 +106,11 @@ AC_CONFIG_FILES([
+ man/rmcpping.8.pre
+ rmcpping/Makefile])
+
+-ISODATE=`date +%Y-%m-%d`
++if test -z "${SOURCE_DATE_EPOCH}"; then
++ ISODATE=`date +%Y-%m-%d`
++else
++ ISODATE=`date -u -d @$SOURCE_DATE_EPOCH +%Y-%m-%d`
++fi
+ AC_SUBST([ISODATE])
+
+ # 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-07 17:08:36.000000000 +0200
@@ -1 +1,2 @@
deb_bmc-watchdog_noRUN
+0002-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-07 17:27:03.000000000 +0200
@@ -4,7 +4,7 @@
# --fail-missing for dh_install
# --link-doc for dh_installdocs
%:
- dh $@ --with autotools_dev --fail-missing --link-doc=freeipmi-common
+ dh $@ --with autoreconf --fail-missing --link-doc=freeipmi-common
override_dh_auto_configure:
: # suppress multiarch support for now
-------------- 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/20150811/0c22b63f/attachment.sig>
More information about the Reproducible-builds
mailing list