-
-
Notifications
You must be signed in to change notification settings - Fork 562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Got CC-BY-NC-SA-3.0 for file mentioning elements under CC-BY-SA-3.0 #3703
Comments
Thanks for the report!
The in angle brackets is for words from the rules that were NOT matched.
It is shorter and contained in another match. Let me explain what happens. You get these three matches:
The Match 1 attributes are:
Here is what happens:
FWIW, this is something @AyanSinhaMahapatra is working on to massively fix likely with #3254 In the meantime the fix is going to be like in #3644
|
Hi @pombredanne, Thank you very much for the detailed explanation. It helps a lot to understand what's going on. I have tried the suggested quick fix: From c5cac48ec306551531c06afc1c5ecc5227319ca7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20L=C3=B6hel?= <juergen.loehel@xxx>
Date: Thu, 21 Mar 2024 11:04:18 -0600
Subject: [PATCH] Quick fix for #3703
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Jürgen Löhel <juergen.loehel@xxx>
---
src/licensedcode/data/rules/cc-by-nc-sa-3.0_23.RULE | 4 ++--
src/licensedcode/data/rules/cc-by-sa-3.0_104.RULE | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
create mode 100644 src/licensedcode/data/rules/cc-by-sa-3.0_104.RULE
diff --git a/src/licensedcode/data/rules/cc-by-nc-sa-3.0_23.RULE b/src/licensedcode/data/rules/cc-by-nc-sa-3.0_23.RULE
index 61ddf947d7..5e41d08f9d 100644
--- a/src/licensedcode/data/rules/cc-by-nc-sa-3.0_23.RULE
+++ b/src/licensedcode/data/rules/cc-by-nc-sa-3.0_23.RULE
@@ -7,5 +7,5 @@ ignorable_urls:
---
licensed under the Creative Commons License,
-Attribution-NonCommercial-ShareAlike 3.0 unported.
-(http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode)
\ No newline at end of file
+{{Attribution-NonCommercial-ShareAlike 3.0 }} unported.
+{{http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode}}
diff --git a/src/licensedcode/data/rules/cc-by-sa-3.0_104.RULE b/src/licensedcode/data/rules/cc-by-sa-3.0_104.RULE
new file mode 100644
index 0000000000..a1eb4d3cc6
--- /dev/null
+++ b/src/licensedcode/data/rules/cc-by-sa-3.0_104.RULE
@@ -0,0 +1,10 @@
+---
+license_expression: cc-by-sa-3.0
+is_license_notice: yes
+relevance: 100
+ignorable_urls:
+ - http://creativecommons.org/licenses/by-sa/3.0/legalcode
+---
+
+Creative Commons license
+{{ http://creativecommons.org/licenses/by-sa/3.0/legalcode }}
--
2.35.3
But I still get this output ( [
{
"path": "console_truetype.c",
"type": "file",
"detected_license_expression": "gpl-2.0-plus",
"detected_license_expression_spdx": "GPL-2.0-or-later",
"license_detections": [
{
"license_expression": "gpl-2.0-plus",
"license_expression_spdx": "GPL-2.0-or-later",
"matches": [
{
"license_expression": "gpl-2.0-plus",
"spdx_license_expression": "GPL-2.0-or-later",
"from_file": "console_truetype.c",
"start_line": 4,
"end_line": 4,
"matcher": "1-spdx-id",
"score": 100,
"matched_length": 6,
"match_coverage": 100,
"rule_relevance": 100,
"rule_identifier": "spdx-license-identifier-gpl_2_0_plus-6a7800b229dd3f061ec9f8deeaf5fc1cd1310d8d",
"rule_url": null
}
],
"identifier": "gpl_2_0_plus-1dbf5e2e-83b4-624b-6a02-72ea175258bd"
}
],
"license_clues": [
{
"license_expression": "cc-by-nc-sa-3.0",
"spdx_license_expression": "CC-BY-NC-SA-3.0",
"from_file": "console_truetype.c",
"start_line": 43,
"end_line": 44,
"matcher": "3-seq",
"score": 54.55,
"matched_length": 12,
"match_coverage": 54.55,
"rule_relevance": 100,
"rule_identifier": "cc-by-nc-sa-3.0_23.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-nc-sa-3.0_23.RULE"
}
],
"percentage_of_license_text": 0.83,
"copyrights": [
{
"copyright": "Copyright (c) 2016 Google, Inc",
"start_line": 2,
"end_line": 2
}
],
"holders": [
{
"holder": "Google, Inc",
"start_line": 2,
"end_line": 2
}
],
"authors": [
{
"author": "Chihung Yu Creative",
"start_line": 42,
"end_line": 43
}
],
"scan_errors": []
}
] I will add the full log here:
Is it necessary to clear some cache? |
Yes, you need to regen the index with |
Signed-off-by: Jürgen Löhel <[email protected]>
@pombredanne Hi :-) Can you pls give me a quick update about the PR #3924. Will you merge the PR soon? |
Signed-off-by: Jürgen Löhel <[email protected]>
Description
This code snippet:
from https://github.com/Xilinx/u-boot-xlnx/blob/3290b109bfa70d65ed4ce49ed84afed0ed4335e0/drivers/video/console_truetype.c#L39 gets detected as
CC-BY-NC-SA-3.0
instead ofCC-BY-SA-3.0
How To Reproduce
I have tested it also with the patches from #3644, but it does not fix the issue.
Logs
Log Snippet with
SCANCODE_DEBUG_LICENSE=True
:How do I need to interpret the log output? Is the token
<nc>
of the URL optional here? Why is the match forsrc/licensedcode/data/rules/cc-by-3.0_1.RULE
with 100% cov not considered?System configuration
The text was updated successfully, but these errors were encountered: