-
Notifications
You must be signed in to change notification settings - Fork 842
Overhaul Apache RAT #4569
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
Overhaul Apache RAT #4569
Changes from all commits
05d7cb5
7f40e42
3e4e614
c0840cc
1806d65
65bfdb9
3e365d0
aedf8db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| title: > | ||
| smokeTestRelease.py: Remove --test-alt-java support | ||
| type: other | ||
| authors: | ||
| - name: David Smiley | ||
| links: | ||
| - name: PR#4608 | ||
| url: https://github.com/apache/solr/pull/4608 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -640,16 +640,23 @@ def verifySrcUnpacked(java, artifact, unpackPath, version, testArgs): | |
| print(' %s' % line.strip()) | ||
| raise RuntimeError('source release has WARs...') | ||
|
|
||
| validateCmd = './gradlew --no-daemon check -p solr/documentation' | ||
| logDir = '%s/build' % unpackPath | ||
| os.makedirs(logDir, exist_ok=True) | ||
|
|
||
| validateCmd = './gradlew rat' | ||
| print(' run "%s"' % validateCmd) | ||
| java.run_java(validateCmd, '%s/rat.log' % logDir) | ||
|
|
||
| validateCmd = './gradlew :solr:documentation:check' | ||
| print(' run "%s"' % validateCmd) | ||
| java.run_java(validateCmd, '%s/validate.log' % unpackPath) | ||
| java.run_java(validateCmd, '%s/documentation.log' % logDir) | ||
|
|
||
| print(" run tests w/ Java %s and testArgs='%s'..." % (java.version, testArgs)) | ||
| java.run_java('./gradlew --no-daemon test %s' % testArgs, '%s/test.log' % unpackPath) | ||
| java.run_java('./gradlew test %s' % testArgs, '%s/test.log' % logDir) | ||
| print(" run integration tests w/ Java %s" % java.version) | ||
| java.run_java('./gradlew --no-daemon integrationTest -Dversion.release=%s' % version, '%s/itest.log' % unpackPath) | ||
| java.run_java('./gradlew integrationTest -Dversion.release=%s' % version, '%s/itest.log' % logDir) | ||
| print(" build binary release w/ Java %s" % java.version) | ||
| java.run_java('./gradlew --no-daemon dev -Dversion.release=%s' % version, '%s/assemble.log' % unpackPath) | ||
| java.run_java('./gradlew dev -Dversion.release=%s' % version, '%s/assemble.log' % logDir) | ||
| testSolrExample("%s/solr/packaging/build/dev" % unpackPath, java.java_home, False) | ||
|
|
||
| testChangelogMd('.', version) | ||
|
|
@@ -981,7 +988,7 @@ def make_java_config(parser): | |
| parser.error('JAVA_HOME must be set') | ||
| if cygwin: | ||
| java_home = subprocess.check_output('cygpath -u "%s"' % java_home, shell=True).decode('utf-8').strip() | ||
| cmd_prefix = 'export JAVA_HOME="%s" PATH="%s/bin:$PATH" JAVACMD="%s/bin/java"' % \ | ||
| cmd_prefix = 'export JAVA_HOME="%s" PATH="%s/bin:$PATH" JAVACMD="%s/bin/java" GRADLE_OPTS="-Dorg.gradle.daemon=false"' % \ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I set the gradle daemon setting here to remove the repetitiveness above |
||
| (java_home, java_home, java_home) | ||
| s = subprocess.check_output('%s; java -version' % cmd_prefix, | ||
| shell=True, stderr=subprocess.STDOUT).decode('utf-8') | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| 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. | ||
| --> | ||
|
|
||
| <!-- | ||
| Custom RAT license families supplementing the built-in defaults. | ||
| --> | ||
| <rat-config> | ||
| <families> | ||
| <family id="MIT" name="The MIT License"/> | ||
| <family id="BSD4" name="Original BSD License (with advertising clause)"/> | ||
| <family id="BSD-modi" name="Modified BSD License"/> | ||
| <family id="GEN" name="Generated"/> | ||
| </families> | ||
|
|
||
| <licenses> | ||
| <!-- BSD 4-clause: presence of advertising clause is a policy violation --> | ||
| <license family="BSD4" id="BSD4" name="BSD 4-Clause (advertising clause)"> | ||
| <text>All advertising materials</text> | ||
| </license> | ||
|
|
||
| <!-- Various BSD-like third-party libraries with non-standard copyright headers --> | ||
| <license family="BSD-modi" id="BSD-modi" name="Modified BSD License"> | ||
| <any> | ||
| <text>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</text> <!-- d3.js --> | ||
| <text>THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS</text> <!-- highlight.js --> | ||
| </any> | ||
| </license> | ||
|
|
||
| <!-- Inline MIT comment used by ui-grid bundled assets --> | ||
| <license family="MIT" id="MIT-uigrid" name="MIT (ui-grid)"> | ||
| <text> ; License: MIT</text> | ||
| </license> | ||
|
|
||
| <!-- Machine-generated source files that carry no license header --> | ||
| <license family="GEN" id="GEN" name="Generated"> | ||
| <any> | ||
| <!-- none so far --> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why include it if there are no rules?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There used to be some but all were old or part of Lucene. I thought it best to leave this here ready to easily add one if needed; it's minor. Of course, we actually do have generated source but I haven't looked at why we don't need this. For some I known we exclude categorically because it's not committed. For committed like a query parser or two, I think it's intermixed with human authored stuff so it gets a license. I think. |
||
| </any> | ||
| </license> | ||
| </licenses> | ||
|
|
||
| <approved> | ||
| <family license_ref="BSD-modi"/> | ||
| <family license_ref="GEN"/> | ||
| <!-- MIT is already approved by the default config; MIT-uigrid inherits that. --> | ||
| <!-- BSD4 is intentionally absent: matching files are policy violations. --> | ||
| </approved> | ||
| </rat-config> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run "rat". It was surprising we weren't already running this tool in the smoketester given it's role.