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

[MINOR] chore: Fix the issue of license loss #2246

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

zhengchenyu
Copy link
Collaborator

@zhengchenyu zhengchenyu commented Nov 11, 2024

What changes were proposed in this pull request?

Fix the issue of license loss

Why are the changes needed?

LICENSE file is missing but license directory which is from grpc-netty-shaded-1.61.1.jar exists.

And when published maven artifacts, I can not close.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

test in dev and cluster

@zhengchenyu
Copy link
Collaborator Author

Before this PR, The files under META-INF are as follows:

xxuser@xxhost tmp % ll META-INF
total 96
drwxr-xr-x@ 15 zhengchenyu  staff    480 11  9 12:16 ./
drwxr-xr-x@ 10 zhengchenyu  staff    320 11 11 17:09 ../
-rw-r--r--@  1 zhengchenyu  staff  22734 11  9 12:16 DEPENDENCIES
-rw-r--r--@  1 zhengchenyu  staff    571 11  9 12:16 DISCLAIMER
-rw-r--r--@  1 zhengchenyu  staff    104 11  9 12:16 MANIFEST.MF
-rw-r--r--@  1 zhengchenyu  staff  11430 11  9 12:16 NOTICE
-rw-r--r--@  1 zhengchenyu  staff    439 10 10  2023 io.netty.versions.properties
drwxr-xr-x@  6 zhengchenyu  staff    192  5  5  2023 license/
drwxr-xr-x@ 15 zhengchenyu  staff    480 11  9 12:15 licenses/
drwxr-xr-x@ 11 zhengchenyu  staff    352 11  9 12:15 maven/
drwxr-xr-x@ 16 zhengchenyu  staff    512 11  9 12:16 native/
drwxr-xr-x@  4 zhengchenyu  staff    128  2  2  2024 native-image/
drwxr-xr-x@ 10 zhengchenyu  staff    320  2  1  1980 proguard/
drwxr-xr-x@ 10 zhengchenyu  staff    320 11  9 12:14 services/
drwxr-xr-x@  4 zhengchenyu  staff    128  1  6  2023 versions/
xx user@xx host tmp % ll META-INF/license
total 96
drwxr-xr-x@  6 zhengchenyu  staff    192  5  5  2023 ./
drwxr-xr-x@ 15 zhengchenyu  staff    480 11  9 12:16 ../
-rw-r--r--@  1 zhengchenyu  staff   6121  5  5  2023 LICENSE.aix-netbsd.txt
-rw-r--r--@  1 zhengchenyu  staff  12486  5  5  2023 LICENSE.boringssl.txt
-rw-r--r--@  1 zhengchenyu  staff  11358  5  5  2023 LICENSE.mvn-wrapper.txt
-rw-r--r--@  1 zhengchenyu  staff  11356  5  5  2023 LICENSE.tomcat-native.txt

I can not find LICENSE file in META-INF directory. But I found META-INF/license directory which is from grpc-netty-shaded-1.61.1.jar.

To be honest, I don't know whether these third-party library needs to be in directory META-INF/licenses, because these third-party are need by grpc-netty-shaded-1.61.1.jar. In this pr, these third-party library is ignored.

I guess that In some OS where files are not case sensitive. license directory conficts with License file. So License is missing.

@zhengchenyu
Copy link
Collaborator Author

After this PR, The files under META-INF are as follows:

xxxuser@xxxhost tmp % ll META-INF
total 128
drwxr-xr-x@ 15 zhengchenyu  staff    480 11 11 16:47 ./
drwxr-xr-x@ 10 zhengchenyu  staff    320 11 11 17:21 ../
-rw-r--r--@  1 zhengchenyu  staff  22734 11 11 16:47 DEPENDENCIES
-rw-r--r--@  1 zhengchenyu  staff    571 11 11 16:47 DISCLAIMER
-rw-r--r--@  1 zhengchenyu  staff  14157 11 11 16:47 LICENSE
-rw-r--r--@  1 zhengchenyu  staff    104 11 11 16:47 MANIFEST.MF
-rw-r--r--@  1 zhengchenyu  staff  11430 11 11 16:47 NOTICE
-rw-r--r--@  1 zhengchenyu  staff    439 10 10  2023 io.netty.versions.properties
drwxr-xr-x@ 15 zhengchenyu  staff    480 11 11 16:47 licenses/
drwxr-xr-x@ 11 zhengchenyu  staff    352 11 11 16:47 maven/
drwxr-xr-x@ 16 zhengchenyu  staff    512 11 11 16:47 native/
drwxr-xr-x@  4 zhengchenyu  staff    128  2  2  2024 native-image/
drwxr-xr-x@ 10 zhengchenyu  staff    320  2  1  1980 proguard/
drwxr-xr-x@ 10 zhengchenyu  staff    320 11 11 16:46 services/
drwxr-xr-x@  4 zhengchenyu  staff    128  1  6  2023 versions/

@jerqi
Copy link
Contributor

jerqi commented Nov 11, 2024

Could you raise a pull request to the master branch?

Copy link

github-actions bot commented Nov 11, 2024

