[Openembedded-architecture] [oe] INCOMPATIBLE_LICENSES and WHITELIST_<license> usage


Mikko Rapeli <mikko.rapeli@...>
 

Hi,

On Thu, Feb 17, 2022 at 04:20:01PM -0800, Andre McCurdy wrote:
On Thu, Feb 17, 2022 at 3:01 PM Saul Wold <Saul.Wold@...> wrote:

Folks,

I am working on a proposal to re-write how INCOMPATIBLE_LICENSES is used
and processed to possibly include a COMPATIBLE_LICENSES variable as
well, see PeterK's email [0]

I am trying to determine the usage of WHITELIST_<license> which would be
used to override a license that might be listed in INCOMPATIBLE_LICENSES
variable.

Randy and I have done a quick and dirty survey of a 100 or so layers
(thanks Randy) and could not find any real usage other than what's
currently in OE-Core for WHITELIST_GPL-3.0.

If you are using WHITELIST_<license>, please let me reply with your usage.
Common case seems to be allowing gdb in debug builds of distros which
are otherwise free of GPLv3 etc, e.g.

https://github.com/MentorEmbedded/meta-mentor/blob/master/meta-mel/conf/distro/include/gdbserver-gplv3.inc
https://github.com/lgirdk/meta-mng/blob/ofw-2112.6/conf/distro/mng.conf
Exactly, I'm using this in a lot of projects.

Basically distro config has:

INCOMPATIBLE_LICENSE_append += " GPLv3 GPLv3+ LGPLv3 LGPLv3+"

and then various GPLv3 tools are allowed in build but not allowed to be
part of images:

WHITELIST_GPL-3.0 += "binutils"
PACKAGE_EXCLUDE += "binutils-dbg binutils-staticdev binutils-dev binutils-doc binutils-locale libbfd binutils"

WHITELIST_GPL-3.0 += "gdb"
PACKAGE_EXCLUDE += "gdb-sdktests-dbg gdb-sdktests gdbserver gdb-dbg gdb-staticdev gdb-dev gdb-doc gdb-locale gdb"

WHITELIST_GPL-3.0 += "rsync"
PACKAGE_EXCLUDE += "rsync-dbg rsync-staticdev rsync-dev rsync-doc rsync-locale rsync"

etc etc.

Use case is that developers can install additional GPLv3 licensed tooling if they
need to debug something, but product images don't include them by default.

Cheers,

-Mikko


Alexander Kanavin
 

You should really try per-image INCOMPATIBLE_LICENSE :) Maintaining
those whitelists/excludes is awkward, as developers constantly want
more of them.

Alex

On Fri, 18 Feb 2022 at 09:00, Mikko Rapeli <mikko.rapeli@...> wrote:

Hi,

On Thu, Feb 17, 2022 at 04:20:01PM -0800, Andre McCurdy wrote:
On Thu, Feb 17, 2022 at 3:01 PM Saul Wold <Saul.Wold@...> wrote:

Folks,

I am working on a proposal to re-write how INCOMPATIBLE_LICENSES is used
and processed to possibly include a COMPATIBLE_LICENSES variable as
well, see PeterK's email [0]

I am trying to determine the usage of WHITELIST_<license> which would be
used to override a license that might be listed in INCOMPATIBLE_LICENSES
variable.

Randy and I have done a quick and dirty survey of a 100 or so layers
(thanks Randy) and could not find any real usage other than what's
currently in OE-Core for WHITELIST_GPL-3.0.

If you are using WHITELIST_<license>, please let me reply with your usage.
Common case seems to be allowing gdb in debug builds of distros which
are otherwise free of GPLv3 etc, e.g.

https://github.com/MentorEmbedded/meta-mentor/blob/master/meta-mel/conf/distro/include/gdbserver-gplv3.inc
https://github.com/lgirdk/meta-mng/blob/ofw-2112.6/conf/distro/mng.conf
Exactly, I'm using this in a lot of projects.

Basically distro config has:

INCOMPATIBLE_LICENSE_append += " GPLv3 GPLv3+ LGPLv3 LGPLv3+"

and then various GPLv3 tools are allowed in build but not allowed to be
part of images:

WHITELIST_GPL-3.0 += "binutils"
PACKAGE_EXCLUDE += "binutils-dbg binutils-staticdev binutils-dev binutils-doc binutils-locale libbfd binutils"

WHITELIST_GPL-3.0 += "gdb"
PACKAGE_EXCLUDE += "gdb-sdktests-dbg gdb-sdktests gdbserver gdb-dbg gdb-staticdev gdb-dev gdb-doc gdb-locale gdb"

WHITELIST_GPL-3.0 += "rsync"
PACKAGE_EXCLUDE += "rsync-dbg rsync-staticdev rsync-dev rsync-doc rsync-locale rsync"

etc etc.

Use case is that developers can install additional GPLv3 licensed tooling if they
need to debug something, but product images don't include them by default.

Cheers,

-Mikko


Mikko Rapeli <mikko.rapeli@...>
 

Hi,

On Fri, Feb 18, 2022 at 09:03:53AM +0100, Alexander Kanavin wrote:
You should really try per-image INCOMPATIBLE_LICENSE :) Maintaining
those whitelists/excludes is awkward, as developers constantly want
more of them.
Hmm, this rings a bell. Likely yes then :)

But on the other hand this way we're quite explicit about what GPLv3 things
we allow to compile. Compiling too much also hurts with compilation times too and for
many use cases developers are better off working with Debian or Ubuntu tooling than
compiling every bell and whistle with yocto.

My list of GPLv3 recipes enabled for compilation is quite stable at:

autoconf
bash
bc
binutils
bison
cairo
ccache
coreutils
diffutils
elfutils
findutils
gawk
gcc
gdb
gdbm
gettext
gnutls
grep
libevent
libmpc
libpipeline
libunistring
m4
make
mpfr
python-rfc3987
python-strict-rfc3339
readline
rsync
sed
tcpreplay
which

Cheers,

-Mikko