From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Alexander Kanavin <alex.kanavin@gmail.com>,
openembedded-core@lists.openembedded.org
Cc: Joshua Watt <JPEWhacker@gmail.com>,
Alexander Kanavin <alex@linutronix.de>
Subject: Re: [OE-core] [PATCH 2/5] meta/files: add layer setup JSON schema and example
Date: Wed, 17 Aug 2022 21:52:06 +0100 [thread overview]
Message-ID: <bff578854db1852bc0891463e6eecd3c892876bd.camel@linuxfoundation.org> (raw)
In-Reply-To: <20220817131023.4093773-2-alex@linutronix.de>
On Wed, 2022-08-17 at 15:10 +0200, Alexander Kanavin wrote:
> From: Joshua Watt <JPEWhacker@gmail.com>
>
> Defines a common schema for layer setup that can be consumed by tools to
> know how to fetch and assemble layers for end users. Also includes an
> example of the layer setup that constructs poky/meta-intel/imaginary product layer
> for reference.
>
> The schema can be used to validate a layer setup file with the commands:
>
> $ python3 -m pip install jsonschema
> $ jsonschema -i meta/files/layers.example.json meta/files/layers.schema.json
>
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
>
> Alex: I made the following modifications to Joshua's original commit:
>
> - moved the files from meta/lib to meta/files
>
> - the example json showcases a multi-repo, multi-layer setup with additional
> configurations and machines, instead of just poky - closer to a typical product
>
> - added oe-selftest that validates the example json against the schema using python3-jsonschema-native
>
> - the schema is modified so that:
>
> -- all lists (sources, layers, remotes) are replaced by objects keyed by 'name' properties of the list items.
> This allows using them as dicts inside Python, and makes the json more compact and readable.
>
> -- added 'contains_this_file' property to source object
>
> -- added 'buildconfigs', 'machines' and 'distros' properties to layer objects.
>
> -- replaced 'remote' property with a 'oneOf' definition for git with a specific
> 'git-remote' property. 'oneOf' is problematic when schema validation fails:
> the diagnostic is only that none of oneOf variants matched, which is too non-specific.
>
> -- added 'describe' property to 'git-remote' object.
>
> -- removed description property for a layer source: it is not clear how to add that
> when auto-generating the json
I finally got some time to think about this a little bit more.
One thing that concerns me a little is that this mixes two things,
layer setup (as in repos) and configuration. I'm nervous about json
config which effectively has to duplicate the list of machines/distros
in layers.
Where is the distro/machine data used?
Are these the only config options people will want to add or will we
have others? init system? libc? Or feature information about which
configurations are expected to work? I worry this is a magnet for
future feature creep and duplication of information.
I can see where the buildconfigs are used but again, does the json file
need to encode those or could you determine them by inspection of the
layers once setup?
I'm still worried about bolting a format directly into one of our core
tools as it effectively means it is a definitive standard. We do
probably need one but I'm not convinced this is quite right, perhaps
because of the above reason. Not 100% sure but something doesn't feel
quite right.
Also, if there is new version of this series, could you squash in these
copyright/license tweaks please:
https://git.yoctoproject.org/poky/commit/?h=master-next&id=45b396298c1dd638bb702f5251b4a663f07978ca
Cheers,
Richard
next prev parent reply other threads:[~2022-08-17 20:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 13:10 [PATCH 1/5] bitbake-layers: add a command to save the active build configuration as a template into a layer Alexander Kanavin
2022-08-17 13:10 ` [PATCH 2/5] meta/files: add layer setup JSON schema and example Alexander Kanavin
2022-08-17 20:52 ` Richard Purdie [this message]
2022-08-17 21:36 ` [OE-core] " Alexander Kanavin
2022-08-17 22:27 ` Richard Purdie
2022-08-18 8:24 ` Alexander Kanavin
2022-08-18 9:27 ` Richard Purdie
2022-09-01 15:29 ` Configuration fragments Alexander Kanavin
2022-09-01 22:47 ` [Openembedded-architecture] " Mark Hatle
2022-08-17 22:16 ` [OE-core] [PATCH 2/5] meta/files: add layer setup JSON schema and example Alexander Kanavin
2022-08-17 13:10 ` [PATCH 3/5] bitbake-layers: add ability to save current layer repository configuration into a json file Alexander Kanavin
2022-08-17 13:10 ` [PATCH 4/5] scripts/oe-setup-layers: add a script that restores the layer configuration from " Alexander Kanavin
2022-08-21 22:04 ` [OE-core] " Philip Balister
2022-08-22 7:45 ` Alexander Kanavin
2022-08-22 1:20 ` Chuck Wolber
2022-08-22 7:52 ` Alexander Kanavin
2022-08-17 13:10 ` [PATCH 5/5] selftest/bblayers: add a test for creating a layer setup and using it to restore the layers Alexander Kanavin
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=bff578854db1852bc0891463e6eecd3c892876bd.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=JPEWhacker@gmail.com \
--cc=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--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