[OE-core] [PATCH] bitbake.conf: Set and export TZ envvar to UTC

Richard Purdie richard.purdie at linuxfoundation.org
Fri Apr 13 16:17:36 UTC 2018


We just ran into an issue where tar failed to build on one server setup
but built everywhere else just fine.

It was running makeinfo to regenerate some docs files and makeinfo was too
old for the host it was running on. There was no dependency on makeinfo-native
as it was not meant to be regenerating the docs.

It was being regenerated as a date from a timestamp used in the docs
was different in Asian timezones than in the other timezones our builds
were being tested in.

I added an entry to https://wiki.yoctoproject.org/wiki/TipsAndTricks/
about how this was debugged.

As such, lets default to setting and exporting TZ to 'UTC' as was already
pioneered by the reproducibile builds work. This makes the builds
deterministic.

[YOCTO #12665]

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/reproducible_build_simple.bbclass | 1 -
 meta/conf/bitbake.conf                         | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/reproducible_build_simple.bbclass b/meta/classes/reproducible_build_simple.bbclass
index dd11cd9..8a60dee 100644
--- a/meta/classes/reproducible_build_simple.bbclass
+++ b/meta/classes/reproducible_build_simple.bbclass
@@ -4,7 +4,6 @@ BUILD_REPRODUCIBLE_BINARIES = "1"
 
 export PYTHONHASHSEED = "0"
 export PERL_HASH_SEED = "0"
-export TZ = 'UTC'
 export SOURCE_DATE_EPOCH ??= "1520598896"
 
 REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 60590e2..ec3207c 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -539,6 +539,7 @@ export MAKE = "make"
 EXTRA_OEMAKE = ""
 EXTRA_OECONF = ""
 export LC_ALL = "en_US.UTF-8"
+export TZ = 'UTC'
 
 ##################################################################
 # Patch handling.
-- 
2.7.4




More information about the Openembedded-core mailing list