-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(license): fix 3rd party refer in LICENSE
also add sky-walking action to check license header
- Loading branch information
Showing
14 changed files
with
155 additions
and
88 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
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,34 @@ | ||
name: License checker | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
check-license: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# More info could refer to: https://github.com/apache/skywalking-eyes | ||
- name: Check License Header | ||
uses: apache/skywalking-eyes@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
log: info | ||
config: .licenserc.yaml | ||
|
||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
|
||
- name: License check(RAT) | ||
run: | | ||
mvn apache-rat:check -ntp | ||
find ./ -name rat.txt -print0 | xargs -0 -I file cat file > merged-rat.txt | ||
grep "Binaries" merged-rat.txt -C 3 && cat merged-rat.txt |
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,77 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
header: # `header` section is configurations for source codes license header. | ||
license: | ||
spdx-id: Apache-2.0 # the spdx id of the license, it's convenient when your license is standard SPDX license. | ||
copyright-owner: Apache Software Foundation # the copyright owner to replace the [owner] in the `spdx-id` template. | ||
content: | # `license` will be used as the content when `fix` command needs to insert a license header. | ||
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. | ||
# `pattern` is optional regexp if all the file headers are the same as `license` or the license of `spdx-id` and `copyright-owner`. | ||
pattern: | | ||
Licensed to the Apache Software Foundation under one or more contributor | ||
license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright | ||
ownership. The Apache Software Foundation 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. | ||
paths: # `paths` are the path list that will be checked (and fixed) by license-eye, default is ['**']. | ||
- '**' | ||
|
||
paths-ignore: # `paths-ignore` are the path list that will be ignored by license-eye. | ||
- '.gitignore' | ||
- 'LICENSE' | ||
- 'NOTICE' | ||
- 'DISCLAIMER' | ||
- '**/*.md' | ||
- '**/*.versionsBackup' | ||
- '**/*.log' | ||
- '**/*.txt' | ||
- '**/*.csv' | ||
- '**/*.json' | ||
- '**/*.svg' | ||
- '**/*.gitattributes' | ||
- '**/.flattened-pom.xml' | ||
- '**/.prettierrc' | ||
- '**/.stylelintrc' | ||
- 'assembly/**' | ||
- '.github/**/*' | ||
- '**/target/*' | ||
comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`. | ||
|
||
# license-location-threshold specifies the index threshold where the license header can be located, | ||
# after all, a "header" cannot be TOO far from the file start. | ||
license-location-threshold: 80 |
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
66 changes: 24 additions & 42 deletions
66
hugegraph-common/src/main/java/org/apache/hugegraph/util/CheckSocket.java
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 |
---|---|---|
@@ -1,55 +1,37 @@ | ||
// Copyright 2017 JanusGraph Authors | ||
// | ||
// Licensed 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. | ||
/* | ||
* 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 org.apache.hugegraph.util; | ||
|
||
import java.io.IOException; | ||
import static java.lang.System.exit; | ||
|
||
import java.net.InetAddress; | ||
import java.net.Socket; | ||
|
||
/* | ||
* This doesn't really belong here. It's only used in the zipfile | ||
* distribution to check whether Gremlin Server or ES are listening on | ||
* their respective TCP ports. But it's so tiny that I don't want | ||
* to reorganize the repo to accommodate it (yet). | ||
* | ||
* Many widely available *NIX programs do this task better (e.g. | ||
* netcat, telnet, nmap, socat, ... we could even use netstat since | ||
* we're interested only in the status of local ports). But we want | ||
* to keep the JanusGraph distribution self-contained insofar as is | ||
* reasonable. | ||
*/ | ||
public final class CheckSocket { | ||
|
||
private static final int E_USAGE = 1; | ||
private static final int E_FAILED = 2; | ||
private static final String MSG_USAGE = | ||
"Usage: " + CheckSocket.class.getSimpleName() + " hostname port"; | ||
|
||
public static void main(String[] args) { | ||
if (args.length != 2) { | ||
System.err.println(MSG_USAGE); | ||
System.exit(E_USAGE); | ||
} | ||
try { | ||
Socket s = new Socket(InetAddress.getByName(args[0]), | ||
Integer.parseInt(args[1])); | ||
s.close(); | ||
System.exit(0); | ||
} catch (IOException e) { | ||
System.err.println(e); | ||
System.exit(E_FAILED); | ||
// Check if the socket connection can be closed normally | ||
new Socket(InetAddress.getByName(args[0]), Integer.parseInt(args[1])).close(); | ||
exit(0); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
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
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
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