Missing license info and headers

patch by Mick Semb Wever; reviewed by Brandon Williams for CASSANDRA-18807
This commit is contained in:
Mick Semb Wever 2023-08-30 13:26:52 +02:00
parent 8bbf92a670
commit ce49e775f7
No known key found for this signature in database
GPG Key ID: E91335D77E3E87CB
18 changed files with 309 additions and 48 deletions

View File

@ -27,7 +27,7 @@
</target> </target>
<target name="_build_ratinclude" depends="_rat_init"> <target name="_build_ratinclude" depends="_rat_init">
<exec executable="git" failifexecutionfails="false" failonerror="false" resultproperty="git.success" output="${build.dir}/.versioned_files"> <exec executable="git" failifexecutionfails="false" failonerror="false" resultproperty="git.success" output="${build.dir}/.ratinclude">
<arg line="ls-tree -r HEAD --name-only"/> <arg line="ls-tree -r HEAD --name-only"/>
</exec> </exec>
<condition property="rat.skip" value="true"> <condition property="rat.skip" value="true">
@ -37,43 +37,55 @@
</condition> </condition>
</target> </target>
<target name="_rat_copy_versioned_files" depends="_build_ratinclude" unless="${rat.skip}"> <target name="rat-check" depends="_build_ratinclude" unless="${rat.skip}" description="License checks on source" >
<copy file="${build.dir}/.versioned_files" tofile="${build.dir}/.ratinclude">
<filterchain>
<linecontainsregexp>
<regexp pattern=".*\.(java|py|sh|xml|spec|md|iml|bat|btm|cql|css|g|html|jflex|jks|mod|name|pom|textile|yml|yaml|MIDRES|HIGHRES|LOWRES)$"/>
</linecontainsregexp>
</filterchain>
</copy>
</target>
<target name="rat-check" depends="_rat_copy_versioned_files" unless="${rat.skip}" description="License checks on source" >
<rat:report reportFile="${build.dir}/rat.txt"> <rat:report reportFile="${build.dir}/rat.txt">
<fileset dir="." includesfile="${build.dir}/.ratinclude"> <fileset dir="." includesfile="${build.dir}/.ratinclude">
<!-- Config files with not much creativity --> <!-- Config files with not much creativity -->
<exclude name="**/ide/**/*"/> <exclude name="ide/**/*"/>
<exclude name="**/metrics-reporter-config-sample.yaml"/> <exclude name="conf/metrics-reporter-config-sample.yaml"/>
<exclude name="**/cassandra.yaml"/> <exclude name="**/cassandra*.yaml"/>
<exclude name="**/cassandra-murmur.yaml"/> <exclude NAME="doc/antora.yml"/>
<exclude name="**/cassandra-seeds.yaml"/> <exclude NAME="eclipse_compiler.properties"/>
<exclude name="**/test/conf/cassandra.yaml"/> <exclude name="test/conf/cdc.yaml"/>
<exclude name="**/test/conf/cassandra_encryption.yaml"/> <exclude name="pylib/cqlshlib/test/config/sslhandling*.config"/>
<exclude name="**/test/conf/cdc.yaml"/> <exclude name="test/conf/commitlog_compression_*.yaml"/>
<exclude name="**/test/conf/commitlog_compression_LZ4.yaml"/> <exclude name="test/conf/system_keyspaces_directory.yaml"/>
<exclude name="**/test/conf/commitlog_compression_Zstd.yaml"/> <exclude name="test/conf/unit-test-conf/test-native-port.yaml"/>
<exclude name="**/test/conf/system_keyspaces_directory.yaml"/> <exclude name="tools/cqlstress-*.yaml"/>
<exclude name="**/test/conf/unit-test-conf/test-native-port.yaml"/> <!-- test data -->
<exclude name="**/test/data/jmxdump/cassandra-3.0-jmx.yaml"/> <exclude name="test/**/cassandra*.conf"/>
<exclude name="**/test/data/jmxdump/cassandra-3.11-jmx.yaml"/> <exclude name="test/**/*.csv"/>
<exclude name="**/test/data/jmxdump/cassandra-4.0-jmx.yaml"/> <exclude name="test/**/*.json"/>
<exclude name="**/tools/cqlstress-counter-example.yaml"/> <exclude name="test/**/*.txt"/>
<exclude name="**/tools/cqlstress-example.yaml"/> <exclude name="test/data/**/*.adler32"/>
<exclude name="**/tools/cqlstress-insanity-example.yaml"/> <exclude name="test/data/**/*.crc32"/>
<exclude name="**/tools/cqlstress-lwt-example.yaml"/> <exclude name="test/data/**/CommitLog-*.log"/>
<!-- NOTICE files --> <exclude name="test/data/**/*.bin"/>
<exclude NAME="**/NOTICE.md"/> <exclude name="test/data/**/*.db"/>
<!-- LICENSE files --> <exclude name="test/data/**/*.sha1"/>
<exclude NAME="**/LICENSE.md"/> <exclude name="test/data/CASSANDRA-15313/lz4-jvm-crash-failure.txt"/>
<exclude name="test/data/jmxdump/cassandra-*-jmx.yaml"/>
<!-- Documentation files -->
<exclude NAME="src/java/**/*.md"/>
<exclude NAME="**/README*"/>
<exclude NAME="CHANGES.txt"/>
<exclude NAME="CASSANDRA-14092.txt"/>
<!-- legal files -->
<exclude NAME="NOTICE.txt"/>
<exclude NAME="LICENSE.txt"/>
<!-- misc -->
<exclude NAME="**/*.patch"/>
<exclude NAME="**/*.dpatch"/>
<exclude NAME="**/*.diff"/>
<exclude NAME="debian/TODO"/>
<exclude NAME="debian/cassandra.bash-completion"/>
<exclude NAME="debian/cassandra-sysctl.conf"/>
<exclude NAME="debian/cassandra.install"/>
<exclude NAME="debian/cassandra-tools.install"/>
<exclude NAME="debian/compat"/>
<exclude NAME="debian/control"/>
<exclude NAME="debian/dirs"/>
<exclude NAME="debian/patches/00list"/>
</fileset> </fileset>
</rat:report> </rat:report>
<exec executable="grep" outputproperty="rat.failed.files" failifexecutionfails="false"> <exec executable="grep" outputproperty="rat.failed.files" failifexecutionfails="false">

