aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2018-01-04 12:01:13 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-05 11:54:57 +0000
commit225a7156d1fb2fbffadf38e4f4e491f053358082 (patch)
treee7f4def22fc8352d89910038719d70726abbc20a
parent22495951d4caaaf1ead219be8cfad3311cebebff (diff)
downloadopenembedded-core-contrib-225a7156d1fb2fbffadf38e4f4e491f053358082.tar.gz
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. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/package_rpm.bbclass1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 1deaf832da..b08608c846 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -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 + "'"