Skip to content

Commit

Permalink
[AIRFLOW-2287] Update license notices
Browse files Browse the repository at this point in the history
Closes apache#3195 from bolkedebruin/AIRFLOW-2287
  • Loading branch information
bolkedebruin authored and r39132 committed Apr 9, 2018
1 parent f7f1d38 commit a30f009
Show file tree
Hide file tree
Showing 10 changed files with 155 additions and 88 deletions.
24 changes: 15 additions & 9 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
71 changes: 71 additions & 0 deletions dev/airflow-license
Original file line number Diff line number Diff line change
@@ -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))
21 changes: 21 additions & 0 deletions licenses/LICENSE-bootstrap-toggle.txt
Original file line number Diff line number Diff line change
@@ -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.
25 changes: 0 additions & 25 deletions licenses/LICENSE-bootstrap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

33 changes: 0 additions & 33 deletions licenses/LICENSE-jquery.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.


7 changes: 0 additions & 7 deletions licenses/LICENSE-jsclockplugin.txt

This file was deleted.

21 changes: 21 additions & 0 deletions licenses/LICENSE-normalize.txt
Original file line number Diff line number Diff line change
@@ -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.
26 changes: 26 additions & 0 deletions licenses/LICENSE-parallel-coordinates.txt
Original file line number Diff line number Diff line change
@@ -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.
13 changes: 0 additions & 13 deletions licenses/LICENSE-typeahead.txt

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/ci/check-license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a30f009

Please sign in to comment.