0

Fix third-party license information for a number of projects

Also fix a couple of bugs in the license tool.
- When scanning, ignore directories that don't contain any files, on the
  assumption that these are DEPS directories for projects not used by our
  current configuration.
- Don't recurse into directories in ADDITIONAL_PATHS, just as we don't for
  regular third_party/foo directories.

Notes
- License file for third_party/mozc was taken from source header.
- LICENSE.chromium_os was copied from Chromium OS source tree.

This fixes 'licenses.py scan' for an Android checkout.

BUG=138921


Review URL: https://chromiumcodereview.appspot.com/10829042

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148693 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
steveblock@chromium.org
2012-07-27 01:52:11 +00:00
parent 6bdf093650
commit abb1b86e9b
6 changed files with 129 additions and 19 deletions

3
.gitignore vendored

@ -172,7 +172,8 @@ v8.log
/third_party/lss
/third_party/mingw-w64
/third_party/mkl
/third_party/mozc
/third_party/mozc/chrome/chromeos/renderer
/third_party/mozc/session
/third_party/nacl_sdk_binaries/
/third_party/nss
/third_party/openssl

27
LICENSE.chromium_os Normal file

@ -0,0 +1,27 @@
// Copyright (c) 2006-2009 The Chromium OS Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. 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.

@ -0,0 +1,5 @@
Name: Native Client SDK
URL: http://code.google.com/chrome/nativeclient
License: BSD
License File: src/LICENSE
Security Critical: yes

29
third_party/mozc/LICENSE vendored Normal file

@ -0,0 +1,29 @@
Copyright 2010-2011, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. 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.

5
third_party/mozc/README.chromium vendored Normal file

@ -0,0 +1,5 @@
Name: Mozc Japanese Input Method Editor
URL: http://code.google.com/p/mozc
License: BSD
Security Critical: yes
Version: unknown

@ -93,13 +93,13 @@ PRUNE_DIRS = ('.svn', '.git', # VCS metadata
'layout_tests') # lots of subdirs
ADDITIONAL_PATHS = (
os.path.join('googleurl'),
os.path.join('native_client_sdk'),
# The directory with the word list for Chinese and Japanese segmentation
# with different license terms than ICU.
os.path.join('third_party','icu','source','data','brkitr'),
# Fake directory so we can include the strongtalk license.
os.path.join('v8', 'strongtalk'),
# Fake directory so we can include the google-url license.
'googleurl',
)
@ -116,6 +116,19 @@ SPECIAL_CASES = {
"Name": "Almost Native Graphics Layer Engine",
"URL": "http://code.google.com/p/angleproject/",
},
os.path.join('third_party', 'cros_system_api'): {
"Name": "Chromium OS system API",
"URL": "http://www.chromium.org/chromium-os",
"License": "BSD",
# Absolute path here is resolved as relative to the source root.
"License File": "/LICENSE.chromium_os",
},
os.path.join('third_party', 'GTM'): {
"Name": "Google Toolbox for Mac",
"URL": "http://code.google.com/p/google-toolbox-for-mac/",
"License": "Apache 2.0",
"License File": "COPYING",
},
os.path.join('third_party', 'lss'): {
"Name": "linux-syscall-support",
"URL": "http://code.google.com/p/lss/",
@ -124,33 +137,46 @@ SPECIAL_CASES = {
"Name": "OTS (OpenType Sanitizer)",
"URL": "http://code.google.com/p/ots/",
},
os.path.join('third_party', 'pdfsqueeze'): {
"Name": "pdfsqueeze",
"URL": "http://code.google.com/p/pdfsqueeze/",
"License": "Apache 2.0",
"License File": "COPYING",
},
os.path.join('third_party', 'ppapi'): {
"Name": "ppapi",
"URL": "http://code.google.com/p/ppapi/",
},
os.path.join('third_party', 'WebKit'): {
"Name": "WebKit",
"URL": "http://webkit.org/",
# Absolute path here is resolved as relative to the source root.
"License File": "/webkit/LICENSE",
os.path.join('third_party', 'scons-2.0.1'): {
"Name": "scons-2.0.1",
"URL": "http://www.scons.org",
"License": "MIT",
},
os.path.join('third_party', 'GTM'): {
"Name": "Google Toolbox for Mac",
"URL": "http://code.google.com/p/google-toolbox-for-mac/",
"License File": "COPYING",
},
os.path.join('third_party', 'pdfsqueeze'): {
"Name": "pdfsqueeze",
"URL": "http://code.google.com/p/pdfsqueeze/",
"License File": "COPYING",
os.path.join('third_party', 'trace-viewer'): {
"Name": "trace-viewer",
"URL": "http://code.google.com/p/trace-viewer",
"License": "BSD",
},
os.path.join('third_party', 'v8-i18n'): {
"Name": "Internationalization Library for v8",
"URL": "http://code.google.com/p/v8-i18n/",
},
os.path.join('third_party', 'WebKit'): {
"Name": "WebKit",
"URL": "http://webkit.org/",
"License": "BSD and GPL v2",
# Absolute path here is resolved as relative to the source root.
"License File": "/webkit/LICENSE",
},
os.path.join('third_party', 'webpagereplay'): {
"Name": "webpagereplay",
"URL": "http://code.google.com/p/web-page-replay",
"License": "Apache 2.0",
},
os.path.join('v8', 'strongtalk'): {
"Name": "Strongtalk",
"URL": "http://www.strongtalk.org/",
# Absolute path here is resolved as relative to the source root.
"License File": "/v8/LICENSE.strongtalk",
},
}
@ -194,7 +220,8 @@ def ParseDir(path):
# Try to find README.chromium.
readme_path = os.path.join(path, 'README.chromium')
if not os.path.exists(readme_path):
raise LicenseError("missing README.chromium")
raise LicenseError("missing README.chromium or licenses.py "
"SPECIAL_CASES entry")
for line in open(readme_path):
line = line.strip()
@ -236,6 +263,15 @@ def ParseDir(path):
return metadata
def ContainsFiles(path):
"""Determines whether any files exist in a directory or in any of its
subdirectories."""
for _, _, files in os.walk(path):
if files:
return True
return False
def FindThirdPartyDirs():
"""Find all third_party directories underneath the current directory."""
third_party_dirs = []
@ -264,10 +300,17 @@ def FindThirdPartyDirs():
dirs[:] = []
continue
# Don't recurse into paths in ADDITIONAL_PATHS, like we do with regular
# third_party/foo paths.
if path in ADDITIONAL_PATHS:
dirs[:] = []
for dir in ADDITIONAL_PATHS:
third_party_dirs.append(dir)
return third_party_dirs
# If a directory contains no files, assume it's a DEPS directory for a
# project not used by our current configuration and skip it.
return [x for x in third_party_dirs if ContainsFiles(x)]
def ScanThirdPartyDirs():