summaryrefslogtreecommitdiffstats
path: root/meta/classes/reproducible_build.bbclass
AgeCommit message (Collapse)Author
2018-03-25reproducible_build.bbclass: support for binary reproducibilityJuro Bystricky
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] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>