Bug 12706 - sanity.bbclass: test for build host references leakage
Summary: sanity.bbclass: test for build host references leakage
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.5
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 4.99
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-04-22 10:27 UTC by Juro Bystricky
Modified: 2020-01-30 12:38 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juro Bystricky 2018-04-22 10:27:51 UTC
There are numerous cases where various build host references ended up in distributed packages. This is a bug, and some might even argue also a security issue, as build host machine internals may be revealed (i.e. username).
Anyway, these are mostly easy to discover, simply comparing two builds in two different folders (diffoscope recommended).
The leakage falls generally in to these two categories:

1. ptest files: We generally copy Makefile and various additional files generated by "configure" on the build host. If you look at various ptest recipes, virtually all of them use "sed" to remove references to "HOSTTOOLS", "recipe-sysroot" etc. Not all references are caught all the time, hecnce a snity test would help here.

2. Debug packages: We use "-fdebug-prefix-map" to remove build host references. 
However, some recipes may need more fine-tuning (i.e. glibc) as not all references are covered. This can cause additional reproducibility issues: if -dbg packages are binary different, then gnu-debug-link contains different checksum in packages referencing the debug packages as well, hence causing non-debug packages to be binary different as well. This is easily observed with MACHINE such as qemuarm, gemumips. 

I am not sure about performance hit of the new sanity checks. If the performance hit is deemed unacceptable, maybe a conditional checks (i.e. only when BUILD_REPRODUCIBLE_BINARIES=1) will be an option.
Comment 1 Juro Bystricky 2018-04-23 14:43:18 UTC
So basically files need to checked for embedded ${WORKDIR}
Comment 2 Ross Burton 2020-01-30 12:38:33 UTC
This is done if you enable the build-paths QA test.