All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] core/reproducible: do not override SOURCE_DATE_EPOCH
@ 2017-11-05  9:14 Yann E. MORIN
  2017-11-05 10:45 ` Peter Korsgaard
  2017-11-26 19:53 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Yann E. MORIN @ 2017-11-05  9:14 UTC (permalink / raw)
  To: buildroot

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.

Reported-by: Peter Korsgaard <peter@korsgaard.com>
Reported-by: Einar J?n Gunnarsson <tolvupostur@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Einar J?n Gunnarsson <tolvupostur@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 79db7fe48a..7a727075ea 100644
--- a/Makefile
+++ b/Makefile
@@ -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
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] core/reproducible: do not override SOURCE_DATE_EPOCH
  2017-11-05  9:14 [Buildroot] [PATCH] core/reproducible: do not override SOURCE_DATE_EPOCH Yann E. MORIN
@ 2017-11-05 10:45 ` Peter Korsgaard
  2017-11-26 19:53 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2017-11-05 10:45 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> 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.

 > Reported-by: Peter Korsgaard <peter@korsgaard.com>
 > Reported-by: Einar J?n Gunnarsson <tolvupostur@gmail.com>
 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Peter Korsgaard <peter@korsgaard.com>
 > Cc: Einar J?n Gunnarsson <tolvupostur@gmail.com>
 > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 > Cc: Arnout Vandecappelle <arnout@mind.be>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] core/reproducible: do not override SOURCE_DATE_EPOCH
  2017-11-05  9:14 [Buildroot] [PATCH] core/reproducible: do not override SOURCE_DATE_EPOCH Yann E. MORIN
  2017-11-05 10:45 ` Peter Korsgaard
@ 2017-11-26 19:53 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2017-11-26 19:53 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> 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.

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

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-26 19:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-05  9:14 [Buildroot] [PATCH] core/reproducible: do not override SOURCE_DATE_EPOCH Yann E. MORIN
2017-11-05 10:45 ` Peter Korsgaard
2017-11-26 19:53 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.