]> 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)
committerSteve Sakoman <steve@sakoman.com>
Thu, 4 Mar 2021 14:19:49 +0000 (04:19 -1000)
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>
(cherry picked from commit f16721df6b3d0d3e681d9a1b3393417bd62b6275)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/package_rpm.bbclass

index 9145717f98ad979d93e3bc86507c8e560c9abc80..95731c7d8d584dd2bd97420844043e221a232131 100644 (file)
@@ -681,6 +681,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 + "'"