| Message ID | 20260106-layer-license-clarification-v1-1-99c69ec1a878@bootlin.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series | contributor-guide/recipe-style-guide.rst: explain difference between layer and recipe license(s) | expand |
On Tue, 2026-01-06 at 16:30 +0100, Antonin Godard via lists.yoctoproject.org wrote: > Explain that the LICENSE set in a recipe does not apply to the recipe > file itself, but to the underlying software. The license of the recipe > file is the license provided in the layer itself. Give OpenEmbedded-Core > as an example for this. > > Fixes [YOCTO #14410] > > Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> > --- > documentation/contributor-guide/recipe-style-guide.rst | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst > index 806bf2384..6a3e9043c 100644 > --- a/documentation/contributor-guide/recipe-style-guide.rst > +++ b/documentation/contributor-guide/recipe-style-guide.rst > @@ -221,6 +221,18 @@ Recipes need to define both the :term:`LICENSE` and > ``meta/files/common-licenses/`` or the :term:`SPDXLICENSEMAP` flag names > defined in ``meta/conf/licenses.conf``. > > + .. note:: > + > + Setting a :term:`LICENSE` in a recipe does not apply to the recipe file > + itself. The license of recipes, configuration files or scripts is > + specified by the license found in the :term:`layer` that holds these > + files. These license files are usually found at the root of the layer. > + Exceptions should be clearly stated in the layer README of LICENSE file. > + > + For example, the :term:`OpenEmbedded-Core (OE-Core)` layer provides both > + the GPL-2.0-only and MIT license files, and a "LICENSE" file to explain > + how these two licenses are attributed to files found in the layer. > + Other layers may want to handle metadata licenses in different ways, for example by including an SPDX-License-Identifier comment at the top of recipe files. So I think we should keep this note more generic. Setting a :term:`LICENSE` in a recipe applies to the software to be built by this recipe, not to the recipe file itself. The license of recipes, configuration files and scripts should also be clearly specified, for example via comments or via a license found in the :term:`layer` that holds these files. These license files are usually found at the root of the layer. Exceptions should be clearly stated in the layer README or LICENSE file. For example, the :term:`OpenEmbedded-Core (OE-Core)` layer provides both the GPL-2.0-only and MIT license files, and a "LICENSE" file to explain how these two licenses are attributed to files found in the layer. How does that look? Best regards,
Hi, On Thu Jan 8, 2026 at 3:47 PM CET, Paul Barker wrote: [...] > Other layers may want to handle metadata licenses in different ways, for > example by including an SPDX-License-Identifier comment at the top of > recipe files. So I think we should keep this note more generic. > > Setting a :term:`LICENSE` in a recipe applies to the software to be > built by this recipe, not to the recipe file itself. The license of > recipes, configuration files and scripts should also be clearly > specified, for example via comments or via a license found in the > :term:`layer` that holds these files. These license files are usually > found at the root of the layer. Exceptions should be clearly stated in > the layer README or LICENSE file. > > For example, the :term:`OpenEmbedded-Core (OE-Core)` layer provides both > the GPL-2.0-only and MIT license files, and a "LICENSE" file to explain > how these two licenses are attributed to files found in the layer. > > How does that look? Looks great, that makes sense indeed. I'll send a new version. Thanks! Antonin
diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst index 806bf2384..6a3e9043c 100644 --- a/documentation/contributor-guide/recipe-style-guide.rst +++ b/documentation/contributor-guide/recipe-style-guide.rst @@ -221,6 +221,18 @@ Recipes need to define both the :term:`LICENSE` and ``meta/files/common-licenses/`` or the :term:`SPDXLICENSEMAP` flag names defined in ``meta/conf/licenses.conf``. + .. note:: + + Setting a :term:`LICENSE` in a recipe does not apply to the recipe file + itself. The license of recipes, configuration files or scripts is + specified by the license found in the :term:`layer` that holds these + files. These license files are usually found at the root of the layer. + Exceptions should be clearly stated in the layer README of LICENSE file. + + For example, the :term:`OpenEmbedded-Core (OE-Core)` layer provides both + the GPL-2.0-only and MIT license files, and a "LICENSE" file to explain + how these two licenses are attributed to files found in the layer. + - :term:`LIC_FILES_CHKSUM`: The OpenEmbedded build system uses this variable to make sure the license text has not changed. If it has, the build produces an error and it affords you the chance to figure
Explain that the LICENSE set in a recipe does not apply to the recipe file itself, but to the underlying software. The license of the recipe file is the license provided in the layer itself. Give OpenEmbedded-Core as an example for this. Fixes [YOCTO #14410] Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- documentation/contributor-guide/recipe-style-guide.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- base-commit: f9042e1da554017fe46460c1fd2bdf8c74b3fa18 change-id: 20260106-layer-license-clarification-70bd02361f76