Respect SOURCE_DATE_EPOCH #106

Open
wants to merge 3 commits into
from

Projects

None yet

2 participants

@andersk
andersk commented Dec 10, 2016

If the SOURCE_DATE_EPOCH environment variable is set, then (1) use UTC for all timestamps and (2) replace all timestamps with min(timestamp, SOURCE_DATE_EPOCH). This allows projects using AsciiDoc to build reproducibly without being patched to pass extra flags.

(We don’t expose UTC timestamps as a separate command line option as in #70, but that shouldn’t be necessary because a user who knows they want UTC can run env TZ=UTC asciidoc. The goal here is to enable reproducibility without requiring special consideration by all AsciiDoc users.)

andersk added some commits Dec 10, 2016
@andersk andersk Combine date_str and time_str into one date_time_str function
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
ac8b4e5
@andersk andersk date_time_str: Respect SOURCE_DATE_EPOCH
If the SOURCE_DATE_EPOCH environment variable is set, then (1) use UTC
for all timestamps and (2) replace all timestamps with min(timestamp,
SOURCE_DATE_EPOCH).  This allows projects using AsciiDoc to build
reproducibly without being patched to pass extra flags.

https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
b847d0d
@elextr
Contributor
elextr commented Dec 10, 2016

Please document in the user guide the change in semantics of the four attributes and add an environment variables section to the man page.

@andersk andersk Document SOURCE_DATE_EPOCH
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
d469c77
@andersk
andersk commented Dec 10, 2016

Documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment