0

Make 'License' field in third-party metadata required

This will simplify the addition of a tool to check licenses for the purpose of
the Android WebView build.

See also http://codereview.chromium.org/10827099

Also adds other missing fields to these README.chromium files as required by
presubmit checks and fixes a regex used to enforce this.

BUG=138921

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149423 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
steveblock@chromium.org
2012-08-01 15:50:29 +00:00
parent f0a6f4bb3d
commit 31eac5b5a5
56 changed files with 94 additions and 10 deletions

@ -1,5 +1,6 @@
Name: David M. Gay's floating point routines
URL: http://www.netlib.org/fp/
License: MIT-like
Original dtoa.c file can be found at <http://www.netlib.org/fp/dtoa.c>.
Original g_fmt.c file can be found at <http://www.netlib.org/fp/g_fmt.c>.

@ -1,6 +1,7 @@
Name: dynamic annotations
URL: http://code.google.com/p/data-race-test/wiki/DynamicAnnotations
Version: 4384
License: BSD
One header and one source file (dynamic_annotations.h and dynamic_annotations.c)
in this directory define runtime macros useful for annotating synchronization

@ -1,2 +1,3 @@
Name: Netscape Portable Runtime (NSPR)
URL: http://www.mozilla.org/projects/nspr/
License: MPL 1.1/GPL 2.0/LGPL 2.1

@ -1,5 +1,6 @@
Name: google-glog's symbolization library
URL: http://code.google.com/p/google-glog/
License: BSD
The following files are copied AS-IS from:
http://code.google.com/p/google-glog/source/browse/#svn/trunk/src (r76)

@ -1,5 +1,6 @@
Name: xdg-user-dirs
URL: http://www.freedesktop.org/wiki/Software/xdg-user-dirs
License: MIT
This directory include xdg-user-dir-lookup.c renamed as xdg_user_dir_lookup.cc
from xdg-user-dirs 0.10. We made xdg_user_dir_lookup() non-static and added a

@ -1,5 +1,6 @@
Name: google-jstemplate
URL: http://code.google.com/p/google-jstemplate/
License: Apache 2.0
"Template processing that is more suitable for the specific development-time
and runtime requirements of AJAX based web applications.

@ -2,6 +2,7 @@ Name: mock4js
Short Name: mock4js
URL: http://mock4js.sourceforge.net/
Version: 0.2
License: MIT
Mock4JS is a dynamic-mock library for Javascript. It enables developers to write
tests that exercise and verify the interactions between the objects in the

@ -2,6 +2,7 @@ Name: Mozilla Personal Security Manager
URL: http://mxr.mozilla.org/mozilla-central/source/security/manager/
InfoURL: http://www.mozilla.org/
Version: 36838:a59a5f030021
License: MPL 1.1 / GPL 2 / LGPL 2.1
Description:
This is selected code bits from Mozilla's Personal Security Manager.

@ -1,5 +1,6 @@
Name: Network Security Services (NSS)
URL: http://www.mozilla.org/projects/security/pki/nss/
License: MPL 1.1/GPL 2.0/LGPL 2.1
We extracted the SHA-256 source files, eliminated unneeded dependencies,
deleted or commented out unused code, and tweaked them for Chrome's source

