<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8158</bug_id>
          
          <creation_ts>2015-08-13 16:48:49 +0000</creation_ts>
          <short_desc>INCOMPATIBLE_LICENSES has unexpected results with GNU libraries</short_desc>
          <delta_ts>2022-10-14 18:25:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>deployment</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=8197</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jussi Kukkonen">jku</reporter>
          <assigned_to name="Joe Slater">joe.slater</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>elizabeth.flanagan</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>53098</commentid>
    <comment_count>0</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2015-08-13 16:48:49 +0000</bug_when>
    <thetext>This sort of license blacklist
    INCOMPATIBLE_LICENSES = &quot;*GPLv3&quot;
seems to lead to very unexpected results when combined with the current standard licensing scheme for GNU software (&quot;LGPLv3+ | GPLv2+&quot;).

As far as I can tell e.g. the &quot;non-gpl3&quot; autobuilder* seems to happily build gmp-6.0.0 which is &quot;LGPLv3 | GPLv2&quot;.

I couldn&apos;t figure out how the checker works yet but could it be that the license checker goes &quot;oh, it&apos;s available as GPLv2 and that&apos;s not blacklisted&quot;? Technically that is correct but it also means that now anything that links to gmp, and (by dependency) to nettle or gnutls has to be GPLv2 compatible... I&apos;m going to guess that most users of INCOMPATIBLE_LICENSES were not planning that.

If my logic above is correct then maybe the autobuilder should just explicitly blacklist the combo &quot;GPLany | LGPLv3&quot; if that&apos;s possible (and docs should have the same suggestion) since this is the common dangerous combination?

CCing beth: ross ratted you out as a domain expert.


*) https://autobuilder.yoctoproject.org/main/builders/nightly-non-gpl3/builds/437/steps/CheckForGPLv3/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53732</commentid>
    <comment_count>1</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2015-09-04 07:34:36 +0000</bug_when>
    <thetext>My test case gmp now has a non-lgpl3 version available in master but the non-gpl3 autobuilder still picks the &quot;LGPLv3+ | GPLv2+&quot; version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54166</commentid>
    <comment_count>2</comment_count>
    <who name="Beth Flanagan">elizabeth.flanagan</who>
    <bug_when>2015-09-16 15:55:30 +0000</bug_when>
    <thetext>Fixed in autobuilder:

http://git.yoctoproject.org/cgit/cgit.cgi/yocto-autobuilder/commit/?id=05e209132bd9ab7fe91cfce6d77eebf4c54ea978

and

http://git.yoctoproject.org/cgit/cgit.cgi/yocto-autobuilder/commit/?id=e7299636b173e1a5930f46d4566abe094dbfa7f2

Verified on yoctodev autobuilder cluster:

[pokybuild@yct51 ~]$ cd yocto-autobuilder/yocto-worker/nightly-non-gpl3/
[pokybuild@yct51 nightly-non-gpl3]$ cd build/
[pokybuild@yct51 build]$ for x in `find ./build/tmp/deploy/licenses -name &quot;license.manifest&quot;`; do cat $x|grep -E &quot;GPLv3|GPL-3&quot;; done</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54360</commentid>
    <comment_count>3</comment_count>
    <who name="Mihail Stanciu">stanciux.mihail</who>
    <bug_when>2015-09-21 09:46:29 +0000</bug_when>
    <thetext>Verified.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54362</commentid>
    <comment_count>4</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2015-09-21 10:21:41 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Verified.

Has it been verified that the build really does not include gmp-6.0.0? I haven&apos;t seen a &quot;non-gpl3&quot; build yet that didn&apos;t... The last one (from 16th) seems to not have the license warning anymore but gmp-6.0.0 is still getting built, which seems worse than before.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54368</commentid>
    <comment_count>5</comment_count>
    <who name="Mihail Stanciu">stanciux.mihail</who>
    <bug_when>2015-09-21 11:47:06 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; Verified.
&gt; 
&gt; Has it been verified that the build really does not include gmp-6.0.0? I
&gt; haven&apos;t seen a &quot;non-gpl3&quot; build yet that didn&apos;t... The last one (from 16th)
&gt; seems to not have the license warning anymore but gmp-6.0.0 is still getting
&gt; built, which seems worse than before.

Sorry, should have been more specific. Verified that the patch is in and it does check for GPLv3.
We can&apos;t really check for more, as we don&apos;t have access to the AB infrastructure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54384</commentid>
    <comment_count>6</comment_count>
    <who name="Mihail Stanciu">stanciux.mihail</who>
    <bug_when>2015-09-21 14:17:38 +0000</bug_when>
    <thetext>Reopening.

Tried a local build using a freshly downloaded AB(made sure the patches were included) and gmp is still being built and still being included in the resulting image.

On the image i found libgmp.so.10.2.0 under /usr/lib, which I THINK is the library that should be skipped.

Oddly enough it&apos;s not showing up in the package manifest or the license manifest, that&apos;s why the &quot;check for gmp&quot; step isn&apos;t signaling anything.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54521</commentid>
    <comment_count>7</comment_count>
    <who name="Beth Flanagan">elizabeth.flanagan</who>
    <bug_when>2015-09-23 12:15:31 +0000</bug_when>
    <thetext>pidge@buile ~/yocto-autobuilder/yocto-worker/nightly-non-gpl3/build/meta $ more recipes-support/gmp/gmp_6.0.0.bb 
require gmp.inc

LICENSE=&quot;GPLv2+ | LGPLv3+&quot;

REVISION=&quot;a&quot;

LIC_FILES_CHKSUM = &quot;file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
                   file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
                   file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
&quot;


As gmp is either GPLv2+ or LGPLv3+ this is actually the correct behaviour:

From the package.manifest we see that:

PACKAGE NAME: gmp
PACKAGE VERSION: 6.0.0
RECIPE NAME: gmp
LICENSE: GPLv2+

So, it is picking the correct license here so it should be on the image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54523</commentid>
    <comment_count>8</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2015-09-23 12:38:48 +0000</bug_when>
    <thetext>&gt; As gmp is either GPLv2+ or LGPLv3+ this is actually the correct behaviour:

Like I said in my original report:

| Technically that is correct but it also means that now anything that
| links to gmp, and (by dependency) to nettle or gnutls has to be GPLv2
| compatible... I&apos;m going to guess that most users of
| INCOMPATIBLE_LICENSES were not planning that.

The people who are allergic to *GPL3 in general are not going to be fine with their libraries suddenly going GPL2 (not LGPL, GPL). Technically the build is 100% correct but I think it&apos;s currently testing a set of software that no-one is interested in.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54529</commentid>
    <comment_count>9</comment_count>
    <who name="Beth Flanagan">elizabeth.flanagan</who>
    <bug_when>2015-09-23 13:09:51 +0000</bug_when>
    <thetext>The problem here is that we&apos;re going to have to do quite a bit of interspection during the build to figure out who links what to what. We can&apos;t blacklist GPLv2+|LGPLv3. So we&apos;ll need to do things that really impact the build.

I&apos;m not sure if there is something here that we can actually do during the build. I&apos;m going to bump this to 2.1 to give us time to consider it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58839</commentid>
    <comment_count>10</comment_count>
    <who name="Beth Flanagan">elizabeth.flanagan</who>
    <bug_when>2016-02-10 17:18:57 +0000</bug_when>
    <thetext>I&apos;m dropping this to a medium and moving this out to 2.2. Part of the issue here is that we&apos;re going to have to go through all of the RDEPENDS and check if those are compatible with the license on the other side of the |. I can see this getting a bit messy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62111</commentid>
    <comment_count>11</comment_count>
    <who name="Beth Flanagan">elizabeth.flanagan</who>
    <bug_when>2016-05-11 18:31:46 +0000</bug_when>
    <thetext>I&apos;m wondering if part of this isn&apos;t a use case for spdx.bbclass. Tracy, can we look at if this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73642</commentid>
    <comment_count>12</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-06-02 11:52:25 +0000</bug_when>
    <thetext>The Intel RefKit team have developed some code to do license checking on generated images[1]. This is used to perform refkit specific license checks[2] but could easily be used to provide a selftest which sets INCOMPATIBLE_LICENSE and checks to see whether the generated image has any (L)GPLv3 components.

