Skip to content

Commit 9f91bf5

Browse files
Merge pull request #3100 from nexB/add-license-dump-option
Add license dump option
2 parents c108206 + c857fa4 commit 9f91bf5

File tree

69,814 files changed

+291846
-178710
lines changed

Some content is hidden

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

69,814 files changed

+291846
-178710
lines changed

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,20 @@ tcl
9595
/00-*.txt
9696
/z-todo-licenses-*
9797

98+
# Extra ignores from licensedb
99+
*.pyc
100+
*.db
101+
.installed.cfg
102+
parts
103+
develop-eggs
104+
eggs
105+
downloads
106+
.settings
107+
TAGS
108+
Procfile
109+
local.cfg
110+
geckodriver.log
111+
var
112+
.metaflow
113+
selenium
114+
/dist/

CHANGELOG.rst

+20-5
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,30 @@ License detection:
5353
detected license only once. This data can contain the reference license text
5454
as an option.
5555

56-
- We can now detect licenses using custom license texts and license rules.
57-
These can be provided as a one off in a directory or packaged as a plugin
58-
for consistent reuse and deployment.
59-
6056
- There is a new "scancode-reindex-licenses" command that replace the
6157
"scancode --reindex-licenses" command line option which has been
6258
removed. This new command supports simpler reindexing using custom
6359
license texts and license rules contributed by plugins or stored in an
64-
additional directory.
60+
additional directory. The "--reindex-licenses-for-all-languages" CLI option
61+
is also moved to the "scancode-reindex-licenses" command as an option
62+
"--all-languages".
63+
64+
- We can now detect licenses using custom license texts and license rules.
65+
These can be provided as a one off in a directory or packaged as a plugin
66+
for consistent reuse and deployment. There is an option "--additional-directory"
67+
with the "scancode-reindex-licenses" command and also a new "--only-builtin"
68+
option to only use the builtin licenses to build the cache.
69+
70+
- Scancode LICENSE and RULE files now also contain their data as YAML frontmatter,
71+
which previously used to be in their respective YAML files. This reduces number of
72+
files in those directories, 'rules' and 'licenses' to half. Git line history is
73+
preserved for the files.
74+
75+
- A new command line option "--get-license-data" is added to dump license data in
76+
JSON, YAML and HTML formats, and also generates a local index and a static website
77+
to view the data. This will essentially be an API/way to get scancode license data
78+
as opposed to just reading the files.
79+
6580

6681
Package detection:
6782
~~~~~~~~~~~~~~~~~~~~~

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ pygmars==0.7.0
5656
Pygments==2.12.0
5757
pymaven-patch==0.3.0
5858
pyparsing==3.0.9
59+
python-frontmatter==1.0.0
5960
pytz==2022.1
6061
PyYAML==6.0
6162
rdflib==6.2.0

setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ install_requires =
101101
pygmars >= 0.7.0
102102
pygments
103103
pymaven_patch >= 0.2.8
104+
python-frontmatter >= 1.0.0
104105
requests >= 2.7.0
105106
saneyaml >= 0.5.2
106107
spdx_tools >= 0.7.0a3
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
---
2+
license_expression: free-unknown
3+
relevance: 100
4+
notes: |
5+
License test derived from a file of the BSD-licensed repository at:
6+
https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/ccurls.t1
7+
originally expected to be detected as LiLiQ-P-1.1
8+
with coverage of 0
9+
This is a URL test extracted from ccurls.t1.
10+
---
11+
112
http://opensource.org/licenses/liliq-p-1.1

src/licensedcode/data/inactive/rules/free-unknown_url_glc_90.yml

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
---
2+
license_expression: free-unknown
3+
relevance: 100
4+
notes: |
5+
License test derived from a file of the BSD-licensed repository at:
6+
https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/ccurls.t1
7+
originally expected to be detected as LiLiQ-P-1.1
8+
with coverage of 0
9+
This is a URL test extracted from ccurls.t1.
10+
---
11+
112
https://opensource.org/licenses/liliq-p-1.1

src/licensedcode/data/inactive/rules/free-unknown_url_glc_91.yml

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
---
2+
license_expression: free-unknown
3+
relevance: 100
4+
notes: |
5+
License test derived from a file of the BSD-licensed repository at:
6+
https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/ccurls.t1
7+
originally expected to be detected as LiLiQ-R-1.1
8+
with coverage of 0
9+
This is a URL test extracted from ccurls.t1.
10+
---
11+
112
http://opensource.org/licenses/liliq-r-1.1

src/licensedcode/data/inactive/rules/free-unknown_url_glc_92.yml

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
---
2+
license_expression: free-unknown
3+
relevance: 100
4+
notes: |
5+
License test derived from a file of the BSD-licensed repository at:
6+
https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/ccurls.t1
7+
originally expected to be detected as LiLiQ-R-1.1
8+
with coverage of 0
9+
This is a URL test extracted from ccurls.t1.
10+
---
11+
112
https://opensource.org/licenses/liliq-r-1.1

src/licensedcode/data/inactive/rules/free-unknown_url_glc_93.yml

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
---
2+
license_expression: free-unknown
3+
relevance: 100
4+
notes: |
5+
License test derived from a file of the BSD-licensed repository at:
6+
https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/ccurls.t1
7+
originally expected to be detected as LiLiQ-Rplus-1.1
8+
with coverage of 0
9+
This is a URL test extracted from ccurls.t1.
10+
---
11+
112
http://opensource.org/licenses/liliq-rplus-1.1