@ -24,7 +24,7 @@ def _CheckThirdPartyReadmesUpdated(input_api, output_api):
return errors
name_pattern = input_api.re.compile(
r'^Name: [a-zA-Z0-9_\-\. ]+\r?$',
r'^Name: [a-zA-Z0-9_\-\. \(\)]+\r?$',
input_api.re.IGNORECASE | input_api.re.MULTILINE)
shortname_pattern = input_api.re.compile(
r'^Short Name: [a-zA-Z0-9_\-\.]+\r?$',
@ -33,7 +33,10 @@ def _CheckThirdPartyReadmesUpdated(input_api, output_api):
r'^Version: [a-zA-Z0-9_\-\.:]+\r?$',
input_api.re.IGNORECASE | input_api.re.MULTILINE)
release_pattern = input_api.re.compile(
r'Security Critical: (yes)|(no)\r?$',
r'^Security Critical: (yes)|(no)\r?$',
input_api.re.IGNORECASE | input_api.re.MULTILINE)
license_pattern = input_api.re.compile(
r'^License: .+\r?$',
input_api.re.IGNORECASE | input_api.re.MULTILINE)
for f in readmes:
@ -58,6 +61,12 @@ def _CheckThirdPartyReadmesUpdated(input_api, output_api):
'field. This field specifies whether the package is built with\n'
'Chromium. Check README.chromium.template for details.',
[f]))
if not license_pattern.search(contents):
errors.append(output_api.PresubmitError(
'Third party README files should contain a \'License\' field.\n'
'This field specifies the license used by the package. Check\n'
'README.chromium.template for details.',
[f]))
return errors

@ -4,7 +4,7 @@ URL: The URL where the package lives
Version: A searchable version number for the package (if the package does not version or is versioned by date or revision this field should be "0" and the revision, or date should be enumerated in the appropriate field)
Date: (OPTIONAL if version is supplied) The date that the package was updated
Revision: (OPTIONAL if version is supplied) The current revision of the package
License: The license under which the package is distributed
License: The license under which the package is distributed. Arbitrary text is allowed, but prefer standard forms, eg MIT/X11/BSD/Apache 2.0/GPL/LGPL.
License File: (OPTIONAL) File that contains a copy of the packages license
Security Critical: Either yes or no depending on whether this package is shipped in releases. For example openssl is critical where cygwin is not.
@ -12,4 +12,4 @@ Description:
A short description of what the package is and is used for.
Local Modifications:
Enumerate any changes that have been made locally to the package from the shipping version listed above.
Enumerate any changes that have been made locally to the package from the shipping version listed above.

@ -1,9 +1,10 @@
Name: MSDN sample code
Short Name: unknown
Short Name: unknown
URL: http://msdn.microsoft.com/en-us/library/dssbex6h.aspx
Version: unknown
Security Critical: no
Version: unknown
Security Critical: no
License: Microsoft Limited Public License
Local changes:
* in_place_menu.h: Modified from Menu.h.
* ole_document_impl.h: Modified from OleDocument.h
* ole_document_impl.h: Modified from OleDocument.h

@ -2,6 +2,7 @@ Name: Darwin
URL: http://www.opensource.apple.com/
Version: unknown
Security Critical: yes
License: Apple Public Source License 2.0
Four files are excerpted here:

@ -2,6 +2,7 @@ Name: Apple sample code
URL: http://developer.apple.com/
Version: unknown
Security Critical: Yes
License: Custom license
Local changes:
* ImageAndTextCell.h: Changed 'image' property to 'retain' mode to fix a crash.

@ -3,6 +3,7 @@ URL: http://svn.webkit.org/repository/webkit/trunk/WebKitLibraries/libWebKitSyst
Version: r106868
Date: 6 February 2012
Security Critical: Yes
License: BSD
Local changes:
Added the contents of LICENSE to WebKitSystemInterface.h.

@ -3,3 +3,4 @@ URL: http://source.android.com
Description: Android shared memory implementation. Only applies to OS_ANDROID.
Version: 7203eb2a8a29a7b721a48cd291700f38f3da1456
Security Critical: yes
License: Apache 2.0

@ -1,6 +1,8 @@
Name: bsdiff
URL: http://lxr.mozilla.org/mozilla/source/other-licenses/bsdiff/bsdiff.c
Version: unknown
License: BSD Protection license
Security Critical: yes
This is Chrome's locally patched copy of Colin Percival's bsdiff tool
(see ../bspatch for the corresponding bspatch tool).

@ -1,6 +1,8 @@
Name: bspatch
URL: http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/update/src/updater/
Version: unknown
License: BSD Protection license
Security Critical: yes
Description:
This is Chrome's locally patched copy of Colin Percival's bspatch tool

