package_rpm.bbclass: clamp timestamps

Improve binary reproducibility of RPM packages.
Ensure timestamps in RPM packages are not later than the value
of SOURCE_DATE_EPOCH. If SOURCE_DATE_EPOCH is not set,
timestamps are not clamped.

(From OE-Core rev: 225a7156d1fb2fbffadf38e4f4e491f053358082)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Juro Bystricky
2018-01-04 12:01:13 -08:00
committed by Richard Purdie
parent 5c7f48c9c0
commit 528ea78fb2

View File

@@ -668,6 +668,7 @@ python do_package_rpm () {
cmd = cmd + " --define '_build_id_links none'"
cmd = cmd + " --define '_binary_payload w6T.xzdio'"
cmd = cmd + " --define '_source_payload w6T.xzdio'"
cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
if perfiledeps:
cmd = cmd + " --define '__find_requires " + outdepends + "'"
cmd = cmd + " --define '__find_provides " + outprovides + "'"