Bug 13473

Summary: systemd: build isn't reproducible
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: High CC: meta.mr.watcher, meta.watcher, richard.purdie
Version: 0.0.0   
Target Milestone: 2.8 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2019-08-08 15:08:16 UTC
The systemd build isn't reproducible because systemd embeds a system time epoch (so that on boot if the RTC isn't set at least the clock is set to the right decade).  This is based on the mtime of NEWS, which in a tarball is static but in a git clone will be the timestamp of the clone.  From meson.build:

time_epoch = get_option('time-epoch')
if time_epoch == -1
        NEWS = files('NEWS')
        time_epoch = run_command(stat, '-c', '%Y', NEWS).stdout().to_int()
endif
conf.set('TIME_EPOCH', time_epoch)

If reproducible builds are enabled, we should set time-epoch to the reproducible build timestamp instead.  This may involve removing the time-epoch PACKAGECONFIG in systemd which doesn't appear to have a purpose.
Comment 1 Ross Burton 2019-09-05 23:05:56 UTC
Patch on the list.
Comment 2 Ross Burton 2019-09-12 14:54:47 UTC
Fixed in oe-core 29afbd4f02354de7103ee3a88f4ce5336b95b88a.