From 54722b4e4fd3f6c916d7c7b745123523b29aeb09 Mon Sep 17 00:00:00 2001 From: Maksim Myskov Date: Sat, 9 Mar 2024 11:49:58 +0300 Subject: [PATCH 1/3] HDDS-10498. Improved configuration for license compliance --- dev-support/rat/rat-exclusions.txt | 55 +++++++++++++++++++++++ hadoop-hdds/docs/pom.xml | 24 ----------- hadoop-hdds/pom.xml | 39 ----------------- hadoop-ozone/dev-support/checks/rat.sh | 8 +--- hadoop-ozone/httpfsgateway/pom.xml | 4 -- hadoop-ozone/pom.xml | 60 -------------------------- pom.xml | 7 +++ 7 files changed, 63 insertions(+), 134 deletions(-) create mode 100644 dev-support/rat/rat-exclusions.txt diff --git a/dev-support/rat/rat-exclusions.txt b/dev-support/rat/rat-exclusions.txt new file mode 100644 index 000000000000..aad1a9697dc2 --- /dev/null +++ b/dev-support/rat/rat-exclusions.txt @@ -0,0 +1,55 @@ +###### 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. + +.github/* +CONTRIBUTING.md +README.md +SECURITY.md +.gitattributes +src/main/resources/proto.lock +**/output.xml +**/log.html +**/report.html +**/.ssh/id_rsa* +src/test/resources/*.log +src/test/resources/ssl/* +**/dependency-reduced-pom.xml +**/pnpm-lock.yaml +src/test/resources/prometheus-test-response.txt +src/main/license/** +src/main/resources/proto.lock +src/test/resources/test.db.ini +tools/fault-injection-service/README.md +**/webapps/static/angular-nvd3-1.0.9.min.js +**/webapps/static/angular-route-1.8.0.min.js +**/webapps/static/bootstrap-3.4.1/** +**/webapps/static/d3-3.5.17.min.js +**/webapps/static/jquery-3.5.1.min.js +**/webapps/static/nvd3-1.8.5.min.css.map +**/webapps/static/nvd3-1.8.5.min.css +**/webapps/static/nvd3-1.8.5.min.js.map +**/webapps/static/nvd3-1.8.5.min.js +**/webapps/static/angular-1.8.0.min.js +src/test/resources/additionalfields.container +src/test/resources/incorrect.checksum.container +src/test/resources/incorrect.container +src/test/resources/test.db.ini +src/test/resources/123-dn-container.db/** +src/test/resources/123.container +static/slides/* +**/themes/ozonedoc/** +**/*.json \ No newline at end of file diff --git a/hadoop-hdds/docs/pom.xml b/hadoop-hdds/docs/pom.xml index 6281fd749591..94f60ea4aa0c 100644 --- a/hadoop-hdds/docs/pom.xml +++ b/hadoop-hdds/docs/pom.xml @@ -51,30 +51,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd"> - - org.apache.rat - apache-rat-plugin - - - static/slides/* - themes/ozonedoc/static/js/bootstrap.min.js - themes/ozonedoc/static/js/jquery-3.5.1.min.js - themes/ozonedoc/static/js/swagger-ui-bundle.js - themes/ozonedoc/static/css/bootstrap-theme.min.css - - themes/ozonedoc/static/css/bootstrap.min.css.map - themes/ozonedoc/static/css/bootstrap.min.css - themes/ozonedoc/static/css/bootstrap-theme.min.css.map - - themes/ozonedoc/static/css/swagger-ui.css - - themes/ozonedoc/static/fonts/glyphicons-halflings-regular.svg - - themes/ozonedoc/layouts/index.html - themes/ozonedoc/theme.toml - - - diff --git a/hadoop-hdds/pom.xml b/hadoop-hdds/pom.xml index a308158c404c..567f432b3881 100644 --- a/hadoop-hdds/pom.xml +++ b/hadoop-hdds/pom.xml @@ -234,45 +234,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd"> - - - org.apache.rat - apache-rat-plugin - - - **/*.json - **/hs_err*.log - **/.attach_* - **/**.rej - **/.factorypath - public - **/*.iml - **/target/** - **/output.xml - **/log.html - **/report.html - .gitattributes - .idea/** - src/main/resources/webapps/static/angular-1.8.0.min.js - src/main/resources/webapps/static/angular-nvd3-1.0.9.min.js - src/main/resources/webapps/static/angular-route-1.8.0.min.js - src/main/resources/webapps/static/d3-3.5.17.min.js - src/main/resources/webapps/static/nvd3-1.8.5.min.css.map - src/main/resources/webapps/static/nvd3-1.8.5.min.css - src/main/resources/webapps/static/nvd3-1.8.5.min.js.map - src/main/resources/webapps/static/nvd3-1.8.5.min.js - src/main/resources/webapps/static/jquery-3.5.1.min.js - src/main/resources/webapps/static/bootstrap-3.4.1/** - src/test/resources/additionalfields.container - src/test/resources/incorrect.checksum.container - src/test/resources/incorrect.container - src/test/resources/test.db.ini - src/test/resources/123-dn-container.db/** - src/test/resources/123.container - src/main/resources/proto.lock - - - org.apache.maven.plugins maven-jar-plugin diff --git a/hadoop-ozone/dev-support/checks/rat.sh b/hadoop-ozone/dev-support/checks/rat.sh index 32a10349026c..681d24fe66a1 100755 --- a/hadoop-ozone/dev-support/checks/rat.sh +++ b/hadoop-ozone/dev-support/checks/rat.sh @@ -24,13 +24,7 @@ mkdir -p "$REPORT_DIR" REPORT_FILE="$REPORT_DIR/summary.txt" -dirs="hadoop-hdds hadoop-ozone" - -for d in $dirs; do - pushd "$d" || exit 1 - mvn -B --no-transfer-progress -fn org.apache.rat:apache-rat-plugin:0.13:check - popd -done +mvn -B --no-transfer-progress -fn org.apache.rat:apache-rat-plugin:0.13:check grep -r --include=rat.txt "!????" $dirs | tee "$REPORT_FILE" diff --git a/hadoop-ozone/httpfsgateway/pom.xml b/hadoop-ozone/httpfsgateway/pom.xml index f56b4006d852..6ff30c433cda 100644 --- a/hadoop-ozone/httpfsgateway/pom.xml +++ b/hadoop-ozone/httpfsgateway/pom.xml @@ -242,10 +242,6 @@ - - org.apache.rat - apache-rat-plugin - org.apache.maven.plugins maven-antrun-plugin diff --git a/hadoop-ozone/pom.xml b/hadoop-ozone/pom.xml index 4b61b37bc40c..c8cd166d1968 100644 --- a/hadoop-ozone/pom.xml +++ b/hadoop-ozone/pom.xml @@ -305,66 +305,6 @@ - - org.apache.rat - apache-rat-plugin - - - **/*.json - **/hs_err*.log - **/target/** - .gitattributes - **/.attach_* - **/**.rej - **/.factorypath - public - **/*.iml - **/output.xml - **/log.html - **/report.html - **/.idea/** - **/.ssh/id_rsa* - dev-support/*tests - dev-support/checkstyle* - dev-support/jdiff/** - src/contrib/** - src/main/webapps/datanode/robots.txt - src/main/webapps/hdfs/robots.txt - src/main/webapps/journal/robots.txt - src/main/webapps/router/robots.txt - src/main/webapps/secondary/robots.txt - src/site/resources/images/* - src/test/all-tests - src/test/empty-file - src/test/resources/*.log - src/test/resources/*.tgz - src/test/resources/data* - src/test/resources/empty-file - src/test/resources/ssl/* - src/main/compose/ozonesecure/docker-image/runner/build/apache-rat-0.12/README-CLI.txt - src/main/compose/ozonesecure/docker-image/runner/build/apache-rat-0.12/README-ANT.txt - webapps/static/angular-1.8.0.min.js - webapps/static/angular-nvd3-1.0.9.min.js - webapps/static/angular-route-1.8.0.min.js - webapps/static/bootstrap-3.4.1/** - webapps/static/d3-3.5.17.min.js - webapps/static/jquery-3.5.1.min.js - webapps/static/jquery.dataTables.min.js - webapps/static/nvd3-1.8.5.min.css.map - webapps/static/nvd3-1.8.5.min.css - webapps/static/nvd3-1.8.5.min.js.map - webapps/static/nvd3-1.8.5.min.js - **/dependency-reduced-pom.xml - **/node_modules/** - **/yarn.lock - **/pnpm-lock.yaml - **/ozone-recon-web/build/** - src/test/resources/prometheus-test-response.txt - src/main/license/** - src/main/resources/proto.lock - - - org.apache.maven.plugins maven-jar-plugin diff --git a/pom.xml b/pom.xml index 898b675893a3..96288716e104 100644 --- a/pom.xml +++ b/pom.xml @@ -2105,6 +2105,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs + + org.apache.rat + apache-rat-plugin + + dev-support/rat/rat-exclusions.txt + + From e96f564b34bf7f24a714748e81ef1e9623c94ff2 Mon Sep 17 00:00:00 2001 From: Maksim Myskov Date: Tue, 12 Mar 2024 00:38:03 +0300 Subject: [PATCH 2/3] divide rat exclusions by modules and added sorting --- dev-support/rat/rat-exclusions.txt | 59 ++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/dev-support/rat/rat-exclusions.txt b/dev-support/rat/rat-exclusions.txt index aad1a9697dc2..734a611e95da 100644 --- a/dev-support/rat/rat-exclusions.txt +++ b/dev-support/rat/rat-exclusions.txt @@ -15,41 +15,60 @@ ###### specific language governing permissions and limitations ###### under the License. +.gitattributes .github/* CONTRIBUTING.md README.md SECURITY.md -.gitattributes -src/main/resources/proto.lock -**/output.xml -**/log.html -**/report.html -**/.ssh/id_rsa* -src/test/resources/*.log -src/test/resources/ssl/* -**/dependency-reduced-pom.xml -**/pnpm-lock.yaml -src/test/resources/prometheus-test-response.txt -src/main/license/** +dev-support/ci/bats-assert/** +dev-support/ci/bats-support/** + +# hadoop-hdds/interface-client src/main/resources/proto.lock -src/test/resources/test.db.ini + +# tools/fault-injection-service tools/fault-injection-service/README.md + +# hadoop-hdds/framework +**/webapps/static/angular-1.8.0.min.js **/webapps/static/angular-nvd3-1.0.9.min.js **/webapps/static/angular-route-1.8.0.min.js **/webapps/static/bootstrap-3.4.1/** **/webapps/static/d3-3.5.17.min.js **/webapps/static/jquery-3.5.1.min.js -**/webapps/static/nvd3-1.8.5.min.css.map **/webapps/static/nvd3-1.8.5.min.css -**/webapps/static/nvd3-1.8.5.min.js.map +**/webapps/static/nvd3-1.8.5.min.css.map **/webapps/static/nvd3-1.8.5.min.js -**/webapps/static/angular-1.8.0.min.js +**/webapps/static/nvd3-1.8.5.min.js.map + +# hadoop-hdds/container-service +src/test/resources/123-dn-container.db/** +src/test/resources/123.container src/test/resources/additionalfields.container src/test/resources/incorrect.checksum.container src/test/resources/incorrect.container src/test/resources/test.db.ini -src/test/resources/123-dn-container.db/** -src/test/resources/123.container -static/slides/* + +# hadoop-hdds/docs **/themes/ozonedoc/** -**/*.json \ No newline at end of file +static/slides/* + +# hadoop-ozone/dist +**/.ssh/id_rsa* +**/log.html +**/output.xml +**/report.html +src/main/license/** + +# hadoop-ozone/integration-test +src/test/resources/ssl/* + +# hadoop-ozone/recon +**/pnpm-lock.yaml +src/test/resources/prometheus-test-response.txt + +# hadoop-ozone/shaded +**/dependency-reduced-pom.xml + +# hadoop-ozone/tools +src/test/resources/*.log \ No newline at end of file From b2b186204b4c7c91aa1970e4cd651c42efdf42cb Mon Sep 17 00:00:00 2001 From: Maksim Myskov Date: Tue, 12 Mar 2024 00:40:36 +0300 Subject: [PATCH 3/3] added json exclusions --- dev-support/rat/rat-exclusions.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-support/rat/rat-exclusions.txt b/dev-support/rat/rat-exclusions.txt index 734a611e95da..1ea97a699e52 100644 --- a/dev-support/rat/rat-exclusions.txt +++ b/dev-support/rat/rat-exclusions.txt @@ -15,6 +15,7 @@ ###### specific language governing permissions and limitations ###### under the License. +**/*.json .gitattributes .github/* CONTRIBUTING.md