diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-02 11:23:21 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-02 18:43:24 +0000 |
commit | 8a1de49b565f528c9569cee522ff0ce1b2bc4d90 (patch) | |
tree | 91bae2765c4830ff53362eefa07c8112aba6f3a3 /meta/lib/oeqa | |
parent | bd9f71fedc5e9cc15bd85da396a6fe0e50652d01 (diff) | |
download | poky-8a1de49b565f528c9569cee522ff0ce1b2bc4d90.tar.gz |
recipetool/devtool: Further SPDX identifier cleanups
Some of these are hard to know what to do with since the original source
files for the checksum aren't present. The safe option is to use "-only"
as often the main license is ambiguous and the source files themselves
determine the "or-later" possibility. The "-only" option therefore is
realistically what we need to use in this code.
(From OE-Core rev: 2b0cbafc7854de0308a624b17b8aaba704b031d5)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/oelib/license.py | 22 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/recipetool.py | 8 |
2 files changed, 15 insertions, 15 deletions
diff --git a/meta/lib/oeqa/selftest/cases/oelib/license.py b/meta/lib/oeqa/selftest/cases/oelib/license.py index 6ebbee589f..3b359396b6 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/license.py +++ b/meta/lib/oeqa/selftest/cases/oelib/license.py | |||
@@ -15,11 +15,11 @@ class SeenVisitor(oe.license.LicenseVisitor): | |||
15 | 15 | ||
16 | class TestSingleLicense(TestCase): | 16 | class TestSingleLicense(TestCase): |
17 | licenses = [ | 17 | licenses = [ |
18 | "GPLv2", | 18 | "GPL-2.0-only", |
19 | "LGPL-2.0", | 19 | "LGPL-2.0-only", |
20 | "Artistic", | 20 | "Artistic-1.0", |
21 | "MIT", | 21 | "MIT", |
22 | "GPLv3+", | 22 | "GPL-3.0-or-later", |
23 | "FOO_BAR", | 23 | "FOO_BAR", |
24 | ] | 24 | ] |
25 | invalid_licenses = ["GPL/BSD"] | 25 | invalid_licenses = ["GPL/BSD"] |
@@ -67,9 +67,9 @@ class TestComplexCombinations(TestSimpleCombinations): | |||
67 | "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"], | 67 | "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"], |
68 | "(ALPHA|(BETA&THETA)|OMEGA)&DELTA": ["OMEGA", "DELTA"], | 68 | "(ALPHA|(BETA&THETA)|OMEGA)&DELTA": ["OMEGA", "DELTA"], |
69 | "((ALPHA|BETA)&FOO)|BAZ": ["BETA", "FOO"], | 69 | "((ALPHA|BETA)&FOO)|BAZ": ["BETA", "FOO"], |
70 | "(GPL-2.0|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0", "BSD-4-clause", "MIT"], | 70 | "(GPL-2.0-only|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0-only", "BSD-4-clause", "MIT"], |
71 | } | 71 | } |
72 | preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0"] | 72 | preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0-only"] |
73 | 73 | ||
74 | class TestIsIncluded(TestCase): | 74 | class TestIsIncluded(TestCase): |
75 | tests = { | 75 | tests = { |
@@ -87,12 +87,12 @@ class TestIsIncluded(TestCase): | |||
87 | [True, ["BAR", "FOOBAR"]], | 87 | [True, ["BAR", "FOOBAR"]], |
88 | ("(FOO | BAR) & FOOBAR | BAZ & MOO & BARFOO", None, "FOO"): | 88 | ("(FOO | BAR) & FOOBAR | BAZ & MOO & BARFOO", None, "FOO"): |
89 | [True, ["BAZ", "MOO", "BARFOO"]], | 89 | [True, ["BAZ", "MOO", "BARFOO"]], |
90 | ("GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary", None, None): | 90 | ("GPL-3.0-or-later & GPL-2.0-only & LGPL-2.1-only | Proprietary", None, None): |
91 | [True, ["GPL-3.0", "GPL-2.0", "LGPL-2.1"]], | 91 | [True, ["GPL-3.0-or-later", "GPL-2.0-only", "LGPL-2.1-only"]], |
92 | ("GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary", None, "GPL-3.0"): | 92 | ("GPL-3.0-or-later & GPL-2.0-only & LGPL-2.1-only | Proprietary", None, "GPL-3.0-or-later"): |
93 | [True, ["Proprietary"]], | 93 | [True, ["Proprietary"]], |
94 | ("GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary", None, "GPL-3.0 Proprietary"): | 94 | ("GPL-3.0-or-later & GPL-2.0-only & LGPL-2.1-only | Proprietary", None, "GPL-3.0-or-later Proprietary"): |
95 | [False, ["GPL-3.0"]] | 95 | [False, ["GPL-3.0-or-later"]] |
96 | } | 96 | } |
97 | 97 | ||
98 | def test_tests(self): | 98 | def test_tests(self): |
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index ca3cf8942d..510dae6bad 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py | |||
@@ -343,7 +343,7 @@ class RecipetoolCreateTests(RecipetoolBase): | |||
343 | result = runCmd('recipetool create -o %s %s -x %s' % (recipefile, srcuri, tempsrc)) | 343 | result = runCmd('recipetool create -o %s %s -x %s' % (recipefile, srcuri, tempsrc)) |
344 | self.assertTrue(os.path.isfile(recipefile)) | 344 | self.assertTrue(os.path.isfile(recipefile)) |
345 | checkvars = {} | 345 | checkvars = {} |
346 | checkvars['LICENSE'] = 'GPL-2.0' | 346 | checkvars['LICENSE'] = 'GPL-2.0-only' |
347 | checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263' | 347 | checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263' |
348 | checkvars['SRC_URI'] = 'https://github.com/logrotate/logrotate/releases/download/${PV}/logrotate-${PV}.tar.xz' | 348 | checkvars['SRC_URI'] = 'https://github.com/logrotate/logrotate/releases/download/${PV}/logrotate-${PV}.tar.xz' |
349 | checkvars['SRC_URI[md5sum]'] = 'a560c57fac87c45b2fc17406cdf79288' | 349 | checkvars['SRC_URI[md5sum]'] = 'a560c57fac87c45b2fc17406cdf79288' |
@@ -363,7 +363,7 @@ class RecipetoolCreateTests(RecipetoolBase): | |||
363 | result = runCmd(['recipetool', 'create', '-o', recipefile, srcuri + ";rev=9f7cf8895ae2d39c465c04cc78e918c157420269", '-x', tempsrc]) | 363 | result = runCmd(['recipetool', 'create', '-o', recipefile, srcuri + ";rev=9f7cf8895ae2d39c465c04cc78e918c157420269", '-x', tempsrc]) |
364 | self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output) | 364 | self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output) |
365 | checkvars = {} | 365 | checkvars = {} |
366 | checkvars['LICENSE'] = 'LGPL-2.1' | 366 | checkvars['LICENSE'] = 'LGPL-2.1-only' |
367 | checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34' | 367 | checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34' |
368 | checkvars['S'] = '${WORKDIR}/git' | 368 | checkvars['S'] = '${WORKDIR}/git' |
369 | checkvars['PV'] = '1.11+git${SRCPV}' | 369 | checkvars['PV'] = '1.11+git${SRCPV}' |
@@ -386,7 +386,7 @@ class RecipetoolCreateTests(RecipetoolBase): | |||
386 | self.fail('recipetool did not create recipe file; output:\n%s\ndirlist:\n%s' % (result.output, str(dirlist))) | 386 | self.fail('recipetool did not create recipe file; output:\n%s\ndirlist:\n%s' % (result.output, str(dirlist))) |
387 | self.assertEqual(dirlist[0], 'socat_%s.bb' % pv, 'Recipe file incorrectly named') | 387 | self.assertEqual(dirlist[0], 'socat_%s.bb' % pv, 'Recipe file incorrectly named') |
388 | checkvars = {} | 388 | checkvars = {} |
389 | checkvars['LICENSE'] = set(['Unknown', 'GPL-2.0']) | 389 | checkvars['LICENSE'] = set(['Unknown', 'GPL-2.0-only']) |
390 | checkvars['LIC_FILES_CHKSUM'] = set(['file://COPYING.OpenSSL;md5=5c9bccc77f67a8328ef4ebaf468116f4', 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263']) | 390 | checkvars['LIC_FILES_CHKSUM'] = set(['file://COPYING.OpenSSL;md5=5c9bccc77f67a8328ef4ebaf468116f4', 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263']) |
391 | # We don't check DEPENDS since they are variable for this recipe depending on what's in the sysroot | 391 | # We don't check DEPENDS since they are variable for this recipe depending on what's in the sysroot |
392 | checkvars['S'] = None | 392 | checkvars['S'] = None |
@@ -402,7 +402,7 @@ class RecipetoolCreateTests(RecipetoolBase): | |||
402 | result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) | 402 | result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) |
403 | self.assertTrue(os.path.isfile(recipefile)) | 403 | self.assertTrue(os.path.isfile(recipefile)) |
404 | checkvars = {} | 404 | checkvars = {} |
405 | checkvars['LICENSE'] = set(['LGPL-2.1', 'MPL-1.1']) | 405 | checkvars['LICENSE'] = set(['LGPL-2.1-only', 'MPL-1.1-only']) |
406 | checkvars['SRC_URI'] = 'http://taglib.github.io/releases/taglib-${PV}.tar.gz' | 406 | checkvars['SRC_URI'] = 'http://taglib.github.io/releases/taglib-${PV}.tar.gz' |
407 | checkvars['SRC_URI[md5sum]'] = 'cee7be0ccfc892fa433d6c837df9522a' | 407 | checkvars['SRC_URI[md5sum]'] = 'cee7be0ccfc892fa433d6c837df9522a' |
408 | checkvars['SRC_URI[sha256sum]'] = 'b6d1a5a610aae6ff39d93de5efd0fdc787aa9e9dc1e7026fa4c961b26563526b' | 408 | checkvars['SRC_URI[sha256sum]'] = 'b6d1a5a610aae6ff39d93de5efd0fdc787aa9e9dc1e7026fa4c961b26563526b' |