Auto merge of #12447 - asajeffrey:license-mpl-2.0, r=frewsxcv

All our Cargo.toml files should contain an MPL-2.0 license field.

<!-- Please describe your changes on the following line: -->

Added a `license = "MPL-2.0"` field to all our `Cargo.toml` files, and added a check to `test-tidy` that the license is present.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12434
- [X] There are tests for these changes

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12447)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-07-14 09:33:18 -07:00 committed by GitHub
commit 650d1d1185
43 changed files with 53 additions and 1 deletions

View file

@ -2,6 +2,7 @@
name = "canvas"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "canvas_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "compositing"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "constellation"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "devtools"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "devtools_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -3,6 +3,7 @@
name = "gfx"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "gfx_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "layout"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "layout_thread"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "layout_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "msg"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "net"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "net_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "plugins"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "profile"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "profile_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -3,6 +3,7 @@
name = "range"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "script"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
build = "build.rs"

View file

@ -2,6 +2,7 @@
name = "script_layout_interface"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "script_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -3,6 +3,7 @@
name = "servo"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
build = "build.rs"
publish = false

View file

@ -2,6 +2,7 @@
name = "style"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
build = "build.rs"

View file

@ -2,6 +2,7 @@
name = "style_traits"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "util"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "webdriver_server"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "geckoservo"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
build = "build.rs"

View file

@ -2,6 +2,7 @@
name = "gecko_bindings"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -3,6 +3,7 @@ name = "string_cache"
description = "A crate to allow using Gecko's nsIAtom as a replacement for string_cache."
version = "0.2.20"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
publish = false
[lib]

View file

@ -2,6 +2,7 @@
name = "glutin_app"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
[lib]
name = "glutin_app"

View file

@ -82,3 +82,9 @@ licenses = [
// except according to those terms.
""",
] # noqa: Indicate to flake8 that we do not want to check indentation here
# The valid licenses, in the form we'd expect to see them in a Cargo.toml file.
licenses_toml = [
'license = "MPL-2.0"',
'license = "MIT/Apache-2.0"',
]

View file

@ -17,7 +17,7 @@ import site
import StringIO
import subprocess
import sys
from licenseck import licenses
from licenseck import licenses, licenses_toml
# License and header checks
EMACS_HEADER = "/* -*- Mode:"
@ -295,9 +295,14 @@ duplicate versions for package "{package}"
def check_toml(file_name, lines):
if not file_name.endswith(".toml"):
raise StopIteration
ok_licensed = False
for idx, line in enumerate(lines):
if line.find("*") != -1:
yield (idx + 1, "found asterisk instead of minimum version number")
for license in licenses_toml:
ok_licensed |= (license in line)
if not ok_licensed:
yield (0, ".toml file should contain a valid license.")
def check_rust(file_name, lines):

View file

@ -3,6 +3,7 @@
name = "build-apk"
version = "0.0.1"
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>", "The Servo Project Developers"]
license = "MPL-2.0"
[[bin]]
name = "build-apk"

View file

@ -2,6 +2,7 @@
name = "compiletest_helper"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
[lib]
name = "compiletest_helper"

View file

@ -2,6 +2,7 @@
name = "plugin_compiletest"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
[lib]
name = "plugin_compiletest"

View file

@ -2,6 +2,7 @@
name = "gfx_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
[lib]
name = "gfx_tests"

View file

@ -2,6 +2,7 @@
name = "layout_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
[lib]
name = "layout_tests"

View file

@ -2,6 +2,7 @@
name = "net_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
[lib]
name = "net_tests"

View file

@ -2,6 +2,7 @@
name = "net_traits_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
[lib]
name = "net_traits_tests"

View file

@ -2,6 +2,7 @@
name = "profile_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
[lib]
name = "profile_tests"

View file

@ -2,6 +2,7 @@
name = "script_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
[lib]
name = "script_tests"

View file

@ -2,6 +2,7 @@
name = "style_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
[lib]
name = "style_tests"

View file

@ -2,6 +2,7 @@
name = "util_tests"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
[lib]
name = "util_tests"