From 9cb0f1b83948855a43b344f6a4ebf7de4f0c67fb Mon Sep 17 00:00:00 2001 From: TanayPawar Date: Fri, 31 Jan 2025 23:45:40 +0530 Subject: [PATCH 1/4] Fix false positive for Apache-2.0 OR BSD-3-Clause and add Apache-2.0 OR MIT rule --- .../data/rules/apache-2.0_or_bsd-new_8.RULE | 4 ++-- .../data/rules/apache-2.0_or_mit_1.RULE | 19 +++++-------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/licensedcode/data/rules/apache-2.0_or_bsd-new_8.RULE b/src/licensedcode/data/rules/apache-2.0_or_bsd-new_8.RULE index 9f2f526ed26..aeaede8c0fa 100644 --- a/src/licensedcode/data/rules/apache-2.0_or_bsd-new_8.RULE +++ b/src/licensedcode/data/rules/apache-2.0_or_bsd-new_8.RULE @@ -1,11 +1,11 @@ --- license_expression: apache-2.0 OR bsd-new is_license_notice: yes -relevance: 99 +relevance: 100 referenced_filenames: - LICENSE.APACHE - LICENSE.BSD --- This software is made available under the terms of *either* of the licenses -found in LICENSE.APACHE or LICENSE.BSD. \ No newline at end of file +found in {{LICENSE.APACHE}} or {{LICENSE.BSD}}. Both must be present for this rule to apply. \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_or_mit_1.RULE b/src/licensedcode/data/rules/apache-2.0_or_mit_1.RULE index 36cf39abdf5..db483f1e84e 100644 --- a/src/licensedcode/data/rules/apache-2.0_or_mit_1.RULE +++ b/src/licensedcode/data/rules/apache-2.0_or_mit_1.RULE @@ -1,20 +1,11 @@ --- license_expression: apache-2.0 OR mit is_license_notice: yes -minimum_coverage: 80 +relevance: 100 referenced_filenames: - - LICENSE-APACHE - - LICENSE-MIT -ignorable_urls: - - http://opensource.org/licenses/MIT - - http://www.apache.org/licenses/LICENSE-2.0 + - LICENSE.APACHE2 + - LICENSE.MIT --- -License - -Licensed under either of - - {{Apache License, Version 2.0 }}(LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) - {{MIT license }}(LICENSE-MIT or http://opensource.org/licenses/MIT) - -{{at your option.}} \ No newline at end of file +This software is made available under the terms of *either* of the licenses +found in LICENSE.APACHE2 or LICENSE.MIT. From 207574604990d68f913acc6436190822c0ba17b9 Mon Sep 17 00:00:00 2001 From: TanayPawar Date: Tue, 11 Mar 2025 22:06:43 +0530 Subject: [PATCH 2/4] added new rule --- .../data/rules/apache-2.0_or_bsd-new_11.RULE | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/licensedcode/data/rules/apache-2.0_or_bsd-new_11.RULE diff --git a/src/licensedcode/data/rules/apache-2.0_or_bsd-new_11.RULE b/src/licensedcode/data/rules/apache-2.0_or_bsd-new_11.RULE new file mode 100644 index 00000000000..67684ca1cdd --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_or_bsd-new_11.RULE @@ -0,0 +1,14 @@ +--- +license_expression: apache-2.0 OR bsd-new +is_license_notice: yes +relevance: 99 +referenced_filenames: + - LICENSE.APACHE + - LICENSE.BSD +ignorable_urls: + - http://www.apache.org/licenses/LICENSE-2.0 + - http://opensource.org/licenses/MIT +--- + +This software is made available under the terms of *either* of the licenses +found in LICENSE.APACHE or LICENSE.BSD. \ No newline at end of file From c78daf7c0c36876b942668afb3de4b81d25a48fa Mon Sep 17 00:00:00 2001 From: TanayPawar Date: Tue, 11 Mar 2025 22:11:50 +0530 Subject: [PATCH 3/4] Revert "added new rule" This reverts commit 207574604990d68f913acc6436190822c0ba17b9. --- .../data/rules/apache-2.0_or_bsd-new_11.RULE | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 src/licensedcode/data/rules/apache-2.0_or_bsd-new_11.RULE diff --git a/src/licensedcode/data/rules/apache-2.0_or_bsd-new_11.RULE b/src/licensedcode/data/rules/apache-2.0_or_bsd-new_11.RULE deleted file mode 100644 index 67684ca1cdd..00000000000 --- a/src/licensedcode/data/rules/apache-2.0_or_bsd-new_11.RULE +++ /dev/null @@ -1,14 +0,0 @@ ---- -license_expression: apache-2.0 OR bsd-new -is_license_notice: yes -relevance: 99 -referenced_filenames: - - LICENSE.APACHE - - LICENSE.BSD -ignorable_urls: - - http://www.apache.org/licenses/LICENSE-2.0 - - http://opensource.org/licenses/MIT ---- - -This software is made available under the terms of *either* of the licenses -found in LICENSE.APACHE or LICENSE.BSD. \ No newline at end of file From 2e856263f9918c6c7ad70b178376d1343b7ceafc Mon Sep 17 00:00:00 2001 From: TanayPawar Date: Tue, 11 Mar 2025 22:19:22 +0530 Subject: [PATCH 4/4] added new rule Signed-off-by: TanayPawar --- .../data/rules/apache-2.0_or_bsd-new_11.RULE | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/licensedcode/data/rules/apache-2.0_or_bsd-new_11.RULE diff --git a/src/licensedcode/data/rules/apache-2.0_or_bsd-new_11.RULE b/src/licensedcode/data/rules/apache-2.0_or_bsd-new_11.RULE new file mode 100644 index 00000000000..67684ca1cdd --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_or_bsd-new_11.RULE @@ -0,0 +1,14 @@ +--- +license_expression: apache-2.0 OR bsd-new +is_license_notice: yes +relevance: 99 +referenced_filenames: + - LICENSE.APACHE + - LICENSE.BSD +ignorable_urls: + - http://www.apache.org/licenses/LICENSE-2.0 + - http://opensource.org/licenses/MIT +--- + +This software is made available under the terms of *either* of the licenses +found in LICENSE.APACHE or LICENSE.BSD. \ No newline at end of file