Test Results

 2 370 files  ±0   2 370 suites  ±0   4h 38m 26s ⏱️ - 1m 31s
   918 tests ±0     917 ✅ ±0   1 💤 ±0  0 ❌ ±0 
10 655 runs  ±0  10 641 ✅ ±0  14 💤 ±0  0 ❌ ±0 

Results for commit ee605ef. ± Comparison against base commit 06cbcef.

♻️ This comment has been updated with latest results.

@zhengchenyu
Copy link
Collaborator Author

Could you raise a pull request to the master branch?

OK, raise pr to master after this pr is done!

To be honest, I'm not very familiar with licenses. Can you please review this? @jerqi @xianjingfeng

@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.53%. Comparing base (06cbcef) to head (b7f42cb).

Additional details and impacted files
@@                Coverage Diff                @@
##             branch-0.9    #2246       +/-   ##
=================================================
+ Coverage         43.23%   54.53%   +11.30%     
- Complexity            0     2720     +2720     
=================================================
  Files                21      406      +385     
  Lines              2505    21212    +18707     
  Branches              0     2010     +2010     
=================================================
+ Hits               1083    11569    +10486     
- Misses             1349     8909     +7560     
- Partials             73      734      +661     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jerqi
Copy link
Contributor

jerqi commented Nov 11, 2024

Could you display the files in the license and licenses?

@zhengchenyu
Copy link
Collaborator Author

zhengchenyu commented Nov 11, 2024

Could you display the files in the license and licenses?

The files under META-INF/licenses are as follows:

drwxr-xr-x@ 15 zhengchenyu  staff    480 11 11 17:41 ./
drwxr-xr-x@ 15 zhengchenyu  staff    480 11 11 17:41 ../
-rw-r--r--@  1 zhengchenyu  staff   1075 11 11 17:41 LICENSE-animal-sniffer.txt
-rw-r--r--@  1 zhengchenyu  staff   1126 11 11 17:41 LICENSE-checker-qual.txt
-rw-r--r--@  1 zhengchenyu  staff  35082 11 11 17:41 LICENSE-hbase-shaded-jersey.txt
-rw-r--r--@  1 zhengchenyu  staff  35084 11 11 17:41 LICENSE-jakarta-annotation.txt
-rw-r--r--@  1 zhengchenyu  staff  35717 11 11 17:41 LICENSE-jakarta-inject.txt
-rw-r--r--@  1 zhengchenyu  staff  39394 11 11 17:41 LICENSE-javax-activation.txt
-rw-r--r--@  1 zhengchenyu  staff  36116 11 11 17:41 LICENSE-javax-annotation.txt
-rw-r--r--@  1 zhengchenyu  staff  36116 11 11 17:41 LICENSE-javax-servlet-api.txt
-rw-r--r--@  1 zhengchenyu  staff  39395 11 11 17:41 LICENSE-jaxb-api.txt
-rw-r--r--@  1 zhengchenyu  staff   1732 11 11 17:41 LICENSE-protobuf.txt
-rw-r--r--@  1 zhengchenyu  staff    774 11 11 17:41 LICENSE-rimraf.txt
-rw-r--r--@  1 zhengchenyu  staff   1154 11 11 17:41 LICENSE-slf4j.txt
-rw-r--r--@  1 zhengchenyu  staff   1360 11 11 17:41 LICENSE-zstd-jni.txt

And The files under META-INF/license are as follows:

drwxr-xr-x@  6 zhengchenyu  staff    192  5  5  2023 ./
drwxr-xr-x@ 15 zhengchenyu  staff    480 11  9 12:16 ../
-rw-r--r--@  1 zhengchenyu  staff   6121  5  5  2023 LICENSE.aix-netbsd.txt
-rw-r--r--@  1 zhengchenyu  staff  12486  5  5  2023 LICENSE.boringssl.txt
-rw-r--r--@  1 zhengchenyu  staff  11358  5  5  2023 LICENSE.mvn-wrapper.txt
-rw-r--r--@  1 zhengchenyu  staff  11356  5  5  2023 LICENSE.tomcat-native.txt

META-INF/licenses is from licenses-binary. By my debug, META-INF/license (a directory) is from grpc-netty-shaded-1.61.1.jar.

@jerqi
Copy link
Contributor

jerqi commented Nov 11, 2024

We should merge them. We can copy the files in the grpc-netty-shaded-1.61.1.jar to licenses-binary. All the jars with diferent licenses in our project should be contained.

@zhengchenyu
Copy link
Collaborator Author

zhengchenyu commented Nov 12, 2024

We should merge them. We can copy the files in the grpc-netty-shaded-1.61.1.jar to licenses-binary. All the jars with diferent licenses in our project should be contained.

@jerqi OK, I have merged these.
Since it may be compiled on case-insensitive operating system, it may be executed multiple times(eg: mvn install then mvn deploy).Here the license directory, licenses directory, and LICENSE file are processed with aliases. Eventually I'll rename it to what we need. Now the files are as follows:

截屏2024-11-12 12 41 35

@zhengchenyu zhengchenyu merged commit ca5d32b into apache:branch-0.9 Nov 12, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants