All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] default-distrovars.inc: drop obsolete LGPLv2_WHITELIST_GPL-3.0
@ 2018-05-12  0:02 Andre McCurdy
  2018-05-14 16:18 ` Mark Hatle
  0 siblings, 1 reply; 3+ messages in thread
From: Andre McCurdy @ 2018-05-12  0:02 UTC (permalink / raw)
  To: openembedded-core

There doesn't seem to be a clear reason to have two separate
variables to hold whitelisted GPLv3 recipes. Both variables are
treated the same, so adding a recipe to LGPLv2_WHITELIST_GPL-3.0 is
already equivalent to adding it to WHITELIST_GPL-3.0.

Anyone needing to whitelist a GPLv3 recipe should now just use
WHITELIST_GPL-3.0.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 meta/classes/base.bbclass                       | 25 ++++++++++++-------------
 meta/classes/multilib.bbclass                   | 12 +++++-------
 meta/conf/distro/include/default-distrovars.inc |  1 -
 3 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index bd0d6e3..68626d5 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -529,19 +529,18 @@ python () {
             incompatwl = []
             for lic in bad_licenses:
                 spdx_license = return_spdx(d, lic)
-                for w in ["LGPLv2_WHITELIST_", "WHITELIST_"]:
-                    whitelist.extend((d.getVar(w + lic) or "").split())
-                    if spdx_license:
-                        whitelist.extend((d.getVar(w + spdx_license) or "").split())
-                    '''
-                    We need to track what we are whitelisting and why. If pn is
-                    incompatible we need to be able to note that the image that
-                    is created may infact contain incompatible licenses despite
-                    INCOMPATIBLE_LICENSE being set.
-                    '''
-                    incompatwl.extend((d.getVar(w + lic) or "").split())
-                    if spdx_license:
-                        incompatwl.extend((d.getVar(w + spdx_license) or "").split())
+                whitelist.extend((d.getVar("WHITELIST_" + lic) or "").split())
+                if spdx_license:
+                    whitelist.extend((d.getVar("WHITELIST_" + spdx_license) or "").split())
+                '''
+                We need to track what we are whitelisting and why. If pn is
+                incompatible we need to be able to note that the image that
+                is created may infact contain incompatible licenses despite
+                INCOMPATIBLE_LICENSE being set.
+                '''
+                incompatwl.extend((d.getVar("WHITELIST_" + lic) or "").split())
+                if spdx_license:
+                    incompatwl.extend((d.getVar("WHITELIST_" + spdx_license) or "").split())
 
             if not pn in whitelist:
                 pkgs = d.getVar('PACKAGES').split()
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 816f54e..4636c20 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -49,7 +49,6 @@ python multilib_virtclass_handler () {
     if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
         raise bb.parse.SkipPackage("Don't extend allarch recipes which are not packagegroups")
 
-
     # Expand this since this won't work correctly once we set a multilib into place
     e.data.setVar("ALL_MULTILIB_PACKAGE_ARCHS", e.data.getVar("ALL_MULTILIB_PACKAGE_ARCHS"))
  
@@ -65,12 +64,11 @@ python multilib_virtclass_handler () {
     e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
     e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
 
-    # Expand the WHITELISTs with multilib prefix
-    for whitelist in ["WHITELIST_GPL-3.0", "LGPLv2_WHITELIST_GPL-3.0"]:
-        pkgs = e.data.getVar(whitelist)
-        for pkg in pkgs.split():
-            pkgs += " " + variant + "-" + pkg
-        e.data.setVar(whitelist, pkgs)
+    # Expand WHITELIST_GPL-3.0 with multilib prefix
+    pkgs = e.data.getVar("WHITELIST_GPL-3.0")
+    for pkg in pkgs.split():
+        pkgs += " " + variant + "-" + pkg
+    e.data.setVar("WHITELIST_GPL-3.0", pkgs)
 
     # DEFAULTTUNE can change TARGET_ARCH override so expand this now before update_data
     newtune = e.data.getVar("DEFAULTTUNE_" + "virtclass-multilib-" + variant, False)
diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index 76d09af..2f46e13 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -24,7 +24,6 @@ DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC}"
 IMAGE_FEATURES ?= ""
 
 WHITELIST_GPL-3.0 ?= ""
-LGPLv2_WHITELIST_GPL-3.0 ?= ""
 
 COMMERCIAL_AUDIO_PLUGINS ?= ""
 # COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] default-distrovars.inc: drop obsolete LGPLv2_WHITELIST_GPL-3.0
  2018-05-12  0:02 [PATCH] default-distrovars.inc: drop obsolete LGPLv2_WHITELIST_GPL-3.0 Andre McCurdy
@ 2018-05-14 16:18 ` Mark Hatle
  2018-05-14 18:47   ` Andre McCurdy
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Hatle @ 2018-05-14 16:18 UTC (permalink / raw)
  To: Andre McCurdy, openembedded-core

On 5/11/18 7:02 PM, Andre McCurdy wrote:
> There doesn't seem to be a clear reason to have two separate
> variables to hold whitelisted GPLv3 recipes. Both variables are
> treated the same, so adding a recipe to LGPLv2_WHITELIST_GPL-3.0 is
> already equivalent to adding it to WHITELIST_GPL-3.0.
> 
> Anyone needing to whitelist a GPLv3 recipe should now just use
> WHITELIST_GPL-3.0.
> 
> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> ---

...

> diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
> index 76d09af..2f46e13 100644
> --- a/meta/conf/distro/include/default-distrovars.inc
> +++ b/meta/conf/distro/include/default-distrovars.inc
> @@ -24,7 +24,6 @@ DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC}"
>  IMAGE_FEATURES ?= ""
>  
>  WHITELIST_GPL-3.0 ?= ""
> -LGPLv2_WHITELIST_GPL-3.0 ?= ""

I don't have enough context to know if this matters, but there are a number of
GPLv3 tools, that have LGPLv2 libraries.  I believe this whitelist was added to
specifically allow this these items to be present on the system, as it was a
distinctly different use-case then just the GPL-3.0 version.

(Not sure how relevant that still is.  Is there any documentation in either the
documentation.conf or guide?)

--Mark

>  COMMERCIAL_AUDIO_PLUGINS ?= ""
>  # COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] default-distrovars.inc: drop obsolete LGPLv2_WHITELIST_GPL-3.0
  2018-05-14 16:18 ` Mark Hatle
@ 2018-05-14 18:47   ` Andre McCurdy
  0 siblings, 0 replies; 3+ messages in thread
From: Andre McCurdy @ 2018-05-14 18:47 UTC (permalink / raw)
  To: Mark Hatle; +Cc: OE Core mailing list

On Mon, May 14, 2018 at 9:18 AM, Mark Hatle <mark.hatle@windriver.com> wrote:
> On 5/11/18 7:02 PM, Andre McCurdy wrote:
>> There doesn't seem to be a clear reason to have two separate
>> variables to hold whitelisted GPLv3 recipes. Both variables are
>> treated the same, so adding a recipe to LGPLv2_WHITELIST_GPL-3.0 is
>> already equivalent to adding it to WHITELIST_GPL-3.0.
>>
>> Anyone needing to whitelist a GPLv3 recipe should now just use
>> WHITELIST_GPL-3.0.
>>
>> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
>> ---
>
> ...
>
>> diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
>> index 76d09af..2f46e13 100644
>> --- a/meta/conf/distro/include/default-distrovars.inc
>> +++ b/meta/conf/distro/include/default-distrovars.inc
>> @@ -24,7 +24,6 @@ DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC}"
>>  IMAGE_FEATURES ?= ""
>>
>>  WHITELIST_GPL-3.0 ?= ""
>> -LGPLv2_WHITELIST_GPL-3.0 ?= ""
>
> I don't have enough context to know if this matters, but there are a number of
> GPLv3 tools, that have LGPLv2 libraries.  I believe this whitelist was added to
> specifically allow this these items to be present on the system, as it was a
> distinctly different use-case then just the GPL-3.0 version.
>
> (Not sure how relevant that still is.  Is there any documentation in either the
> documentation.conf or guide?)

That used to be relevant a while ago when LICENSE was applied to all
packages created by the recipe. Nowadays, LICENSE can be defined on a
per-package basis, so the case where a recipe builds (for example) an
LPGLv2 library and a GPLv3 demo app and an image in a GPLv3-free
distro needs to include only the library is handled fine without any
whitelisting. The cairo and gnutls recipes are examples of that in
oe-core.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-14 18:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-12  0:02 [PATCH] default-distrovars.inc: drop obsolete LGPLv2_WHITELIST_GPL-3.0 Andre McCurdy
2018-05-14 16:18 ` Mark Hatle
2018-05-14 18:47   ` Andre McCurdy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.