Bug 13378

Summary: native programs from RSS that alias hosttools can cause non-reproducible builds
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Joshua Watt <JPEWhacker>
Component: coreAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, randy.macleod
Version: 0.0.0   
Target Milestone: 5.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Joshua Watt 2019-06-05 19:05:25 UTC
Recipe specific sysroots can result in non-reproducible rebuilds of recipes. The reason for this is that task add to the RSS as they are executed, but there is no way of rolling back these changes if a previous task needs to be reexecuted. This means that a downstream task might add things to the RSS that would have an effect on upstream recipes.

The most common result of this appears to be do_configure steps finding different tools (either from the RSS or from the hosttools) if the recipe RDEPENDS on a package that provides the same tools as the host. For example, the log.do_configure of the "acl" package contains the following line the first time it is run in a clean sandbox:

 checking for sort... /projects/poky/build/reproducible/tmp/hosttools/sort

However, if a dependency changes and the recipe has to be reconfigured, the next time it will find:

 checking for sort... /projects/poky/build/reproducible/tmp/work/core2-32-poky-linux/acl/2.2.52-r0/recipe-sysroot-native/usr/bin/sort

This appears to be because acl RDEPENDS on coreutils, which overrides the hosttools provided sort
Comment 1 Randy MacLeod 2023-04-21 18:45:46 UTC
Moved en masse from 4.2 to 4.3 by Randy.