Skip to content

Commit f555e21

Browse files
pan3793ulysses-you
authored andcommitted
[KYUUBI #2115][1.5] Update license and enhance collect_licenses script
### _Why are the changes needed?_ Backport #2115 for 1.5 ### _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 - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #2136 from pan3793/license-1.5. Closes #2115 44a774d [Cheng Pan] version 7c40703 [Cheng Pan] Remove CCO a9e8364 [Cheng Pan] [LICENSE] Update LICENSE-binary Authored-by: Cheng Pan <chengpan@apache.org> Signed-off-by: ulysses-you <ulyssesyou@apache.org>
1 parent ed177fc commit f555e21

File tree

22 files changed

+1274
-1241
lines changed

22 files changed

+1274
-1241
lines changed

LICENSE

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,3 @@
199199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200
See the License for the specific language governing permissions and
201201
limitations under the License.
202-
203-
------------------------------------------------------------------------------------
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

LICENSE-binary

Lines changed: 46 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -202,40 +202,42 @@
202202

203203
------------------------------------------------------------------------------------
204204

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-
217205
This project bundles some components that are licensed under the
218206

219207
Apache License Version 2.0
220208
--------------------------
221-
commons-codec:commons-codec
209+
commons-lang:commons-lang
222210
org.apache.commons:commons-lang3
223211
org.apache.curator:curator-client
224212
org.apache.curator:curator-framework
225213
org.apache.curator:curator-recipes
226-
com.google.guava:failureaccess
227214
com.google.guava:guava
228215
org.apache.hadoop:hadoop-client-api
229216
org.apache.hadoop:hadoop-client-runtime
217+
org.apache.hive:hive-common
218+
org.apache.hive:hive-metastore
219+
org.apache.hive:hive-serde
230220
org.apache.hive:hive-service-rpc
231-
org.apache.htrace:htrace-core4
221+
org.apache.hive:hive-shims-0.23
222+
org.apache.hive:hive-shims-common
232223
com.fasterxml.jackson.core:jackson-annotations
233224
com.fasterxml.jackson.core:jackson-core
234225
com.fasterxml.jackson.core:jackson-databind
235226
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
236227
com.fasterxml.jackson.datatype:jackson-datatype-jsr310
237228
com.fasterxml.jackson.jaxrs:jackson-jaxrs-base
238229
com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider
230+
com.fasterxml.jackson.module:jackson-module-jaxb-annotations
231+
com.fasterxml.jackson.module:jackson-module-scala_*
232+
jakarta.validation:jakarta.validation-api
233+
org.javassist:javassist
234+
org.glassfish.jersey.core:jersey-client
235+
org.glassfish.jersey.core:jersey-common
236+
org.glassfish.jersey.containers:jersey-container-servlet-core
237+
org.glassfish.jersey.ext:jersey-entity-filtering
238+
org.glassfish.jersey.inject:jersey-hk2
239+
org.glassfish.jersey.media:jersey-media-json-jackson
240+
org.glassfish.jersey.core:jersey-server
239241
org.eclipse.jetty:jetty-http
240242
org.eclipse.jetty:jetty-io
241243
org.eclipse.jetty:jetty-security
@@ -245,13 +247,29 @@ org.eclipse.jetty:jetty-util-ajax
245247
org.eclipse.jetty:jetty-util
246248
org.apache.thrift:libfb303
247249
org.apache.thrift:libthrift
250+
org.apache.logging.log4j:log4j-1.2-api
251+
org.apache.logging.log4j:log4j-api
252+
org.apache.logging.log4j:log4j-core
253+
org.apache.logging.log4j:log4j-slf4j-impl
248254
org.webjars:swagger-ui
249255
org.yaml:snakeyaml
250256
io.dropwizard.metrics:metrics-core
251257
io.dropwizard.metrics:metrics-jmx
252258
io.dropwizard.metrics:metrics-json
253259
io.dropwizard.metrics:metrics-jvm
254260
io.netty:netty-all
261+
io.netty:netty-buffer
262+
io.netty:netty-codec
263+
io.netty:netty-common
264+
io.netty:netty-handler
265+
io.netty:netty-resolver
266+
io.netty:netty-tcnative-classes
267+
io.netty:netty-transport-classes-epoll
268+
io.netty:netty-transport-classes-kqueue
269+
io.netty:netty-transport-native-epoll
270+
io.netty:netty-transport-native-kqueue
271+
io.netty:netty-transport-native-unix-common
272+
io.netty:netty-transport
255273
io.prometheus:simpleclient
256274
io.prometheus:simpleclient_common
257275
io.prometheus:simpleclient_dropwizard
@@ -270,27 +288,32 @@ org.apache.zookeeper:zookeeper
270288
BSD
271289
------------
272290
jline:jline
291+
com.thoughtworks.paranamer:paranamer
273292

274293
BSD 3-Clause
275294
------------
276295
org.scala-lang:scala-library
277296

278297
Eclipse Distribution License - v 1.0
279298
------------------------------------
299+
jakarta.activation:jakarta.activation-api
280300
jakarta.xml.bind:jakarta.xml.bind-api
281301

282302
Eclipse Public License (EPL) 2.0
283303
--------------------------------
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
304+
jakarta.annotation:jakarta.annotation-api
305+
jakarta.servlet:jakarta.servlet-api
306+
jakarta.ws.rs:jakarta.ws.rs-api
307+
org.glassfish.hk2:hk2-api
308+
org.glassfish.hk2:hk2-locator
309+
org.glassfish.hk2:hk2-utils
310+
org.glassfish.hk2.external:aopalliance-repackaged
311+
org.glassfish.hk2.external:jakarta.inject
312+
org.glassfish.hk2:osgi-resource-locator
289313

290314
MIT License
291315
-----------
292-
org.slf4j:slf4j-api
293-
org.slf4j:slf4j-log4j12
294-
org.slf4j:jcl-over-slf4j
295316
com.github.scopt:scopt_*
296317
io.github.classgraph:classgraph
318+
org.slf4j:slf4j-api
319+
org.slf4j:jcl-over-slf4j

build/Dockerfile

Lines changed: 4 additions & 1 deletion
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

Lines changed: 57 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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)