Skip to content

Commit 33424a1

Browse files
committed
[KYUUBI apache#2115] Update license and enhance collect_licenses script
### _Why are the changes needed?_ This PR updates the LICENSE and NOTICE files for both source release and binary release, and enhances the `collect_licenses.sh` script to support 1)collect `NOTICE*`(previous only `NOTICE`) files, 2) remove redundant or duplicated text from final NOTICE This PR also fix the LICENSE and NOTICE files for shaded modules ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes apache#2115 from pan3793/license. Closes apache#2115 e515eaa [Cheng Pan] nit 53052ee [Cheng Pan] License for static resource b14837f [Cheng Pan] Remove CCO 2fe01d5 [Cheng Pan] nit cb617e1 [Cheng Pan] log conf 7aaf2db [Cheng Pan] Update LICENSE 412a04f [Cheng Pan] Fix kyuubi-version-info.properties 0ed01fa [Cheng Pan] recover MANIFEST.MF f0a5d19 [Cheng Pan] Update LICENSE for shade modules 407b9dd [Cheng Pan] python3 830c7a9 [Cheng Pan] Revert "Setup python3" 239890d [Cheng Pan] Revert "setup-python@v3" b0b2766 [Cheng Pan] setup-python@v3 3487cd4 [Cheng Pan] Setup python3 82ae8f0 [Cheng Pan] Revert "Update Dockerfile install python3" 4df10c7 [Cheng Pan] Update Dockerfile install python3 bbd87a4 [Cheng Pan] niy 152d2d0 [Cheng Pan] nit 85e89dc [Cheng Pan] update license df891a6 [Cheng Pan] Revert "Clean LICENSE" 09dcba9 [Cheng Pan] enhance collect_license.sh acb624c [Cheng Pan] enhance collect-licenses.sh 7e0d565 [Cheng Pan] Clean LICENSE 8eb5e35 [Cheng Pan] [LICENSE] Update LICENSE-binary Authored-by: Cheng Pan <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
1 parent da22498 commit 33424a1

File tree

26 files changed

+1362
-1242
lines changed

26 files changed

+1362
-1242
lines changed

LICENSE

+15-12
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,18 @@
201201
limitations under the License.
202202

203203
------------------------------------------------------------------------------------
204-
205-
This product includes code from Apache Spark
206-
207-
* org.apache.kyuubi.Logging copied from classes in org.apache.spark.internal.Logging
208-
* org.apache.kyuubi.engine.spark.FetchIterator copied from org.apache.spark.sql.hive.thriftserver.FetchIterator
209-
* org.apache.kyuubi.engine.spark.shim.CatalogShim_v3_0 copied some methods from org.apache.spark.sql.connector.catalog.CatalogV2Implicits
210-
* org.apache.kyuubi.engine.flink.util.StringUtils copied from classes in org.apache.spark.sql.catalyst.util.StringUtils
211-
* org.apache.kyuubi.engine.flink.util.StringUtilsSuite copied from classes in org.apache.spark.sql.catalyst.util.StringUtilsSuite
212-
213-
Copyright: 2014 and onwards The Apache Software Foundation
214-
Home page: https://spark.apache.org/
215-
License: https://www.apache.org/licenses/LICENSE-2.0
204+
This product bundles various third-party components under other open source licenses.
205+
This section summarizes those components and their licenses. See licenses/
206+
for text of these licenses.
207+
208+
Apache License Version 2.0
209+
--------------------------
210+
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/swagger/*
211+
212+
MIT license
213+
-----------
214+
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/assets/fonts/*
215+
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/icon.min.css
216+
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/semantic.min.css
217+
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/semantic.min.js
218+
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/jquery-3.6.0.min.js

LICENSE-binary

+57-25
Original file line numberDiff line numberDiff line change
@@ -201,41 +201,44 @@
201201
limitations under the License.
202202

203203
------------------------------------------------------------------------------------
204-
205-
This product includes code from Apache Spark
206-
207-
* org.apache.kyuubi.Logging copied from classes in org.apache.spark.internal.Logging
208-
* org.apache.kyuubi.engine.spark.FetchIterator copied from org.apache.spark.sql.hive.thriftserver.FetchIterator
209-
* org.apache.kyuubi.engine.spark.shim.CatalogShim_v3_0 copied some methods from org.apache.spark.sql.connector.catalog.CatalogV2Implicits
210-
211-
Copyright: 2014 and onwards The Apache Software Foundation
212-
Home page: https://spark.apache.org/
213-
License: https://www.apache.org/licenses/LICENSE-2.0
214-
215-
------------------------------------------------------------------------------------
216-
217-
This project bundles some components that are licensed under the
204+
This product bundles various third-party components under other open source licenses.
205+
This section summarizes those components and their licenses. See licenses/
206+
for text of these licenses.
218207

219208
Apache License Version 2.0
220209
--------------------------
221-
commons-codec:commons-codec
210+
commons-lang:commons-lang
222211
org.apache.commons:commons-lang3
223212
org.apache.curator:curator-client
224213
org.apache.curator:curator-framework
225214
org.apache.curator:curator-recipes
226-
com.google.guava:failureaccess
227215
com.google.guava:guava
228216
org.apache.hadoop:hadoop-client-api
229217
org.apache.hadoop:hadoop-client-runtime
218+
org.apache.hive:hive-common
219+
org.apache.hive:hive-metastore
220+
org.apache.hive:hive-serde
230221
org.apache.hive:hive-service-rpc
231-
org.apache.htrace:htrace-core4
222+
org.apache.hive:hive-shims-0.23
223+
org.apache.hive:hive-shims-common
232224
com.fasterxml.jackson.core:jackson-annotations
233225
com.fasterxml.jackson.core:jackson-core
234226
com.fasterxml.jackson.core:jackson-databind
235227
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
236228
com.fasterxml.jackson.datatype:jackson-datatype-jsr310
237229
com.fasterxml.jackson.jaxrs:jackson-jaxrs-base
238230
com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider
231+
com.fasterxml.jackson.module:jackson-module-jaxb-annotations
232+
com.fasterxml.jackson.module:jackson-module-scala_*
233+
jakarta.validation:jakarta.validation-api
234+
org.javassist:javassist
235+
org.glassfish.jersey.core:jersey-client
236+
org.glassfish.jersey.core:jersey-common
237+
org.glassfish.jersey.containers:jersey-container-servlet-core
238+
org.glassfish.jersey.ext:jersey-entity-filtering
239+
org.glassfish.jersey.inject:jersey-hk2
240+
org.glassfish.jersey.media:jersey-media-json-jackson
241+
org.glassfish.jersey.core:jersey-server
239242
org.eclipse.jetty:jetty-http
240243
org.eclipse.jetty:jetty-io
241244
org.eclipse.jetty:jetty-security
@@ -245,13 +248,29 @@ org.eclipse.jetty:jetty-util-ajax
245248
org.eclipse.jetty:jetty-util
246249
org.apache.thrift:libfb303
247250
org.apache.thrift:libthrift
251+
org.apache.logging.log4j:log4j-1.2-api
252+
org.apache.logging.log4j:log4j-api
253+
org.apache.logging.log4j:log4j-core
254+
org.apache.logging.log4j:log4j-slf4j-impl
248255
org.webjars:swagger-ui
249256
org.yaml:snakeyaml
250257
io.dropwizard.metrics:metrics-core
251258
io.dropwizard.metrics:metrics-jmx
252259
io.dropwizard.metrics:metrics-json
253260
io.dropwizard.metrics:metrics-jvm
254261
io.netty:netty-all
262+
io.netty:netty-buffer
263+
io.netty:netty-codec
264+
io.netty:netty-common
265+
io.netty:netty-handler
266+
io.netty:netty-resolver
267+
io.netty:netty-tcnative-classes
268+
io.netty:netty-transport-classes-epoll
269+
io.netty:netty-transport-classes-kqueue
270+
io.netty:netty-transport-native-epoll
271+
io.netty:netty-transport-native-kqueue
272+
io.netty:netty-transport-native-unix-common
273+
io.netty:netty-transport
255274
io.prometheus:simpleclient
256275
io.prometheus:simpleclient_common
257276
io.prometheus:simpleclient_dropwizard
@@ -267,30 +286,43 @@ io.swagger.core.v3:swagger-jaxrs2
267286
io.swagger.core.v3:swagger-models
268287
org.apache.zookeeper:zookeeper
269288

289+
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/swagger/*
290+
270291
BSD
271292
------------
272293
jline:jline
294+
com.thoughtworks.paranamer:paranamer
273295

274296
BSD 3-Clause
275297
------------
276298
org.scala-lang:scala-library
277299

278300
Eclipse Distribution License - v 1.0
279301
------------------------------------
302+
jakarta.activation:jakarta.activation-api
280303
jakarta.xml.bind:jakarta.xml.bind-api
281304

282305
Eclipse Public License (EPL) 2.0
283306
--------------------------------
284-
jakarta.servlet:jakarta.servlet-api https://projects.eclipse.org/projects/ee4j.servlet
285-
286-
Common Development and Distribution License (CDDL) 1.1
287-
------------------------------------------------------
288-
javax.xml.bind:jaxb-api https://github.com/javaee/jaxb-v2
307+
jakarta.annotation:jakarta.annotation-api
308+
jakarta.servlet:jakarta.servlet-api
309+
jakarta.ws.rs:jakarta.ws.rs-api
310+
org.glassfish.hk2:hk2-api
311+
org.glassfish.hk2:hk2-locator
312+
org.glassfish.hk2:hk2-utils
313+
org.glassfish.hk2.external:aopalliance-repackaged
314+
org.glassfish.hk2.external:jakarta.inject
315+
org.glassfish.hk2:osgi-resource-locator
289316

290317
MIT License
291318
-----------
292-
org.slf4j:slf4j-api
293-
org.slf4j:slf4j-log4j12
294-
org.slf4j:jcl-over-slf4j
295319
com.github.scopt:scopt_*
296320
io.github.classgraph:classgraph
321+
org.slf4j:slf4j-api
322+
org.slf4j:jcl-over-slf4j
323+
324+
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/assets/fonts/*
325+
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/icon.min.css
326+
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/semantic.min.css
327+
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/semantic.min.js
328+
kyuubi-server/src/main/resources/org/apache/kyuubi/ui/static/jquery-3.6.0.min.js

build/Dockerfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ ENV CI ${CI}
4646
ADD . /workspace/kyuubi
4747
WORKDIR /workspace/kyuubi
4848

49-
RUN ./build/dist ${MVN_ARG} && \
49+
RUN apt-get update && \
50+
DEBIAN_FRONTEND=noninteractive \
51+
apt-get install -y python3 && \
52+
./build/dist ${MVN_ARG} && \
5053
mv /workspace/kyuubi/dist /opt/kyuubi && \
5154
# Removing stuff saves time because docker creates a temporary layer
5255
rm -rf ~/.m2 && \

build/release/append_notice.py

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/usr/bin/env python3
2+
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one or more
5+
# contributor license agreements. See the NOTICE file distributed with
6+
# this work for additional information regarding copyright ownership.
7+
# The ASF licenses this file to You under the Apache License, Version 2.0
8+
# (the "License"); you may not use this file except in compliance with
9+
# the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
20+
import sys
21+
22+
def usage():
23+
print('Usage: %s <NOTICE file> <APPEND file1> <APPEND file2> ...' % sys.argv[0])
24+
25+
redundant_text_list = [
26+
"""This product includes software developed at
27+
The Apache Software Foundation (http://www.apache.org/).""",
28+
"""This product includes software developed at
29+
The Apache Software Foundation (https://www.apache.org/)."""
30+
]
31+
32+
def append(notice_file, append_file):
33+
with open(notice_file, 'r') as f:
34+
notice_text = f.read()
35+
36+
with open(append_file, 'r') as f:
37+
append_text = f.read()
38+
39+
for text in redundant_text_list:
40+
append_text = append_text.replace(text, '')
41+
42+
append_text = append_text.strip()
43+
44+
if not append_text in notice_text:
45+
with open(notice_file, 'a') as f:
46+
f.write(append_text)
47+
f.write('\n\n')
48+
49+
if __name__ == "__main__":
50+
if len(sys.argv) < 3:
51+
print(sys.argv)
52+
usage()
53+
sys.exit(-1)
54+
55+
notice_file = sys.argv[1]
56+
for append_file in sys.argv[2:]:
57+
append(notice_file, append_file)

build/release/collect-licenses.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ done
5555
NOTICE="${DST}/NOTICE"
5656
[ -f "${NOTICE}" ] && rm "${NOTICE}"
5757
cp "${NOTICE_BINARY_PREAMBLE}" "${NOTICE}"
58-
(export LC_ALL=C; find "${TMP}" -name "NOTICE" | sort | xargs cat >> "${NOTICE}")
58+
(export LC_ALL=C; find "${TMP}" -name "NOTICE*" | sort | xargs ${KYUUBI_DIR}/build/release/append_notice.py "${NOTICE}")
5959

6060
LICENSES="${DST}/licenses"
6161
[ -f "${LICENSES}" ] && rm -r "${LICENSES}"

0 commit comments

Comments
 (0)