]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
reproducible_build.bbclass: support for binary reproducibility
authorJuro Bystricky <juro.bystricky@intel.com>
Tue, 20 Mar 2018 22:34:19 +0000 (15:34 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 25 Mar 2018 08:40:42 +0000 (09:40 +0100)
commitcf6f3c023cfa731ce061949135e255458d474964
treedd569929bfc225460f0c845b7d887c82a030bd8a
parent7cd6442613353b93ab6a2fe8f0dd6f2c9fa18afb
reproducible_build.bbclass: support for binary reproducibility

Setup environment for builds requiring binary reproducibility.
Determine and export SOURCE_DATE_EPOCH per each recipe.
This is a crucial step to achieve binary reproducibility.
The value for this variable (timestamp) is obtained after source code for
a recipe has been unpacked, but before it is patched. If the code sources
come from a GIT repo, we get the timestamp from the top commit. (GIT repo
does not preserve file mktime timestamps). Otherwise, if GIT repo is not
present, we try to get mtime from known files such as NEWS, ChangeLog, etc.
If this also fails, we go through all files and get the timestamp from the
youngest one. We create an individual timestamp for each recipe.
The timestamp is stored in the file '__source_date_epoch.txt' (in the folder
source-date-epoch_). Later on, each task reads this file and sets
the exported value of SOURCE_DATE_EPOCH to the value found in the file.

Uasge:

INHERIT += "reproducible_build"

[YOCTO#11178]
[YOCTO#11179]

(From OE-Core rev: cc438ac7711dedbe05d654e99af9316c9215b02e)

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