src/licensedcode/data/inactive/rules/free-unknown_url_glc_94.yml

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
---
2+
license_expression: free-unknown
3+
relevance: 100
4+
notes: |
5+
License test derived from a file of the BSD-licensed repository at:
6+
https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/ccurls.t1
7+
originally expected to be detected as LiLiQ-Rplus-1.1
8+
with coverage of 0
9+
This is a URL test extracted from ccurls.t1.
10+
---
11+
112
https://opensource.org/licenses/liliq-rplus-1.1

src/licensedcode/data/inactive/rules/free-unknown_url_glc_95.yml

-8
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
---
2+
license_expression: unknown
3+
is_license_reference: yes
4+
notes: mostly used by Oracle in the JDK and Linux
5+
---
6+
17
Use is subject to licence term

src/licensedcode/data/inactive/rules/unknown_use_subject_to_licence_terms.yml

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
---
2+
license_expression: unknown
3+
is_license_reference: yes
4+
notes: mostly used by Oracle in the JDK and Linux
5+
---
6+
17
Use is subject to licence terms.

src/licensedcode/data/inactive/rules/unknown_use_subject_to_licence_terms2.yml

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
---
2+
license_expression: unknown
3+
is_license_reference: yes
4+
notes: mostly used by Oracle in the JDK and Linux
5+
---
6+
17
Use is subject to license term

src/licensedcode/data/inactive/rules/unknown_use_subject_to_license_terms.yml

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
---
2+
license_expression: unknown
3+
is_license_reference: yes
4+
notes: mostly used by Oracle in the JDK and Linux
5+
---
6+
17
Use is subject to license terms.

src/licensedcode/data/inactive/rules/unknown_use_subject_to_license_terms2.yml

-3
This file was deleted.

src/licensedcode/data/licenses/389-exception.LICENSE

+46
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
1+
---
2+
key: 389-exception
3+
short_name: 389 Directory Server Exception to GPL 2.0
4+
name: 389 Directory Server Exception to GPL 2.0
5+
category: Copyleft Limited
6+
owner: Fedora
7+
homepage_url: https://spdx.org/licenses/389-exception.html
8+
is_exception: yes
9+
spdx_license_key: 389-exception
10+
text_urls:
11+
- http://www.directory.fedora.redhat.com/wiki/GPL_Exception_License_Text
12+
other_urls:
13+
- http://directory.fedoraproject.org/wiki/GPL_Exception_License_Text
14+
- http://www.gnu.org/licenses/gpl-2.0.txt
15+
- https://web.archive.org/web/20080828121337/http://directory.fedoraproject.org/wiki/GPL_Exception_License_Text
16+
standard_notice: |
17+
This Program is free software; you can redistribute it and/or modify it
18+
under the terms of the GNU General Public License as published by the Free
19+
Software Foundation; version 2 of the License.
20+
This Program is distributed in the hope that it will be useful, but WITHOUT
21+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
23+
more details.
24+
You should have received a copy of the GNU General Public License along
25+
with this Program; if not, write to the Free Software Foundation, Inc., 59
26+
Temple Place, Suite 330, Boston, MA 02111-1307 USA.
27+
In addition, as a special exception, Red Hat, Inc. gives You the additional
28+
right to link the code of this Program with code not covered under the GNU
29+
General Public License ("Non-GPL Code") and to distribute linked
30+
combinations including the two, subject to the limitations in this
31+
paragraph. Non-GPL Code permitted under this exception must only link to
32+
the code of this Program through those well defined interfaces identified
33+
in the file named EXCEPTION found in the source code files (the "Approved
34+
Interfaces"). The files of Non-GPL Code may instantiate templates or use
35+
macros or inline functions from the Approved Interfaces without causing the
36+
resulting work to be covered by the GNU General Public License. Only Red
37+
Hat, Inc. may make changes or additions to the list of Approved Interfaces.
38+
You must obey the GNU General Public License in all respects for all of the
39+
Program code and other code used in conjunction with the Program except the
40+
Non-GPL Code covered by this exception. If you modify this file, you may
41+
extend this exception to your version of the file, but you are not
42+
obligated to do so. If you do not wish to provide this exception without
43+
modification, you must delete this exception statement from your version
44+
and license this file solely under the GPL without exception.
45+
---
46+
147
In addition, as a special exception, Red Hat, Inc. gives You the additional
248
right to link the code of this Program with code not covered under the GNU
349
General Public License ("Non-GPL Code") and to distribute linked combinations

src/licensedcode/data/licenses/389-exception.yml

-43
This file was deleted.

src/licensedcode/data/licenses/3com-microcode.LICENSE

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
---
2+
key: 3com-microcode
3+
short_name: 3Com Microcode
4+
name: 3Com Microcode
5+
category: Permissive
6+
owner: HP - Hewlett Packard
7+
notes: this is a Linux firmware BSD-like license with some weird extra terms
8+
spdx_license_key: LicenseRef-scancode-3com-microcode
9+
---
10+
111

212
Redistribution and use in source and binary forms of the
313
microcode software are permitted provided that the following conditions
@@ -26,4 +36,4 @@ MICROCODE SOFTWARE WILL NOT CREATE OR GIVE GROUNDS FOR A LICENSE BY
2636
IMPLICATION, ESTOPPEL, OR OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS
2737
(PATENT, COPYRIGHT, TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT)
2838
EMBODIED IN ANY OTHER 3COM HARDWARE OR SOFTWARE EITHER SOLELY OR IN
29-
COMBINATION WITH THE MICROCODE SOFTWARE
39+
COMBINATION WITH THE MICROCODE SOFTWARE

src/licensedcode/data/licenses/3com-microcode.yml

-7
This file was deleted.

0 commit comments

Comments
 (0)