@ -1,6 +1,8 @@
Name: bzip2
URL: http://www.bzip.org/downloads.html
Version: 1.0.5
License: BSD
Security Critical: yes
Description:
This is a copy of the parts of the bzip-1.0.5 distribution needed to build

@ -2,6 +2,8 @@ Name: Compact Language Detection
Short Name: cld
URL: http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/
Version: unknown
License: BSD
Security Critical: yes
Description:
The CLD is used to determine the language of text.

@ -1,6 +1,8 @@
Name: codesighs
URL: http://hg.mozilla.org/mozilla-central/tools/codesighs
Version: unknown
License: MPL 1.1/GPL 2.0/LGPL 2.1
Security Critical: no
Description:
This is Chromium's copy of the Mozilla codesighs tool.

@ -2,6 +2,7 @@ Name: devscripts
URL: http://anonscm.debian.org/gitweb/?p=devscripts/devscripts.git
Version: 2.11.7
Security Critical: no
License: GPL 2.0
Description:
This directory contains selected tools from the Debian's devscripts collection.

@ -3,6 +3,7 @@ Short Name: opengles-book
URL: http://opengles-book.com/
Version: unknown
Security Critical: no
License: MIT
Description:
Code samples from OpenGL ES 2.0 Programming Guide.
@ -10,6 +11,8 @@ Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
Publisher: Addison-Wesley Professional
ISBN: 0321502795
Sample code is MIT licensed - http://www.opengles-book.com/downloads.html
Local Modifications:
Removed files that chromium did not need:
- Bin/*

@ -3,6 +3,7 @@ URL: http://www.gtk.org/
License File: COPYING
Version: 3.1.4
Security Critical: yes
License: LGPL 2
Description:
This package is used by views/ime/character_composer.cc.

@ -5,6 +5,7 @@ Version: 0
Date: 20111101
Revision: 93d8573ddcf97648983a1c1b5cdda8a3ec6d4432
Security Critical: yes
License: MIT
Description:
"Harfbuzz is an OpenType text shaping engine."

@ -3,6 +3,7 @@ URL: http://sourceforge.net/projects/hunspell/files/Hyphen/
Version: 2.6
License File: COPYING
Security Critical: yes
License: MPL 1.1/GPL 2.0/LGPL 2.1
Description:
This is a partial copy of Hyphen 2.6 with the following changes:
@ -12,4 +13,4 @@ This is a partial copy of Hyphen 2.6 with the following changes:
as expected.
The patch is in google.patch.
See 'hyphen.tex' for additional requirements regarding that file.
See 'hyphen.tex' for additional requirements regarding that file.

@ -1,6 +1,7 @@
Name: iccjpeg
URL: http://www.ijg.org
Version: unknown
License: Custom license
License File: LICENSE
Security Critical: yes

@ -2,6 +2,8 @@ Name: ISimpleDOM COM interfaces for accessibility
Short Name: ISimpleDOM
URL: http://www.mozilla.org/access/windows/at-apis
Version: unknown
License: MPL 1.1/GPL 2.0/LGPL 2.1
Security Critical: yes
Description:
This directory contains the ISimpleDOM API, which is needed

@ -1,6 +1,8 @@
Name: jemalloc
URL: http://hg.mozilla.org/mozilla-central/src/memory
Version: unknown
License: BSD
Security Critical: yes
Description:
This contains Chromium's locally patched copy of Jason Evans' jemalloc package.

@ -3,6 +3,7 @@ URL: http://people.ubuntu.com/~fta/chromium/translations/trunk/patches/
InfoURL: https://launchpad.net/chromium-browser
Version: r311
Security Critical: no
License: BSD
Description:
Translations for Chromium provided by Launchpad. These translations are not

@ -2,6 +2,8 @@ Name: LCOV - the LTP GCOV extension
Short Name: lcov
URL: http://ltp.sourceforge.net/coverage/lcov.php
Version: 1.7
License: GPL v2
Security Critical: no
Description:
This directory contains a stock lcov-1.7 with the following changes:

@ -1,6 +1,8 @@
Name: libjpeg
URL: http://www.ijg.org/
Version: 6b
License: Custom license
Security Critical: yes
Description:
This contains a copy of libjpeg-6b.

@ -2,6 +2,7 @@ Name: libpng
URL: http://libpng.org/
Version: 1.2.45
Security Critical: yes
License: libpng license
Description:
Our custom configuration options are defined in pngusr.h. This was previously

@ -3,6 +3,7 @@ URL: http://freedesktop.org/wiki/Software/vaapi
Source: git clone git://anongit.freedesktop.org/git/libva
Version: unknown
RealVersion: git tip-of-tree as of 20120629
License: MIT
License File: COPYING
Security Critical: no

@ -2,6 +2,7 @@ Name: WebP image encoder/decoder
Short Name: libwebp
URL: http://code.google.com/speed/webp
Version: v0.1.3
License: BSD
License File: LICENSE
Security Critical: Yes

@ -1,6 +1,7 @@
Name: libxml
URL: http://xmlsoft.org
Version: 2.7.7
License: MIT
License File: src/COPYING
Security Critical: yes

@ -2,6 +2,7 @@ Name: libxslt
URL: http://xmlsoft.org/XSLT
Version: 1.1.26
Security Critical: yes
License: MIT
Description:
This directory contains a partial snapshot of the libxslt library

@ -3,6 +3,7 @@ Short Name: lzma
URL: http://www.7-zip.org/sdk.html
Version: 9.20
Security Critical: yes
License: Public domain
Description:
This contains a part of LZMA SDK 9.20.

@ -2,6 +2,8 @@ Name: modp base64 decoder
Short Name: stringencoders
URL: http://code.google.com/p/stringencoders/
Version: unknown
License: BSD
Security Critical: yes
Description:
The modp_b64.c file was modified to remove the inclusion of modp's config.h

@ -1,7 +1,7 @@
Name: Mongoose webserver
Short Name: mongoose
URL: http://code.google.com/p/mongoose/
LICENSE: MIT
License: MIT
Version: 55cf8bf30cd9
Release: between 3.0 and 3.1
Security Critical: no

@ -2,6 +2,7 @@ Name: Cocoa extension code from Camino
Short Name: camino
URL: http://caminobrowser.org/
Version: unknown
License: MPL 1.1/GPL 2.0/LGPL 2.1
Description:
This directory contains the following files come from (Mozilla) Camino

@ -3,6 +3,7 @@ Short Name: npapi
URL: http://mxr.mozilla.org/mozilla-central/source/modules/plugin/base/public/
Version: unknown
Security Critical: yes
License: MPL 1.1/GPL 2.0/LGPL 2.1
Modifications:
- Converted to utf-8 with: vim +"argdo write ++enc=utf-8" *.h

@ -1,7 +1,10 @@
Name: PLY (Python Lex-Yacc)
Current version: 3.4
URL: http://www.dabeaz.com/ply/ply-3.4.tar.gz
License: BSD
License File: LICENSE
Security Critical: no
Version: 3.4
This directory contains a copy of these ply-3.4 components:

@ -1,6 +1,7 @@
Name: Protocol Buffers
Short Name: protobuf
URL: http://protobuf.googlecode.com/svn/trunk
License: BSD
License File: COPYING.txt
Version: unknown
Revision: r423

@ -1,6 +1,7 @@
Name: Python FTP server library
Short Name: pyftpdlib
URL: http://code.google.com/p/pyftpdlib/
License: MIT
License File: src/LICENSE
Version: unknown
Security Critical: no

@ -3,6 +3,7 @@ Short Name: qcms
URL: https://github.com/jrmuizel/qcms/tree/v4
Version: v4
Date: 2012-03-13
License: MIT
License File: src/COPYING
Security Critical: yes

@ -2,3 +2,4 @@ Name: skia
URL: http://code.google.com/p/skia
Version: unknown
Security Critical: yes
License: BSD

@ -3,6 +3,7 @@ URL: http://sqlite.org/
Version: 3.7.6.3
Included In Release: Yes
Security Critical: Yes
License: Public domain
Instructions for importing a new release of SQLite from sqlite.org.

@ -2,6 +2,8 @@ Name: Simplified Wrapper and Interface Generator (SWIG)
Short Name: swig
URL: http://www.swig.org/download.html
Version: 1.3.40
License: MIT
Security Critical: no
Description:
Simplified Wrapper and Interface Generator (SWIG) is an interface compiler

@ -1,6 +1,8 @@
Name: talloc
URL: http://talloc.samba.org/talloc/doc/html/index.html
Version: 2.0.1
License: LGPL v3
Security Critical: yes
The talloc library is only being used by a portion of the Mesa
software renderer, in ../mesa/MesaLib, and is only linked in to the

@ -4,6 +4,7 @@ URL: http://gperftools.googlecode.com/
Version: unknown
Revision: 144
Security Critical: yes
License: BSD
Description:
This contains Chromium's locally patched copy of tcmalloc.

@ -2,6 +2,7 @@ Name: tlslite
URL: http://trevp.net/tlslite/
Version: 0.3.8
Security Critical: No
License: Public domain
Local Modifications:

@ -5,6 +5,7 @@ URL: http://selenium.googlecode.com/svn/trunk/py
Version: unknown
Revision: 16922
Security Critical: no
License: Apache 2, MIT and GPL
Description:

@ -1,7 +1,9 @@
Name: wtl
URL: http://www.microsoft.com/downloads/details.aspx?FamilyID=e5ba5ba4-6e6b-462a-b24c-61115e846f0c
Version: 8.0
License: Microsoft Permissive License
License File: Ms-PL.txt
Security Critical: yes
With min and max replaced respectively with __min and __max. See below for an explanation.

@ -2,6 +2,7 @@ Name: zlib
URL: http://zlib.net/
Version: 1.2.5
Security Critical: yes
License: Custom license
Description:
General purpose compression library

@ -110,11 +110,13 @@ SPECIAL_CASES = {
'googleurl': {
"Name": "google-url",
"URL": "http://code.google.com/p/google-url/",
"License": "BSD and MPL 1.1/GPL 2.0/LGPL 2.1",
"License File": "LICENSE.txt",
},
os.path.join('third_party', 'angle'): {
"Name": "Almost Native Graphics Layer Engine",
"URL": "http://code.google.com/p/angleproject/",
"License": "BSD",
},
os.path.join('third_party', 'cros_system_api'): {
"Name": "Chromium OS system API",
@ -136,6 +138,7 @@ SPECIAL_CASES = {
os.path.join('third_party', 'ots'): {
"Name": "OTS (OpenType Sanitizer)",
"URL": "http://code.google.com/p/ots/",
"License": "BSD",
},
os.path.join('third_party', 'pdfsqueeze'): {
"Name": "pdfsqueeze",
@ -160,6 +163,7 @@ SPECIAL_CASES = {
os.path.join('third_party', 'v8-i18n'): {
"Name": "Internationalization Library for v8",
"URL": "http://code.google.com/p/v8-i18n/",
"License": "Apache 2.0, BSD and others",
},
os.path.join('third_party', 'WebKit'): {
"Name": "WebKit",
@ -176,6 +180,7 @@ SPECIAL_CASES = {
os.path.join('v8', 'strongtalk'): {
"Name": "Strongtalk",
"URL": "http://www.strongtalk.org/",
"License": "BSD",
# Absolute path here is resolved as relative to the source root.
"License File": "/v8/LICENSE.strongtalk",
},
@ -208,6 +213,7 @@ def ParseDir(path):
"License File": "LICENSE", # Relative path to license text.
"Name": None, # Short name (for header on about:credits).
"URL": None, # Project home page.
"License": None, # Software license.
}
# Relative path to a file containing some html we're required to place in