Skip to content

docs: use SOURCE_DATE_EPOCH for copyright year when it is set

To make builds bit-by-bit reproducible, the source code should not change what is built based on the current time.

Currently, the documentation sets its build year by querying the system clock, which means that the produced documentation changes when you build it in a different year.

One approach (which i would actually prefer, though it costs one more manual commit per year of development) is to manually set the year in doc/conf.py, and to warn during the build if it appears to be out of date. (see !952 (merged))

This approach instead uses SOURCE_DATE_EPOCH, so that environments which set it explicitly will be able to build reproducibly.

See https://reproducible-builds.org/docs/source-date-epoch/ for more details.

Edited by Daniel Kahn Gillmor

Merge request reports