Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 9 additions & 5 deletions etc/scripts/licenses/synclic.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ class DejaSource(ExternalLicensesSource):
"is_deprecated",
"is_exception",
# not yet
# "notes",
# "standard_notice",
)
non_updatable_attributes = ("notes",)
Expand Down Expand Up @@ -601,6 +602,8 @@ def build_license(self, mapping, *args, **kwargs):
key = mapping["key"]
standard_notice = mapping.get("standard_notice") or ""
standard_notice = clean_text(standard_notice)
# notes = mapping.get("reference_notes") or ""
# notes = clean_text(notes)

deprecated = not mapping.get("is_active")
spdx_license_key = mapping.get("spdx_license_key") or None
Expand Down Expand Up @@ -629,6 +632,7 @@ def build_license(self, mapping, *args, **kwargs):
is_exception=mapping.get("is_exception", False),
is_deprecated=deprecated,
standard_notice=standard_notice,
# notes=notes,
)
text = mapping["full_text"] or ""
# normalize EOL to POSIX
Expand Down Expand Up @@ -994,6 +998,7 @@ def update_external(_attrib, _sc_val, _ext_val):
update_scancode(attrib, scancode_value, external_value)
continue

# We merge sequences
if isinstance(scancode_value, (list, tuple)) and isinstance(external_value, (list, tuple)):
normalized_scancode_value = set(s for s in scancode_value if s and s.strip())
normalize_external_value = set(s for s in external_value if s and s.strip())
Expand Down Expand Up @@ -1034,8 +1039,7 @@ def update_external(_attrib, _sc_val, _ext_val):
continue

if isinstance(scancode_value, str) and isinstance(external_value, str):
# keep the stripped and normalized spaces value
# normalized spaces
# make value stripped and with normalized spaces
normalized_scancode_value = " ".join(scancode_value.split())
normalize_external_value = " ".join(external_value.split())

Expand Down Expand Up @@ -1165,9 +1169,9 @@ def synchronize_licenses(

# the matching key exists on both sides: merge/update both licenses
scancode_updated, external_updated = merge_licenses(
scancode_license,
external_license,
external_source.updatable_attributes,
scancode_license=scancode_license,
external_license=external_license,
updatable_attributes=external_source.updatable_attributes,
from_spdx=use_spdx_key,
)

Expand Down
35 changes: 35 additions & 0 deletions foo.html

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions ht.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from licensedcode.cache import get_index
idx = get_index()
file= "sample.license.txt"
matches = idx.match(location=file)
for match in matches:
ht = match.get_highlighted_text()
print(ht)
27 changes: 27 additions & 0 deletions sample.license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) Django Software Foundation and individual contributors.
All rights reserved.

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 above copyright notice,
this list of conditions and the following disclaimer.

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

