Source: aodh Version: 1.0.0-11 Severity: wishlist Tags: patch 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 'aodh' could not be built reproducibly. The attached patch removes build date from documentation. Once applied, aodh can be built reproducibly in our current experimental framework. Regards, Alexis Bienvenüe. [1]: https://wiki.debian.org/ReproducibleBuilds
diff -Nru aodh-1.0.0/debian/changelog aodh-1.0.0/debian/changelog --- aodh-1.0.0/debian/changelog 2015-11-21 14:22:21.000000000 +0100 +++ aodh-1.0.0/debian/changelog 2016-04-06 10:26:06.000000000 +0200 @@ -1,3 +1,10 @@ +aodh (1.0.0-11.0~reproducible1) unstable; urgency=medium + + * Use SOURCE_DATE_EPOCH for sample timestamps, to get reproducible + build. + + -- Alexis Bienvenüe <p...@passoire.fr> Wed, 06 Apr 2016 10:26:05 +0200 + aodh (1.0.0-11) unstable; urgency=medium * Fixed incorrect python-keystonemiddleware (build-)depends version. diff -Nru aodh-1.0.0/debian/patches/series aodh-1.0.0/debian/patches/series --- aodh-1.0.0/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ aodh-1.0.0/debian/patches/series 2016-04-06 10:23:28.000000000 +0200 @@ -0,0 +1 @@ +use_SOURCE_DATE_EPOCH_for_sample_timestamps diff -Nru aodh-1.0.0/debian/patches/use_SOURCE_DATE_EPOCH_for_sample_timestamps aodh-1.0.0/debian/patches/use_SOURCE_DATE_EPOCH_for_sample_timestamps --- aodh-1.0.0/debian/patches/use_SOURCE_DATE_EPOCH_for_sample_timestamps 1970-01-01 01:00:00.000000000 +0100 +++ aodh-1.0.0/debian/patches/use_SOURCE_DATE_EPOCH_for_sample_timestamps 2016-04-06 11:11:05.000000000 +0200 @@ -0,0 +1,42 @@ +Description: Use SOURCE_DATE_EPOCH for sample timestamps + To get reproducible build of documentation, use SOURCE_DATE_EPOCH + environment variable (if set). + See https://wiki.debian.org/ReproducibleBuilds + and https://reproducible-builds.org/specs/source-date-epoch/ +Author: Alexis Bienvenüe <p...@passoire.fr> + +Index: aodh-1.0.0/aodh/api/controllers/v2/alarms.py +=================================================================== +--- aodh-1.0.0.orig/aodh/api/controllers/v2/alarms.py ++++ aodh-1.0.0/aodh/api/controllers/v2/alarms.py +@@ -19,6 +19,8 @@ + # under the License. + + import datetime ++import time ++import os + import itertools + import json + import uuid +@@ -359,10 +361,10 @@ class Alarm(base.Base): + user_id="c96c887c216949acbdfbd8b494863567", + project_id="c96c887c216949acbdfbd8b494863567", + enabled=True, +- timestamp=datetime.datetime.utcnow(), ++ timestamp=datetime.datetime.utcfromtimestamp(float(os.environ.get('SOURCE_DATE_EPOCH', time.time()))), + state="ok", + severity="moderate", +- state_timestamp=datetime.datetime.utcnow(), ++ state_timestamp=datetime.datetime.utcfromtimestamp(float(os.environ.get('SOURCE_DATE_EPOCH', time.time()))), + ok_actions=["http://site:8000/ok"], + alarm_actions=["http://site:8000/alarm"], + insufficient_data_actions=["http://site:8000/nodata"], +@@ -480,7 +482,7 @@ class AlarmChange(base.Base): + user_id="3e5d11fda79448ac99ccefb20be187ca", + project_id="b6f16144010811e387e4de429e99ee8c", + on_behalf_of="92159030020611e3b26dde429e99ee8c", +- timestamp=datetime.datetime.utcnow(), ++ timestamp=datetime.datetime.utcfromtimestamp(float(os.environ.get('SOURCE_DATE_EPOCH', time.time()))), + ) + +
_______________________________________________ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds