All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Quentin Schulz <quentin.schulz@streamunlimited.com>
Cc: "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 5/7] base.bbclass: Report only the licenses that are incompatible for a package
Date: Wed, 11 Dec 2019 01:01:02 +0000	[thread overview]
Message-ID: <6bb56b63b3564853979b92ff3ac9f68e@XBOX03.axis.com> (raw)
In-Reply-To: <20191209102019.cgtzabidya2omoy6@qschulz>

> -----Original Message-----
> From: Quentin Schulz <quentin.schulz@streamunlimited.com>
> Sent: den 9 december 2019 11:20
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH 5/7] base.bbclass: Report only the licenses
> that are incompatible for a package
> 
> Hi Peter,
> 
> On Sat, Dec 07, 2019 at 06:38:13AM +0100, Peter Kjellerstedt wrote:
> > Instead of reporting ${LICENSE} when a package is identified as using
> > an incompatible license, report the license(s) that are actually
> > incompatible.
> >
> > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > ---
> [...]
> > diff --git a/meta/lib/oeqa/selftest/cases/incompatible_lic.py
> b/meta/lib/oeqa/selftest/cases/incompatible_lic.py
> > index ad878571b5..9d1e801117 100644
> > --- a/meta/lib/oeqa/selftest/cases/incompatible_lic.py
> > +++ b/meta/lib/oeqa/selftest/cases/incompatible_lic.py
> > @@ -4,7 +4,7 @@ from oeqa.utils.commands import bitbake
> >  class IncompatibleLicenseTests(OESelftestTestCase):
> >
> >      def lic_test(self, pn, pn_lic, lic):
> > -        error_msg = 'ERROR: Nothing PROVIDES \'%s\'\n%s was skipped: it
> has an incompatible license: %s' % (pn, pn, pn_lic)
> > +        error_msg = 'ERROR: Nothing PROVIDES \'%s\'\n%s was skipped: it
> has incompatible license(s): %s' % (pn, pn, pn_lic)
> >
> >          self.write_config("INCOMPATIBLE_LICENSE += \"%s\"" % (lic))
> >
> > @@ -27,12 +27,12 @@ class IncompatibleLicenseTests(OESelftestTestCase):
> >      # license cannot be built when INCOMPATIBLE_LICENSE contains this
> SPDX
> >      # license
> >      def test_incompatible_spdx_license_alias(self):
> > -        self.lic_test('incompatible-license-alias', 'GPLv3', 'GPL-3.0')
> > +        self.lic_test('incompatible-license-alias', 'GPL-3.0', 'GPL-
> 3.0')
> >
> >      # Verify that a package with an alias (from SPDXLICENSEMAP) to an
> SPDX
> >      # license cannot be built when INCOMPATIBLE_LICENSE contains this
> alias
> >      def test_incompatible_alias_spdx_license_alias(self):
> > -        self.lic_test('incompatible-license-alias', 'GPLv3', 'GPLv3')
> > +        self.lic_test('incompatible-license-alias', 'GPL-3.0', 'GPLv3')
> >
> 
> We currently have 4 tests:
>  - GPL-3.0 in LICENSE field in recipe and GPL-3.0 in INCOMPATIBLE_LICENSE
>  - GPL-3.0 in LICENSE field in recipe and GPLv3 in INCOMPATIBLE_LICENSE
>  - GPLv3 in LICENSE field in recipe and GPL-3.0 in INCOMPATIBLE_LICENSE
>  - GPLv3 in LICENSE field in recipe and GPLv3 in INCOMPATIBLE_LICENSE
> 
> They test that the alias system (SPXLICENSEMAP) still works, which is
> rather important since we never enforced the use of licenses from
> SRC_DISTRIBUTE_LICENSES in LICENSE in recipes and allowed the use of
> aliases (hence SPXLICENSEMAP).
> 
> If I'm not mistaken this change induces the following 4 tests:
>  - GPL-3.0 in LICENSE field in recipe and GPL-3.0 in INCOMPATIBLE_LICENSE
>  - GPL-3.0 in LICENSE field in recipe and GPLv3 in INCOMPATIBLE_LICENSE
>  - GPL-3.0 in LICENSE field in recipe and GPL-3.0 in INCOMPATIBLE_LICENSE
>  - GPL-3.0 in LICENSE field in recipe and GPLv3 in INCOMPATIBLE_LICENSE
> 
> which duplicates two tests.

Actually not. Please note that different recipes are used for the 
first two tests (incompatible-license.bb) and the last two tests 
(incompatible-license-alias.bb).

> The questions are: which error warranted this code change?

Before, the LICENSE string was reported as is, whereas after my changes, 
the canonical SPDX names are reported.

> Are SPDXLICENSEMAP aliases still working? Can it still be checked?

It is still working and checked.

> If the original tests are indeed not needed anymore, we need to explicit
> why (and we can actually just remove them).
> 
> I'm still advocating for new tests with wildcards :)

Ah, now I think I get your comment from the previous mail. Yes, I 
should probably add some tests that validate the wildcard support.

> Thanks,
> Quentin

//Peter



  reply	other threads:[~2019-12-11  1:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-07  5:38 [PATCH 1/7] license.bbclass: Introduce AVAILABLE_LICENSES that lists all licenses Peter Kjellerstedt
2019-12-07  5:38 ` [PATCH 2/7] licenses.conf: Remove the SRC_DISTRIBUTE_LICENSES variable Peter Kjellerstedt
2019-12-07  5:38 ` [PATCH 3/7] license.bbclass: Make incompatible_pkg_license return incompatible lics Peter Kjellerstedt
2019-12-07  5:38 ` [PATCH 4/7] base.bbclass: Simplify the check for whitelisted licenses Peter Kjellerstedt
2019-12-07  5:38 ` [PATCH 5/7] base.bbclass: Report only the licenses that are incompatible for a package Peter Kjellerstedt
2019-12-09 10:20   ` Quentin Schulz
2019-12-11  1:01     ` Peter Kjellerstedt [this message]
2019-12-07  5:38 ` [PATCH 6/7] package.bbclass: Report only the licenses that are incompatible Peter Kjellerstedt
2019-12-07  5:38 ` [PATCH 7/7] license_image.bbclass: " Peter Kjellerstedt
2019-12-09  9:40 ` [PATCH 1/7] license.bbclass: Introduce AVAILABLE_LICENSES that lists all licenses Quentin Schulz
2019-12-11  0:51   ` Peter Kjellerstedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6bb56b63b3564853979b92ff3ac9f68e@XBOX03.axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=quentin.schulz@streamunlimited.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.