Skip to content

Commit 01b6bc8

Browse files
authored
Merge pull request #215 from hesa/hesa-add-licenses-029
Add licenses bulk 029
2 parents 41299f6 + 8df7570 commit 01b6bc8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+421
-59
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ Current support:
5656

5757
|Type | Number |
5858
|----------------|--------|
59-
|Licenses | 205 |
60-
|Aliases | 2833 |
59+
|Licenses | 210 |
60+
|Aliases | 2933 |
6161
|Compatibilities | 22 |
6262
|Operators | 14 |
63-
|Ambiguities | 160 |
64-
|Compounds | 51 |
63+
|Ambiguities | 171 |
64+
|Compounds | 56 |
6565

6666
# About
6767

STATUS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
|Type | Number |
33
|----------------|--------|
4-
|Licenses | 205 |
5-
|Aliases | 2833 |
4+
|Licenses | 210 |
5+
|Aliases | 2933 |
66
|Compatibilities | 22 |
77
|Operators | 14 |
8-
|Ambiguities | 160 |
9-
|Compounds | 51 |
8+
|Ambiguities | 171 |
9+
|Compounds | 56 |

devel/check-license-file.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,11 @@
1212
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]})/../
1313
cat $1 | while read LICENSE
1414
do
15+
COMMENT=$(echo $LICENSE | grep -c "^#")
16+
if [ $COMMENT -ne 0 ]
17+
then
18+
echo "ignore comment: $LICENSE" 1>&2
19+
continue
20+
fi
1521
printf "unknown\n$LICENSE\n"
1622
done | ${SCRIPT_DIR}/devel/flame shell -s | grep -v Unknown

python/flame/license_db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def expression_license(self, license_expression, validations=None, update_dual=T
435435
>>> fl = FossLicenses()
436436
>>> expression = fl.expression_license('BSD3 & x11-keith-packard')
437437
>>> print(expression['identified_license'])
438-
BSD-3-Clause AND LicenseRef-flame-x11-keith-packard
438+
BSD-3-Clause AND HPND-sell-variant
439439
440440
"""
441441
if not isinstance(license_expression, str):

tests/python/test_ambigs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
'compounds_file': 'tests/var/compounds.json'
1313
})
1414

15-
def test_ambig_gpl():
15+
def _DISABLE_test_ambig_gpl():
1616
lic = fl.expression_license("GPL", update_dual=False)
1717
assert lic['identified_license'] == "GPL"
1818
assert lic['ambiguities']

tests/python/test_values.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ def test_compounds():
6262
for alias in compound['aliases']:
6363
logging.debug(f' alias: {alias}')
6464
expression = fl.expression_license(alias, update_dual=False)
65+
# print("Checking alias: " + str(alias), file=sys.stderr)
66+
# print("Checking expression: " + str(expression), file=sys.stderr)
67+
# print("Checking identified: " + str(expression['identified_license']), file=sys.stderr)
68+
# print("Checking compound: " + str(compound_spdx), file=sys.stderr)
6569
assert compound_spdx == expression['identified_license']
6670
count += 1
6771
global tot_count

tests/shell/sanity-check.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,9 @@ check_presence BSD-3-Clause-Modification " -i -e modification -e repoze " " -e 0
196196
check_presence BSD-3-Clause-No-Nuclear-Warranty " -i -e nuclear" " -e 0 -e 1 -e 2 -e 4"
197197
check_presence BSD-4-Clause "$BSD4_PRESENT" " $ZERO_BSD_PRESENT $BSD2_PRESENT $BSD3_PRESENT"
198198
check_presence BSD-4-Clause-UC " -i -e university -e UC" " -e 1 -e 2 -e 3"
199+
check_presence BSD-4.3TAHOE " -i -e bsla" ""
199200
check_presence BSD-Source-Code " -i -e source -e code " " -e 1 -e 2 -e 3"
200-
201+
check_presence BUSL-1.1 " -i -e busl -e business -e businnes -e bsl-1.1 " "-i -e 1.0"
201202
check_presence bzip2-1.0.6 " -i -e 1.0.6 -e 2010 -e bzip2 " " 1.1"
202203

203204
check_presence CC0-1.0 " -e 1 -e 0 " " -e [2-9]"
@@ -278,11 +279,13 @@ check_presence LGPL-2.1-or-later " $LGPL_COMMON -e 2 -e later" " -e 3"
278279
check_presence LGPL-3.0-or-later " $LGPL_COMMON -e 3 -e later" " -e 2"
279280

280281
check_presence LicenseRef-scancode-boost-original " -i -e original " ""
282+
check_presence LicenseRef-scancode-bsl-1.0 "-i -e bsl" " -i -e busl -e 1.1"
281283
check_presence LicenseRef-scancode-cvwl " -i -e cvwl -e MITRE " ""
282284
check_presence LicenseRef-scancode-g10-permissive " -i -e g10 " ""
283285
check_presence LicenseRef-scancode-indiana-extreme " -i -e indiana " " -e 1.2"
284286
check_presence LicenseRef-scancode-iso-8879 " -i 8879 " ""
285287
check_presence LicenseRef-scancode-josl-1.0 " -i josl-1 -e jabber " ""
288+
check_presence LicenseRef-scancode-mit-old-style " -i -e old -e mit" " -i -e ^mit$"
286289
check_presence LicenseRef-scancode-public-domain " -i -e domain -e public " ""
287290
check_presence LicenseRef-scancode-wtfpl-1.0 " -i -e wtfpl " ""
288291
check_presence LicenseRef-scancode-unicode " -i -e unicode " " -e 3"
@@ -333,6 +336,7 @@ check_presence ODC-By-1.0 " -i -e 1.0 -e odc" ""
333336
check_presence OFL-1.0 " -e 1.0 " " -e 1.1"
334337
check_presence OFL-1.1 " -e 1.1" " -e 1.0"
335338
check_presence OGTSL " -i -e ogtsl -e Open\ Group -e ogts\ license -e opengroup" ""
339+
check_presence OLDAP-2.8 " -i -e oldap -e open[\ ]*ldap" ""
336340
check_presence OML " -i -e oml -e market -e fastcgi -e OM\ License" ""
337341
check_presence OpenSSL " -i -e openssl " ""
338342
check_presence OSL-2.1 " -i -e Open\ Software -e OSL-2 -e OSL\ 2" ""

var/ambiguities.json

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
},
2323
"Apache License": {
2424
"aliases": [
25+
"License :: OSI Approved :: Apache Software License",
2526
"Apache",
2627
"Apache License",
2728
"Apache Software License",
@@ -35,7 +36,6 @@
3536
"Apache Software Licenses",
3637
"The Apache License",
3738
"Apache license",
38-
"License :: OSI Approved :: Apache Software License",
3939
"OSI Approved Apache Software License",
4040
"apache",
4141
"OSI-Approved-::-Apache-Software-License",
@@ -57,7 +57,8 @@
5757
"License :: OSI Approved :: Artistic License",
5858
"Artistic License",
5959
"Artistic",
60-
"Artistic License (Perl)"
60+
"Artistic License (Perl)",
61+
"Artistc"
6162
],
6263
"problem": "This license has different version (1.0, and 2.0). Without a version number it is not possible to determine which of the versions is meant."
6364
},
@@ -97,17 +98,25 @@
9798
"BSD_License",
9899
"BSD_License_",
99100
"BSD like",
100-
"BSD-LIKE"
101+
"BSD-LIKE",
102+
"bsd",
103+
"BSD-clause",
104+
"bsd license"
101105
],
102106
"problem": "There are a couple of variants or versions of the BSD license (0BSD, BSD-1-Clause, BSD-2-Clause, BSD-3-Clause and BSD-4-Clause). Without the version/variant of the license it is not possible to determine which of the versions is meant."
103107
},
104108
"BSL": {
105-
"aliases": [
106-
"bsl-1",
107-
"BSL-1"
108-
],
109-
"problem": "BSL or BSL-1 might refer to the Boost License(s) Original Boost and BSL-1.0. BSL can also refer to Business Source License or BUSL."
109+
"aliases": [
110+
"bsl-1",
111+
"BSL-1"
112+
],
113+
"problem": "BSL or BSL-1 might refer to the Boost License(s) Original Boost and BSL-1.0. BSL can also refer to Business Source License or BUSL."
110114
},
115+
"Business Source License": {
116+
"aliases": [
117+
],
118+
"problem": "There are a couple of variants or versions of the Business Source License license (BUSL-1.0, BUSL-1.1). Without the version/variant of the license it is not possible to determine which of the versions is meant."
119+
},
111120
"Common Development and Distribution License": {
112121
"aliases": [
113122
"CDDL",
@@ -211,10 +220,13 @@
211220
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
212221
"GNU Library/LGPL",
213222
"GNU Library",
223+
"gnu library",
214224
"GNU Library or GNU Lesser General Public License",
215225
"GNU Lesser General Public License v1.0",
216226
"LGPL license",
217-
"GNU Lesser Public License"
227+
"GNU Lesser Public License",
228+
"lesser general public license",
229+
"Lesser GPL"
218230
],
219231
"problem": "This license has different versions (2.0, 2.1 and 3.0). Without a version number it is not possible to determine which of the versions is meant."
220232
},
@@ -242,7 +254,9 @@
242254
"aliases": [
243255
"MPL",
244256
"MPL-1",
245-
"MPLv1",
257+
"MPLv1",
258+
"mpl",
259+
"MPL License",
246260
"Mozilla-permissive",
247261
"Mozilla"
248262
],
@@ -259,7 +273,14 @@
259273
"aliases": [
260274
"License :: OSI Approved"
261275
],
262-
"problem": "OSI has approved many licenses. You It is not possible to determine which license is meant with this information."
276+
"problem": "OSI has approved many licenses. It is not possible to determine which license is meant with this information."
277+
},
278+
"OpenLDAP Public License": {
279+
"aliases": [
280+
"openldap",
281+
"OpenLDAP"
282+
],
283+
"problem": "This license has different versions (1.1, 1.2, 1.3, 1.4, 2.0, 2.0.1, 2.1, 2.2, 2.2.1, 2.2.2, 2.3, 2.4, 2.5, 2.6, 2.7 and 2.8) and variantes. Without a version number clearly distinguishing the version it is not possible to determine which of the versions is meant."
263284
},
264285
"Open Software License": {
265286
"aliases": [

var/compounds.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
},
66
"compounds": [
77
{
8-
"spdxid": "AGPL 3.0 WITH romic-exception",
8+
"spdxid": "AGPL-3.0-only WITH romic-exception",
99
"aliases": [
1010
"linking-exception-agpl-3.0",
11-
"AGPL-3.0-only WITH romic-exception"
11+
"AGPL 3.0 WITH romic-exception"
1212
]
1313
},
1414
{
@@ -48,7 +48,11 @@
4848
"GPL-2.0-only WITH the classpath exception",
4949
"GPLv2+CE",
5050
"GNU General Public License Version 2 with \"CLASSPATH\" EXCEPTION TO THE GNU General Public License VERSION 2 by Oracle",
51-
"GNU General Public License Version 2 with \"CLASSPATH\" EXCEPTION TO THE GNU General Public License VERSION 2 by Sun Microsystems"
51+
"GNU General Public License Version 2 with \"CLASSPATH\" EXCEPTION TO THE GNU General Public License VERSION 2 by Sun Microsystems",
52+
"GPLv2+CPE",
53+
"GPL-2.0-only WITH CPE",
54+
"GPL-2.0-only w/ CPE",
55+
"GPLv2 w/ CPE"
5256
]
5357
},
5458
{
@@ -111,15 +115,16 @@
111115
"GPL-3 w/ GCC exception",
112116
"GPL-3.0-only WITH GCC exception",
113117
"GPL-3.0-only WITH GCC Runtime Library exception",
114-
"GPL-3.0+-with-GCC-exception",
115118
"GPL-2.0-only WITH GCC exception",
116-
"GPL-2.0-only WITH GCC Runtime Library exception"
119+
"GPL-2.0-only WITH GCC Runtime Library exception",
120+
"GNU General Public License 3 plus GCC RUNTIME LIBRARY EXCEPTION"
117121
],
118122
"compatibility_as": "0BSD"
119123
},
120124
{
121125
"spdxid": "GPL-3.0-or-later WITH GCC-exception-3.1",
122126
"aliases": [
127+
"GPL-3.0+-with-GCC-exception"
123128
],
124129
"compatibility_as": "0BSD"
125130
},

var/licenses/AGPL-3.0-only.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
"GNU AFFERO GENERAL PUBLIC LICENSE",
5555
"GNU Affero General Public License",
5656
"GNU Affero General Public License-3.0 license",
57-
"Affero General Public License v3.0"
57+
"Affero General Public License v3.0",
58+
"GNU Affero General Public License-3",
59+
"gnu affero gpl 3.0",
60+
"agpl-3"
5861
]
5962
}

0 commit comments

Comments
 (0)