* [U-Boot] [PATCH v3 1/2] Makefile: Use correct timezone for U_BOOT_TZ
@ 2015-08-13 6:08 Chris Packham
2015-08-13 6:08 ` [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ Chris Packham
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Chris Packham @ 2015-08-13 6:08 UTC (permalink / raw)
To: u-boot
When building with SOURCE_DATE_EPOCH the timezone is in UTC. When
building normally the timezone is taken from the build machine's locale
setting.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Paul Kocialkowski <contact@paulk.fr>
---
Changes in v3:
- None
Changes in v2:
- Collect some tested-by tags
- Remove reference to f3f431a71272 in the commit message
- Drop Ccs that were erroneously added when submitting v1, remaining Ccs
are from the original mailing list thread
Makefile | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index ad51e60..3ff063a 100644
--- a/Makefile
+++ b/Makefile
@@ -1279,10 +1279,16 @@ define filechk_version.h
endef
define filechk_timestamp.h
- (SOURCE_DATE="$${SOURCE_DATE_EPOCH:+@$$SOURCE_DATE_EPOCH}"; \
- LC_ALL=C date -u -d "$${SOURCE_DATE:-now}" +'#define U_BOOT_DATE "%b %d %C%y"'; \
- LC_ALL=C date -u -d "$${SOURCE_DATE:-now}" +'#define U_BOOT_TIME "%T"'; \
- LC_ALL=C date -u -d "$${SOURCE_DATE:-now}" +'#define U_BOOT_TZ "%z"' )
+ (if test -n "$${SOURCE_DATE_EPOCH}"; then \
+ SOURCE_DATE="@$${SOURCE_DATE_EPOCH}"; \
+ LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \
+ LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \
+ LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \
+ else \
+ LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \
+ LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \
+ LC_ALL=C date +'#define U_BOOT_TZ "%z"'; \
+ fi)
endef
$(version_h): include/config/uboot.release FORCE
--
2.5.0.rc0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ 2015-08-13 6:08 [U-Boot] [PATCH v3 1/2] Makefile: Use correct timezone for U_BOOT_TZ Chris Packham @ 2015-08-13 6:08 ` Chris Packham 2015-08-25 12:09 ` Paul Kocialkowski 2015-08-25 10:22 ` [U-Boot] [PATCH v3 1/2] Makefile: Use correct timezone for U_BOOT_TZ Andreas Bießmann ` (2 subsequent siblings) 3 siblings, 1 reply; 10+ messages in thread From: Chris Packham @ 2015-08-13 6:08 UTC (permalink / raw) To: u-boot Along with SOURCE_DATE_EPOCH SOURCE_DATE_TZ can be used to recreate a build with a specific date timestamp. This allows the verification of source supplied with a pre-compiled binary. If SOURCE_DATE_EPOCH is supplied SOURCE_DATE_TZ can be used to specify what will appear in the output of the version command. If SOURCE_DATE_TZ is not specified UTC will be used. SOURCE_DATE_TZ on it's own will not have an affect. Signed-off-by: Chris Packham <judge.packham@gmail.com> --- This is a quick proof of concept that allows some control of how the timezone is displayed. Now you can do something like make SOURCE_DATE_EPOCH=12345678 SOURCE_DATE_TZ=America/Los_Angeles Changes in v3: - Drop RFC Changes in v2: None Makefile | 7 ++++--- README | 9 ++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 3ff063a..609b595 100644 --- a/Makefile +++ b/Makefile @@ -1281,9 +1281,10 @@ endef define filechk_timestamp.h (if test -n "$${SOURCE_DATE_EPOCH}"; then \ SOURCE_DATE="@$${SOURCE_DATE_EPOCH}"; \ - LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ - LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \ - LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \ + SOURCE_TZ="$${SOURCE_DATE_TZ:-UTC}"; \ + TZ="$${SOURCE_TZ}" LC_ALL=C date -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ + TZ="$${SOURCE_TZ}" LC_ALL=C date -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \ + TZ="$${SOURCE_TZ}" LC_ALL=C date -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \ else \ LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \ LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \ diff --git a/README b/README index 1bcb63c..d2e3e94 100644 --- a/README +++ b/README @@ -5087,11 +5087,14 @@ Reproducible builds In order to achieve reproducible builds, timestamps used in the U-Boot build process have to be set to a fixed value. -This is done using the SOURCE_DATE_EPOCH environment variable. -SOURCE_DATE_EPOCH is to be set on the build host's shell, not as a configuration -option for U-Boot or an environment variable in U-Boot. +This is done using the SOURCE_DATE_EPOCH and SOURCE_DATE_TZ environment +variables. These are to be set on the build host's shell, not as a +configuration option for U-Boot or an environment variable in U-Boot. SOURCE_DATE_EPOCH should be set to a number of seconds since the epoch, in UTC. +SOURCE_DATE_TZ will default to UTC but can be set to another timezone and is +used to determine how the date is displayed (tzselect(1) can be used to +determine an appropriate value). Building the Software: ====================== -- 2.5.0.rc0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ 2015-08-13 6:08 ` [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ Chris Packham @ 2015-08-25 12:09 ` Paul Kocialkowski 2015-08-26 9:08 ` Chris Packham 0 siblings, 1 reply; 10+ messages in thread From: Paul Kocialkowski @ 2015-08-25 12:09 UTC (permalink / raw) To: u-boot Le jeudi 13 ao?t 2015 ? 18:08 +1200, Chris Packham a ?crit : > Along with SOURCE_DATE_EPOCH SOURCE_DATE_TZ can be used to recreate a > build with a specific date timestamp. This allows the verification of > source supplied with a pre-compiled binary. > > If SOURCE_DATE_EPOCH is supplied SOURCE_DATE_TZ can be used to specify > what will appear in the output of the version command. If SOURCE_DATE_TZ > is not specified UTC will be used. SOURCE_DATE_TZ on it's own will not > have an affect. I advise against merging this patch given Ximin Luo's comments on v1, at least until this has been properly discussed with the reproducible team and a precise meaning for it has been agreed on. > Signed-off-by: Chris Packham <judge.packham@gmail.com> > --- > This is a quick proof of concept that allows some control of how the > timezone is displayed. Now you can do something like > > make SOURCE_DATE_EPOCH=12345678 SOURCE_DATE_TZ=America/Los_Angeles > > > Changes in v3: > - Drop RFC > > Changes in v2: None > > Makefile | 7 ++++--- > README | 9 ++++++--- > 2 files changed, 10 insertions(+), 6 deletions(-) > > diff --git a/Makefile b/Makefile > index 3ff063a..609b595 100644 > --- a/Makefile > +++ b/Makefile > @@ -1281,9 +1281,10 @@ endef > define filechk_timestamp.h > (if test -n "$${SOURCE_DATE_EPOCH}"; then \ > SOURCE_DATE="@$${SOURCE_DATE_EPOCH}"; \ > - LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ > - LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \ > - LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \ > + SOURCE_TZ="$${SOURCE_DATE_TZ:-UTC}"; \ > + TZ="$${SOURCE_TZ}" LC_ALL=C date -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ > + TZ="$${SOURCE_TZ}" LC_ALL=C date -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \ > + TZ="$${SOURCE_TZ}" LC_ALL=C date -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \ > else \ > LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \ > LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \ > diff --git a/README b/README > index 1bcb63c..d2e3e94 100644 > --- a/README > +++ b/README > @@ -5087,11 +5087,14 @@ Reproducible builds > In order to achieve reproducible builds, timestamps used in the U-Boot build > process have to be set to a fixed value. > > -This is done using the SOURCE_DATE_EPOCH environment variable. > -SOURCE_DATE_EPOCH is to be set on the build host's shell, not as a configuration > -option for U-Boot or an environment variable in U-Boot. > +This is done using the SOURCE_DATE_EPOCH and SOURCE_DATE_TZ environment > +variables. These are to be set on the build host's shell, not as a > +configuration option for U-Boot or an environment variable in U-Boot. > > SOURCE_DATE_EPOCH should be set to a number of seconds since the epoch, in UTC. > +SOURCE_DATE_TZ will default to UTC but can be set to another timezone and is > +used to determine how the date is displayed (tzselect(1) can be used to > +determine an appropriate value). > > Building the Software: > ====================== -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150825/e66d5b0a/attachment.sig> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ 2015-08-25 12:09 ` Paul Kocialkowski @ 2015-08-26 9:08 ` Chris Packham 2015-08-26 9:29 ` [U-Boot] about reproducible builds (was Re: [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ) Holger Levsen ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Chris Packham @ 2015-08-26 9:08 UTC (permalink / raw) To: u-boot On Wed, Aug 26, 2015 at 12:09 AM, Paul Kocialkowski <contact@paulk.fr> wrote: > Le jeudi 13 ao?t 2015 ? 18:08 +1200, Chris Packham a ?crit : >> Along with SOURCE_DATE_EPOCH SOURCE_DATE_TZ can be used to recreate a >> build with a specific date timestamp. This allows the verification of >> source supplied with a pre-compiled binary. >> >> If SOURCE_DATE_EPOCH is supplied SOURCE_DATE_TZ can be used to specify >> what will appear in the output of the version command. If SOURCE_DATE_TZ >> is not specified UTC will be used. SOURCE_DATE_TZ on it's own will not >> have an affect. > > I advise against merging this patch given Ximin Luo's comments on v1, at > least until this has been properly discussed with the reproducible team > and a precise meaning for it has been agreed on. > I'm happy to go along with that. 1/2 of this series was the "fix". 2/2 just kind of came up as part of the discussion that followed. Tom, can you handle that or do you want me to send a v4 of the series with just the first patch? Just for my own understanding is the "reproducible team" a u-boot thing or a debian thing? I'm not really active in any of the debian projects so maybe someone there should pick this up if it's a debian thing. >> Signed-off-by: Chris Packham <judge.packham@gmail.com> >> --- >> This is a quick proof of concept that allows some control of how the >> timezone is displayed. Now you can do something like >> >> make SOURCE_DATE_EPOCH=12345678 SOURCE_DATE_TZ=America/Los_Angeles >> >> >> Changes in v3: >> - Drop RFC >> >> Changes in v2: None >> >> Makefile | 7 ++++--- >> README | 9 ++++++--- >> 2 files changed, 10 insertions(+), 6 deletions(-) >> >> diff --git a/Makefile b/Makefile >> index 3ff063a..609b595 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -1281,9 +1281,10 @@ endef >> define filechk_timestamp.h >> (if test -n "$${SOURCE_DATE_EPOCH}"; then \ >> SOURCE_DATE="@$${SOURCE_DATE_EPOCH}"; \ >> - LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ >> - LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \ >> - LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \ >> + SOURCE_TZ="$${SOURCE_DATE_TZ:-UTC}"; \ >> + TZ="$${SOURCE_TZ}" LC_ALL=C date -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ >> + TZ="$${SOURCE_TZ}" LC_ALL=C date -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \ >> + TZ="$${SOURCE_TZ}" LC_ALL=C date -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \ >> else \ >> LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \ >> LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \ >> diff --git a/README b/README >> index 1bcb63c..d2e3e94 100644 >> --- a/README >> +++ b/README >> @@ -5087,11 +5087,14 @@ Reproducible builds >> In order to achieve reproducible builds, timestamps used in the U-Boot build >> process have to be set to a fixed value. >> >> -This is done using the SOURCE_DATE_EPOCH environment variable. >> -SOURCE_DATE_EPOCH is to be set on the build host's shell, not as a configuration >> -option for U-Boot or an environment variable in U-Boot. >> +This is done using the SOURCE_DATE_EPOCH and SOURCE_DATE_TZ environment >> +variables. These are to be set on the build host's shell, not as a >> +configuration option for U-Boot or an environment variable in U-Boot. >> >> SOURCE_DATE_EPOCH should be set to a number of seconds since the epoch, in UTC. >> +SOURCE_DATE_TZ will default to UTC but can be set to another timezone and is >> +used to determine how the date is displayed (tzselect(1) can be used to >> +determine an appropriate value). >> >> Building the Software: >> ====================== > ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] about reproducible builds (was Re: [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ) 2015-08-26 9:08 ` Chris Packham @ 2015-08-26 9:29 ` Holger Levsen 2015-08-26 10:01 ` [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ Paul Kocialkowski 2015-08-27 11:50 ` Tom Rini 2 siblings, 0 replies; 10+ messages in thread From: Holger Levsen @ 2015-08-26 9:29 UTC (permalink / raw) To: u-boot Hi Chris, On Mittwoch, 26. August 2015, Chris Packham wrote: > Just for my own understanding is the "reproducible team" a u-boot > thing or a debian thing? I'm not really active in any of the debian > projects so maybe someone there should pick this up if it's a debian > thing. the "reproducible team" so far involved has indeed been the "Debian reproducible builds team", but we care about free software in general and we also think that reproducible builds shall become the norm one day. very short one paragraph summary: With free software, anyone can inspect the source code for malicious flaws. But Debian like most distributions provides binary packages to its users. The idea of ?deterministic? or ?reproducible? builds is to empower anyone to verify that no flaws have been introduced during the build process by reproducing byte-for-byte identical binary packages from a given source. for a longer summary you might want to watch http://media.ccc.de/browse/conferences/camp2015/camp2015-6657-how_to_make_your_software_build_reproducibly.html or http://media.ccc.de/browse/congress/2014/31c3_-_6240_-_en_-_saal_g_-_201412271400_-_reproducible_builds_-_mike_perry_-_seth_schoen_-_hans_steiner.html - the latter explains the motivation behind our work in greater detail. Or you can also read about this, https://wiki.debian.org/ReproducibleBuilds/About (alone, the wiki has much more information on other pages as well) has the following contents: Why do we want reproducible builds? Reproducing builds Recording the environment Reproduce the build environment References Presentations Publicity Related projects Further work Last but not least, the Debian reproducible builds team has also been investigating other projects, see eg https://reproducible.debian.net/openwrt/ https://reproducible.debian.net/netbsd/ https://reproducible.debian.net/coreboot/ (and more will be coming.) cheers, Holger -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 828 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150826/5f3d3002/attachment.sig> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ 2015-08-26 9:08 ` Chris Packham 2015-08-26 9:29 ` [U-Boot] about reproducible builds (was Re: [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ) Holger Levsen @ 2015-08-26 10:01 ` Paul Kocialkowski 2015-08-27 11:50 ` Tom Rini 2 siblings, 0 replies; 10+ messages in thread From: Paul Kocialkowski @ 2015-08-26 10:01 UTC (permalink / raw) To: u-boot Le mercredi 26 ao?t 2015 ? 21:08 +1200, Chris Packham a ?crit : > On Wed, Aug 26, 2015 at 12:09 AM, Paul Kocialkowski <contact@paulk.fr> wrote: > > Le jeudi 13 ao?t 2015 ? 18:08 +1200, Chris Packham a ?crit : > >> Along with SOURCE_DATE_EPOCH SOURCE_DATE_TZ can be used to recreate a > >> build with a specific date timestamp. This allows the verification of > >> source supplied with a pre-compiled binary. > >> > >> If SOURCE_DATE_EPOCH is supplied SOURCE_DATE_TZ can be used to specify > >> what will appear in the output of the version command. If SOURCE_DATE_TZ > >> is not specified UTC will be used. SOURCE_DATE_TZ on it's own will not > >> have an affect. > > > > I advise against merging this patch given Ximin Luo's comments on v1, at > > least until this has been properly discussed with the reproducible team > > and a precise meaning for it has been agreed on. > > > > I'm happy to go along with that. 1/2 of this series was the "fix". 2/2 > just kind of came up as part of the discussion that followed. Tom, can > you handle that or do you want me to send a v4 of the series with just > the first patch? > > Just for my own understanding is the "reproducible team" a u-boot > thing or a debian thing? I'm not really active in any of the debian > projects so maybe someone there should pick this up if it's a debian > thing. Well, I'm referring to the reproducible team at Debian, but since they're working with upstream (and they're apparently the only group of people to do that work), I think it's fair to say they're the reference when it comes to reproducible builds. > >> Signed-off-by: Chris Packham <judge.packham@gmail.com> > >> --- > >> This is a quick proof of concept that allows some control of how the > >> timezone is displayed. Now you can do something like > >> > >> make SOURCE_DATE_EPOCH=12345678 SOURCE_DATE_TZ=America/Los_Angeles > >> > >> > >> Changes in v3: > >> - Drop RFC > >> > >> Changes in v2: None > >> > >> Makefile | 7 ++++--- > >> README | 9 ++++++--- > >> 2 files changed, 10 insertions(+), 6 deletions(-) > >> > >> diff --git a/Makefile b/Makefile > >> index 3ff063a..609b595 100644 > >> --- a/Makefile > >> +++ b/Makefile > >> @@ -1281,9 +1281,10 @@ endef > >> define filechk_timestamp.h > >> (if test -n "$${SOURCE_DATE_EPOCH}"; then \ > >> SOURCE_DATE="@$${SOURCE_DATE_EPOCH}"; \ > >> - LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ > >> - LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \ > >> - LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \ > >> + SOURCE_TZ="$${SOURCE_DATE_TZ:-UTC}"; \ > >> + TZ="$${SOURCE_TZ}" LC_ALL=C date -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ > >> + TZ="$${SOURCE_TZ}" LC_ALL=C date -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \ > >> + TZ="$${SOURCE_TZ}" LC_ALL=C date -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \ > >> else \ > >> LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \ > >> LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \ > >> diff --git a/README b/README > >> index 1bcb63c..d2e3e94 100644 > >> --- a/README > >> +++ b/README > >> @@ -5087,11 +5087,14 @@ Reproducible builds > >> In order to achieve reproducible builds, timestamps used in the U-Boot build > >> process have to be set to a fixed value. > >> > >> -This is done using the SOURCE_DATE_EPOCH environment variable. > >> -SOURCE_DATE_EPOCH is to be set on the build host's shell, not as a configuration > >> -option for U-Boot or an environment variable in U-Boot. > >> +This is done using the SOURCE_DATE_EPOCH and SOURCE_DATE_TZ environment > >> +variables. These are to be set on the build host's shell, not as a > >> +configuration option for U-Boot or an environment variable in U-Boot. > >> > >> SOURCE_DATE_EPOCH should be set to a number of seconds since the epoch, in UTC. > >> +SOURCE_DATE_TZ will default to UTC but can be set to another timezone and is > >> +used to determine how the date is displayed (tzselect(1) can be used to > >> +determine an appropriate value). > >> > >> Building the Software: > >> ====================== > > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150826/39380ba1/attachment.sig> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ 2015-08-26 9:08 ` Chris Packham 2015-08-26 9:29 ` [U-Boot] about reproducible builds (was Re: [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ) Holger Levsen 2015-08-26 10:01 ` [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ Paul Kocialkowski @ 2015-08-27 11:50 ` Tom Rini 2 siblings, 0 replies; 10+ messages in thread From: Tom Rini @ 2015-08-27 11:50 UTC (permalink / raw) To: u-boot On Wed, Aug 26, 2015 at 09:08:03PM +1200, Chris Packham wrote: > On Wed, Aug 26, 2015 at 12:09 AM, Paul Kocialkowski <contact@paulk.fr> wrote: > > Le jeudi 13 ao?t 2015 ? 18:08 +1200, Chris Packham a ?crit : > >> Along with SOURCE_DATE_EPOCH SOURCE_DATE_TZ can be used to recreate a > >> build with a specific date timestamp. This allows the verification of > >> source supplied with a pre-compiled binary. > >> > >> If SOURCE_DATE_EPOCH is supplied SOURCE_DATE_TZ can be used to specify > >> what will appear in the output of the version command. If SOURCE_DATE_TZ > >> is not specified UTC will be used. SOURCE_DATE_TZ on it's own will not > >> have an affect. > > > > I advise against merging this patch given Ximin Luo's comments on v1, at > > least until this has been properly discussed with the reproducible team > > and a precise meaning for it has been agreed on. > > > > I'm happy to go along with that. 1/2 of this series was the "fix". 2/2 > just kind of came up as part of the discussion that followed. Tom, can > you handle that or do you want me to send a v4 of the series with just > the first patch? I'll pick up just the first patch for now, shortly. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150827/0faa0a61/attachment.sig> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v3 1/2] Makefile: Use correct timezone for U_BOOT_TZ 2015-08-13 6:08 [U-Boot] [PATCH v3 1/2] Makefile: Use correct timezone for U_BOOT_TZ Chris Packham 2015-08-13 6:08 ` [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ Chris Packham @ 2015-08-25 10:22 ` Andreas Bießmann 2015-08-25 12:10 ` Paul Kocialkowski 2015-08-28 21:02 ` [U-Boot] [U-Boot, v3, " Tom Rini 3 siblings, 0 replies; 10+ messages in thread From: Andreas Bießmann @ 2015-08-25 10:22 UTC (permalink / raw) To: u-boot On 08/13/2015 08:08 AM, Chris Packham wrote: > When building with SOURCE_DATE_EPOCH the timezone is in UTC. When > building normally the timezone is taken from the build machine's locale > setting. > > Signed-off-by: Chris Packham <judge.packham@gmail.com> > Tested-by: Bin Meng <bmeng.cn@gmail.com> > Tested-by: Paul Kocialkowski <contact@paulk.fr> This also re-enables normal building on *BSD style hosts. Tested-by: Andreas Bie?mann <andreas.devel@googlemail.com> > --- > > Changes in v3: > - None > > Changes in v2: > - Collect some tested-by tags > - Remove reference to f3f431a71272 in the commit message > - Drop Ccs that were erroneously added when submitting v1, remaining Ccs > are from the original mailing list thread > > Makefile | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/Makefile b/Makefile > index ad51e60..3ff063a 100644 > --- a/Makefile > +++ b/Makefile > @@ -1279,10 +1279,16 @@ define filechk_version.h > endef > > define filechk_timestamp.h > - (SOURCE_DATE="$${SOURCE_DATE_EPOCH:+@$$SOURCE_DATE_EPOCH}"; \ > - LC_ALL=C date -u -d "$${SOURCE_DATE:-now}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ > - LC_ALL=C date -u -d "$${SOURCE_DATE:-now}" +'#define U_BOOT_TIME "%T"'; \ > - LC_ALL=C date -u -d "$${SOURCE_DATE:-now}" +'#define U_BOOT_TZ "%z"' ) > + (if test -n "$${SOURCE_DATE_EPOCH}"; then \ > + SOURCE_DATE="@$${SOURCE_DATE_EPOCH}"; \ > + LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ > + LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \ > + LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \ > + else \ > + LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \ > + LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \ > + LC_ALL=C date +'#define U_BOOT_TZ "%z"'; \ > + fi) > endef > > $(version_h): include/config/uboot.release FORCE > ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v3 1/2] Makefile: Use correct timezone for U_BOOT_TZ 2015-08-13 6:08 [U-Boot] [PATCH v3 1/2] Makefile: Use correct timezone for U_BOOT_TZ Chris Packham 2015-08-13 6:08 ` [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ Chris Packham 2015-08-25 10:22 ` [U-Boot] [PATCH v3 1/2] Makefile: Use correct timezone for U_BOOT_TZ Andreas Bießmann @ 2015-08-25 12:10 ` Paul Kocialkowski 2015-08-28 21:02 ` [U-Boot] [U-Boot, v3, " Tom Rini 3 siblings, 0 replies; 10+ messages in thread From: Paul Kocialkowski @ 2015-08-25 12:10 UTC (permalink / raw) To: u-boot Le jeudi 13 ao?t 2015 ? 18:08 +1200, Chris Packham a ?crit : > When building with SOURCE_DATE_EPOCH the timezone is in UTC. When > building normally the timezone is taken from the build machine's locale > setting. Looks good to me! > Signed-off-by: Chris Packham <judge.packham@gmail.com> > Tested-by: Bin Meng <bmeng.cn@gmail.com> > Tested-by: Paul Kocialkowski <contact@paulk.fr> > --- > > Changes in v3: > - None > > Changes in v2: > - Collect some tested-by tags > - Remove reference to f3f431a71272 in the commit message > - Drop Ccs that were erroneously added when submitting v1, remaining Ccs > are from the original mailing list thread > > Makefile | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/Makefile b/Makefile > index ad51e60..3ff063a 100644 > --- a/Makefile > +++ b/Makefile > @@ -1279,10 +1279,16 @@ define filechk_version.h > endef > > define filechk_timestamp.h > - (SOURCE_DATE="$${SOURCE_DATE_EPOCH:+@$$SOURCE_DATE_EPOCH}"; \ > - LC_ALL=C date -u -d "$${SOURCE_DATE:-now}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ > - LC_ALL=C date -u -d "$${SOURCE_DATE:-now}" +'#define U_BOOT_TIME "%T"'; \ > - LC_ALL=C date -u -d "$${SOURCE_DATE:-now}" +'#define U_BOOT_TZ "%z"' ) > + (if test -n "$${SOURCE_DATE_EPOCH}"; then \ > + SOURCE_DATE="@$${SOURCE_DATE_EPOCH}"; \ > + LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ > + LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \ > + LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \ > + else \ > + LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \ > + LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \ > + LC_ALL=C date +'#define U_BOOT_TZ "%z"'; \ > + fi) > endef > > $(version_h): include/config/uboot.release FORCE -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150825/ed009170/attachment.sig> ^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [U-Boot, v3, 1/2] Makefile: Use correct timezone for U_BOOT_TZ 2015-08-13 6:08 [U-Boot] [PATCH v3 1/2] Makefile: Use correct timezone for U_BOOT_TZ Chris Packham ` (2 preceding siblings ...) 2015-08-25 12:10 ` Paul Kocialkowski @ 2015-08-28 21:02 ` Tom Rini 3 siblings, 0 replies; 10+ messages in thread From: Tom Rini @ 2015-08-28 21:02 UTC (permalink / raw) To: u-boot On Thu, Aug 13, 2015 at 06:08:27PM +1200, Chris Packham wrote: > When building with SOURCE_DATE_EPOCH the timezone is in UTC. When > building normally the timezone is taken from the build machine's locale > setting. > > Signed-off-by: Chris Packham <judge.packham@gmail.com> > Tested-by: Bin Meng <bmeng.cn@gmail.com> > Tested-by: Paul Kocialkowski <contact@paulk.fr> > Tested-by: Andreas Bie?mann <andreas.devel@googlemail.com> Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150828/0b54cbe3/attachment.sig> ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-08-28 21:02 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-08-13 6:08 [U-Boot] [PATCH v3 1/2] Makefile: Use correct timezone for U_BOOT_TZ Chris Packham 2015-08-13 6:08 ` [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ Chris Packham 2015-08-25 12:09 ` Paul Kocialkowski 2015-08-26 9:08 ` Chris Packham 2015-08-26 9:29 ` [U-Boot] about reproducible builds (was Re: [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ) Holger Levsen 2015-08-26 10:01 ` [U-Boot] [PATCH v3 2/2] Makefile: Add SOURCE_DATE_TZ Paul Kocialkowski 2015-08-27 11:50 ` Tom Rini 2015-08-25 10:22 ` [U-Boot] [PATCH v3 1/2] Makefile: Use correct timezone for U_BOOT_TZ Andreas Bießmann 2015-08-25 12:10 ` Paul Kocialkowski 2015-08-28 21:02 ` [U-Boot] [U-Boot, v3, " Tom Rini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox