forked from apache/kudu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KUDU-2411: Update license information for binary test jars
This patch updates the license files to account for transitive dependencies we ship with the binary jar files and updates the scripting infrastructure to validate the licensing information at binary jar build time. This patch also introduces binary-jar-specific license and notice files to account for licensing information only relevant to the binary artifacts. Change-Id: If864384e60013d592c5c7315e2d9a99c83f31449 Reviewed-on: http://gerrit.cloudera.org:8080/12431 Reviewed-by: Grant Henke <[email protected]> Tested-by: Kudu Jenkins
- Loading branch information
Showing
9 changed files
with
660 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -479,6 +479,7 @@ src/kudu/util/x509_check_host.*: OpenSSL software license: | |
|
||
OpenSSL License | ||
--------------- | ||
|
||
==================================================================== | ||
Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved. | ||
|
||
|
@@ -532,8 +533,8 @@ src/kudu/util/x509_check_host.*: OpenSSL software license: | |
Hudson ([email protected]). | ||
|
||
|
||
Original SSLeay License | ||
----------------------- | ||
Original SSLeay License | ||
----------------------- | ||
|
||
Copyright (C) 1995-1998 Eric Young ([email protected]) | ||
All rights reserved. | ||
|
@@ -570,7 +571,7 @@ src/kudu/util/x509_check_host.*: OpenSSL software license: | |
Eric Young ([email protected])" | ||
The word 'cryptographic' can be left out if the rouines from the library | ||
being used are not cryptographic related :-). | ||
4. If you include any Windows specific code (or a derivative thereof) from | ||
4. If you include any Windows specific code (or a derivative thereof) from | ||
the apps directory (application code) you must include an acknowledgement: | ||
"This product includes software written by Tim Hudson ([email protected])" | ||
|
||
|
482 changes: 482 additions & 0 deletions
482
build-support/mini-cluster/LICENSE-BINARY-JAR-LINUX.txt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
======================================================================= | ||
License information for macOS binary test jar distribution dependencies | ||
======================================================================= | ||
|
||
In addition to dependencies described elsewhere, the below dependencies are | ||
distributed with the macOS version of the Kudu binary test jar. | ||
|
||
-------------------------------------------------------------------------------- | ||
OpenSSL: OpenSSL software license | ||
libraries: libssl, libcrypto | ||
Source: Homebrew repository | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
=========================================================== | ||
Notices for Linux binary test jar distribution dependencies | ||
=========================================================== | ||
|
||
OpenSSL: | ||
|
||
This product includes software developed by the OpenSSL Project | ||
for use in the OpenSSL Toolkit (http://www.openssl.org/) | ||
|
||
Cyrus SASL: | ||
|
||
This product includes software developed by Computing Services | ||
at Carnegie Mellon University (http://www.cmu.edu/computing/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
=========================================================== | ||
Notices for macOS binary test jar distribution dependencies | ||
=========================================================== | ||
|
||
OpenSSL: | ||
|
||
This product includes software developed by the OpenSSL Project | ||
for use in the OpenSSL Toolkit (http://www.openssl.org/) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/usr/bin/perl | ||
############################################################################### | ||
# 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. | ||
############################################################################### | ||
# This script will check a Kudu binary jar distribution to ensure that all | ||
# included shared objects are mentioned in LICENSE.txt; | ||
# The JAR must first be unpacked and this script pointed to the directory | ||
# within the JAR containing the LICENSE.txt file | ||
############################################################################### | ||
use strict; | ||
use warnings; | ||
use File::Basename qw(dirname); | ||
|
||
if (scalar @ARGV != 1) { | ||
print STDERR "Usage: $0 binary-jar-unpacked-prefix-dir\n"; | ||
print STDERR " Where binary-jar-unpacked-prefix-dir is the directory within the jar\n"; | ||
print STDERR " containing the LICENSE.txt file.\n"; | ||
exit 1; | ||
} | ||
my $jar_prefix = $ARGV[0]; | ||
|
||
# Read the CMake config files and parse out the libraries that are part of the | ||
# Kudu project. | ||
my $script_dir = dirname $0; | ||
my $src_root = "$script_dir/../.."; | ||
chomp(my @project_deps = `find $src_root/src -name CMakeLists.txt | xargs egrep 'add_library|ADD_EXPORTABLE_LIBRARY'`); | ||
for (@project_deps) { | ||
s/^.*?://; # Strip off leading filename from grep. | ||
s/^[^(]+\(//; # Strip off CMake function / macro name | ||
s/ .*//; # Retain only the first argument to each add_library() call which is the library name. | ||
s/^/lib/; # Prepend "lib" to each library name to match the shared object name. | ||
} | ||
|
||
# Read the LICENSE.txt file from the binary test jar and parse out the library | ||
# dependencies. | ||
my $jar_lic_file = "$jar_prefix/LICENSE.txt"; | ||
open(FILE, "< $jar_lic_file") or die "Cannot open $jar_lic_file: $!"; | ||
chomp(my @contents = grep { /^libraries:/ } <FILE>); | ||
close FILE; | ||
my @external_deps; | ||
foreach my $line (@contents) { | ||
$line =~ s/^libraries: //; | ||
my @deps = split(/,\s*/, $line); | ||
push @external_deps, @deps; | ||
} | ||
|
||
# Create a regular expression to determine if there are any libraries shipped | ||
# in the jar file that are not accounted for by either the CMake project files | ||
# or the LICENSE.txt file. | ||
my @pats = map { "\\b$_\\b" } @project_deps, @external_deps; | ||
my $pat_str = join("|", @pats); | ||
my $pat_known_deps = qr($pat_str); | ||
|
||
# List the libraries in the binary test jar and print any that don't correspond | ||
# to known deps. | ||
my $seen_unknown_deps = 0; | ||
chomp(my @jar_libs = `cd $jar_prefix && find lib/ -type f`); | ||
foreach my $lib (@jar_libs) { | ||
if ($lib !~ $pat_known_deps) { | ||
print STDERR "unknown license: $lib\n"; | ||
$seen_unknown_deps++; | ||
} | ||
} | ||
if (!$seen_unknown_deps) { | ||
print "OK\n"; | ||
exit 0; | ||
} | ||
print "Found $seen_unknown_deps unknown dependencies\n"; | ||
exit 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters