Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(license): add license checker for copyright and fix license files #1674

Merged
merged 12 commits into from
Nov 8, 2023

Conversation

empiredan
Copy link
Contributor

@empiredan empiredan commented Nov 7, 2023

#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 as follows:

$ python3 scripts/check_license.py
No diff found for marker 'Copyright (c) Facebook, Inc' in /Users/danwang/Workdir/prj/ds/pegasus/empiredan-pegasus-new/.licenserc.yaml
Diff found for marker 'https://github.com/preshing/cpp11-on-multicore/blob/master/LICENSE' in /Users/danwang/Workdir/prj/ds/pegasus/empiredan-pegasus-new/.licenserc.yaml:
++: {'src/utils/hpc_locks/autoreseteventcondvar.h', 'src/utils/hpc_locks/readme.txt'}
No diff found for marker 'Copyright (c) 2011 The Chromium Authors' in /Users/danwang/Workdir/prj/ds/pegasus/empiredan-pegasus-new/.licenserc.yaml
No diff found for marker 'Copyright (c) 2012 The Chromium Authors' in /Users/danwang/Workdir/prj/ds/pegasus/empiredan-pegasus-new/.licenserc.yaml
No diff found for marker 'Copyright (c) 2006-2009 The Chromium Authors' in /Users/danwang/Workdir/prj/ds/pegasus/empiredan-pegasus-new/.licenserc.yaml
No diff found for marker 'Copyright 2017 The Abseil Authors' in /Users/danwang/Workdir/prj/ds/pegasus/empiredan-pegasus-new/.licenserc.yaml
No diff found for marker 'Copyright (c) 2010-2011, Rob Jansen' in /Users/danwang/Workdir/prj/ds/pegasus/empiredan-pegasus-new/.licenserc.yaml
No diff found for marker 'Copyright (c) 2017 Guillaume Papin' in /Users/danwang/Workdir/prj/ds/pegasus/empiredan-pegasus-new/.licenserc.yaml
Diff found for marker 'Copyright (c) 2015 Microsoft Corporation' in /Users/danwang/Workdir/prj/ds/pegasus/empiredan-pegasus-new/.licenserc.yaml:
+++++++++: {'src/utils/dlib.h', 'src/runtime/test/command.txt', 'src/replica/replica_test_utils.h', 'docs/rdsn-README.md', 'src/common/serialization_helper/dsn.layer2_types.h', 'src/aio/test/copy_source.txt', 'src/common/api_common.h', 'src/runtime/dsn.layer2_types.cpp', 'src/replica/replica_test_utils.cpp'}
markers in some files of the project not found in /Users/danwang/Workdir/prj/ds/pegasus/empiredan-pegasus-new/.licenserc.yaml:
{'NO_COPYRIGHT_MARKER': {'./.rat-excludes',
                         './DISCLAIMER-WIP',
                         './NOTICE',
                         '.devcontainer/devcontainer.json',
                         '.github/ISSUE_TEMPLATE/bug_report.md',
                         '.github/ISSUE_TEMPLATE/feature-request.md',
                         '.github/ISSUE_TEMPLATE/general_question.md',
                         '.github/pull_request_template.md',
                         'admin-cli/go.sum',
                         'go-client/example/pegasus-client-config.json',
                         'go-client/generator/admin.csv',
                         'go-client/generator/radmin.csv',
                         'go-client/go.sum',
                         'go-client/idl/base/GoUnusedProtection__.go',
                         'go-client/idl/base/dsn_err_string.go',
                         'go-client/idl/base/rocskdb_err_string.go',
                         'nodejs-client/.npmigonre',
                         'nodejs-client/package.json',
                         'pegic/go.sum',
                         'python-client/requirement.txt',
                         'src/aio/test/copy_source.txt',
                         'src/failure_detector/test/gtest.filter',
                         'src/meta/test/meta_state/gtest.filter',
                         'src/meta/test/suite1',
                         'src/meta/test/suite2',
                         'src/nfs/test/nfs_test_file1',
                         'src/nfs/test/nfs_test_file2',
                         'src/replica/duplication/test/log.1.0.all_loaded_are_write_empties',
                         'src/replica/duplication/test/log.1.0.handle_real_private_log',
                         'src/replica/duplication/test/log.1.0.handle_real_private_log2',
                         'src/replica/storage/simple_kv/test/rep_tests.pdf',
                         'src/runtime/test/command.txt',
                         'src/runtime/test/gtest.filter',
                         'src/shell/argh.h',
                         'src/shell/linenoise/linenoise.c',
                         'src/shell/linenoise/linenoise.h',
                         'src/shell/sds/sds.c',
                         'src/shell/sds/sds.h',
                         'src/shell/sds/sdsalloc.h',
                         'src/utils/hpc_locks/autoreseteventcondvar.h',
                         'src/utils/hpc_locks/readme.txt',
                         'src/utils/test/config-empty.ini',
                         'thirdparty/fix_fds_for_macos.patch',
                         'thirdparty/fix_jemalloc_for_m1_on_macos.patch',
                         'thirdparty/fix_libevent_for_macos.patch',
                         'thirdparty/fix_prometheus-cpp_limits.patch',
                         'thirdparty/fix_s2_for_aarch64.patch',
                         'thirdparty/fix_thrift_for_cpp11.patch',
                         'thirdparty/rocksdb_fix_atomic_flush_0879c240.patch'}}

The files marked with No diff found are consistent with .licenserc.yaml. Otherwise, .licenserc.yaml should be fixed accordingly.

@empiredan empiredan marked this pull request as draft November 7, 2023 06:18
@empiredan empiredan marked this pull request as ready for review November 8, 2023 04:19
@empiredan empiredan merged commit 85f3e74 into apache:master Nov 8, 2023
9 checks passed
empiredan added a commit to empiredan/pegasus that referenced this pull request Nov 8, 2023
…es (apache#1674)

apache#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`.
empiredan added a commit that referenced this pull request Nov 8, 2023
…es (cherry-pick #1674) (#1677)

#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`.

This PR is to cherry-pick #1674 into v2.5 to solve issue #1676.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants