public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [RFC v2 0/2] Add bblock helper script
@ 2023-07-21 14:25 Julien Stephan
  2023-07-21 14:25 ` [RFC v2 1/2] bitbake.conf: include bblock.conf Julien Stephan
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Julien Stephan @ 2023-07-21 14:25 UTC (permalink / raw)
  To: openembedded-core; +Cc: Julien Stephan

Hi all,

This is the v2 of bblock script.

Improvement from V1:
* Signatures are now package architecture specific meaning that if you
  switch MACHINE, the lock sig will not be taken into account
* I added the -r option to unlock recipes
* I added a -d option to display the current bblock.conf
* Added an include directive for conf/bblock.conf inside bitbake.conf
* Added -t option to specify the tasks to lock/unlock

Limitations:
* I may be still missing some checks on user input
* I need to find a way to get the list of tasks ( by default still lock
  only the do_compile for now, unless -t is specified)
* Do not check if a particular recipe/task is already locked when trying
  to add lock. So entries may appear multiple times
* We still need the signature of the tasks to be already computed before
  locking. Need to find a way to generate it if missing

I did some tests using qemux86-64 and qemuarm but I may be missing some
corner cases.

I force pushed my branch on poky-contrib [1]

Any feedback are welcome!

Cheers
Julien

V1:
I am currently working on bug #13425 and I would like to post my wip
script as an RFC to get feedback on it, before going further in the
development.

The script `script/bblock` can be used with the following command:

bblock [list of recipes to lock]

Here is a summary of what is currently implemented:
* can lock several recipes at once
* on first execution bblock will append `require bblock.inc` in
  `build/conf/auto.conf` (creates `auto.conf` if it doesn't exist)
* on first execution creates the file `build/conf/bblock.inc` with a
  dedicated header and:
         - adds SIGGEN_LOCKEDSIGS_TYPES += "t-bblock"
         - adds SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "warn" to display warning but
           do not stop the build
* loops over all recipes to lock and adds entry with latest "do_compile"
  signature in `conf/bblock.inc`, such as: SIGGEN_LOCKEDSIGS_t-bblock += "bc:do_compile:e233cd793137a92dd575a417a2877e324ce526c4dc4a7db652abb9512f406f1f"

Limitations:
* only gets do_compile signature for now as a POC
* `bblock reset [list of recipes]` not yet implemented
* no check if a recipe is already locked

Steps to test the script:
bitbake bc --> generate a signature for bc's tasks
bblock bc
# modify do_compile in bc recipe to force signature change
bitbake bc --> throws the following warning: `WARNING: The bc:do_compile sig is computed to be 680bd6c291bf88e379e0c405a773cf5f81851e1a52570398cefd0196000ac1ef, but the sig is locked to e233cd793137a92dd575a417a2877e324ce526c4dc4a7db652abb9512f406f1f in SIGGEN_LOCKEDSIGS_t-bblock`

I also have a point I would like to discuss: I only get signature for
do_compile for the POC but wondering what should I do here:
* have a set of predefined task to lock, in that case how to choose the
  tasks?
* compute the list of all available tasks for a given recipe and get
  signature for all? Is there a way to get such list without using
  `infoil.build_targets(pn, "listtasks", handle_events=True)` as this
  will start bitbake, takes some time and requires some processing of
  the output
* add an option for the user to specify the task he wants to lock? (this
  may be useful to add anyway)

My branch is available here [1]

Am I going into the right direction?

Cheers
Julien

[1]: https://git.yoctoproject.org/poky-contrib/commit/?h=jstephan/bblock
Julien Stephan (2):
  bitbake.conf: include bblock.conf
  scripts/bblock: add a script to lock/unlock recipes

 meta/conf/bitbake.conf |   1 +
 scripts/bblock         | 184 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 185 insertions(+)
 create mode 100755 scripts/bblock

--
2.41.0


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

end of thread, other threads:[~2023-08-07 13:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-21 14:25 [RFC v2 0/2] Add bblock helper script Julien Stephan
2023-07-21 14:25 ` [RFC v2 1/2] bitbake.conf: include bblock.conf Julien Stephan
2023-07-21 14:25 ` [RFC v2 2/2] scripts/bblock: add a script to lock/unlock recipes Julien Stephan
2023-07-23 12:11 ` [OE-core] [RFC v2 0/2] Add bblock helper script Alexander Kanavin
2023-07-24  8:25   ` Julien Stephan
2023-07-24  8:36     ` Alexander Kanavin
2023-07-27 14:15       ` Julien Stephan
2023-07-27 14:28         ` Alexander Kanavin
2023-08-07 13:37           ` Julien Stephan
2023-08-07 13:47             ` Alexander Kanavin

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