[Buildroot] [PATCH 02/34] reproducibility: override locale and timezone
Gilles Chanteperdrix
gilles.chanteperdrix at xenomai.org
Tue Jun 14 13:53:56 UTC 2016
On Sat, May 07, 2016 at 03:15:50PM +0200, Thomas Petazzoni wrote:
> Hello,
>
> On Sat, 30 Apr 2016 09:48:58 +0200, Gilles Chanteperdrix wrote:
> > ---
> > Makefile | 7 +++++++
> > 1 file changed, 7 insertions(+)
>
> Missing SoB.
>
> > diff --git a/Makefile b/Makefile
> > index ec7dccb..86b2ed2 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -218,6 +218,13 @@ ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
> > -include $(BR2_CONFIG)
> > endif
> >
> > +export BR2_REPRODUCIBLE
>
> Why ?
So that it can be used in scripts. Like wrappers script. In order to
know if we should take special actions because we are targeting a
reproducible build.
>
> > +ifeq ($(BR2_REPRODUCIBLE),y)
> > +export TZ=UTC
> > +export LANG=C
> > +export LC_ALL=C
> > +endif
>
> Regarding overriding TZ, LANG and LC_ALL, I'm wondering if we shouldn't
> do it unconditionally, regardless of the value of BR2_REPRODUCIBLE.
> What is the benefit of leaving those variable to their value from the
> build environment?
Obviously:
- having dates printed for your local timezone (like build timestamps
if you do not want a reproducible build). I do not know about you,
but I would hate to have to convert a build timestamp from UTC to
local timezone in order to see if I am running the binary I think I
am running.
- having compiler messages printed in your locale, if you set the
locale, it is probably what you want.
--
Gilles.
https://click-hack.org
More information about the buildroot
mailing list