]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_rpm: Enable use_source_date_epoch_as_buildtime in package_rpm class
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Thu, 18 Feb 2021 14:25:16 +0000 (15:25 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 19 Feb 2021 10:59:57 +0000 (10:59 +0000)
Adding --define 'use_source_date_epoch_as_buildtime 1' to rpmbuild
ensure that the rpm header does have a consistent BUILDTIME tag.

This allows the rpms to be built reproducibly.

Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_rpm.bbclass

index c48bece7428976090cc314f8b22303dbd56947fa..c1824306ee6499df4a307e41b03a5276f3383adf 100644 (file)
@@ -687,6 +687,7 @@ python do_package_rpm () {
     cmd = cmd + " --define '_binary_payload w6T.xzdio'"
     cmd = cmd + " --define '_source_payload w6T.xzdio'"
     cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
+    cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'"
     cmd = cmd + " --define '_buildhost reproducible'"
     if perfiledeps:
         cmd = cmd + " --define '__find_requires " + outdepends + "'"