]> code.ossystems Code Review - openembedded-core.git/commitdiff
reproducible_build_simple.bbclass: simple environment for reproducible binaries
authorJuro Bystricky <juro.bystricky@intel.com>
Sat, 10 Mar 2018 18:57:49 +0000 (10:57 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 12 Mar 2018 22:05:58 +0000 (15:05 -0700)
Export environmental variables needed for binary reproducibility with consistent values.

This class can be used either directly via:
INHERIT += "reproducible_build_simple"

or can be inherited by a more complex/complete bbclass, for example a bblass which
will crack SOURCE_DATE_EPOCH for each recipe.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/reproducible_build_simple.bbclass [new file with mode: 0644]

diff --git a/meta/classes/reproducible_build_simple.bbclass b/meta/classes/reproducible_build_simple.bbclass
new file mode 100644 (file)
index 0000000..dd11cd9
--- /dev/null
@@ -0,0 +1,11 @@
+# Setup default environment for reproducible builds.
+
+BUILD_REPRODUCIBLE_BINARIES = "1"
+
+export PYTHONHASHSEED = "0"
+export PERL_HASH_SEED = "0"
+export TZ = 'UTC'
+export SOURCE_DATE_EPOCH ??= "1520598896"
+
+REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896"
+