3. Neither the name of Django nor the names of its contributors may be used
to endorse or promote products derived from this software without
specific prior written permission.

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.
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/anti-capitalist-1.4.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
key: anti-capitalist-1.4
short_name: ACSL v. 1.4
name: ANTI-CAPITALIST SOFTWARE LICENSE (v 1.4)
name: Anti-Capitalist Software License (v 1.4)
category: Free Restricted
owner: Everest Pipkin and Ramsey Nasser
homepage_url: https://anticapitalist.software/
Expand Down
3 changes: 2 additions & 1 deletion src/licensedcode/data/licenses/app-s2p.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ key: app-s2p
short_name: App::s2p License
name: App::s2p License
category: Permissive
owner: Unspecified
owner: Fedora
homepage_url: https://fedoraproject.org/wiki/Licensing/App-s2p
spdx_license_key: App-s2p
other_urls:
- https://fedoraproject.org/wiki/Licensing/App-s2p
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/bohl-0.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ key: bohl-0.2
short_name: BOHL-0.2
name: The Balloon Open Hardware License v0.2
category: Permissive
owner: The Balloon
owner: iTechnic
spdx_license_key: LicenseRef-scancode-bohl-0.2
text_urls:
- https://web.archive.org/web/20140426215620/http://www.balloonboard.org/docs/Balloon_License_0v2.pdf
Expand Down
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/cc-by-nc-sa-2.0-fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ key: cc-by-nc-sa-2.0-fr
language: fr
short_name: CC-BY-NC-SA-2.0-FR
name: Creative Commons Attribution-NonCommercial-ShareAlike 2.0 France
category: Free Restricted
category: Source-available
owner: Creative Commons
spdx_license_key: CC-BY-NC-SA-2.0-FR
other_urls:
Expand Down
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/cc-by-nc-sa-3.0-de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ key: cc-by-nc-sa-3.0-de
language: de
short_name: CC-BY-NC-SA-3.0-DE
name: Creative Commons Attribution Non Commercial Share Alike 3.0 Germany
category: Free Restricted
category: Source-available
owner: Creative Commons
spdx_license_key: CC-BY-NC-SA-3.0-DE
other_urls:
Expand Down
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/cc-by-sa-1.0.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
key: cc-by-sa-1.0
short_name: CC-BY-SA-1.0
name: Creative Commons Attribution Share Alike License 1.0
category: Permissive
category: Copyleft Limited
owner: Creative Commons
homepage_url: http://creativecommons.org/licenses/by-sa/1.0/
spdx_license_key: CC-BY-SA-1.0
Expand Down
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/cc-by-sa-4.0.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
key: cc-by-sa-4.0
short_name: CC-BY-SA-4.0
name: Creative Commons Attribution-ShareAlike 4.0 International Public License
category: Copyleft
category: Copyleft Limited
owner: Creative Commons
homepage_url: http://creativecommons.org/licenses/by-sa/4.0/
spdx_license_key: CC-BY-SA-4.0
Expand Down
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/cc-gpl-2.0-pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ key: cc-gpl-2.0-pt
language: pt
short_name: CC-GPL-2.0-PT
name: Creative Commons Licença Pública Geral do GNU (GPL) [General Public License]
category: Copyleft Limited
category: Copyleft
owner: Creative Commons
homepage_url: https://creativecommons.org/licenses/GPL/2.0/
spdx_license_key: LicenseRef-scancode-cc-gpl-2.0-pt
Expand Down
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/cecill-c-en.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
key: cecill-c-en
short_name: CeCILL-C License English
name: CeCILL-C Free Software License Agreement English
category: Copyleft
category: Copyleft Limited
owner: CeCILL
homepage_url: http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html
notes: "This is the English translation of \nhttp://www.cecill.info/licences/Licence_CeCILL-C_V1-fr.html\n"
Expand Down
123 changes: 123 additions & 0 deletions src/licensedcode/data/licenses/cncf-corporate-cla-1.0.LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
Cloud Native Computing Foundation
A project of The Linux Foundation
Software Grant and Corporate Contributor License Agreement ("Agreement") v1.0

Thank you for your interest in the Cloud Native Computing Foundation project (“CNCF”) of The
Linux Foundation (the "Foundation"). In order to clarify the intellectual property license granted
with Contributions from any person or entity, the Foundation must have a Contributor License
Agreement (CLA) on file that has been signed by each Contributor, indicating agreement to the
license terms below. This license is for your protection as a Contributor as well as the protection
of CNCF, the Foundation and its users; it does not change your rights to use your own
Contributions for any other purpose.

This version of the Agreement allows an entity (the "Corporation") to submit Contributions to the
Foundation, to authorize Contributions submitted by its designated employees to the
Foundation, and to grant copyright and patent licenses thereto.

If you have not already done so, please complete and sign, then scan and email a PDF file of
this Agreement to ​cla@cncf.io​
If necessary, send an original signed Agreement to The Linux
Foundation, 1 Letterman Drive, Building D, Suite D4700, San Francisco CA 94129, U.S.A.
Please read this document carefully before signing and keep a copy for your records.

 Corporation name: ________________________________________________
 Corporation address: ________________________________________________
 ________________________________________________
 ________________________________________________

 Point of Contact: ________________________________________________
 E­Mail: ________________________________________________
 Telephone: _____________________

