Makefile: generate SOURCE_DATE_EPOCH for reproducible builds
authorGilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Wed, 23 Nov 2016 12:58:40 +0000 (13:58 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 23 Nov 2016 21:55:17 +0000 (22:55 +0100)
commit9befe94baf990ee6331e77edb40e286e9dc4df8d
tree2c3ad12a5ea3a40052443e18f896fa5916d17a9b
parentb5c00f09085251a122b0af08438685fa2304b73d
Makefile: generate SOURCE_DATE_EPOCH for reproducible builds

When reproducibility is requested, generate a global SOURCE_DATE_EPOCH
environment variable which contains either the date of Buildroot last
commit if running from a git repository, or the latest release date.

This means that all packages embedding build dates will appear to
have the same build date, so in case of new commit or release, all
packages will appear to have been changed, even though some of them
may not have changed in fact.

The meaning of SOURCE_DATE_EPOCH is specified by the following
specification:
  https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile