Re: [docs][PATCH] variables: Update variable documentation for SPDX license expressions

"Antonin Godard" <[email protected]> Thu, 23 Jul 2026 10:31:00 +0200
Newsgroups org.yoctoproject.lists.docs
Message-ID <[email protected]>
Hi,

On Wed Jul 22, 2026 at 8:48 PM CEST, Joshua Watt via lists.yoctoproject.org=
 wrote:
> Updates the documentation for the variables affected by the transition
> to using SPDX license expressions
>
> Signed-off-by: Joshua Watt <[email protected]>
> ---
>  documentation/ref-manual/variables.rst | 46 ++++++++++++++------------
>  1 file changed, 24 insertions(+), 22 deletions(-)
>
> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-m=
anual/variables.rst
> index 394797ca3..599ef6f2e 100644
> --- a/documentation/ref-manual/variables.rst
> +++ b/documentation/ref-manual/variables.rst
> @@ -4806,6 +4806,12 @@ system and gives an overview of their function and=
 contents.
>        - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later``
>        - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later``
> =20
> +      If a license in :term:`LICENSE` has an exception listed using the
> +      ``WITH`` operator, the license will still match this variable and =
the
> +      license will not be allowed. To explicitly allow an SPDX license
> +      exception to a license, the exception must be listed in
> +      :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS`
> +
>        .. note::
> =20
>           This functionality is only regularly tested using the following
> @@ -4819,12 +4825,12 @@ system and gives an overview of their function an=
d contents.
>           are required to produce a functional system image.
> =20
>     :term:`INCOMPATIBLE_LICENSE_EXCEPTIONS`
> -      Specifies a space-separated list of package and license pairs that
> -      are allowed to be used even if the license is specified in
> -      :term:`INCOMPATIBLE_LICENSE`. The package and license pairs are
> -      separated using a colon. Example::
> +      Specifies a space-separated list of package and SPDX license or SP=
DX
> +      license exception pairs that are allowed to be used even if the li=
cense
> +      is specified in :term:`INCOMPATIBLE_LICENSE`. The package and lice=
nse
> +      pairs are separated using a colon. Example::
> =20
> -         INCOMPATIBLE_LICENSE_EXCEPTIONS =3D "gdbserver:GPL-3.0-only gdb=
server:LGPL-3.0-only"
> +         INCOMPATIBLE_LICENSE_EXCEPTIONS =3D "gdbserver:GPL-3.0-only gdb=
server:LGPL-3.0-only gdbserver:GCC-exception-3.1"

I guess you meant "gcc:GCC-exception-3.1"?

> =20
>     :term:`INHERIT`
>        Causes the named class or classes to be inherited globally. Anonym=
ous
> @@ -5945,27 +5951,24 @@ system and gives an overview of their function an=
d contents.
> =20
>     :term:`LICENSE`
>        This is a required field in an OpenEmbedded recipe file, and shoul=
d
> -      contain a list of source licenses for the recipe. Follow these rul=
es:
> -
> -      -  Do not use spaces within individual license names.
> +      contain a :term:`SPDX License Expression` that describes the sourc=
e
> +      license(s) for the recipe. Keep in mind a few rules:
> =20
> -      -  Separate license names using \| (pipe) when there is a choice
> -         between licenses.
> +      -  Separate license name using ``OR`` when there is a choice betwe=
en
> +         licenses
> =20
> -      -  Separate license names using & (ampersand) when there are
> -         multiple licenses for different parts of the source.
> +      -  Separate license names using ``AND`` when multiple licenses app=
ly to
> +         different parts of the source code
> =20
> -      -  You can use spaces between license names.
> +      -  All licenses must be valid SPDX License Identifiers

Add a quick link here?

`SPDX License Identifiers <https://spdx.org/licenses/>`__

> =20
> -      -  For standard licenses, use the names of the files in
> -         ``meta/files/common-licenses/`` or the
> -         :term:`SPDXLICENSEMAP` flag names defined in
> -         ``meta/conf/licenses.conf``.
> +      -  Any License that does not come from the SPDX License list

Same link:

`SPDX License List <https://spdx.org/licenses/>`__

> +         must be prefixed with ``LicenseRef-``.
> =20
>        Here are some examples::
> =20
> -         LICENSE =3D "LGPL-2.1-only | GPL-3.0-only"
> -         LICENSE =3D "MPL-1.0 & LGPL-2.1-only"
> +         LICENSE =3D "LGPL-2.1-only OR GPL-3.0-only"
> +         LICENSE =3D "MPL-1.0 AND LGPL-2.1-only"
>           LICENSE =3D "GPL-2.0-or-later"
> =20
>        The first example is from the
> @@ -5981,15 +5984,14 @@ system and gives an overview of their function an=
d contents.
>        but has accompanying documentation licensed under the GNU Free
>        Documentation License 1.2 could be specified as follows::
> =20
> -         LICENSE =3D "GFDL-1.2 & GPL-2.0-only"
> +         LICENSE =3D "GFDL-1.2 AND GPL-2.0-only"
>           LICENSE:${PN} =3D "GPL-2.0.only"
>           LICENSE:${PN}-doc =3D "GFDL-1.2"
> =20
>        .. note::
> =20
>           A recipe's :term:`LICENSE` value must be accompanied by an asso=
ciated
> -         :term:`LIC_FILES_CHKSUM` value, except in the special case wher=
e
> -         the :term:`LICENSE` value is set to "CLOSED".
> +         :term:`LIC_FILES_CHKSUM` value.
> =20
>     :term:`LICENSE_CREATE_PACKAGE`
>        Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbed=
ded

Thanks!
Antonin