Skip to content

Commit 85f3e74

Browse files
authored
chore(license): add license checker for copyright and fix license files (#1674)
#1676 There are several tasks/steps for this PR: - develop a script to check the consistency between `.licenserc.yaml` and all files of the project. - according to the check result, fix `.licenserc.yaml`. - according to the fixed `.licenserc.yaml`, amend `LICENSE`. License checker could be run just by `python3 scripts/check_license.py`.
1 parent ee369d3 commit 85f3e74

File tree

3 files changed

+311
-48
lines changed

3 files changed

+311
-48
lines changed

.licenserc.yaml

Lines changed: 57 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -20,80 +20,104 @@ header:
2020
copyright-owner: Apache Software Foundation
2121

2222
paths-ignore:
23+
# Configuration files that could not be added with copyright info (otherwise would lead to error).
24+
- '.rat-excludes'
25+
- '**/*.csv'
26+
- '**/*.json'
2327
# All the type of licenses of this project should be added to LICENSE.
28+
- 'DISCLAIMER-WIP'
2429
- 'LICENSE'
2530
- 'NOTICE'
26-
- '.github/pull_request_template.md'
31+
# Template files of issues and pull requests for Github.
2732
- '.github/ISSUE_TEMPLATE/bug_report.md'
2833
- '.github/ISSUE_TEMPLATE/feature-request.md'
2934
- '.github/ISSUE_TEMPLATE/general_question.md'
30-
- '.rat-excludes'
31-
- 'DISCLAIMER-WIP'
35+
- '.github/pull_request_template.md'
36+
# Image files for docs.
37+
- '**/*.jpg'
38+
- '**/*.png'
39+
# Files in pdf format.
40+
- '**/*.pdf'
41+
# Special files for golang.
42+
- '**/go.sum'
43+
# TODO(wangdan): Generated files for go client, could generate dynamically?
44+
- 'go-client/idl/base/GoUnusedProtection__.go'
45+
- 'go-client/idl/base/dsn_err_string.go'
46+
- 'go-client/idl/base/rocskdb_err_string.go'
47+
# Special files for nodejs.
48+
- '**/.npmigonre'
49+
# Special files for python.
3250
- 'python-client/requirement.txt'
33-
- '.devcontainer/devcontainer.json'
51+
# Text files used for tests and could not be added with copyright info (otherwise would lead to error).
52+
- 'src/aio/test/copy_source.txt'
53+
- 'src/runtime/test/command.txt'
54+
- 'src/failure_detector/test/gtest.filter'
55+
- 'src/meta/test/meta_state/gtest.filter'
56+
- 'src/meta/test/suite1'
57+
- 'src/meta/test/suite2'
58+
- 'src/nfs/test/nfs_test_file1'
59+
- 'src/nfs/test/nfs_test_file2'
60+
- 'src/runtime/test/gtest.filter'
61+
# Used for tests and should be empty, or ignore all comment lines (otherwise would lead to error).
62+
- 'src/utils/test/config-empty.ini'
63+
# Binary files used for tests and could not be added with copyright info (otherwise would lead to error).
64+
- 'src/replica/duplication/test/log.1.0.handle_real_private_log'
65+
- 'src/replica/duplication/test/log.1.0.handle_real_private_log2'
66+
- 'src/replica/duplication/test/log.1.0.all_loaded_are_write_empties'
67+
# Used for patches for thirdparties.
68+
- 'thirdparty/fix_fds_for_macos.patch'
69+
- 'thirdparty/fix_jemalloc_for_m1_on_macos.patch'
70+
- 'thirdparty/fix_libevent_for_macos.patch'
71+
- 'thirdparty/fix_prometheus-cpp_limits.patch'
72+
- 'thirdparty/fix_s2_for_aarch64.patch'
73+
- 'thirdparty/fix_thrift_for_cpp11.patch'
74+
- 'thirdparty/rocksdb_fix_atomic_flush_0879c240.patch'
3475
# TODO(yingchun): shell/* files are import from thirdparties, we can move them to thirdparty later.
76+
# Copyright (c) 2016, Adi Shavit
3577
- 'src/shell/argh.h'
78+
# Copyright (c) 2010-2016, Salvatore Sanfilippo, etc.
3679
- 'src/shell/linenoise/linenoise.c'
80+
# Copyright (c) 2010-2014, Salvatore Sanfilippo, etc.
3781
- 'src/shell/linenoise/linenoise.h'
82+
# Copyright (c) 2006-2015, Salvatore Sanfilippo, etc.
3883
- 'src/shell/sds/sds.c'
3984
- 'src/shell/sds/sds.h'
4085
- 'src/shell/sds/sdsalloc.h'
41-
- '**/go.sum'
42-
- '**/*.csv'
43-
- '**/*.json'
44-
- 'go-client/idl/base/dsn_err_string.go'
45-
- 'go-client/idl/base/rocskdb_err_string.go'
46-
- 'go-client/idl/base/GoUnusedProtection__.go'
47-
- '**/.npmigonre'
4886
# Copyright (c) Facebook, Inc
4987
- 'src/utils/TokenBucket.h'
5088
- 'src/utils/test/TokenBucketTest.cpp'
5189
- 'src/utils/test/TokenBucketTest.h'
90+
# https://github.com/preshing/modern-cpp-threading/blob/master/LICENSE
91+
- 'src/utils/hpc_locks/autoreseteventcondvar.h'
5292
# https://github.com/preshing/cpp11-on-multicore/blob/master/LICENSE
5393
- 'src/utils/hpc_locks/autoresetevent.h'
54-
- 'src/utils/hpc_locks/autoreseteventcondvar.h'
5594
- 'src/utils/hpc_locks/benaphore.h'
5695
- 'src/utils/hpc_locks/bitfield.h'
5796
- 'src/utils/hpc_locks/readme.txt'
5897
- 'src/utils/hpc_locks/rwlock.h'
5998
- 'src/utils/hpc_locks/sema.h'
60-
# Copyright (c) xxxx The Chromium Authors
99+
# Copyright (c) 2011 The Chromium Authors
61100
- 'src/utils/safe_strerror_posix.h'
101+
# Copyright (c) 2012 The Chromium Authors
62102
- 'src/runtime/build_config.h'
63103
- 'src/utils/test/autoref_ptr_test.cpp'
104+
# Copyright (c) 2006-2009 The Chromium Authors
64105
- 'src/utils/safe_strerror_posix.cpp'
65106
# Copyright 2017 The Abseil Authors
66107
- 'src/utils/absl/base/internal/invoke.h'
67108
- 'src/utils/absl/utility/utility.h'
109+
- 'src/utils/memutil.h'
68110
- 'src/utils/smart_pointers.h'
111+
- 'src/utils/string_view.cpp'
69112
- 'src/utils/string_view.h'
70113
- 'src/utils/test/memutil_test.cpp'
71-
- 'src/utils/test/string_view_test.cpp'
72114
- 'src/utils/test/smart_pointers_test.cpp'
73-
- 'src/utils/memutil.h'
74-
- 'src/utils/string_view.cpp'
115+
- 'src/utils/test/string_view_test.cpp'
75116
# Copyright (c) 2010-2011, Rob Jansen
76117
- 'cmake_modules/FindRT.cmake'
77118
- 'cmake_modules/FindDL.cmake'
78119
# Copyright (c) 2017 Guillaume Papin
79120
- 'scripts/run-clang-format.py'
80-
# need manual fix
81-
- 'src/failure_detector/test/gtest.filter'
82-
- 'src/meta/test/meta_state/gtest.filter'
83-
- 'src/meta/test/suite1'
84-
- 'src/meta/test/suite2'
85-
- 'src/nfs/test/nfs_test_file1'
86-
- 'src/nfs/test/nfs_test_file2'
87-
- 'src/runtime/test/gtest.filter'
88-
- 'thirdparty/fix_fds_for_macos.patch'
89-
- 'thirdparty/fix_jemalloc_for_m1_on_macos.patch'
90-
- 'thirdparty/fix_libevent_for_macos.patch'
91-
- 'thirdparty/fix_prometheus-cpp_limits.patch'
92-
- 'thirdparty/fix_s2_for_aarch64.patch'
93-
- 'thirdparty/fix_thrift_for_cpp11.patch'
94-
- 'thirdparty/rocksdb_fix_atomic_flush_0879c240.patch'
95-
# should be empty, or ignore all comment lines
96-
- 'src/utils/test/config-empty.ini'
97121
# The MIT License (MIT), Copyright (c) 2015 Microsoft Corporation
98122
- 'cmake_modules/BaseFunctions.cmake'
99123
- 'docs/rdsn-README.md'
@@ -105,15 +129,13 @@ header:
105129
- 'idl/replica_admin.thrift'
106130
- 'scripts/compile_thrift.py'
107131
- 'scripts/learn_stat.py'
108-
- 'src/common/api_common.h'
109132
- 'src/runtime/api_layer1.h'
110133
- 'src/runtime/api_task.h'
111134
- 'src/utils/api_utilities.h'
112135
- 'src/runtime/app_model.h'
113136
- 'src/common/json_helper.h'
114137
- 'src/runtime/rpc/rpc_stream.h'
115138
- 'src/runtime/rpc/serialization.h'
116-
- 'src/common/serialization_helper/dsn.layer2_types.h'
117139
- 'src/common/serialization_helper/dsn_types.h'
118140
- 'src/common/serialization_helper/thrift_helper.h'
119141
- 'src/runtime/serverlet.h'
@@ -131,7 +153,6 @@ header:
131153
- 'src/client/partition_resolver.h'
132154
- 'src/replica/replica_base.h'
133155
- 'src/common/replica_envs.h'
134-
- 'src/replica/replica_test_utils.h'
135156
- 'src/common/replication.codes.h'
136157
- 'src/replica/replication_app_base.h'
137158
- 'src/client/replication_ddl_client.h'
@@ -187,7 +208,6 @@ header:
187208
- 'src/utils/configuration.h'
188209
- 'src/utils/crc.h'
189210
- 'src/utils/customizable_id.h'
190-
- 'src/utils/dlib.h'
191211
- 'src/utils/enum_helper.h'
192212
- 'src/utils/error_code.h'
193213
- 'src/utils/errors.h'
@@ -220,7 +240,6 @@ header:
220240
- 'src/aio/test/aio.cpp'
221241
- 'src/aio/test/clear.sh'
222242
- 'src/aio/test/config.ini'
223-
- 'src/aio/test/copy_source.txt'
224243
- 'src/aio/test/run.sh'
225244
- 'src/block_service/test/config-test.ini'
226245
- 'src/client/CMakeLists.txt'
@@ -363,7 +382,6 @@ header:
363382
- 'src/replica/replica_learn.cpp'
364383
- 'src/replica/replica_stub.cpp'
365384
- 'src/replica/replica_stub.h'
366-
- 'src/replica/replica_test_utils.cpp'
367385
- 'src/replica/replication_app_base.cpp'
368386
- 'src/replica/replication_service_app.cpp'
369387
- 'src/replica/split/test/config-test.ini'
@@ -514,7 +532,6 @@ header:
514532
- 'src/replica/test/run.sh'
515533
- 'src/runtime/CMakeLists.txt'
516534
- 'src/runtime/core_main.cpp'
517-
- 'src/runtime/dsn.layer2_types.cpp'
518535
- 'src/runtime/env.sim.cpp'
519536
- 'src/runtime/env.sim.h'
520537
- 'src/runtime/fault_injector.cpp'
@@ -569,7 +586,6 @@ header:
569586
- 'src/runtime/test/address_test.cpp'
570587
- 'src/runtime/test/async_call.cpp'
571588
- 'src/runtime/test/clear.sh'
572-
- 'src/runtime/test/command.txt'
573589
- 'src/runtime/test/config-test-corrupt-message.ini'
574590
- 'src/runtime/test/config-test-sim.ini'
575591
- 'src/runtime/test/config-test.ini'

LICENSE

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ limitations under the License.
231231

232232
--------------------------------------------------------------------------------
233233

234-
src/shell/linenoise/* - BSD-2-Clause License
234+
src/shell/linenoise/linenoise.h - BSD-2-Clause License
235+
src/shell/linenoise/LICENSE
235236

236237
Copyright (c) 2010-2014, Salvatore Sanfilippo <antirez at gmail dot com>
237238
Copyright (c) 2010-2013, Pieter Noordhuis <pcnoordhuis at gmail dot com>
@@ -263,6 +264,38 @@ src/shell/linenoise/* - BSD-2-Clause License
263264

264265
--------------------------------------------------------------------------------
265266

267+
src/shell/linenoise/linenoise.c - BSD-2-Clause License
268+
269+
Copyright (c) 2010-2016, Salvatore Sanfilippo <antirez at gmail dot com>
270+
Copyright (c) 2010-2013, Pieter Noordhuis <pcnoordhuis at gmail dot com>
271+
272+
All rights reserved.
273+
274+
Redistribution and use in source and binary forms, with or without
275+
modification, are permitted provided that the following conditions are
276+
met:
277+
278+
* Redistributions of source code must retain the above copyright
279+
notice, this list of conditions and the following disclaimer.
280+
281+
* Redistributions in binary form must reproduce the above copyright
282+
notice, this list of conditions and the following disclaimer in the
283+
documentation and/or other materials provided with the distribution.
284+
285+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
286+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
287+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
288+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
289+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
290+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
291+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
292+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
293+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
294+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
295+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
296+
297+
--------------------------------------------------------------------------------
298+
266299
src/shell/sds/* - BSD-2-Clause License
267300

268301
Copyright (c) 2006-2015, Salvatore Sanfilippo <antirez at gmail dot com>
@@ -327,12 +360,12 @@ src/shell/argh.h - BSD-3-Clause License
327360

328361
--------------------------------------------------------------------------------
329362

330-
src/utils/smart_pointers.h - Apache 2.0 License
331-
src/utils/string_view.h
332-
src/utils/absl/base/internal/invoke.h
363+
src/utils/absl/base/internal/invoke.h - Apache 2.0 License
333364
src/utils/absl/utility/utility.h
334365
src/utils/memutil.h
366+
src/utils/smart_pointers.h
335367
src/utils/string_view.cpp
368+
src/utils/string_view.h
336369
src/utils/test/memutil_test.cpp
337370
src/utils/test/smart_pointers_test.cpp
338371
src/utils/test/string_view_test.cpp
@@ -406,11 +439,12 @@ limitations under the License.
406439
--------------------------------------------------------------------------------
407440

408441
src/utils/hpc_locks/autoreseteventcondvar.h - zlib License
409-
src/utils/hpc_locks/rwlock.h
410442
src/utils/hpc_locks/autoresetevent.h
411-
src/utils/hpc_locks/sema.h
412-
src/utils/hpc_locks/bitfield.h
413443
src/utils/hpc_locks/benaphore.h
444+
src/utils/hpc_locks/bitfield.h
445+
src/utils/hpc_locks/readme.txt
446+
src/utils/hpc_locks/rwlock.h
447+
src/utils/hpc_locks/sema.h
414448

415449
Copyright (c) 2015 Jeff Preshing
416450

0 commit comments

Comments
 (0)