Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH] metadata: Add license-mapping.conf for SPDX license mapping
Date: Sun, 13 Nov 2022 11:58:22
Message-Id: 20221113115809.1025416-1-mgorny@gentoo.org
1 Add a file defining mapping of SPDX-2.0 license identifiers to Gentoo
2 ebuild licenses. This was originally discussed on Gentoo Bugzilla [1],
3 the submitted to the gentoo-dev ml [2].
4
5 The proposed file uses the common key-value format used for
6 configuration files. Currently only `spdx-to-ebuild` section is defined
7 but other kinds of mapping can be added in the future. As described
8 in the top comment, it provides the ability to map SPDX-2.0 license
9 identifiers along with the `+` and `WITH` operators to arbitrary
10 Gentoo LICENSE strings (including all-of and any-of groups).
11
12 The initial list is taken from cargo-ebuild's license.rs [3],
13 courtesy of Leonardo H. Neumann and Georgy Yakovlev. A parser for this
14 file format is implemented in pycargoebuild [4].
15
16 [1] https://bugs.gentoo.org/706472
17 [2] https://archives.gentoo.org/gentoo-dev/message/01924bb71411696dce04445d85da508d
18 [3] https://gitweb.gentoo.org/proj/cargo-ebuild.git/tree/src/license.rs?id=b4314edc5bb672f5e94dcbc996f443e98fdb4dba
19 [4] https://github.com/projg2/pycargoebuild/
20
21 Signed-off-by: Michał Górny <mgorny@g.o>
22 ---
23 metadata/license-mapping.conf | 171 ++++++++++++++++++++++++++++++++++
24 1 file changed, 171 insertions(+)
25 create mode 100644 metadata/license-mapping.conf
26
27 diff --git a/metadata/license-mapping.conf b/metadata/license-mapping.conf
28 new file mode 100644
29 index 000000000000..c6608e450f4a
30 --- /dev/null
31 +++ b/metadata/license-mapping.conf
32 @@ -0,0 +1,171 @@
33 +# Copyright 2022 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +# Mapping of SPDX-2.0 licenses to Gentoo repository licenses.
37 +#
38 +# Keys are <license-id>[+] [WITH <exception-id>].
39 +#
40 +# License and exception identifiers are case-insensitive but please follow
41 +# the case used in SPDX. "WITH" exceptions are matched exactly,
42 +# i.e. "Apache-2.0 WITH LLVM-exception" will not match plain "Apache-2.0".
43 +# The "+" operator prefers exact match but falls back to the variant without,
44 +# i.e. if "MPL-1.0+" is not defined, the mapping for "MPL-1.0" is used.
45 +#
46 +# Values are ebuild-style LICENSE terms, possibly including multiple
47 +# licenses (implicit all-of group) and all-of/any-of groups.
48 +
49 +[spdx-to-ebuild]
50 +0BSD = 0BSD
51 +AFL-2.1 = AFL-2.1
52 +AFL-3.0 = AFL-3.0
53 +AGPL-3.0 = AGPL-3
54 +AGPL-3.0-only = AGPL-3
55 +AGPL-3.0-or-later = AGPL-3+
56 +Aladdin = Aladdin
57 +AMPAS = AMPAS
58 +Apache-1.0 = Apache-1.0
59 +Apache-1.1 = Apache-1.1
60 +Apache-2.0 = Apache-2.0
61 +Apache-2.0 WITH LLVM-exception = Apache-2.0-with-LLVM-exceptions
62 +APL-1.0 = APL-1.0
63 +APSL-2.0 = APSL-2
64 +Artistic-1.0 = Artistic
65 +Artistic-2.0 = Artistic-2
66 +Beerware = BEER-WARE
67 +BSD-1-Clause = BSD-1
68 +BSD-2-Clause = BSD-2
69 +BSD-3-Clause = BSD
70 +BSD-4-Clause = BSD-4
71 +BSL-1.0 = Boost-1.0
72 +bzip2-1.0.5 = BZIP2
73 +bzip2-1.0.6 = BZIP2
74 +CC-BY-2.0 = CC-BY-2.0
75 +CC-BY-2.5 = CC-BY-2.5
76 +CC-BY-3.0 = CC-BY-3.0
77 +CC-BY-4.0 = CC-BY-4.0
78 +CC-BY-NC-4.0 = CC-BY-NC-4.0
79 +CC-BY-NC-ND-2.0 = CC-BY-NC-ND-2.0
80 +CC-BY-NC-ND-2.5 = CC-BY-NC-ND-2.5
81 +CC-BY-NC-ND-3.0 = CC-BY-NC-ND-3.0
82 +CC-BY-NC-ND-4.0 = CC-BY-NC-ND-4.0
83 +CC-BY-NC-SA-2.5 = CC-BY-NC-SA-2.5
84 +CC-BY-NC-SA-3.0 = CC-BY-NC-SA-3.0
85 +CC-BY-NC-SA-4.0 = CC-BY-NC-SA-4.0
86 +CC-BY-ND-3.0 = CC-BY-ND-3.0
87 +CC-BY-ND-4.0 = CC-BY-ND-4.0
88 +CC-BY-SA-1.0 = CC-BY-SA-1.0
89 +CC-BY-SA-2.0 = CC-BY-SA-2.0
90 +CC-BY-SA-2.5 = CC-BY-SA-2.5
91 +CC-BY-SA-3.0 = CC-BY-SA-3.0
92 +CC-BY-SA-4.0 = CC-BY-SA-4.0
93 +CC-PD = CC-PDDC
94 +CC0-1.0 = CC0-1.0
95 +CDDL-1.0 = CDDL
96 +CDDL-1.1 = CDDL-1.1
97 +CECILL-2.0 = CeCILL-2
98 +CECILL-B = CeCILL-B
99 +CECILL-C = CeCILL-C
100 +CPAL-1.0 = CPAL-1.0
101 +CPL-1.0 = CPL-1.0
102 +CPOL-1.02 = CPOL
103 +curl = curl
104 +ECL-2.0 = ECL-2.0
105 +EPL-1.0 = EPL-1.0
106 +EPL-2.0 = EPL-2.0
107 +ErlPL-1.1 = ErlPL-1.1
108 +EUPL-1.1 = EUPL-1.1
109 +EUPL-1.2 = EUPL-1.2
110 +Fair = fairuse
111 +FSFAP = FSFAP
112 +FTL = FTL
113 +GD = gd
114 +Glulxe = Glulxe
115 +gnuplot = gnuplot
116 +GPL-1.0 = GPL-1
117 +GPL-1.0+ = GPL-1+
118 +GPL-1.0-only = GPL-1
119 +GPL-1.0-or-later = GPL-1+
120 +GPL-2.0 = GPL-2
121 +GPL-2.0+ = GPL-2+
122 +GPL-2.0-only = GPL-2
123 +GPL-2.0-or-later = GPL-2+
124 +GPL-2.0-with-classpath-exception = GPL-2-with-classpath-exception
125 +GPL-2.0-with-font-exception = GPL-2-with-font-exception
126 +GPL-3.0 = GPL-3
127 +GPL-3.0+ = GPL-3+
128 +GPL-3.0-only = GPL-3
129 +GPL-3.0-or-later = GPL-3+
130 +GPL-3.0-with-autoconf-exception = GPL-3-with-autoconf-exception
131 +gSOAP-1.3b = gSOAP
132 +HPND = HPND
133 +ICU = icu
134 +IJG = IJG
135 +ImageMagick = imagemagick
136 +Info-ZIP = Info-ZIP
137 +Interbase-1.0 = Interbase-1.0
138 +IPA = IPAfont
139 +ISC = ISC
140 +JSON = JSON
141 +LGPL-2.0 = LGPL-2
142 +LGPL-2.0+ = LGPL-2+
143 +LGPL-2.0-only = LGPL-2
144 +LGPL-2.0-or-later = LGPL-2+
145 +LGPL-2.1 = LGPL-2.1
146 +LGPL-2.1+ = LGPL-2.1+
147 +LGPL-2.1-only = LGPL-2.1
148 +LGPL-2.1-or-later = LGPL-2.1+
149 +LGPL-3.0 = LGPL-3
150 +LGPL-3.0+ = LGPL-3+
151 +LGPL-3.0-only = LGPL-3
152 +LGPL-3.0-or-later = LGPL-3+
153 +Libpng = libpng
154 +libpng-2.0 = libpng2
155 +libtiff = libtiff
156 +LPPL-1.2 = LPPL-1.2
157 +LPPL-1.3a = LPPL-1.3
158 +LPPL-1.3c = LPPL-1.3c
159 +MirOS = MirOS
160 +MIT = MIT
161 +MIT-advertising = MIT-with-advertising
162 +mpich2 = mpich2
163 +MPL-1.0 = MPL-1.0
164 +MPL-1.1 = MPL-1.1
165 +MPL-2.0 = MPL-2.0
166 +MS-PL = Ms-PL
167 +NPL-1.1 = NPL-1.1
168 +OFL-1.0 = OFL
169 +OFL-1.1 = OFL-1.1
170 +OLDAP-2.7 = OPENLDAP
171 +OpenSSL = openssl
172 +OPL-1.0 = OPL
173 +OSL-1.1 = OSL-1.1
174 +OSL-2.0 = OSL-2.0
175 +OSL-2.1 = OSL-2.1
176 +PHP-3.0 = PHP-3
177 +PHP-3.01 = PHP-3.01
178 +PostgreSQL = POSTGRESQL
179 +PSF-2.0 = PSF-2
180 +psutils = psutils
181 +Python-2.0 = PYTHON
182 +QPL-1.0 = QPL-1.0
183 +Rdisc = rdisc
184 +RSA-MD = RSA
185 +Ruby = Ruby
186 +Sendmail = Sendmail
187 +SGI-B-2.0 = SGI-B-2.0
188 +Sleepycat = Sleepycat
189 +SSPL-1.0 = SSPL-1
190 +TCL = tcltk
191 +TCP-wrappers = tcp_wrappers_license
192 +Unicode-DFS-2016 = Unicode-DFS-2016
193 +Unlicense = Unlicense
194 +Vim = vim
195 +VOSTROM = VOSTROM
196 +W3C = W3C
197 +W3C-19980720 = W3C-document
198 +Watcom-1.0 = Watcom-1.0
199 +WTFPL = WTFPL-2
200 +wxWindows = wxWinLL-3.1
201 +Zend-2.0 = Zend-2.0
202 +Zlib = ZLIB
203 +ZPL-2.1 = ZPL
204 --
205 2.38.1

Replies