Bug 13473 - systemd: build isn't reproducible
Summary: systemd: build isn't reproducible
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 0.0.0
Hardware: x86 Multiple
: High normal
Target Milestone: 2.8 M3
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-08-08 15:08 UTC by Ross Burton
Modified: 2019-09-12 14:54 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.