Bug 13515

Summary: reproducible QA: Verify final images are binary identical
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Joshua Watt <JPEWhacker>
Component: coreAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Medium CC: jacob.kroon, meta.mr.watcher, meta.watcher, randy.macleod, tim.orling
Version: unspecified   
Target Milestone: 6.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Joshua Watt 2019-09-10 21:15:00 UTC
In addition to verifying that the final produced packages are binary identical, the reproducible build QA test should also verify that the final produced images (e.g. core-image-minimal, core-image-sato) are identical. Note that for some image types, this should be easy but for some (e.g. squashfs) it may require work to make the image generation tools product reproducible output in the first place.
Comment 1 Jacob Kroon 2020-02-19 17:21:36 UTC
For vfat images, mkfs.vfat has an "--invariant" flag which helps when creating reproducible images.

For ext2/3/4, mkfs.ext* has support for two undocumented features:
  1. Setting env. variable E2FSPROGS_FAKE_TIME to a specific nbr. of seconds.
     Helps with setting file-system creation date.
  2. Passing -E hash_seed=<directory-hash-seed>.
Also, passing "-U clear" makes the UUID reproducible.
Comment 2 Jacob Kroon 2020-02-23 16:21:40 UTC
For ext4, "debugfs" can be used to reset ctime/atime/mtime for files in an image.
Comment 3 Randy MacLeod 2023-04-21 18:45:47 UTC
Moved en masse from 4.2 to 4.3 by Randy.