13
.jenkins/Jenkinsfile vendored
View File

@ -6,14 +6,13 @@
// "License"); you may not use this file except in compliance // "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at // with the License. You may obtain a copy of the License at
// //
// https://www.apache.org/licenses/LICENSE-2.0 // http://www.apache.org/licenses/LICENSE-2.0
// //
// Unless required by applicable law or agreed to in writing, // Unless required by applicable law or agreed to in writing, software
// software distributed under the License is distributed on an // distributed under the License is distributed on an "AS IS" BASIS,
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// KIND, either express or implied. See the License for the // Se# Licensed to the Apache Software Foundation (ASF) under onee the License for the specific language governing permissions and
// specific language governing permissions and limitations // limitations under the License.
// under the License.
// //
// //
// Jenkins declaration of how to build and test the current codebase. // Jenkins declaration of how to build and test the current codebase.

View File

@ -202,8 +202,12 @@
limitations under the License. limitations under the License.
THIRD-PARTY DEPENDENCIES APACHE CASSANDRA SUBCOMPONENTS:
========================
Convenience copies of some third-party dependencies are distributed with Apache Cassandra includes a number of subcomponents with
Apache Cassandra as Java jar files in lib/. Licensing information for separate copyright notices and license terms. Your use of the source
these files can be found in the lib/licenses directory. code for these subcomponents is subject to the terms and
conditions of the following licenses.
This product bundles a file (VIntCoding.java) from Protocol Buffers
copyright Google Inc., which is available under a BSD license.

View File