1. http://git.yoctoproject.org/clean/cgit.cgi/intel-iot-refkit/tree/meta-refkit-core/lib/licensecheck.py
2. http://git.yoctoproject.org/clean/cgit.cgi/intel-iot-refkit/tree/meta-iotqa/lib/oeqa/selftest/refkit-license-check.py
3. http://git.yoctoproject.org/clean/cgit.cgi/intel-iot-refkit/commit/?id=5620309e2b22835bc43329b380127dcf20ace535</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74781</commentid>
    <comment_count>13</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2017-07-05 14:11:00 +0000</bug_when>
    <thetext>(In reply to comment #12)
&gt; The Intel RefKit team have developed some code to do license checking on
&gt; generated images[1]. This is used to perform refkit specific license
&gt; checks[2] but could easily be used to provide a selftest which sets
&gt; INCOMPATIBLE_LICENSE and checks to see whether the generated image has any
&gt; (L)GPLv3 components.

I had a quick look here and I&apos;m not sure I follow... I mean, yes it&apos;s probably possible to write a test like that but would it help? We already know the non-gpl3 build ends up with libraries with effective &quot;LGPLv3|GPLv2&quot; licenses.

I still think the results of INCOPATIBLE_LICENSES is unexpected but I&apos;m not sure if there&apos;s anything we can reasonably do that would really help,  especially now that we&apos;ve removed the obsolete lgplv2 versions (moved to meta-gplv2).

I&apos;ll build a non-gpl3 image and do some tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75008</commentid>
    <comment_count>14</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-07-13 15:55:15 +0000</bug_when>
    <thetext>(In reply to comment #13)
&gt; (In reply to comment #12)
&gt; &gt; The Intel RefKit team have developed some code to do license checking on
&gt; &gt; generated images[1]. This is used to perform refkit specific license
&gt; &gt; checks[2] but could easily be used to provide a selftest which sets
&gt; &gt; INCOMPATIBLE_LICENSE and checks to see whether the generated image has any
&gt; &gt; (L)GPLv3 components.
&gt; 
&gt; I had a quick look here and I&apos;m not sure I follow... I mean, yes it&apos;s
&gt; probably possible to write a test like that but would it help? We already
&gt; know the non-gpl3 build ends up with libraries with effective &quot;LGPLv3|GPLv2&quot;
&gt; licenses.

Would it help? I&apos;m not sure, I certainly defer to you here. Especially as you filed this bug.

&gt; I still think the results of INCOPATIBLE_LICENSES is unexpected but I&apos;m not
&gt; sure if there&apos;s anything we can reasonably do that would really help, 
&gt; especially now that we&apos;ve removed the obsolete lgplv2 versions (moved to
&gt; meta-gplv2).

Perhaps some warning laden documentation to point people at? Maybe we could even generate a warning when the option is set that would warn about the generated content requiring further review?

&gt; I&apos;ll build a non-gpl3 image and do some tests.

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88334</commentid>
    <comment_count>15</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-10-08 08:31:11 +0000</bug_when>
    <thetext>Joe can you see if this is still a problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94184</commentid>
    <comment_count>16</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-10-14 18:25:39 +0000</bug_when>
    <thetext>I didn&apos;t check it myself but I asked Joe and he said that:
  Nothing with an incompatible license is put on the target.

Also we have have several test for the license rules:

$ git log --oneline -11 meta/lib/oeqa/selftest/cases/incompatible_lic.py
ce08cf4825 lib: Add copyright statements to files without one
a74792b15d selftest/runtime_test/incompatible_lic: Use IMAGE_CLASSES for testimage
d01b1919dc selftest/incompatible_lic: Remove references to AVAILABLE_LICENSES
82f24d2197 license: Rework INCOMPATIBLE_LICENSE wildcard handling
d6449581c9 base/license: Rework INCOMPATIBLE_LICENSE variable handling
ebee9854d7 selftest: add core-image-weston to no-gpl3-no-meta-gpl2 image test

from 2021, 2022.

Re-open with details if there&apos;s still a problem.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>