Bug 11176

Summary: Add optional command to rootfs-postprocess to remove non-determinism from rootfs
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Joshua Lock <joshuagloe>
Component: coreAssignee: Juro Bystricky <juro.bystricky>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, randy.macleod
Version: 2.4   
Target Milestone: 2.5 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Joshua Lock 2017-03-17 15:02:31 UTC
Add optional post-process command to use strip-nondeterminism to remove sources of non-derterminism from the rootfs.

This will provide an optional "hammer" to improve the determinism of the system's output whilst we continue to work on the wider problem of reproducible builds with the Yocto Project.

Post-processing a rootfs with strip-nondeterminism will provide immediate benefits to users of the system performing file-based updates (i.e. we'll be better able to produce a new rootfs for processing by OSTree which only includes real changes, not just changes introduced by non-determinism).
Comment 1 Juro Bystricky 2017-08-30 23:30:13 UTC
Sent a patch to ML:
https://patchwork.openembedded.org/patch/143063/
Comment 2 Juro Bystricky 2018-01-24 22:29:26 UTC
Still in review...
Comment 3 Juro Bystricky 2018-04-18 18:22:05 UTC
Merged:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b8ce7d0800dc63db2786e2761b7ac97f7b59cd06

Basically, the new code executes at the very end of do_rootfs.
At present, it modifies some timestamps/mktime of some files to achieve
deterministic outcome. There may be other actions required eventually, but this was enough to build deterministic rootfs for core-image-minimal.