diff mbox series

[meta-oe,1/2] libgpiod: set per-package license assignments

Message ID 20260925133929.1991-2-mark.jonas@de.bosch.com
State New
Headers show
Series libgpiod: detail package licensing | expand

Commit Message

Jonas Mark (BT-EL/ESW1) Sept. 25, 2026, 1:39 p.m. UTC
From: Ricardo Simoes <ricardo.simoes@pt.bosch.com>

libgpiod 2.x has more complex licensing than its 1.x counterpart, with
multiple licenses applying to different parts of the project. Because
the recipe has no per-package LICENSE statement, a user installing just
the library (LGPL-2.1-or-later) might be led to believe it is also
subject to GPL-2.0-or-later and the other aggregate licenses, which do
not apply to that package.

Thus, to make it clear which licenses apply to which parts of the
project, split the recipe-wide LICENSE into per-package values so that
each generated package reports its actual license instead of the
aggregate expression.

Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
---
 meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Bartosz Golaszewski Sept. 25, 2026, 1:56 p.m. UTC | #1
On Fri, 25 Sep 2026 15:39:28 +0200, "Mark Jonas via
lists.openembedded.org"
<mark.jonas=de.bosch.com@lists.openembedded.org> said:
> From: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
>
> libgpiod 2.x has more complex licensing than its 1.x counterpart, with
> multiple licenses applying to different parts of the project. Because
> the recipe has no per-package LICENSE statement, a user installing just
> the library (LGPL-2.1-or-later) might be led to believe it is also
> subject to GPL-2.0-or-later and the other aggregate licenses, which do
> not apply to that package.
>
> Thus, to make it clear which licenses apply to which parts of the
> project, split the recipe-wide LICENSE into per-package values so that
> each generated package reports its actual license instead of the
> aggregate expression.
>
> Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
> Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
> ---

Thanks for doing this!

>  meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb b/meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb
> index b3cb33ac89..977405c2fc 100644
> --- a/meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb
> +++ b/meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb
> @@ -3,6 +3,17 @@ require libgpiod.inc
>  inherit meson systemd update-rc.d useradd gobject-introspection
>
>  LICENSE = "CC-BY-SA-4.0 AND GPL-2.0-or-later AND LGPL-2.1-or-later"
> +LICENSE:${PN} = "LGPL-2.1-or-later"
> +LICENSE:${PN}-cli = "GPL-2.0-or-later"
> +LICENSE:${PN}-gpiosim = "LGPL-2.1-or-later"
> +LICENSE:${PN}-glib = "LGPL-2.1-or-later"
> +LICENSE:${PN}-manager = "GPL-2.0-or-later"
> +LICENSE:${PN}-manager-cfg = "CC-BY-SA-4.0"
> +LICENSE:${PN}-tools = "GPL-2.0-or-later"
> +LICENSE:libgpiodbus = "GPL-2.0-or-later"

Ugh, this is a mistake on my part. The libgpiodbus library should be licensed
under LGPL-v2.1 like all the other shared libraries in the project. I'll send
a patch.

In any case:

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

Bart
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb b/meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb
index b3cb33ac89..977405c2fc 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_2.3.1.bb
@@ -3,6 +3,17 @@  require libgpiod.inc
 inherit meson systemd update-rc.d useradd gobject-introspection
 
 LICENSE = "CC-BY-SA-4.0 AND GPL-2.0-or-later AND LGPL-2.1-or-later"
+LICENSE:${PN} = "LGPL-2.1-or-later"
+LICENSE:${PN}-cli = "GPL-2.0-or-later"
+LICENSE:${PN}-gpiosim = "LGPL-2.1-or-later"
+LICENSE:${PN}-glib = "LGPL-2.1-or-later"
+LICENSE:${PN}-manager = "GPL-2.0-or-later"
+LICENSE:${PN}-manager-cfg = "CC-BY-SA-4.0"
+LICENSE:${PN}-tools = "GPL-2.0-or-later"
+LICENSE:libgpiodbus = "GPL-2.0-or-later"
+LICENSE:libgpiodcxx = "LGPL-2.1-or-later"
+LICENSE:libgpiotools = "LGPL-2.1-or-later"
+
 LIC_FILES_CHKSUM = " \
     file://LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
     file://LICENSES/LGPL-2.1-or-later.txt;md5=4b54a1fd55a448865a0b32d41598759d \