Skip to contentSkip to conversation

core/reproducible: do not override SOURCE_DATE_EPOCH

PATCH New Yann E. MORIN 2 participants 3 messages Nov 5, 2017 – Nov 26, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 core/reproducible: do not override SOURCE_DATE_EPOCH

SOURCE_DATE_EPOCH is currently forcibly set (to either the git commit date, or the last release date).

However, the spec mandates that it should not be modified if already
set: https://reproducible-builds.org/specs/source-date-epoch/

Build systems MUST NOT overwrite this variable for child processes to consume if it is already present.

Abide by the rule, and only set it if not already set.

This will allow users to pass it from an upper-layer buildsystem (e.g. a jenkins or gitlab-ci job, for example), when they have a reson to do so.

Cc Peter Korsgaard <[email protected]>
Cc Einar J?n Gunnarsson <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 79db7fe48a..7a727075ea 100644
@@ -254,7 +254,7 @@ export LANG = C
 export LC_ALL = C
 export GZIP = -n
 BR2_VERSION_GIT_EPOCH = $(shell GIT_DIR=$(TOPDIR)/.git $(GIT) log -1 --format=%at)
-export SOURCE_DATE_EPOCH = $(if $(wildcard $(TOPDIR)/.git),$(BR2_VERSION_GIT_EPOCH),$(BR2_VERSION_EPOCH))
+export SOURCE_DATE_EPOCH ?= $(if $(wildcard $(TOPDIR)/.git),$(BR2_VERSION_GIT_EPOCH),$(BR2_VERSION_EPOCH))
 DEPENDENCIES_HOST_PREREQ += host-fakedate
 endif
 
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 core/reproducible: do not override SOURCE_DATE_EPOCH

Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

SOURCE_DATE_EPOCH is currently forcibly set (to either the git commit date, or the last release date).

However, the spec mandates that it should not be modified if already
set: https://reproducible-builds.org/specs/source-date-epoch/

Build systems MUST NOT overwrite this variable for child processes to consume if it is already present.

Abide by the rule, and only set it if not already set.

This will allow users to pass it from an upper-layer buildsystem (e.g. a jenkins or gitlab-ci job, for example), when they have a reson to do so.

Quoted 7 lines
Cc Peter Korsgaard <[email protected]>
Cc Einar J?n Gunnarsson <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 core/reproducible: do not override SOURCE_DATE_EPOCH

In reply to Yann E. MORIN
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

SOURCE_DATE_EPOCH is currently forcibly set (to either the git commit date, or the last release date).

However, the spec mandates that it should not be modified if already
set: https://reproducible-builds.org/specs/source-date-epoch/

Quoted 7 lines

Build systems MUST NOT overwrite this variable for child processes to consume if it is already present.

Abide by the rule, and only set it if not already set.

This will allow users to pass it from an upper-layer buildsystem (e.g. a jenkins or gitlab-ci job, for example), when they have a reson to do so.

Committed to 2017.02.x and 2017.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard