public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Jan-Simon Möller" <dl9pf@gmx.de>
To: openembedded-core@lists.openembedded.org
Cc: "Jan-Simon Möller" <jsmoeller@linuxfoundation.org>
Subject: [PATCH] oe-selftests: add rpm to reproducible build selftest
Date: Wed, 17 Feb 2021 12:57:57 +0100	[thread overview]
Message-ID: <20210217115757.18324-1-dl9pf@gmx.de> (raw)

From: Jan-Simon Möller <jsmoeller@linuxfoundation.org>

rpm packaging has shown good numbers wrt reproducible builds as well
when testing core-image-minimal locally:

 Reproducibility summary for rpm: same=4671 different=0 missing=0 total=4671

Thus enable it in the autobuilder to be more widely tested.

v2: also add the define for "use_source_date_epoch_as_buildtime 1"

Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
---
 meta/classes/package_rpm.bbclass             | 1 +
 meta/lib/oeqa/selftest/cases/reproducible.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index c48bece742..c1824306ee 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -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 + "'"
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 0963c2f11a..9785c5ffac 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -173,7 +173,7 @@ class DiffoscopeTests(OESelftestTestCase):
             self.assertTrue(os.path.exists(os.path.join(tmpdir, 'index.html')), "HTML index not found!")

 class ReproducibleTests(OESelftestTestCase):
-    package_classes = ['deb', 'ipk']
+    package_classes = ['deb', 'ipk', 'rpm']
     images = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'world']
     save_results = False
     if 'OEQA_DEBUGGING_SAVED_OUTPUT' in os.environ:
--
2.30.0


             reply	other threads:[~2021-02-17 11:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17 11:57 Jan-Simon Möller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-02-16 18:28 [PATCH] oe-selftests: add rpm to reproducible build selftest Jan-Simon Möller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210217115757.18324-1-dl9pf@gmx.de \
    --to=dl9pf@gmx.de \
    --cc=jsmoeller@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox