Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
59 changes: 31 additions & 28 deletions etc/scripts/synclic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 nexB Inc. and others. All rights reserved.
# Copyright (c) 2019 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
Expand Down Expand Up @@ -56,9 +56,9 @@
- the DejaCode licenses

Run python synclic.py -h for help.

"""


TRACE = True
TRACE_ADD = True
TRACE_FETCH = True
Expand Down Expand Up @@ -434,10 +434,6 @@ def build_license(self, mapping, scancode_licenses):

other_urls = list(other_urls)

# notes = mapping.get('licenseComments')
# if notes and notes.strip():
# notes = 'Per SPDX.org, ' + ' '.join(notes.split())

standard_notice = mapping.get('standardLicenseHeader') or ''
if standard_notice:
standard_notice = clean_text(standard_notice)
Expand Down Expand Up @@ -545,11 +541,7 @@ def build_license(self, mapping, scancode_licenses):
# these licenses are combos of many others and are ignored: we detect
# instead each part of the combo
dejacode_special_composites = set([
'lzma-sdk-2006',
'intel-bsd-special',
'openssh',
'aes-128-3.0',
'stlport-2000',
'intel-bsd-special',
])
is_combo = key in dejacode_special_composites
if is_combo:
Expand Down Expand Up @@ -772,27 +764,35 @@ def license_to_dict(lico):
Return an OrderedDict of license data with texts for API calls.
Fields with empty values are not included.
"""
return dict(
licm = dict(
is_active=False,
reviewed=False,
license_status='NotReviewed',
is_component_license=False,

key=lico.key,
short_name=lico.short_name,
name=lico.name,
category=lico.category,
owner=lico.owner,
homepage_url=lico.homepage_url,
reference_notes=lico.notes,
full_text=lico.text,
is_exception=lico.is_exception,
spdx_license_key=lico.spdx_license_key,
text_urls='\n'.join(lico.text_urls),
osi_url=lico.osi_url,
faq_url=lico.faq_url,
other_urls='\n'.join(lico.other_urls),
is_exception=lico.is_exception
)
if lico.text:
licm.update(full_text=lico.text)
if lico.homepage_url:
licm.update(homepage_url=lico.homepage_url)
if lico.spdx_license_key:
licm.update(spdx_license_key=lico.spdx_license_key)
if lico.notes:
licm.update(reference_notes=lico.notes)
if lico.text_urls:
licm.update(text_urls='\n'.join(lico.text_urls))
if lico.osi_url:
licm.update(osi_url=lico.osi_url)
if lico.faq_url:
licm.update(faq_url=lico.faq_url)
if lico.other_urls:
licm.update(other_urls='\n'.join(lico.other_urls))
return licm


EXTERNAL_LICENSE_SYNCHRONIZATION_SOURCES = {
Expand Down Expand Up @@ -863,12 +863,15 @@ def update_external(_attrib, _sc_val, _ext_val):
# special case for URL lists, we consider all URL fields to
# update
if attrib.endswith('_urls',):
all_sc_urls = set(list(normalized_scancode_value)
+scancode_license.text_urls
+scancode_license.other_urls
+[scancode_license.homepage_url,
scancode_license.osi_url,
scancode_license.faq_url])
all_sc_urls = set(
list(normalized_scancode_value) +
scancode_license.text_urls +
scancode_license.other_urls +
[scancode_license.homepage_url,
scancode_license.osi_url,
scancode_license.faq_url
]
)
all_sc_urls = set(u for u in all_sc_urls if u)
new_other_urls = normalize_external_value.difference(all_sc_urls)
# add other urls to ScanCode
Expand Down
15 changes: 15 additions & 0 deletions src/licensedcode/data/licenses/aes-128-3.0.LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
All code contained in this distributed is placed in the public domain.
=============================================================
Disclaimer:
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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.
=============================================================
6 changes: 6 additions & 0 deletions src/licensedcode/data/licenses/aes-128-3.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
key: aes-128-3.0
short_name: AES-128 3.0 License
name: AES-128 v3.0 License
category: Public Domain
owner: Unspecified
minimum_coverage: 90
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/alfresco-exception-0.5.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
key: alfresco-exception-0.5
name: Alfresco FLOSS Exception v0.5
short_name: Alfresco FLOSS Exception v0.5
name: Alfresco FLOSS Exception v0.5
category: Copyleft
owner: Alfresco
homepage_url: https://web.archive.org/web/20070306001556/http://www.alfresco.com/legal/licensing/floss_exception/
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ name: Autoconf simple exception to GPL-2.0
category: Copyleft Limited
owner: Free Software Foundation (FSF)
homepage_url: https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob;f=config.guess;h=a7448442748cc6f98a066d2d1051fad3b043761a;hb=HEAD
notes: |-
this is a simpler version of the Autonconf exception to the GPL
notes: this is a simpler version of the Autonconf exception to the GPL
is_exception: yes
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/blitz-artistic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ name: Blitz++ Artistic License
category: Copyleft Limited
owner: Blitz++
homepage_url: https://github.com/blitzpp/blitz
notes: This is a modified artistic license, no longer in use.
notes: This is a modified artistic license, no longer in use.
text_urls:
- https://raw.githubusercontent.com/blitzpp/blitz/e3c973d68e5ee17aec779bf9711b38fd4afc355f/LICENSE
8 changes: 4 additions & 4 deletions src/licensedcode/data/licenses/bsd-3-clause-no-change.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
key: bsd-3-clause-no-change
short_name: BSD 3-Clause No Change
name: BSD 3-Clause No Change
short_name: BSD 3-Clause No Change
name: BSD 3-Clause No Change
category: Permissive
owner: David Corcoran <[email protected]>
owner: David Corcoran <[email protected]>
homepage_url: https://pcsclite.apdu.fr/
notes: there is an extra clause about changes which has some ambiguities
other_urls:
- https://salsa.debian.org/rousseau/PCSC/blob/master/COPYING
notes: there is an extra clause about changes which has some ambiguities
3 changes: 2 additions & 1 deletion src/licensedcode/data/licenses/bsd-original-muscle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ name: BSD-Original MUSCLE
category: Permissive
owner: David Corcoran
homepage_url: https://web.archive.org/web/20060318003856/http://linuxnet.com/
notes: This license has some extra terms beyond the advertizing clause not found in the bsd-originl
notes: This license has some extra terms beyond the advertizing clause not found in the bsd-original

2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/cvwl.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
key: cvwl
short_name: Collaborative Virtual Workspace License
name: Collaborative Virtual Workspace License
category: Proprietary
category: Proprietary Free
owner: Mitre
homepage_url: https://opensource.org/licenses/mitrepl
minimum_coverage: 30
3 changes: 1 addition & 2 deletions src/licensedcode/data/licenses/dwtfnmfpl-3.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ name: DWTFNMFPL-3.0
category: Permissive
owner: dittodhole
homepage_url: https://github.com/dittodhole/WTFNMFPLv3
notes: A variation Do What The Fuck You Want
Public License (WTFPL) by Sam Hocevar.
notes: A variant on the Do What The Fuck You Want Public License (WTFPL) by Sam Hocevar.
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/ecma-documentation.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
key: ecma-documentation
short_name: ECMA Documentation License
name: ECMA Documentation License
category: Free restricted
category: Free Restricted
owner: Ecma International
homepage_url: http://www.ecma-international.org/publications/DISCLAIMER.pdf
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/ecma-no-patent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ name: ECMA no patent notice
category: Proprietary Free
owner: Ecma International
homepage_url: http://www.ecma-international.org/memento/codeofconduct.htm
is_exception: yes
is_exception: yes
4 changes: 2 additions & 2 deletions src/licensedcode/data/licenses/ecma-patent-coc-0.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
key: ecma-patent-coc-0
short_name: ECMA Historical Code of Conduct in Patent Matters
short_name: ECMA Historical Code of Conduct in Patent Matters
name: ECMA Historical Code of Conduct in Patent Matters
category: Proprietary Free
owner: Ecma International
homepage_url: http://www.ecma-international.org/memento/historical%20codeofconduct.htm
notes: valid until December 3, 2009
notes: valid until December 3, 2009
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/ecma-patent-coc-2.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
key: ecma-patent-coc-2
short_name: ECMA Code of Conduct in Patent Matters v2
short_name: ECMA Code of Conduct in Patent Matters v2
name: ECMA Code of Conduct in Patent Matters v2
category: Proprietary Free
owner: Ecma International
Expand Down
7 changes: 2 additions & 5 deletions src/licensedcode/data/licenses/flora-1.1.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
key: flora-1.1
short_name: Flora License v1.1
name: Flora License v1.1
category: Proprietary
category: Proprietary Free
owner: Tizen Association

notes: there was a version 1.0 before https://web.archive.org/web/20130224120957/http://floralicense.org:80/license/
other_urls:
- https://github.com/lirriel/first1/blob/123928934e4231c75d63d1a222b2dfedca7308cc/AlarmUI/NOTICE
- https://github.com/search?q=%22Flora+License+%22&type=Code
- http://floralicense.org/
- https://review.tizen.org/git/?p=apps/home/taskmanager.git;a=blob_plain;f=LICENSE;hb=HEAD

notes: there was a version 1.0 before
https://web.archive.org/web/20130224120957/http://floralicense.org:80/license/
4 changes: 2 additions & 2 deletions src/licensedcode/data/licenses/freetype-patent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ name: freetype patent grant
category: Permissive
owner: freetype
homepage_url: https://www.freetype.org/
notes: This patemt grant clause is similat to Apache-2.0 section 3 and is
sometimes seen used alone with the freetype license.
notes: This patent grant clause is similat to Apache-2.0 section 3 and is sometimes seen used
alone with the freetype license.
minimum_coverage: 70
2 changes: 1 addition & 1 deletion src/licensedcode/data/licenses/jpnic-idnkit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ homepage_url: https://www.nic.ad.jp/ja/idn/idnkit/download/
text_urls:
- https://dev.w3.org/libwww/modules/idn/LICENSE.txt
other_urls:
- https://jprs.co.jp/idn/
- https://jprs.co.jp/idn/
4 changes: 2 additions & 2 deletions src/licensedcode/data/licenses/jpnic-mdnkit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: JPNIC mdnkit license
category: Proprietary Free
owner: JPNIC
homepage_url: https://www.nic.ad.jp/ja/idn/idnkit/download/
notes: this is essentially the same license as the jpnic-idnkit license with extra terms making
it proprietary
text_urls:
- https://www.nic.ad.jp/ja/idn/mdnkit/download/documents/idnkit-1.0pr1-doc/LICENSE.txt
notes: this is essentially the same license as the jpnic-idnkit license with
extra terms making it proprietary
1 change: 1 addition & 0 deletions src/licensedcode/data/licenses/jython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ owner: Python Software Foundation (PSF)
homepage_url: http://www.jython.org/license.txt
text_urls:
- http://www.jython.org/license.txt
notes: this is a complex composite of multiple licenses
25 changes: 25 additions & 0 deletions src/licensedcode/data/licenses/libmng-2007.LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
The MNG Library is supplied "AS IS". The Contributing Authors
disclaim all warranties, expressed or implied, including, without
limitation, the warranties of merchantability and of fitness for any
purpose. The Contributing Authors assume no liability for direct,
indirect, incidental, special, exemplary, or consequential damages,
which may result from the use of the MNG Library, even if advised of
the possibility of such damage.

Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:

1. The origin of this source code must not be misrepresented;
you must not claim that you wrote the original software.

2. Altered versions must be plainly marked as such and must not be
misrepresented as being the original source.

3. This Copyright notice may not be removed or altered from any source
or altered source distribution.

The Contributing Authors specifically permit, without fee, and
encourage the use of this source code as a component to supporting
the MNG and JNG file format in commercial products. If you use this
source code in a product, acknowledgment would be highly appreciated.
47 changes: 47 additions & 0 deletions src/licensedcode/data/licenses/libmng-2007.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
key: libmng-2007
short_name: libmng License 2007
name: libmng License 2007
category: Permissive
owner: libmng Project
other_urls:
- http://www.linuxfromscratch.org/blfs/view/cvs/general/libmng.html
standard_notice: |
Copyright (c) 2000-2007 Gerard Juyn ([email protected])
[You may insert additional notices after this sentence if you modify
this source]
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
Gerard Juyn
Glenn Randers-Pehrson
The MNG Library is supplied "AS IS". The Contributing Authors
disclaim all warranties, expressed or implied, including, without
limitation, the warranties of merchantability and of fitness for any
purpose. The Contributing Authors assume no liability for direct,
indirect, incidental, special, exemplary, or consequential damages,
which may result from the use of the MNG Library, even if advised of
the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
1. The origin of this source code must not be misrepresented;
you must not claim that you wrote the original software.
2. Altered versions must be plainly marked as such and must not be
misrepresented as being the original source.
3. This Copyright notice may not be removed or altered from any source
or altered source distribution.
The Contributing Authors specifically permit, without fee, and
encourage the use of this source code as a component to supporting
the MNG and JNG file format in commercial products. If you use this
source code in a product, acknowledgment would be highly appreciated.
Parts of this software have been adapted from the libpng package.
Although this library supports all features from the PNG specification
(as MNG descends from it) it does not require the libpng package.
It does require the zlib library and optionally the IJG jpeg library,
and/or the "little-cms" library by Marti Maria (depending on the
inclusion of support for JNG and Full-Color-Management respectively.
This library's function is primarily to read and display MNG
animations. It is not meant as a full-featured image-editing
component! It does however offer creation and editing functionality
at the chunk level.
(future modifications may include some more support for creation
and or editing)
5 changes: 2 additions & 3 deletions src/licensedcode/data/licenses/maxmind-odl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ name: Maxmind Open Data License
category: Free Restricted
owner: Maxmind
homepage_url: https://geolite.maxmind.com/download/geoip/database/LICENSE.txt

notes: This license is mostly the same as a bsd-original (or rather a
bsd-simplified with and advertizing clause)
notes: This license is mostly the same as a bsd-original (or rather a bsd-simplified with and
advertizing clause)
6 changes: 5 additions & 1 deletion src/licensedcode/data/licenses/mit-old-style-no-advert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ name: MIT Old Style no advertising
category: Permissive
owner: MIT
homepage_url: http://fedoraproject.org/wiki/Licensing:MIT#Old_Style_.28no_advertising_without_permission.29
notes: this is rather similar to the NTP license
notes: Per SPDX.org, this license is OSI certified.
spdx_license_key: NTP
osi_url: https://opensource.org/licenses/NTP
other_urls:
- http://www.opensource.org/licenses/NTP
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ owner: Microsoft
homepage_url: http://www.microsoft.com/web/webpi/eula/webpages_2_eula_enu.htm
other_urls:
- http://go.microsoft.com/fwlink/?LinkId=210218
- https://www.microsoft.com/web/webpi/eula/ASPNET-Web-Pages-Template-License.rtf
- https://www.microsoft.com/web/webpi/eula/ASPNET-Web-Pages-Template-License.rtf
1 change: 0 additions & 1 deletion src/licensedcode/data/licenses/ms-visual-2015-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ owner: Microsoft
homepage_url: https://visualstudio.microsoft.com/license-terms/mt171586/
other_urls:
- http://go.microsoft.com/fwlink/?LinkID=614949

Loading