diff --git a/LICENSE b/LICENSE index d46809475ec83..540289ba3e530 100644 --- a/LICENSE +++ b/LICENSE @@ -214,28 +214,34 @@ MIT licenses ======================================================================== The following components are provided under the MIT License. See project link for details. -The text of each license is also included at licenses/LICENSE-[project]-[version].txt. +The text of each license is also included at licenses/LICENSE-[project].txt. (MIT License) jquery (https://jquery.org/license/) (MIT License) dagre-d3 (https://github.com/cpettitt/dagre-d3) - (MIT License) bootstrap (https://github.com/twbs/bootstrap/blob/v3-dev/LICENSE) + (MIT License) bootstrap (https://github.com/twbs/bootstrap/) (MIT License) d3-tip (https://github.com/Caged/d3-tip) (MIT License) dataTables (https://datatables.net) - (MIT License) Clock Plugin (https://github.com/Lwangaman/jQuery-Clock-Plugin) (MIT License) WebGL-2D (https://github.com/gameclosure/webgl-2d) - (MIT License) Underscore.js (http://underscorejs.org) + (MIT License) Underscorejs (http://underscorejs.org) (MIT License) Bootstrap Toggle (http://www.bootstraptoggle.com) - (MIT License) normalize.css (http://git.io/normalize) + (MIT License) normalize.css (http://necolas.github.io/normalize.css/) ======================================================================== BSD 2-Clause licenses ======================================================================== The following components are provided under the BSD 2-Clause license. See file headers and project links for details. -The text of each license is also included at licenses/LICENSE-[project]-[version].txt. +The text of each license is also included at licenses/LICENSE-[project].txt. (BSD 2 License) flask-kerberos (https://github.com/mkomitee/flask-kerberos) - (BSD 2 License) Ace (https://github.com/ajaxorg/ace) - (BSD 2 License) d3js (https://d3js.org) - (BSD 3 License) parallel.js (https://parallel.js.org/) +======================================================================== +BSD 3-Clause licenses +======================================================================== +The following components are provided under the BSD 2-Clause license. +See file headers and project links for details. +The text of each license is also included at licenses/LICENSE-[project].txt. + + (BSD 3 License) Ace (https://github.com/ajaxorg/ace) + (BSD 3 License) d3js (https://d3js.org) + (BSD 3 License) parallel-coordinates (http://syntagmatic.github.com/parallel-coordinates/) diff --git a/dev/airflow-license b/dev/airflow-license new file mode 100755 index 0000000000000..b7c7ad6d80af7 --- /dev/null +++ b/dev/airflow-license @@ -0,0 +1,71 @@ +#!/usr/bin/env python + +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import print_function + +import os +import re +import slugify +import string + +# order is important +_licenses = {'MIT': ['Permission is hereby granted free of charge', 'The above copyright notice and this permission notice shall'], + 'BSD-3': ['Redistributions of source code must retain the above copyright', 'Redistributions in binary form must reproduce the above copyright', 'specific prior written permission'], + 'BSD-2': ['Redistributions of source code must retain the above copyright', 'Redistributions in binary form must reproduce the above copyright'], + 'AL': ['http://www.apache.org/licenses/LICENSE-2.0']} + + +def get_notices(): + license_file = open("../LICENSE", "r") + regex = ur"\((.+?)\) (.+?) \((http.+?)\)" + + return list(filter(None, [re.findall(regex, line) for line in license_file])) + + +def parse_license_file(project_name): + name = re.match("^[a-z0-9\-]+", project_name.lower()) + name = slugify.slugify(name.group(0)) + path = "../licenses/LICENSE-{}.txt".format(name) + if os.path.exists(path): + data = " ".join(line.strip() for line in open(path)).lower() + data = data.translate(None, string.punctuation) + for k in _licenses: + matches = 0 + for v in _licenses[k]: + if v.lower() in data: + matches += 1 + if matches == len(_licenses[k]): + return k + + return False + + +if __name__ == "__main__": + print("{:<30}|{:<50}||{:<20}||{:<10}" + .format("PROJECT", "URL", "LICENSE TYPE DEFINED", "DETECTED")) + + notices = get_notices() + + for notice in notices: + notice = notice[0] + license = parse_license_file(notice[1]) + print("{:<30}|{:<50}||{:<20}||{:<10}" + .format(notice[1], notice[2][:50], notice[0], license)) + + file_count = len([name for name in os.listdir("../licenses")]) + print("Defined licenses: {} Files found: {}".format(len(notices), file_count)) diff --git a/licenses/LICENSE-bootstrap-toggle.txt b/licenses/LICENSE-bootstrap-toggle.txt new file mode 100644 index 0000000000000..0bd283164f026 --- /dev/null +++ b/licenses/LICENSE-bootstrap-toggle.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2011-2014 Min Hur, The New York Times Company + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/licenses/LICENSE-bootstrap.txt b/licenses/LICENSE-bootstrap.txt index c6cf4c90391a8..69837f2c9da3a 100644 --- a/licenses/LICENSE-bootstrap.txt +++ b/licenses/LICENSE-bootstrap.txt @@ -21,28 +21,3 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -This product includes Bootstrap Toggle (http://www.bootstraptoggle.com - MIT license), Copyright 2014 Min Hur, The New York Times Company. - -The MIT License (MIT) - -Copyright (c) 2011-2014 Min Hur, The New York Times Company - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/licenses/LICENSE-jquery.txt b/licenses/LICENSE-jquery.txt index 5e3fa97f0663f..e4e5e00ef0a46 100644 --- a/licenses/LICENSE-jquery.txt +++ b/licenses/LICENSE-jquery.txt @@ -34,36 +34,3 @@ All files located in the node_modules and external directories are externally maintained libraries used by this software which have their own licenses; we recommend you read them, as their terms may differ from the terms above. - - -This product includes Parallel Coordinates (https://syntagmatic.github.io/parallel-coordinates - BSD License), Copyright (c) 2012, Kai Chang. -For airflow/www/static/para/parallel.js: - -Copyright (c) 2012, Kai Chang -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. - -* The name Kai Chang may not 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 MICHAEL BOSTOCK 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. - - diff --git a/licenses/LICENSE-jsclockplugin.txt b/licenses/LICENSE-jsclockplugin.txt deleted file mode 100644 index 9f464168a1562..0000000000000 --- a/licenses/LICENSE-jsclockplugin.txt +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Clock plugin - * Copyright (c) 2010 John R D'Orazio (donjohn.fmmi@gmail.com) - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ diff --git a/licenses/LICENSE-normalize.txt b/licenses/LICENSE-normalize.txt new file mode 100644 index 0000000000000..8a0df4f36158c --- /dev/null +++ b/licenses/LICENSE-normalize.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright © Nicolas Gallagher and Jonathan Neal + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/licenses/LICENSE-parallel-coordinates.txt b/licenses/LICENSE-parallel-coordinates.txt new file mode 100644 index 0000000000000..95c402724a0ec --- /dev/null +++ b/licenses/LICENSE-parallel-coordinates.txt @@ -0,0 +1,26 @@ +Copyright (c) 2012, Kai Chang +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. + +* The name Kai Chang may not 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 MICHAEL BOSTOCK 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. diff --git a/licenses/LICENSE-typeahead.txt b/licenses/LICENSE-typeahead.txt deleted file mode 100644 index 0754b397bd350..0000000000000 --- a/licenses/LICENSE-typeahead.txt +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2014 Bass Jobsen @bassjobsen - -Licensed under the Apache License, Version 2.0 (the 'License'); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an 'AS IS' BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/scripts/ci/check-license.sh b/scripts/ci/check-license.sh index 87063e2e3b06f..83c942a0a4f12 100755 --- a/scripts/ci/check-license.sh +++ b/scripts/ci/check-license.sh @@ -63,7 +63,7 @@ else declare java_cmd=java fi -export RAT_VERSION=0.11 +export RAT_VERSION=0.12 export rat_jar="${TRAVIS_CACHE}"/lib/apache-rat-${RAT_VERSION}.jar mkdir -p ${TRAVIS_CACHE}/lib