@ -1,4 +1,23 @@
#
# 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.
#
#
# Maven2 Repository Locations (you can override these in "build.properties" to point to a local proxy, e.g. Nexus) # Maven2 Repository Locations (you can override these in "build.properties" to point to a local proxy, e.g. Nexus)
#
artifact.remoteRepository.central: https://repo1.maven.org/maven2 artifact.remoteRepository.central: https://repo1.maven.org/maven2
artifact.remoteRepository.apache: https://repo.maven.apache.org/maven2 artifact.remoteRepository.apache: https://repo.maven.apache.org/maven2

View File

@ -1,3 +1,21 @@
#
# 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.
#
#
########################################################################### ###########################################################################
# jvm.options # # jvm.options #
# # # #

View File

@ -1,2 +1,18 @@
# 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.
#
vm.max_map_count = 1048575 vm.max_map_count = 1048575
net.ipv4.tcp_keepalive_time=300 net.ipv4.tcp_keepalive_time=300

16
debian/cassandra.conf vendored
View File

@ -1,3 +1,19 @@
# 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.
#
# Provided by the cassandra package # Provided by the cassandra package
cassandra - memlock unlimited cassandra - memlock unlimited
cassandra - nofile 100000 cassandra - nofile 100000

View File

@ -1,4 +1,20 @@
#!/bin/sh #!/bin/sh
# 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.
#
# postinst script for cassandra # postinst script for cassandra
set -e set -e

16
debian/default vendored
View File

@ -1,3 +1,19 @@
# 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.
#
# NOTICE: See also /etc/cassandra/cassandra-env.sh # NOTICE: See also /etc/cassandra/cassandra-env.sh
# EXTRA_CLASSPATH provides the means to extend Cassandra's classpath with # EXTRA_CLASSPATH provides the means to extend Cassandra's classpath with

16
debian/init vendored
View File

@ -1,4 +1,20 @@
#! /bin/sh #! /bin/sh
# 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.
#
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: cassandra # Provides: cassandra
# Required-Start: $remote_fs $network $named $time # Required-Start: $remote_fs $network $named $time

View File

@ -1,3 +1,19 @@
# 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.
#
have nodetool && have cqlsh && have nodetool && have cqlsh &&
{ {

17
debian/rules vendored
View File

@ -1,5 +1,20 @@
#!/usr/bin/make -f #!/usr/bin/make -f
# 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.
#
# Uncomment to enable verbose mode. # Uncomment to enable verbose mode.
#export DH_VERBOSE=1 #export DH_VERBOSE=1

View File

@ -1,3 +1,19 @@
# 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.
#
[nosetests] [nosetests]
verbosity=3 verbosity=3
detailed-errors=1 detailed-errors=1

View File

@ -1,3 +1,20 @@
# 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.
#
#
# See python driver docs: futures and six have to be installed before # See python driver docs: futures and six have to be installed before
# cythonizing the driver, perhaps only on old pips. # cythonizing the driver, perhaps only on old pips.
# http://datastax.github.io/python-driver/installation.html#cython-based-extensions # http://datastax.github.io/python-driver/installation.html#cython-based-extensions

View File

@ -1,4 +1,20 @@
#!/bin/bash #!/bin/bash
# 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.
#
# #
# /etc/init.d/cassandra # /etc/init.d/cassandra
# #

View File

@ -1,3 +1,19 @@
# 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.
#
cassandra - memlock unlimited cassandra - memlock unlimited
cassandra - nofile 100000 cassandra - nofile 100000
cassandra - nproc 32768 cassandra - nproc 32768

View File

@ -1,3 +1,19 @@
# 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.
#
# NOTICE: See also /etc/cassandra/cassandra-env.sh # NOTICE: See also /etc/cassandra/cassandra-env.sh
# EXTRA_CLASSPATH provides the means to extend Cassandra's classpath with # EXTRA_CLASSPATH provides the means to extend Cassandra's classpath with

View File

@ -1,3 +1,20 @@
/*
* 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.
*/
package #package_name#; package #package_name#;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;