diff options
3 files changed, 15 insertions, 15 deletions
diff --git a/meta-selftest/recipes-test/license/incompatible-license.bb b/meta-selftest/recipes-test/license/incompatible-license.bb index 1728ad76b7..282f5c2875 100644 --- a/meta-selftest/recipes-test/license/incompatible-license.bb +++ b/meta-selftest/recipes-test/license/incompatible-license.bb | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | SUMMARY = "Recipe with an SPDX license" | 1 | SUMMARY = "Recipe with an SPDX license" |
| 2 | DESCRIPTION = "Is licensed with an SPDX license to be used for testing" | 2 | DESCRIPTION = "Is licensed with an SPDX license to be used for testing" |
| 3 | LICENSE = "GPL-3.0" | 3 | LICENSE = "GPL-3.0-only" |
diff --git a/meta-selftest/recipes-test/license/incompatible-licenses.bb b/meta-selftest/recipes-test/license/incompatible-licenses.bb index 9c1545efba..ab3b58d2c9 100644 --- a/meta-selftest/recipes-test/license/incompatible-licenses.bb +++ b/meta-selftest/recipes-test/license/incompatible-licenses.bb | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | SUMMARY = "Recipe with multiple SPDX licenses" | 1 | SUMMARY = "Recipe with multiple SPDX licenses" |
| 2 | DESCRIPTION = "Is licensed with multiple SPDX licenses to be used for testing" | 2 | DESCRIPTION = "Is licensed with multiple SPDX licenses to be used for testing" |
| 3 | LICENSE = "GPL-2.0 & GPL-3.0 & LGPL-3.0" | 3 | LICENSE = "GPL-2.0-only & GPL-3.0 & LGPL-3.0-only" |
diff --git a/meta/lib/oeqa/selftest/cases/incompatible_lic.py b/meta/lib/oeqa/selftest/cases/incompatible_lic.py index 2a6382a1a8..152da6332a 100644 --- a/meta/lib/oeqa/selftest/cases/incompatible_lic.py +++ b/meta/lib/oeqa/selftest/cases/incompatible_lic.py | |||
| @@ -15,66 +15,66 @@ class IncompatibleLicenseTests(OESelftestTestCase): | |||
| 15 | # Verify that a package with an SPDX license (from AVAILABLE_LICENSES) | 15 | # Verify that a package with an SPDX license (from AVAILABLE_LICENSES) |
| 16 | # cannot be built when INCOMPATIBLE_LICENSE contains this SPDX license | 16 | # cannot be built when INCOMPATIBLE_LICENSE contains this SPDX license |
| 17 | def test_incompatible_spdx_license(self): | 17 | def test_incompatible_spdx_license(self): |
| 18 | self.lic_test('incompatible-license', 'GPL-3.0', 'GPL-3.0') | 18 | self.lic_test('incompatible-license', 'GPL-3.0-only', 'GPL-3.0-only') |
| 19 | 19 | ||
| 20 | # Verify that a package with an SPDX license (from AVAILABLE_LICENSES) | 20 | # Verify that a package with an SPDX license (from AVAILABLE_LICENSES) |
| 21 | # cannot be built when INCOMPATIBLE_LICENSE contains an alias (in | 21 | # cannot be built when INCOMPATIBLE_LICENSE contains an alias (in |
| 22 | # SPDXLICENSEMAP) of this SPDX license | 22 | # SPDXLICENSEMAP) of this SPDX license |
| 23 | def test_incompatible_alias_spdx_license(self): | 23 | def test_incompatible_alias_spdx_license(self): |
| 24 | self.lic_test('incompatible-license', 'GPL-3.0', 'GPLv3') | 24 | self.lic_test('incompatible-license', 'GPL-3.0-only', 'GPLv3') |
| 25 | 25 | ||
| 26 | # Verify that a package with an SPDX license (from AVAILABLE_LICENSES) | 26 | # Verify that a package with an SPDX license (from AVAILABLE_LICENSES) |
| 27 | # cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded license | 27 | # cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded license |
| 28 | # matching this SPDX license | 28 | # matching this SPDX license |
| 29 | def test_incompatible_spdx_license_wildcard(self): | 29 | def test_incompatible_spdx_license_wildcard(self): |
| 30 | self.lic_test('incompatible-license', 'GPL-3.0', '*GPL-3.0') | 30 | self.lic_test('incompatible-license', 'GPL-3.0-only', '*GPL-3.0-only') |
| 31 | 31 | ||
| 32 | # Verify that a package with an SPDX license (from AVAILABLE_LICENSES) | 32 | # Verify that a package with an SPDX license (from AVAILABLE_LICENSES) |
| 33 | # cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded alias | 33 | # cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded alias |
| 34 | # license matching this SPDX license | 34 | # license matching this SPDX license |
| 35 | def test_incompatible_alias_spdx_license_wildcard(self): | 35 | def test_incompatible_alias_spdx_license_wildcard(self): |
| 36 | self.lic_test('incompatible-license', 'GPL-3.0', '*GPLv3') | 36 | self.lic_test('incompatible-license', 'GPL-3.0-only', '*GPLv3') |
| 37 | 37 | ||
| 38 | # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX | 38 | # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX |
| 39 | # license cannot be built when INCOMPATIBLE_LICENSE contains this SPDX | 39 | # license cannot be built when INCOMPATIBLE_LICENSE contains this SPDX |
| 40 | # license | 40 | # license |
| 41 | def test_incompatible_spdx_license_alias(self): | 41 | def test_incompatible_spdx_license_alias(self): |
| 42 | self.lic_test('incompatible-license-alias', 'GPL-3.0', 'GPL-3.0') | 42 | self.lic_test('incompatible-license-alias', 'GPL-3.0-only', 'GPL-3.0-only') |
| 43 | 43 | ||
| 44 | # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX | 44 | # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX |
| 45 | # license cannot be built when INCOMPATIBLE_LICENSE contains this alias | 45 | # license cannot be built when INCOMPATIBLE_LICENSE contains this alias |
| 46 | def test_incompatible_alias_spdx_license_alias(self): | 46 | def test_incompatible_alias_spdx_license_alias(self): |
| 47 | self.lic_test('incompatible-license-alias', 'GPL-3.0', 'GPLv3') | 47 | self.lic_test('incompatible-license-alias', 'GPL-3.0-only', 'GPLv3') |
| 48 | 48 | ||
| 49 | # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX | 49 | # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX |
| 50 | # license cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded | 50 | # license cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded |
| 51 | # license matching this SPDX license | 51 | # license matching this SPDX license |
| 52 | def test_incompatible_spdx_license_alias_wildcard(self): | 52 | def test_incompatible_spdx_license_alias_wildcard(self): |
| 53 | self.lic_test('incompatible-license-alias', 'GPL-3.0', '*GPL-3.0') | 53 | self.lic_test('incompatible-license-alias', 'GPL-3.0-only', '*GPL-3.0') |
| 54 | 54 | ||
| 55 | # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX | 55 | # Verify that a package with an alias (from SPDXLICENSEMAP) to an SPDX |
| 56 | # license cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded | 56 | # license cannot be built when INCOMPATIBLE_LICENSE contains a wildcarded |
| 57 | # alias license matching the SPDX license | 57 | # alias license matching the SPDX license |
| 58 | def test_incompatible_alias_spdx_license_alias_wildcard(self): | 58 | def test_incompatible_alias_spdx_license_alias_wildcard(self): |
| 59 | self.lic_test('incompatible-license-alias', 'GPL-3.0', '*GPLv3') | 59 | self.lic_test('incompatible-license-alias', 'GPL-3.0-only', '*GPLv3') |
| 60 | 60 | ||
| 61 | # Verify that a package with multiple SPDX licenses (from | 61 | # Verify that a package with multiple SPDX licenses (from |
| 62 | # AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains | 62 | # AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains |
| 63 | # some of them | 63 | # some of them |
| 64 | def test_incompatible_spdx_licenses(self): | 64 | def test_incompatible_spdx_licenses(self): |
| 65 | self.lic_test('incompatible-licenses', 'GPL-3.0 LGPL-3.0', 'GPL-3.0 LGPL-3.0') | 65 | self.lic_test('incompatible-licenses', 'GPL-3.0-only LGPL-3.0-only', 'GPL-3.0-only LGPL-3.0-only') |
| 66 | 66 | ||
| 67 | # Verify that a package with multiple SPDX licenses (from | 67 | # Verify that a package with multiple SPDX licenses (from |
| 68 | # AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains a | 68 | # AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains a |
| 69 | # wildcard to some of them | 69 | # wildcard to some of them |
| 70 | def test_incompatible_spdx_licenses_wildcard(self): | 70 | def test_incompatible_spdx_licenses_wildcard(self): |
| 71 | self.lic_test('incompatible-licenses', 'GPL-3.0 LGPL-3.0', '*GPL-3.0') | 71 | self.lic_test('incompatible-licenses', 'GPL-3.0-only LGPL-3.0-only', '*GPL-3.0-only') |
| 72 | 72 | ||
| 73 | # Verify that a package with multiple SPDX licenses (from | 73 | # Verify that a package with multiple SPDX licenses (from |
| 74 | # AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains a | 74 | # AVAILABLE_LICENSES) cannot be built when INCOMPATIBLE_LICENSE contains a |
| 75 | # wildcard matching all licenses | 75 | # wildcard matching all licenses |
| 76 | def test_incompatible_all_licenses_wildcard(self): | 76 | def test_incompatible_all_licenses_wildcard(self): |
| 77 | self.lic_test('incompatible-licenses', 'GPL-2.0 GPL-3.0 LGPL-3.0', '*') | 77 | self.lic_test('incompatible-licenses', 'GPL-2.0-only GPL-3.0-only LGPL-3.0-only', '*') |
| 78 | 78 | ||
| 79 | # Verify that a package with a non-SPDX license (neither in | 79 | # Verify that a package with a non-SPDX license (neither in |
| 80 | # AVAILABLE_LICENSES nor in SPDXLICENSEMAP) cannot be built when | 80 | # AVAILABLE_LICENSES nor in SPDXLICENSEMAP) cannot be built when |
| @@ -91,7 +91,7 @@ INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0" | |||
| 91 | 91 | ||
| 92 | def test_bash_default(self): | 92 | def test_bash_default(self): |
| 93 | self.write_config(self.default_config()) | 93 | self.write_config(self.default_config()) |
| 94 | error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0+" | 94 | error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0-or-later" |
| 95 | 95 | ||
| 96 | result = bitbake('core-image-minimal', ignore_status=True) | 96 | result = bitbake('core-image-minimal', ignore_status=True) |
| 97 | if error_msg not in result.output: | 97 | if error_msg not in result.output: |
| @@ -99,7 +99,7 @@ INCOMPATIBLE_LICENSE_pn-core-image-minimal = "GPL-3.0 LGPL-3.0" | |||
| 99 | 99 | ||
| 100 | def test_bash_and_license(self): | 100 | def test_bash_and_license(self): |
| 101 | self.write_config(self.default_config() + '\nLICENSE_append_pn-bash = " & SomeLicense"') | 101 | self.write_config(self.default_config() + '\nLICENSE_append_pn-bash = " & SomeLicense"') |
| 102 | error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0+" | 102 | error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0-or-later" |
| 103 | 103 | ||
| 104 | result = bitbake('core-image-minimal', ignore_status=True) | 104 | result = bitbake('core-image-minimal', ignore_status=True) |
| 105 | if error_msg not in result.output: | 105 | if error_msg not in result.output: |
