diff options
-rw-r--r-- | meta/classes/license.bbclass | 65 | ||||
-rw-r--r-- | meta/conf/licenses.conf | 64 |
2 files changed, 64 insertions, 65 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index ad543f6188..a66933f733 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
@@ -10,71 +10,6 @@ addtask populate_lic after do_patch before do_package | |||
10 | do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}" | 10 | do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}" |
11 | do_populate_lic[cleandirs] = "${LICSSTATEDIR}" | 11 | do_populate_lic[cleandirs] = "${LICSSTATEDIR}" |
12 | 12 | ||
13 | # Standards are great! Everyone has their own. In an effort to standardize licensing | ||
14 | # names, common-licenses will use the SPDX standard license names. In order to not | ||
15 | # break the non-standardized license names that we find in LICENSE, we'll set | ||
16 | # up a bunch of VarFlags to accomodate non-SPDX license names. | ||
17 | # | ||
18 | # We should really discuss standardizing this field, but that's a longer term goal. | ||
19 | # For now, we can do this and it should grab the most common LICENSE naming variations. | ||
20 | # | ||
21 | # We should NEVER have a GPL/LGPL without a version!!!! | ||
22 | # Any mapping to MPL/LGPL/GPL should be fixed | ||
23 | # see: https://wiki.yoctoproject.org/wiki/License_Audit | ||
24 | |||
25 | # GPL variations | ||
26 | SPDXLICENSEMAP[GPL-1] = "GPL-1.0" | ||
27 | SPDXLICENSEMAP[GPLv1] = "GPL-1.0" | ||
28 | SPDXLICENSEMAP[GPLv1.0] = "GPL-1.0" | ||
29 | SPDXLICENSEMAP[GPL-2] = "GPL-2.0" | ||
30 | SPDXLICENSEMAP[GPLv2] = "GPL-2.0" | ||
31 | SPDXLICENSEMAP[GPLv2.0] = "GPL-2.0" | ||
32 | SPDXLICENSEMAP[GPL-3] = "GPL-3.0" | ||
33 | SPDXLICENSEMAP[GPLv3] = "GPL-3.0" | ||
34 | SPDXLICENSEMAP[GPLv3.0] = "GPL-3.0" | ||
35 | |||
36 | #LGPL variations | ||
37 | SPDXLICENSEMAP[LGPLv2] = "LGPL-2.0" | ||
38 | SPDXLICENSEMAP[LGPLv2.0] = "LGPL-2.0" | ||
39 | SPDXLICENSEMAP[LGPL2.1] = "LGPL-2.1" | ||
40 | SPDXLICENSEMAP[LGPLv2.1] = "LGPL-2.1" | ||
41 | SPDXLICENSEMAP[LGPLv3] = "LGPL-3.0" | ||
42 | |||
43 | #MPL variations | ||
44 | SPDXLICENSEMAP[MPL-1] = "MPL-1.0" | ||
45 | SPDXLICENSEMAP[MPLv1] = "MPL-1.0" | ||
46 | SPDXLICENSEMAP[MPLv1.1] = "MPL-1.1" | ||
47 | SPDXLICENSEMAP[MPLv2] = "MPL-2.0" | ||
48 | |||
49 | #MIT variations | ||
50 | SPDXLICENSEMAP[MIT-X] = "MIT" | ||
51 | SPDXLICENSEMAP[MIT-style] = "MIT" | ||
52 | |||
53 | #Openssl variations | ||
54 | SPDXLICENSEMAP[openssl] = "OpenSSL" | ||
55 | |||
56 | #Python variations | ||
57 | SPDXLICENSEMAP[PSF] = "Python-2.0" | ||
58 | SPDXLICENSEMAP[PSFv2] = "Python-2.0" | ||
59 | SPDXLICENSEMAP[Python-2] = "Python-2.0" | ||
60 | |||
61 | #Apache variations | ||
62 | SPDXLICENSEMAP[Apachev2] = "Apache-2.0" | ||
63 | SPDXLICENSEMAP[Apache-2] = "Apache-2.0" | ||
64 | |||
65 | #Artistic variations | ||
66 | SPDXLICENSEMAP[Artisticv1] = "Artistic-1.0" | ||
67 | SPDXLICENSEMAP[Artistic-1] = "Artistic-1.0" | ||
68 | |||
69 | #Academic variations | ||
70 | SPDXLICENSEMAP[AFL-2] = "AFL-2.0" | ||
71 | SPDXLICENSEMAP[AFL-1] = "AFL-1.2" | ||
72 | SPDXLICENSEMAP[AFLv2] = "AFL-2.0" | ||
73 | SPDXLICENSEMAP[AFLv1] = "AFL-1.2" | ||
74 | |||
75 | #Other variations | ||
76 | SPDXLICENSEMAP[EPLv1.0] = "EPL-1.0" | ||
77 | |||
78 | license_create_manifest() { | 13 | license_create_manifest() { |
79 | mkdir -p ${LICENSE_DIRECTORY}/${IMAGE_NAME} | 14 | mkdir -p ${LICENSE_DIRECTORY}/${IMAGE_NAME} |
80 | # Get list of installed packages | 15 | # Get list of installed packages |
diff --git a/meta/conf/licenses.conf b/meta/conf/licenses.conf index 6ed4dfe405..3cb143c863 100644 --- a/meta/conf/licenses.conf +++ b/meta/conf/licenses.conf | |||
@@ -39,6 +39,70 @@ SRC_DISTRIBUTE_LICENSES += "SPL-1.0 SugarCRM-1 SugarCRM-1.1.3 UCB VSL-1.0 W3C" | |||
39 | SRC_DISTRIBUTE_LICENSES += "Watcom-1.0 WXwindows XFree86-1.1 Xnet YPL-1.1" | 39 | SRC_DISTRIBUTE_LICENSES += "Watcom-1.0 WXwindows XFree86-1.1 Xnet YPL-1.1" |
40 | SRC_DISTRIBUTE_LICENSES += "Zimbra-1.3 Zlib ZPL-1.1 ZPL-2.0 ZPL-2.1" | 40 | SRC_DISTRIBUTE_LICENSES += "Zimbra-1.3 Zlib ZPL-1.1 ZPL-2.0 ZPL-2.1" |
41 | 41 | ||
42 | # Standards are great! Everyone has their own. In an effort to standardize licensing | ||
43 | # names, common-licenses will use the SPDX standard license names. In order to not | ||
44 | # break the non-standardized license names that we find in LICENSE, we'll set | ||
45 | # up a bunch of VarFlags to accomodate non-SPDX license names. | ||
46 | # | ||
47 | # We should really discuss standardizing this field, but that's a longer term goal. | ||
48 | # For now, we can do this and it should grab the most common LICENSE naming variations. | ||
49 | # | ||
50 | # We should NEVER have a GPL/LGPL without a version!!!! | ||
51 | # Any mapping to MPL/LGPL/GPL should be fixed | ||
52 | # see: https://wiki.yoctoproject.org/wiki/License_Audit | ||
53 | |||
54 | # GPL variations | ||
55 | SPDXLICENSEMAP[GPL-1] = "GPL-1.0" | ||
56 | SPDXLICENSEMAP[GPLv1] = "GPL-1.0" | ||
57 | SPDXLICENSEMAP[GPLv1.0] = "GPL-1.0" | ||
58 | SPDXLICENSEMAP[GPL-2] = "GPL-2.0" | ||
59 | SPDXLICENSEMAP[GPLv2] = "GPL-2.0" | ||
60 | SPDXLICENSEMAP[GPLv2.0] = "GPL-2.0" | ||
61 | SPDXLICENSEMAP[GPL-3] = "GPL-3.0" | ||
62 | SPDXLICENSEMAP[GPLv3] = "GPL-3.0" | ||
63 | SPDXLICENSEMAP[GPLv3.0] = "GPL-3.0" | ||
64 | |||
65 | #LGPL variations | ||
66 | SPDXLICENSEMAP[LGPLv2] = "LGPL-2.0" | ||
67 | SPDXLICENSEMAP[LGPLv2.0] = "LGPL-2.0" | ||
68 | SPDXLICENSEMAP[LGPL2.1] = "LGPL-2.1" | ||
69 | SPDXLICENSEMAP[LGPLv2.1] = "LGPL-2.1" | ||
70 | SPDXLICENSEMAP[LGPLv3] = "LGPL-3.0" | ||
71 | |||
72 | #MPL variations | ||
73 | SPDXLICENSEMAP[MPL-1] = "MPL-1.0" | ||
74 | SPDXLICENSEMAP[MPLv1] = "MPL-1.0" | ||
75 | SPDXLICENSEMAP[MPLv1.1] = "MPL-1.1" | ||
76 | SPDXLICENSEMAP[MPLv2] = "MPL-2.0" | ||
77 | |||
78 | #MIT variations | ||
79 | SPDXLICENSEMAP[MIT-X] = "MIT" | ||
80 | SPDXLICENSEMAP[MIT-style] = "MIT" | ||
81 | |||
82 | #Openssl variations | ||
83 | SPDXLICENSEMAP[openssl] = "OpenSSL" | ||
84 | |||
85 | #Python variations | ||
86 | SPDXLICENSEMAP[PSF] = "Python-2.0" | ||
87 | SPDXLICENSEMAP[PSFv2] = "Python-2.0" | ||
88 | SPDXLICENSEMAP[Python-2] = "Python-2.0" | ||
89 | |||
90 | #Apache variations | ||
91 | SPDXLICENSEMAP[Apachev2] = "Apache-2.0" | ||
92 | SPDXLICENSEMAP[Apache-2] = "Apache-2.0" | ||
93 | |||
94 | #Artistic variations | ||
95 | SPDXLICENSEMAP[Artisticv1] = "Artistic-1.0" | ||
96 | SPDXLICENSEMAP[Artistic-1] = "Artistic-1.0" | ||
97 | |||
98 | #Academic variations | ||
99 | SPDXLICENSEMAP[AFL-2] = "AFL-2.0" | ||
100 | SPDXLICENSEMAP[AFL-1] = "AFL-1.2" | ||
101 | SPDXLICENSEMAP[AFLv2] = "AFL-2.0" | ||
102 | SPDXLICENSEMAP[AFLv1] = "AFL-1.2" | ||
103 | |||
104 | #Other variations | ||
105 | SPDXLICENSEMAP[EPLv1.0] = "EPL-1.0" | ||
42 | 106 | ||
43 | # Additional license directories. Add your custom licenses directories this path. | 107 | # Additional license directories. Add your custom licenses directories this path. |
44 | # LICENSE_PATH += "${COREBASE}/custom-licenses" | 108 | # LICENSE_PATH += "${COREBASE}/custom-licenses" |