Skip to contentSkip to conversation

reproducible_build_simple.bbclass: simple environment for reproducible binaries

PATCH New Juro Bystricky 1 participant 1 message Mar 10, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reproducible_build_simple.bbclass: simple environment for reproducible binaries

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.

---
 meta/classes/reproducible_build_simple.bbclass | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 meta/classes/reproducible_build_simple.bbclass
meta/classes/reproducible_build_simple.bbclass new file +11 -0
new file mode 100644
index 0000000..dd11cd9
@@ -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"
+
Signature · 1 line
2.7.4