public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Mark Hatle" <mark.hatle@kernel.crashing.org>
To: openembedded-core@lists.openembedded.org
Subject: [master][PATCH v2 0/6] Allow PR Service and hash equiv togther
Date: Wed, 26 Aug 2020 06:27:27 -0500	[thread overview]
Message-ID: <20200826112733.52492-1-mark.hatle@kernel.crashing.org> (raw)

v2:

Most comments have been addressed to create a v2 version.  I've refactored
the commits to make a few things more clear, basically moving code around
and fixing minor issues BEFORE the big patch.

Before there were two patches that together implemented the PR Serv/Hash
work.  This has been combined into a single patch and the oe_nohash stuff
has simply been removed as no longer applicable.

The only comment that was NOT addressed in this was the suggestion to
sed the pkgdata files in do_packagedata.  I'm hesitent to do this as
sed with ${...} in them has proven to be fragile for me in the past.  If
we decide that is necessary, I'd suggest we start with this set and then
make that change after this proves to work (or not).

v1:

Before PR service didn't work reliably with hash equivalency.  Generally
you ended up with results that may not be reproducible, even if you
started with the same PR service database and hash equivalency database.

Overtime, intermediate PR values would be created that would cause thing
to get out of sync in the case of certain rebuilds or other corner cases.

The set refactors the PR service to work along side the new hash equiv
system.  It moves the PR and AUTOINC lookup to AFTER the do_package task
is complete.  This allows us to use the do_package unihash for lookup.

Additionally this fixed a small issue with the kernel, where the PR value
could get incremented twice.  The fix is an artifact of the other changes
that cause us to only run the PR service work once per recipe.

This has been tested with the following workflow, which covers one of
the critical corner cases for me:

configure local.conf with:

   BB_HASHSERVE = "auto"
   BB_SIGNATURE_HANDLER = "OEEquivHash"
   
   PRSERV_HOST ??= "localhost:0"
   
   INHERIT += "reproducible_build"
   INHERIT += "buildhistory"

bitbake glibc linux-yocto

# Modify meta/recipes-core/glibc/glibc_2.32.bb, add a comment
# to the do_patch_append().  This will taint the hash of this
# function.

bitbake glibc linux-yocto

# The system should have detected the output was the same, and
# no proceed past do_package in glibc.  The kernel should not
# have built at all.

# Store/mv the tmp and sstate-cache from that build elsewhere
# repeat the run

bitbake glibc linux-yocto

# Compare the results of tmp/deploy/<package>/* between last
# and current run.
#
# The contents should be the same (filenames specifically).
#
# Also the kernel should be r0.0, not r0.1.

Note: if the hash equivalency database or PR server database (located
in the cache directory) is removed, the values may not be the same
as the previous run.

Additionally while testing the various package_*.bbclass files, it
was noted that package_tar.bbclass was not working the same way as
the others.  This was correct as a standalone patch.

Mark Hatle (6):
  package_tar.bbclass: Sync to the other package_* classes
  kernel.bbclass: Remove do_install[prefunc] no longer needed
  buildhistory.bbclass: Rework to use read_subpackage_metadata
  package.bbclass: Move package_get_auto_pr to packagedata.bbclass
  kernel.bbclass: Move away from calling package_get_auto_pr
  package.bbclass: hash equivalency and pr service

 meta/classes/buildhistory.bbclass |  49 ++++++-------
 meta/classes/kernel.bbclass       |   6 +-
 meta/classes/nopackages.bbclass   |   1 +
 meta/classes/package.bbclass      | 111 ++++++++++++++----------------
 meta/classes/package_tar.bbclass  |   6 +-
 meta/classes/packagedata.bbclass  |  68 ++++++++++++++++++
 meta/conf/bitbake.conf            |   1 +
 7 files changed, 148 insertions(+), 94 deletions(-)

-- 
2.17.1


             reply	other threads:[~2020-08-26 11:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26 11:27 Mark Hatle [this message]
2020-08-26 11:27 ` [master][PATCH v2 1/6] package_tar.bbclass: Sync to the other package_* classes Mark Hatle
2020-08-26 11:27 ` [master][PATCH v2 2/6] kernel.bbclass: Remove do_install[prefunc] no longer needed Mark Hatle
2020-08-26 11:27 ` [master][PATCH v2 3/6] buildhistory.bbclass: Rework to use read_subpackage_metadata Mark Hatle
2020-08-26 11:27 ` [master][PATCH v2 4/6] package.bbclass: Move package_get_auto_pr to packagedata.bbclass Mark Hatle
2020-08-26 11:44   ` [OE-core] " Richard Purdie
2020-08-26 12:03     ` Mark Hatle
2020-08-26 11:27 ` [master][PATCH v2 5/6] kernel.bbclass: Move away from calling package_get_auto_pr Mark Hatle
2020-08-26 11:27 ` [master][PATCH v2 6/6] package.bbclass: hash equivalency and pr service Mark Hatle
2020-08-26 11:48 ` [OE-core] [master][PATCH v2 0/6] Allow PR Service and hash equiv togther Richard Purdie
2020-08-26 12:14   ` Mark Hatle
2020-08-26 12:21     ` Richard Purdie

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=20200826112733.52492-1-mark.hatle@kernel.crashing.org \
    --to=mark.hatle@kernel.crashing.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