You accept and agree to the following terms and conditions for Your present and future
Contributions submitted to the Foundation. In return, the Foundation shall not use Your
Contributions in a way that is contrary to the public benefit or inconsistent with its nonprofit
status and bylaws in effect at the time of the Contribution. Except for the license granted herein
to the Foundation and recipients of software distributed by the Foundation, You reserve all right,
title, and interest in and to Your Contributions.

 1. Definitions.

 "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright
owner that is making this Agreement with the Foundation. For legal entities, the entity making a
Contribution and all other entities that control, are controlled by, or are under common control
with that entity are considered to be a single Contributor. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

 "Contribution" shall mean the code, documentation or other original works of authorship
expressly identified in Schedule B, as well as any original work of authorship, including any
modifications or additions to an existing work, that is intentionally submitted by You to the
Foundation for inclusion in, or documentation of, any of the products owned or managed by the
Foundation (the "Work"). For the purposes of this definition, "submitted" means any form of
electronic, verbal, or written communication sent to the Foundation or its representatives,
including but not limited to communication on electronic mailing lists, source code control
systems, and issue tracking systems that are managed by, or on behalf of, the Foundation for
the purpose of discussing and improving the Work, but excluding communication that is
conspicuously marked or otherwise designated in writing by You as "Not a Contribution."

 2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You
hereby grant to the Foundation and to recipients of software distributed by the Foundation a
perpetual, worldwide, non­exclusive, no­charge, royalty­free, irrevocable copyright license to
reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and
distribute Your Contributions and such derivative works.

 3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby
grant to the Foundation and to recipients of software distributed by the Foundation a perpetual,
worldwide, non­exclusive, no­charge, royalty­free, irrevocable (except as stated in this section)
patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the
Work, where such license applies only to those patent claims licensable by You that are
necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s)
with the Work to which such Contribution(s) were submitted. If any entity institutes patent
litigation against You or any other entity (including a cross­claim or counterclaim in a lawsuit)
alleging that your Contribution, or the Work to which you have contributed, constitutes direct or
contributory patent infringement, then any patent licenses granted to that entity under this
Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.

 4. You represent that You are legally entitled to grant the above license. You represent further
that each employee of the Corporation designated on Schedule A below (or in a subsequent
written modification to that Schedule) is authorized to submit Contributions on behalf of the
Corporation.

 5. You represent that each of Your Contributions is Your original creation (see section 7 for
submissions on behalf of others).

 6. You are not expected to provide support for Your Contributions, except to the extent You
desire to provide support. You may provide support for free, for a fee, or not at all. Unless
required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE, NON­INFRINGEMENT,
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.

 7. Should You wish to submit work that is not Your original creation, You may submit it to the
Foundation separately from any Contribution, identifying the complete details of its source and
of any license or other restriction (including, but not limited to, related patents, trademarks, and
license agreements) of which you are personally aware, and conspicuously marking the work as
"Submitted on behalf of a third­party: [named here]".

 8. It is your responsibility to notify the Foundation when any change is required to the list of
designated employees authorized to submit Contributions on behalf of the Corporation, or to the
Corporation's Point of Contact with the Foundation.



Please sign: __________________________________ Date: _______________

Title: __________________________________

Corporation: __________________________________


Schedule A

Initial list of designated employees. NB: authorization is not tied to particular Contributions.
Please indicate “CLA Manager” next to the name of any employees listed below that are
authorized to add or remove designated employees from this list in the future.



Schedule B

[Identification of optional concurrent software grant. Would be left blank or omitted if there is no
concurrent software grant.]
11 changes: 11 additions & 0 deletions src/licensedcode/data/licenses/cncf-corporate-cla-1.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
key: cncf-corporate-cla-1.0
short_name: CNCF Corporate CLA 1.0
name: Software Grant and Corporate Contributor License Agreement ("Agreement") v1.0
category: Patent License
owner: Linux Foundation
homepage_url: https://github.com/cncf/cla/blob/master/corporate-cla.pdf
spdx_license_key: LicenseRef-scancode-cncf-corporate-cla-1.0
faq_url: https://github.com/kubernetes/community/blob/master/CLA.md
ignorable_emails:
- cla@cncf.io

Loading