Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] Example of how prebuilt binaries and locked sstate could work
@ 2020-11-01 12:53 Richard Purdie
  2020-11-01 12:53 ` [PATCH 1/2] sstate: Promote do_install to an sstate test Richard Purdie
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Richard Purdie @ 2020-11-01 12:53 UTC (permalink / raw)
  To: openembedded-core; +Cc: Nicolas Dechesne, Viswanath Kraleti

At the Yocto Project Summit, there was some talk about how prebuilt binaries could
be better supported. There was some discussion about how "locked sstate" could 
actually handle this quite neatly. I thought I'd have a look at that and came up 
with a few patches to illustrate what I was talking about.

Rather than talk about this in abstract terms, I've written this up as an oeqa
selftest, you can run it as "oe-selftest -r binaryonly". The selftest patch commit
message contains information about the example "binaryonly" implementation.

This series is a proof of concept and there are a list of known issues:

This patch series depends upon:
 * the libxcb owner/group fix I sent out
 * a bitbake patch to siggen in bitbake master-next to remove what I think is a 
   misfunctioning optimisation to get_unihash
 * a fix to sstatesig in OE-Core master-next to adapt to the above bitbake fix

This series contains a patch to enable sstate for do_install globally. As noted
in the patch, whilst it builds, there are some rules missing to make it work 
optimially.

There is a bug in the way locked hashes were being handled by dependent tasks. The
two patches in master-next mentioned above are attempts to try and fix that, they 
certainly make this selftest work but I have concerns they may break something else.
I'm therefore performing wider autobuilder testing to see if that shows any issues.

The proof of concept here isn't 100% complete. In particular:

* We need a more generic/usable way to lock/unlock specific tasks in recipes,
  the test just generates a file of the right format for now to show how it works.
* A warning is shown for the locked recipe. We need a way to specify not to warn
  for a specific list of recipes.
* If the sstate object the recipe is locked to is unavailable it will currently
  fail the build obtusely. We need to write some kind of user readable error.
* There is no mechanism to ship specific sstate within a layer, we'd probably
  need one for this. The existing mirror syntax will probably help/work.
* The source date epoch and populate_lic tasks need to be properly handled, I've
  just ignored them in this demo.

I'd note that the BBPATH trick to enable/disable the source build could be done
as separate layers, I just didn't want to add multiple layers to OE-Core just for
this. The reason for this trick is that in many cases, the URLs and build process
for the source needs to be kept separate and not disclosed. That source inc is 
therefore designed to be seperable.

Richard Purdie (2):
  sstate: Promote do_install to an sstate test
  selftest: Add binaryonly example and selftest

 .../xz-binaryonly-src.inc                     | 16 +++++++++
 meta-selftest/classes/binaryonly-src.bbclass  |  9 +++++
 meta-selftest/classes/binaryonly.bbclass      |  9 +++++
 .../xz-binaryonly/xz-binaryonly_5.2.5.bb      | 36 +++++++++++++++++++
 meta/classes/base.bbclass                     | 10 ++++++
 meta/classes/staging.bbclass                  |  2 +-
 meta/lib/oe/sstatesig.py                      |  2 +-
 meta/lib/oeqa/selftest/cases/binaryonly.py    | 34 ++++++++++++++++++
 8 files changed, 116 insertions(+), 2 deletions(-)
 create mode 100644 meta-selftest/binaryonly-secretsource/xz-binaryonly-src.inc
 create mode 100644 meta-selftest/classes/binaryonly-src.bbclass
 create mode 100644 meta-selftest/classes/binaryonly.bbclass
 create mode 100644 meta-selftest/recipes-binaryonly/xz-binaryonly/xz-binaryonly_5.2.5.bb
 create mode 100644 meta/lib/oeqa/selftest/cases/binaryonly.py

-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-02 11:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-01 12:53 [PATCH 0/2] Example of how prebuilt binaries and locked sstate could work Richard Purdie
2020-11-01 12:53 ` [PATCH 1/2] sstate: Promote do_install to an sstate test Richard Purdie
2020-11-01 12:53 ` [PATCH 2/2] selftest: Add binaryonly example and selftest Richard Purdie
2020-11-02  9:01 ` [OE-core] [PATCH 0/2] Example of how prebuilt binaries and locked sstate could work Mikko Rapeli
2020-11-02 10:28   ` Richard Purdie
2020-11-02 11:48     ` Mikko Rapeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox