Skip to content

Commit

Permalink
Add more license detection rules
Browse files Browse the repository at this point in the history
These are misc rules to improve license detection speed and
accuracy

Signed-off-by: Philippe Ombredanne <[email protected]>
  • Loading branch information
pombredanne committed Nov 21, 2023
1 parent 9171dd7 commit 51823af
Show file tree
Hide file tree
Showing 18 changed files with 457 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/licensedcode/data/rules/apache-2.0_1337.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
license_expression: apache-2.0
is_license_notice: yes
---

A copy of the Apache 2.0 license is reproduced below. This license applies only
to files that indicate as such in their license header.
14 changes: 14 additions & 0 deletions src/licensedcode/data/rules/bsl-1.1_13.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
license_expression: bsl-1.1
is_license_notice: yes
minimum_coverage: 98
referenced_filenames:
- LICENSE
---

Use of this software is governed by the Business Source License
included in the LICENSE file at the root of this repository.

As of the Change Date specified in that file, in accordance with
the Business Source License, use of this software will be governed
by the Apache License, Version 2.0.
10 changes: 10 additions & 0 deletions src/licensedcode/data/rules/bsl-1.1_17.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
license_expression: bsl-1.1
is_license_notice: yes
minimum_coverage: 98
referenced_filenames:
- LICENSE
---

Use of this software is governed by the Business Source License
included in the LICENSE file at the root of this repository.
8 changes: 8 additions & 0 deletions src/licensedcode/data/rules/bsl-1.1_18.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
license_expression: bsl-1.1
is_license_notice: yes
minimum_coverage: 100
---

source-available and licensed under the BSL 1.1, converting to the open-source
Apache 2.0 license after 4 years.
8 changes: 8 additions & 0 deletions src/licensedcode/data/rules/bsl-1.1_19.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
license_expression: bsl-1.1
is_license_notice: yes
minimum_coverage: 100
---

licensed under the BSL 1.1, converting to the open-source
Apache 2.0 license after 4 years.
8 changes: 8 additions & 0 deletions src/licensedcode/data/rules/bsl-1.1_20.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
license_expression: bsl-1.1
is_license_notice: yes
relevance: 100
minimum_coverage: 100
---

licensed under the BSL 1.1
8 changes: 8 additions & 0 deletions src/licensedcode/data/rules/bsl-1.1_21.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
license_expression: bsl-1.1
is_license_notice: yes
relevance: 100
---

BUSINESS SOURCE LICENSE AGREEMENT
Business Source License 1.1
9 changes: 9 additions & 0 deletions src/licensedcode/data/rules/cc-by-2.5_29.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
license_expression: cc-by-2.5
is_license_notice: yes
ignorable_urls:
- http://creativecommons.org/licenses/by/2.5
---

distributed under a Creative Commons Attribution 2.5 License. The
license can be found at http://creativecommons.org/licenses/by/2.5/.
21 changes: 21 additions & 0 deletions src/licensedcode/data/rules/cc-pd_30.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
license_expression: cc-pd
is_license_text: yes
---

The person or persons who have associated their work with this document (the
"Dedicator") hereby dedicate the entire copyright in the work of authorship
identified below (the "Work") to the public domain.

Dedicator makes this dedication for the benefit of the public at large and to
the detriment of Dedicator's heirs and successors. Dedicator intends this
dedication to be an overt act of relinquishment in perpetuity of all present and
future rights under copyright law, whether vested or contingent, in the Work.
Dedicator understands that such relinquishment of all rights includes the
relinquishment of all rights to enforce (by lawsuit or otherwise) those
copyrights in the Work.

Dedicator recognizes that, once placed in the public domain, the Work may be
freely reproduced, distributed, transmitted, used, modified, built upon, or
otherwise exploited by anyone for any purpose, commercial or non-commercial, and
in any way, including by methods that have not yet been invented or conceived.
7 changes: 7 additions & 0 deletions src/licensedcode/data/rules/cc-pd_31.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
license_expression: cc-pd
is_license_reference: yes
relevance: 95
---

Copyright-Only Dedication (based on United States law)
8 changes: 8 additions & 0 deletions src/licensedcode/data/rules/cc-pd_32.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
license_expression: cc-pd
is_license_reference: yes
relevance: 100
---

Copyright-Only Dedication* (based on United States law)
or Public Domain Certification
44 changes: 44 additions & 0 deletions src/licensedcode/data/rules/lbnl-bsd_13.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
license_expression: lbnl-bsd
is_license_text: yes
notes: From https://www.davidhbailey.com/dhbsoftware/LBNL-BSD-License.docx
---

The parties now agree as follows:


1. Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

(1) Redistributions of source code must retain the copyright notice, this list
of conditions and the following disclaimer.

(2) Redistributions in binary form must reproduce the copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

(3) Neither the name of the University of California, Lawrence Berkeley National
Laboratory, U.S. Dept. of Energy nor the names of its contributors may be used
to endorse or promote products derived from this software without specific prior
written permission.

2. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

3. You are under no obligation whatsoever to provide any bug fixes, patches, or
upgrades to the features, functionality or performance of the source code
("Enhancements") to anyone; however, if you choose to make your Enhancements
available either publicly, or directly to Lawrence Berkeley National Laboratory,
without imposing a separate written license agreement for such Enhancements,
then you hereby grant the following license: a non-exclusive, royalty-free
perpetual license to install, use, modify, prepare derivative works, incorporate
into other computer software, distribute, and sublicense such enhancements or
derivative works thereof, in binary and source code form.
41 changes: 41 additions & 0 deletions src/licensedcode/data/rules/lbnl-bsd_17.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
license_expression: lbnl-bsd
is_license_text: yes
notes: From https://www.davidhbailey.com/dhbsoftware/LBNL-BSD-License.docx
---

1. Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

(1) Redistributions of source code must retain the copyright notice, this list
of conditions and the following disclaimer.

(2) Redistributions in binary form must reproduce the copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

(3) Neither the name of the University of California, Lawrence Berkeley National
Laboratory, U.S. Dept. of Energy nor the names of its contributors may be used
to endorse or promote products derived from this software without specific prior
written permission.

2. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

3. You are under no obligation whatsoever to provide any bug fixes, patches, or
upgrades to the features, functionality or performance of the source code
("Enhancements") to anyone; however, if you choose to make your Enhancements
available either publicly, or directly to Lawrence Berkeley National Laboratory,
without imposing a separate written license agreement for such Enhancements,
then you hereby grant the following license: a non-exclusive, royalty-free
perpetual license to install, use, modify, prepare derivative works, incorporate
into other computer software, distribute, and sublicense such enhancements or
derivative works thereof, in binary and source code form.
7 changes: 7 additions & 0 deletions src/licensedcode/data/rules/mit_1310.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
license_expression: mit
is_license_notice: yes
---

A copy of the MIT license is reproduced below. This license applies only to
files that indicate as such in their license header.
7 changes: 7 additions & 0 deletions src/licensedcode/data/rules/postgresql_33.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
license_expression: postgresql
is_license_notice: yes
---

A copy of the PostgreSQL license is reproduced below. This license applies only
to files that indicate as such in their license header.
Loading

0 comments on commit 51823af

Please sign in to comment.