From d720abbe46db84c40f79acd31c56a88ed9942002 Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Fri, 20 Oct 2017 07:22:56 -0700 Subject: [PATCH 1/2] YETUS-15. build environment --- .gitignore | 4 +- .rat-excludes | 18 - Dockerfile | 29 ++ LICENSE | 53 +++ README.md | 15 +- VERSION | 1 - asf-site-src/.dockerignore | 22 + asf-site-src/Dockerfile | 52 +++ asf-site-src/Gemfile.lock | 16 +- asf-site-src/config.rb | 16 +- asf-site-src/pom.xml | 268 ++++++++++++ asf-site-src/source/contribute/releases.md | 338 +++++++-------- asf-site-src/source/contribute/website.md | 45 +- asf-site-src/source/documentation/0.6.0 | 1 - .../source/documentation/0.6.0.html.md | 1 - asf-site-src/source/documentation/0.7.0 | 1 - .../source/documentation/0.7.0.html.md | 1 - asf-site-src/source/documentation/0.8.0 | 1 - .../source/documentation/0.8.0.html.md | 1 - asf-site-src/src/main/assemblies/asf-site.xml | 37 ++ .../audience-annotations-jdiff/pom.xml | 32 +- .../assemblies/audience-annotations-jdiff.xml | 37 ++ .../audience-annotations/pom.xml | 43 +- .../main/assemblies/audience-annotations.xml | 37 ++ .../yetus/audience/InterfaceAudience.java | 7 +- .../yetus/audience/InterfaceStability.java | 6 +- .../apache/yetus/audience/package-info.java | 22 + .../audience/tools/StabilityOptions.java | 6 +- .../yetus/audience/tools/package-info.java | 22 + audience-annotations-component/pom.xml | 35 +- build.sh | 283 ------------- hooks/build | 27 ++ pom.xml | 386 ++++++++++++++++++ precommit/pom.xml | 154 +++++++ .../main/python}/jenkins-admin.py | 0 .../python}/unit-test-filter-file.example | 0 .../{ => src/main/shell}/coprocs.d/README.md | 0 .../main/shell}/coprocs.d/e_a_r_helper.sh | 0 .../main/shell}/coprocs.d/process_counter.sh | 0 .../{ => src/main/shell}/coprocs.d/reaper.sh | 0 .../main/shell}/core.d/00-yetuslib.sh | 0 .../{ => src/main/shell}/core.d/01-common.sh | 30 +- .../main/shell}/core.d/builtin-bugsystem.sh | 0 .../main/shell}/core.d/builtin-personality.sh | 0 .../{ => src/main/shell}/core.d/docker.sh | 0 .../{ => src/main/shell}/core.d/patchfiles.sh | 0 .../{ => src/main/shell}/core.d/reaper.sh | 0 .../{ => src/main/shell}/docker-cleanup.sh | 0 precommit/{ => src/main/shell}/it/it-tp.sh | 0 .../main/shell}/personality/accumulo.sh | 0 .../main/shell}/personality/bigtop.sh | 0 .../{ => src/main/shell}/personality/drill.sh | 0 .../{ => src/main/shell}/personality/flink.sh | 0 .../{ => src/main/shell}/personality/geode.sh | 0 .../main/shell}/personality/hadoop.sh | 0 .../{ => src/main/shell}/personality/hbase.sh | 0 .../main/shell}/personality/jmeter.sh | 0 .../{ => src/main/shell}/personality/kafka.sh | 0 .../{ => src/main/shell}/personality/orc.sh | 0 .../{ => src/main/shell}/personality/pig.sh | 0 .../{ => src/main/shell}/personality/ratis.sh | 0 .../{ => src/main/shell}/personality/samza.sh | 0 .../{ => src/main/shell}/personality/tajo.sh | 0 .../{ => src/main/shell}/personality/tez.sh | 0 precommit/src/main/shell/personality/yetus.sh | 32 ++ .../{ => src/main/shell}/smart-apply-patch.sh | 0 .../main/shell}/test-patch-docker/Dockerfile | 5 +- .../test-patch-docker/Dockerfile-endstub | 0 .../test-patch-docker/launch-test-patch.sh | 0 .../{ => src/main/shell}/test-patch.d/ant.sh | 0 .../main/shell}/test-patch.d/asflicense.sh | 0 .../main/shell}/test-patch.d/author.sh | 0 .../main/shell}/test-patch.d/autoconf.sh | 0 .../main/shell}/test-patch.d/briefreport.sh | 0 .../main/shell}/test-patch.d/bugzilla.sh | 0 .../{ => src/main/shell}/test-patch.d/cc.sh | 0 .../main/shell}/test-patch.d/checkstyle.sh | 0 .../main/shell}/test-patch.d/cmake.sh | 0 .../main/shell}/test-patch.d/ctest.sh | 0 .../main/shell}/test-patch.d/dupname.sh | 0 .../main/shell}/test-patch.d/findbugs.sh | 0 .../main/shell}/test-patch.d/github.sh | 0 .../main/shell}/test-patch.d/gradle.sh | 0 .../main/shell}/test-patch.d/hadolint.sh | 0 .../main/shell}/test-patch.d/htmlout.sh | 0 .../{ => src/main/shell}/test-patch.d/java.sh | 0 .../{ => src/main/shell}/test-patch.d/jira.sh | 0 .../main/shell}/test-patch.d/junit.sh | 0 .../{ => src/main/shell}/test-patch.d/make.sh | 0 .../main/shell}/test-patch.d/maven.sh | 0 .../main/shell}/test-patch.d/nobuild.sh | 0 .../main/shell}/test-patch.d/pathlen.sh | 0 .../main/shell}/test-patch.d/perlcritic.sh | 0 .../main/shell}/test-patch.d/pylint.sh | 0 .../main/shell}/test-patch.d/rubocop.sh | 0 .../main/shell}/test-patch.d/ruby-lint.sh | 0 .../main/shell}/test-patch.d/scala.sh | 0 .../main/shell}/test-patch.d/shellcheck.sh | 14 +- .../main/shell}/test-patch.d/shelldocs.sh | 0 .../{ => src/main/shell}/test-patch.d/tap.sh | 0 .../main/shell}/test-patch.d/test4tests.sh | 0 .../main/shell}/test-patch.d/unitveto.sh | 0 .../main/shell}/test-patch.d/whitespace.sh | 0 .../{ => src/main/shell}/test-patch.d/xml.sh | 0 precommit/{ => src/main/shell}/test-patch.sh | 22 +- releasedocmaker/pom.xml | 149 +++++++ .../src/main/assemblies/releasedocmaker.xml | 46 +++ .../releasedocmaker/ReleaseDocMaker.java | 45 ++ .../src/main/python/releasedocmaker.py | 24 ++ .../main/python/releasedocmaker/__init__.py | 5 +- .../src/main/python/releasedocmaker}/utils.py | 0 .../src/main/shell/releasedocmaker | 30 ++ shelldocs/pom.xml | 161 ++++++++ .../org/apache/yetus/shelldocs/ShellDocs.java | 45 ++ shelldocs/src/main/python/shelldocs.py | 25 ++ .../main/python/shelldocs/__init__.py} | 0 start-build-env.sh | 89 ++++ yetus-assemblies/pom.xml | 47 +++ .../main/resources/assemblies/module-dist.xml | 38 ++ .../resources/assemblies/script-bundle.xml | 46 +++ yetus-dist/pom.xml | 273 +++++++++++++ yetus-dist/src/main/assemblies/bin-tgz.xml | 34 ++ yetus-dist/src/main/assemblies/site-meta.xml | 38 ++ yetus-dist/src/main/assemblies/site-tgz.xml | 34 ++ yetus-dist/src/main/assemblies/site.xml | 81 ++++ yetus-dist/src/main/assemblies/source.xml | 43 ++ yetus-dist/src/main/assemblies/yetus-dist.xml | 60 +++ yetus-dist/src/main/resources/VERSION | 1 + yetus-maven-plugin/pom.xml | 138 +++++++ .../main/assemblies/yetus-maven-plugin.xml | 37 ++ .../maven/plugin/fileops/CreateDirsMojo.java | 97 +++++ .../maven/plugin/fileops/package-info.java | 22 + .../maven/plugin/rdm/ReleaseDocMakerMojo.java | 234 +++++++++++ .../yetus/maven/plugin/rdm/package-info.java | 22 + .../yetus/maven/plugin/utils/Utils.java | 131 ++++++ .../maven/plugin/utils/package-info.java | 22 + yetus-minimaven-plugin/pom.xml | 83 ++++ .../plugin/fileops/CreateSymLinkMojo.java | 94 +++++ .../maven/plugin/fileops/MakeBins4Libs.java | 156 +++++++ .../maven/plugin/fileops/package-info.java | 22 + .../src/main/resources/licenses/ASL20.txt | 14 + yetus-project/pom.xml | 171 -------- 142 files changed, 3921 insertions(+), 756 deletions(-) delete mode 100644 .rat-excludes create mode 100644 Dockerfile delete mode 100644 VERSION create mode 100644 asf-site-src/.dockerignore create mode 100644 asf-site-src/Dockerfile create mode 100644 asf-site-src/pom.xml delete mode 120000 asf-site-src/source/documentation/0.6.0 delete mode 120000 asf-site-src/source/documentation/0.6.0.html.md delete mode 120000 asf-site-src/source/documentation/0.7.0 delete mode 120000 asf-site-src/source/documentation/0.7.0.html.md delete mode 120000 asf-site-src/source/documentation/0.8.0 delete mode 120000 asf-site-src/source/documentation/0.8.0.html.md create mode 100644 asf-site-src/src/main/assemblies/asf-site.xml create mode 100644 audience-annotations-component/audience-annotations-jdiff/src/main/assemblies/audience-annotations-jdiff.xml create mode 100644 audience-annotations-component/audience-annotations/src/main/assemblies/audience-annotations.xml create mode 100644 audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/package-info.java create mode 100644 audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/package-info.java delete mode 100755 build.sh create mode 100755 hooks/build create mode 100644 pom.xml create mode 100644 precommit/pom.xml rename precommit/{jenkins => src/main/python}/jenkins-admin.py (100%) rename precommit/{jenkins => src/main/python}/unit-test-filter-file.example (100%) rename precommit/{ => src/main/shell}/coprocs.d/README.md (100%) rename precommit/{ => src/main/shell}/coprocs.d/e_a_r_helper.sh (100%) rename precommit/{ => src/main/shell}/coprocs.d/process_counter.sh (100%) rename precommit/{ => src/main/shell}/coprocs.d/reaper.sh (100%) rename precommit/{ => src/main/shell}/core.d/00-yetuslib.sh (100%) rename precommit/{ => src/main/shell}/core.d/01-common.sh (95%) rename precommit/{ => src/main/shell}/core.d/builtin-bugsystem.sh (100%) rename precommit/{ => src/main/shell}/core.d/builtin-personality.sh (100%) rename precommit/{ => src/main/shell}/core.d/docker.sh (100%) rename precommit/{ => src/main/shell}/core.d/patchfiles.sh (100%) rename precommit/{ => src/main/shell}/core.d/reaper.sh (100%) rename precommit/{ => src/main/shell}/docker-cleanup.sh (100%) rename precommit/{ => src/main/shell}/it/it-tp.sh (100%) rename precommit/{ => src/main/shell}/personality/accumulo.sh (100%) rename precommit/{ => src/main/shell}/personality/bigtop.sh (100%) rename precommit/{ => src/main/shell}/personality/drill.sh (100%) rename precommit/{ => src/main/shell}/personality/flink.sh (100%) rename precommit/{ => src/main/shell}/personality/geode.sh (100%) rename precommit/{ => src/main/shell}/personality/hadoop.sh (100%) rename precommit/{ => src/main/shell}/personality/hbase.sh (100%) rename precommit/{ => src/main/shell}/personality/jmeter.sh (100%) rename precommit/{ => src/main/shell}/personality/kafka.sh (100%) rename precommit/{ => src/main/shell}/personality/orc.sh (100%) rename precommit/{ => src/main/shell}/personality/pig.sh (100%) rename precommit/{ => src/main/shell}/personality/ratis.sh (100%) rename precommit/{ => src/main/shell}/personality/samza.sh (100%) rename precommit/{ => src/main/shell}/personality/tajo.sh (100%) rename precommit/{ => src/main/shell}/personality/tez.sh (100%) create mode 100755 precommit/src/main/shell/personality/yetus.sh rename precommit/{ => src/main/shell}/smart-apply-patch.sh (100%) rename precommit/{ => src/main/shell}/test-patch-docker/Dockerfile (96%) rename precommit/{ => src/main/shell}/test-patch-docker/Dockerfile-endstub (100%) rename precommit/{ => src/main/shell}/test-patch-docker/launch-test-patch.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/ant.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/asflicense.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/author.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/autoconf.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/briefreport.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/bugzilla.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/cc.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/checkstyle.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/cmake.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/ctest.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/dupname.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/findbugs.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/github.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/gradle.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/hadolint.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/htmlout.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/java.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/jira.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/junit.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/make.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/maven.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/nobuild.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/pathlen.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/perlcritic.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/pylint.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/rubocop.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/ruby-lint.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/scala.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/shellcheck.sh (94%) rename precommit/{ => src/main/shell}/test-patch.d/shelldocs.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/tap.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/test4tests.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/unitveto.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/whitespace.sh (100%) rename precommit/{ => src/main/shell}/test-patch.d/xml.sh (100%) rename precommit/{ => src/main/shell}/test-patch.sh (99%) create mode 100644 releasedocmaker/pom.xml create mode 100644 releasedocmaker/src/main/assemblies/releasedocmaker.xml create mode 100644 releasedocmaker/src/main/java/org/apache/yetus/releasedocmaker/ReleaseDocMaker.java create mode 100755 releasedocmaker/src/main/python/releasedocmaker.py rename release-doc-maker/releasedocmaker.py => releasedocmaker/src/main/python/releasedocmaker/__init__.py (99%) rename {release-doc-maker => releasedocmaker/src/main/python/releasedocmaker}/utils.py (100%) create mode 100755 releasedocmaker/src/main/shell/releasedocmaker create mode 100644 shelldocs/pom.xml create mode 100644 shelldocs/src/main/java/org/apache/yetus/shelldocs/ShellDocs.java create mode 100755 shelldocs/src/main/python/shelldocs.py rename shelldocs/{shelldocs.py => src/main/python/shelldocs/__init__.py} (100%) create mode 100755 start-build-env.sh create mode 100644 yetus-assemblies/pom.xml create mode 100644 yetus-assemblies/src/main/resources/assemblies/module-dist.xml create mode 100644 yetus-assemblies/src/main/resources/assemblies/script-bundle.xml create mode 100644 yetus-dist/pom.xml create mode 100644 yetus-dist/src/main/assemblies/bin-tgz.xml create mode 100644 yetus-dist/src/main/assemblies/site-meta.xml create mode 100644 yetus-dist/src/main/assemblies/site-tgz.xml create mode 100644 yetus-dist/src/main/assemblies/site.xml create mode 100644 yetus-dist/src/main/assemblies/source.xml create mode 100644 yetus-dist/src/main/assemblies/yetus-dist.xml create mode 100644 yetus-dist/src/main/resources/VERSION create mode 100644 yetus-maven-plugin/pom.xml create mode 100644 yetus-maven-plugin/src/main/assemblies/yetus-maven-plugin.xml create mode 100644 yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateDirsMojo.java create mode 100644 yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java create mode 100644 yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/ReleaseDocMakerMojo.java create mode 100644 yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/package-info.java create mode 100644 yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/Utils.java create mode 100644 yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/package-info.java create mode 100644 yetus-minimaven-plugin/pom.xml create mode 100644 yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java create mode 100644 yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java create mode 100644 yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java create mode 100644 yetus-minimaven-plugin/src/main/resources/licenses/ASL20.txt delete mode 100644 yetus-project/pom.xml diff --git a/.gitignore b/.gitignore index 7383e692b..480fc9222 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,9 @@ .project .settings target -build publish *.swp *.pyc +asf-site-src/source/documentation/0* +asf-site-src/source/documentation/in-progress/CHANGELOG.md +asf-site-src/source/documentation/in-progress/RELEASENOTES.md diff --git a/.rat-excludes b/.rat-excludes deleted file mode 100644 index 6b5d184da..000000000 --- a/.rat-excludes +++ /dev/null @@ -1,18 +0,0 @@ -\..* -Gemfile.lock -config.json -bootstrap.* -[Ff]ont-?[Aa]wesome.* -glyphicons.* -jquery.* -package-list -precommit-apidocs -VERSION -0.6.0 -0.6.0.html.md -0.7.0 -0.7.0.html.md -0.8.0 -0.8.0.html.md -script.js -unit-test-filter-file.example diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..2d4f052b1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +# 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. + +ARG DOCKER_TAG=latest +ARG DOCKER_REPO=apache/yetus +FROM ${DOCKER_REPO}-base:${DOCKER_TAG} + +COPY . /ysrc/ + +# hadolint ignore=DL3003 +RUN cd /ysrc \ + && mvn clean install -DskipTests \ + && rm -rf /.m2 \ + && cd /usr \ + && tar xzpf /ysrc/yetus-dist/target/artifacts/apache-yetus*bin.tar.gz \ + --strip 1 \ + && rm -rf /ysrc diff --git a/LICENSE b/LICENSE index 1c7f96bdd..21579c4bc 100644 --- a/LICENSE +++ b/LICENSE @@ -418,3 +418,56 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---- + +This project utilizes Jython 2.7 for running Python code on JVMs. It +is available under the Python Software Foundation License v2: + +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Jython") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Jython alone +or in any derivative version, provided, however, that PSF's License +Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2007 +Python Software Foundation; All Rights Reserved" are retained in +Jython alone or in any derivative version prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Jython or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Jython. + +4. PSF is making Jython available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF JYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF JYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING JYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Jython, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. diff --git a/README.md b/README.md index 2b814c226..46046cf76 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,7 @@ Apache Yetus is a collection of libraries and tools that enable contribution and release process for software projects. -> :warning: **A Note About Repository Layout** -> Yetus currently has no unified build tool, so individual components handle their own tooling. The current layout -> is temporary until such time as we adopt a project-wide build system. For more information, watch -> [YETUS-125](https://issues.apache.org/jira/browse/YETUS-125) - -The current repository is broken up by major component: +Here is a list of the major components: * [Website source](asf-site-src/) Holds our documentation, which is presented via [our website](https://yetus.apache.org/). @@ -36,11 +31,7 @@ version. Precommit provides robust tools to deal with contributions, including applying patches from a variety of project sources and evaluating them against project norms via a system of plugins. See the [precommit overview](asf-site-src/source/documentation/in-progress/precommit-architecture.md) to get started working with -precommit. Note that even if the top level layout doesn't change, the layout of Precommit might when it adds in -unit tests under [YETUS-15](https://issues.apache.org/jira/browse/YETUS-15). -* [Yetus Project Pom](yetus-project/) -Provides common configuration and dependency management for Yetus' java based component. Currently -builds with Maven 3.2.0+. +precommit. * [Audience Annotations](audience-annotations-component/) Audience Annotations allows projects to use Java Annotations to delineate public and non-public parts of their APIs. It also provides doclets to generate javadocs filtered by intended audience. Currently builds with Maven 3.2.0+. @@ -49,3 +40,5 @@ Shelldocs processes comments on Bash functions for a annotations similar to Java audience scoping functionality similar to the doclet from Audience Annotations. * [Release Doc Maker](release-doc-maker/) Release Doc Maker analyzes Jira and Git information to produce Markdown formatted release notes. +* [yetus-maven-plugin](yetus-maven-plugin/) +Provides some small utilities for some uncommon maven requirements (such as symlinks). \ No newline at end of file diff --git a/VERSION b/VERSION deleted file mode 100644 index 5ea35de7a..000000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.9.0-SNAPSHOT diff --git a/asf-site-src/.dockerignore b/asf-site-src/.dockerignore new file mode 100644 index 000000000..1e75cce90 --- /dev/null +++ b/asf-site-src/.dockerignore @@ -0,0 +1,22 @@ +# 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. +README.md +config.rb +data +pom.xml +source +src +target \ No newline at end of file diff --git a/asf-site-src/Dockerfile b/asf-site-src/Dockerfile new file mode 100644 index 000000000..17e23d973 --- /dev/null +++ b/asf-site-src/Dockerfile @@ -0,0 +1,52 @@ +# 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. + +ARG DOCKER_TAG=latest +FROM apache/yetus-build:${DOCKER_TAG} + +WORKDIR /root +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +ARG GROUP_ID +ARG USER_ID +ARG USER_NAME +# hadolint ignore=DL3008 +RUN apt-get -q update \ + && apt-get -q install --no-install-recommends -y \ + pinentry-tty \ + subversion \ + sudo \ + vim \ + zlib1g-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* +# pre-install most of the middleman stack to save time +# on re-launches +RUN gem install bundler \ + middleman:'~>3.4.0' \ + middleman-livereload \ + middleman-syntax \ + redcarpet \ + therubyracer \ + tzinfo-data \ + rake:10.3.1 \ + nokogiri:1.8.5 +RUN bundle config --global github.https true +RUN groupadd --non-unique -g "${GROUP_ID}" "${USER_NAME}" +RUN useradd -g "${GROUP_ID}" -u "${USER_ID}" -k /root -m "${USER_NAME}" +# shellcheck disable=SC2039,SC1117 +RUN echo -e "${USER_NAME}\\tALL=NOPASSWD: ALL" > "/etc/sudoers.d/yetus-build-${USER_ID}" +ENV HOME /home/${USER_NAME} diff --git a/asf-site-src/Gemfile.lock b/asf-site-src/Gemfile.lock index 0ce4618a1..293c2031f 100644 --- a/asf-site-src/Gemfile.lock +++ b/asf-site-src/Gemfile.lock @@ -1,5 +1,5 @@ GIT - remote: git://github.com/middleman/middleman-syntax.git + remote: https://github.com/middleman/middleman-syntax.git revision: 0377cc9d2219c2a6ffc2acfd39057f833934af9a specs: middleman-syntax (3.1.0) @@ -7,7 +7,7 @@ GIT rouge (~> 3.1) GIT - remote: git://github.com/vmg/redcarpet.git + remote: https://github.com/vmg/redcarpet.git revision: 92a7b3ae2241b862e9bf45e0af3cf53ebdfb0afb specs: redcarpet (3.4.0) @@ -96,13 +96,13 @@ GEM sprockets (~> 2.12.1) sprockets-helpers (~> 1.1.0) sprockets-sass (~> 1.3.0) - mime-types (3.1) + mime-types (3.2.2) mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) + mime-types-data (3.2018.0812) mini_portile2 (2.3.0) minitest (5.11.3) multi_json (1.13.1) - nokogiri (1.8.4) + nokogiri (1.8.5) mini_portile2 (~> 2.3.0) padrino-helpers (0.12.9) i18n (~> 0.6, >= 0.6.7) @@ -113,14 +113,14 @@ GEM rack (1.6.10) rack-livereload (0.3.17) rack - rack-test (1.0.0) + rack-test (1.1.0) rack (>= 1.0, < 3) rake (10.3.1) rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) ref (2.0.0) - rouge (3.1.1) + rouge (3.3.0) sass (3.4.25) sprockets (2.12.5) hike (~> 1.2) @@ -162,4 +162,4 @@ DEPENDENCIES wdm (~> 0.1.0) BUNDLED WITH - 1.16.1 + 1.17.1 diff --git a/asf-site-src/config.rb b/asf-site-src/config.rb index 0c7bf8ac8..5cb6093cb 100644 --- a/asf-site-src/config.rb +++ b/asf-site-src/config.rb @@ -29,7 +29,7 @@ lax_spacing: true ) -set :build_dir, 'publish' +set :build_dir, 'target/site' set :css_dir, 'assets/css' set :js_dir, 'assets/js' @@ -75,7 +75,7 @@ def manipulate_resource_list(resources) end end -SHELLDOCS = File.absolute_path('../shelldocs/shelldocs.py') +SHELLDOCS = File.absolute_path('../shelldocs/src/main/python/shelldocs.py') def shelldocs(output, docs = []) unless FileUtils.uptodate?(output, docs) && @@ -88,7 +88,7 @@ def shelldocs(output, docs = []) end end -RELEASEDOCMAKER = File.absolute_path('../release-doc-maker/releasedocmaker.py') +RELEASEDOCMAKER = File.absolute_path('../releasedocmaker/src/main/python/releasedocmaker.py') def releasenotes(output, version) # TODO: check jira for last update to the version and compare to source @@ -180,19 +180,19 @@ def table(header, body) # has to be outside of hte asf-site-src directory. # TODO when we can, update to middleman 4 so we can use multiple source dirs # instead of symlinks - FileUtils.mkdir_p '../target/in-progress/precommit-apidocs' - precommit_shelldocs('../target/in-progress/precommit-apidocs', '../precommit') + FileUtils.mkdir_p 'target/site/documentation/in-progress/precommit-apidocs' + precommit_shelldocs('target/site/documentation/in-progress/precommit-apidocs', '../precommit/src/main/shell') unless data.versions.releases.nil? data.versions.releases.each do |release| - build_release_docs('../target', release) - releasenotes('../target', release) + build_release_docs('target', release) + releasenotes('target', release) # stitch the javadoc in place sitemap.register_resource_list_manipulator( "#{release}_javadocs".to_sym, ApiDocs.new( sitemap, "documentation/#{release}/audience-annotations-apidocs", - "../target/build-#{release}/audience-annotations-component/target/site/apidocs" + "target/build-#{release}/audience-annotations-component/target/site/apidocs" ) ) end diff --git a/asf-site-src/pom.xml b/asf-site-src/pom.xml new file mode 100644 index 000000000..c60221b8c --- /dev/null +++ b/asf-site-src/pom.xml @@ -0,0 +1,268 @@ + + + + 4.0.0 + + org.apache.yetus + yetus-project + 0.9.0-SNAPSHOT + .. + + asf-site + Website and Documentation for Apache Yetus + Apache Yetus - Website/Documentation + pom + + + ${basedir}/../releasedocmaker/src/main/python/releasedocmaker.py + + + + + + + org.apache.yetus + yetus-minimaven-plugin + ${project.version} + + + 0.6.0 + pre-site + + symlink + + + ../../target/0.6.0 + ${basedir}/source/documentation/0.6.0 + + + + 0.6.0.html.md + pre-site + + symlink + + + ../../target/0.6.0.html.md + ${basedir}/source/documentation/0.6.0.html.md + + + + 0.7.0 + pre-site + + symlink + + + ../../target/0.7.0 + ${basedir}/source/documentation/0.7.0 + + + + 0.7.0.html.md + pre-site + + symlink + + + ../../target/0.7.0.html.md + ${basedir}/source/documentation/0.7.0.html.md + + + + 0.8.0 + pre-site + + symlink + + + ../../target/0.8.0 + ${basedir}/source/documentation/0.8.0 + + + + 0.8.0.html.md + pre-site + + symlink + + + ../../target/0.8.0.html.md + ${basedir}/source/documentation/0.8.0.html.md + + + + in-progress + pre-site + + symlink + + + in-progress + ${basedir}/source/documentation/${project.version} + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + releasedocs + pre-site + + exec + + + ${rdm.bin} + true + + --lint=all + --license + --outputdir + source/documentation/in-progress + --project + YETUS + --projecttitle + Apache Yetus + --usetoday + --version + ${project.version} + + + + + bundle-install + pre-site + + exec + + + bundle + true + + install + + + + + middleman + pre-site + + exec + + + bundle + false + + exec + middleman + build + + + + + + + + maven-assembly-plugin + + + website-docs + site + + single + + + apache-yetus-${project.version}-site + false + false + + src/main/assemblies/${project.artifactId}.xml + + + + + + + + org.apache.rat + apache-rat-plugin + + + Gemfile.lock + source/assets/config.json + source/assets/css/bootstrap-theme.css + source/assets/css/bootstrap-theme.css.map + source/assets/css/bootstrap-theme.min.css + source/assets/css/bootstrap.css + source/assets/css/bootstrap.css.map + source/assets/css/bootstrap.min.css + source/assets/css/font-awesome.css + source/assets/css/font-awesome.min.css + source/assets/fonts/fontawesome-webfont.svg + source/assets/fonts/glyphicons-halflings-regular.svg + source/assets/js/bootstrap.js + source/assets/js/bootstrap.min.js + source/assets/js/jquery-2.1.4.min.js + + + + + + maven-clean-plugin + + + + source/documentation/ + + 0* + + false + + + source/documentation/in-progress + + CHANGELOG.md + RELEASENOTES.md + + false + + + + + + + maven-deploy-plugin + + true + + + + + + + + diff --git a/asf-site-src/source/contribute/releases.md b/asf-site-src/source/contribute/releases.md index 0f67aabff..aed80acb5 100644 --- a/asf-site-src/source/contribute/releases.md +++ b/asf-site-src/source/contribute/releases.md @@ -41,10 +41,12 @@ The Subversion project provides a nice set of pointers to installing on various ### Project Specific Build Tools To create our convenience binary artifact, you'll need to build both our project docs and all of individual components. If you normally only work on one part of the project, say Yetus Precommit, this might require some additional programming languages and tools. -- Yetus Audience Annotations will require Maven 3.2.0+ and Java 7. -- Yetus Precommit will require Python 2.6+ for generating documentation on its API via Yetus Shelldocs. +NOTE: All of these tools should be in the Docker container that is launched by using the `./start-build-dev.sh` script. + +- Yetus Audience Annotations will require Maven 3.2.0+ and Java 8. +- Yetus Precommit will require Python 2.7+ for generating documentation on its API via Yetus Shelldocs. - The project documentation will require Ruby 2.x+ for rendering. -- We'll build release notes with Yetus Release Doc Maker, which will require Python 2.6+. +- We'll build release notes with Yetus Release Doc Maker, which will require Python 2.7+. - Assembling release artifacts will make use of bash, tar, gzip, and shasum. ## Setup @@ -85,12 +87,12 @@ Next, create a shortened link to the JIRA version's release notes. This should u 1. Paste the URL into the "URI" field 1. Set the optional key field to 'yetus-_version_-jira' -For example, on the 0.2.0 release you would use 'https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12318920&version=12334330' for the URI field and 'yetus-0.2.0-jira' for the key. +For example, on the 0.7.0 release you would use 'https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12318920&version=12334330' for the URI field and 'yetus-0.7.0-jira' for the key. Finally, you should create a JIRA version to correspond to the release _following_ the one you are managing. This is so that folks can continue to work on things that won't make it into the in-progress release while we evaluate candidates. 1. Browse to the ASF JIRA project management page for versions: https://issues.apache.org/jira/plugins/servlet/project-config/YETUS/versions -1. Fill in a version one minor version up from the release you're managing. E.g. when managing the 0.2.0 release, fill in 0.3.0. +1. Fill in a version one minor version up from the release you're managing. E.g. when managing the 0.7.0 release, fill in 0.3.0. 1. Set a start date of today. 1. Click "Add" @@ -98,10 +100,11 @@ Finally, you should create a JIRA version to correspond to the release _followin Once you have a issue to track things, you can create the git branch for staging our release. This seperate branch will allow you to polish the release while regular work continues on the master branch. You will need to update master for the next SNAPSHOT version and the branch for the release. -Example commands, presuming the release under management is **0.2.0** and the JIRA issue is **YETUS-XXX**: +Example commands, presuming the release under management is **0.7.0** and the JIRA issue is **YETUS-XXX**: ``` $ # Ensure master is up to date +$ mvn clean $ git fetch origin $ git status # On branch master @@ -119,34 +122,60 @@ $ git checkout -b YETUS-XXX Switched to a new branch 'YETUS-XXX' $ git push origin YETUS-XXX $ # find files we need to update for release -$ grep -rl "0.2.0-SNAPSHOT" * 2>/dev/null -VERSION +$ grep -rl "0.7.0-SNAPSHOT" * 2>/dev/null +asf-site-src/pom.xml audience-annotations-component/audience-annotations/pom.xml audience-annotations-component/audience-annotations-jdiff/pom.xml audience-annotations-component/pom.xml -yetus-project/pom.xml +pom.xml +precommit/pom.xml +releasedocmaker/pom.xml +shelldocs/pom.xml +yetus-dist/pom.xml +yetus-maven-plugin/pom.xml +yetus-minimaven-plugin/pom.xml +``` + +At this point you should edit the aforementioned files so they have the version we expect upon a successful release. Search for instances of *VERSION-SNAPSHOT* and replace with *VERSION*; e.g. *0.7.0-SNAPSHOT* should become *0.7.0*: + +``` +$ perl -pi -e 's,0.7.0-SNAPSHOT,0.7.0,g' $(find . -type f) ``` -At this point you should edit the aforementioned files so they have the version we expect upon a successful release. Search for instances of *VERSION-SNAPSHOT* and replace with *VERSION*; e.g. *0.2.0-SNAPSHOT* should become *0.2.0*. After you are done, create a branch-specific patch and then prepare to update the master branch. + + After you are done, create a branch-specific patch and then prepare to update the master branch. ``` $ git add -p -$ git commit -m "YETUS-XXX. Stage version 0.2.0." +$ git commit -m "YETUS-XXX. Stage version 0.7.0." $ git format-patch --stdout origin/YETUS-XXX > path/to/patches/YETUS-XXX-YETUS-XXX.1.patch $ git checkout master -$ grep -rl "0.2.0-SNAPSHOT" * 2>/dev/null -VERSION +$ grep -rl "0.7.0-SNAPSHOT" * 2>/dev/null +asf-site-src/pom.xml audience-annotations-component/audience-annotations/pom.xml audience-annotations-component/audience-annotations-jdiff/pom.xml audience-annotations-component/pom.xml -yetus-project/pom.xml +pom.xml +precommit/pom.xml +releasedocmaker/pom.xml +shelldocs/pom.xml +yetus-dist/pom.xml +yetus-maven-plugin/pom.xml +yetus-minimaven-plugin/pom.xml +``` + +Now update these files, but this time you should update them for the next minor version's SNAPSHOT. e.g. *0.7.0-SNAPSHOT* should become *0.8.0-SNAPSHOT*: + + +``` +$ perl -pi -e 's,0.7.0-SNAPSHOT,0.8.0,g' $(find . -type f) ``` -Now update these files, but this time you should update them for the next minor version's SNAPSHOT. e.g. *0.2.0-SNAPSHOT* should become *0.3.0-SNAPSHOT*. After you are done, create a patch. +After you are done, create a patch. ``` $ git add -p -$ git commit -m "YETUS-XXX. bump master version to 0.3.0-SNAPSHOT" +$ git commit -m "YETUS-XXX. bump master version to 0.8.0-SNAPSHOT" $ git format-patch --stdout origin/master > path/to/patches/YETUS-XXX.1.patch ``` @@ -160,14 +189,15 @@ Depending on how candidate evaluation goes, you may end up performing these step 1. Update your `${HOME}/.m2/settings.xml` file to include the Maven snapshot information as indicated on http://www.apache.org/dev/publishing-maven-artifacts.html 1. Build release artifacts. You should use our convenience script to create the tarballs and markdown documents for a release. Run the following from the release staging branch and inspect the results: - $ ./build.sh --release --deploy - $ ls -lah target/RELEASENOTES.md target/CHANGELOG.md target/*.tar.gz -1. Check out the staging area for release candidates and make a directory for this candidate, somewhere outside of the your working directory. Copy the artifacts from the previous step into place. For example, when working on RC1 for the 0.2.0 release + $ mvn --batch-mode clean install -Papache-release + $ mvn --batch-mode site + $ ls -lah yetus-dist/target/artifacts/* +1. Check out the staging area for release candidates and make a directory for this candidate, somewhere outside of the your working directory. Copy the artifacts (**except the site.tar.gz**) from the previous step into place. For example, when working on RC1 for the 0.7.0 release $ svn co https://dist.apache.org/repos/dist/dev/yetus/ yetus-dist-dev $ cd yetus-dist-dev - $ mkdir 0.2.0-RC1 - $ cd 0.2.0-RC1 + $ mkdir 0.7.0-RC1 + $ cd 0.7.0-RC1 $ cp path/to/yetus/target/RELEASENOTES.md path/to/yetus/target/CHANGELOG.md path/to/yetus/target/*.tar.gz . 1. While still in the staging area, sign the artifacts and create the needed checksum files: @@ -180,23 +210,23 @@ Depending on how candidate evaluation goes, you may end up performing these step 1. Push the release candidate to staging distribution. This will make the artifacts visible for the vote. $ cd .. - $ svn add 0.2.0-RC1 - $ svn commit -m "stage Apache Yetus 0.2.0-RC1" -Afterwards, the artifacts should be visible via the web under the same URL used when checking out. In the case of 0.2.0-RC1: https://dist.apache.org/repos/dist/dev/yetus/0.2.0-RC1/ + $ svn add 0.7.0-RC1 + $ svn commit -m "stage Apache Yetus 0.7.0-RC1" +Afterwards, the artifacts should be visible via the web under the same URL used when checking out. In the case of 0.7.0-RC1: https://dist.apache.org/repos/dist/dev/yetus/0.7.0-RC1/ 1. Examine staged maven build. Go to the [ASF repository](http://repository.apache.org/) and log in with your asf LDAP credentials. Look for the staging repository with a name that includes "yetus". Clicking on it will give you a link to an "Open" repository. You can examine the structure in the Nexus API while you're logged in. If it looks essentially correct, "Close" the repository. Refreshing and clicking on the repository will give you a link in the Summary tab that other folks can use to interact with the repository. -1. Call a vote on the release candidate. At this point you have everything you need to call a vote. Your vote thread must contain "[VOTE]" in the subject line, a link to the candidate staging area you created, a source repository commit hash, and voting rules. It should also contain hashes for the artifacts. Here is an example draft for 0.2.0-RC1, update it as appropriate for your release: +1. Call a vote on the release candidate. At this point you have everything you need to call a vote. Your vote thread must contain "[VOTE]" in the subject line, a link to the candidate staging area you created, a source repository commit hash, and voting rules. It should also contain hashes for the artifacts. Here is an example draft for 0.7.0-RC1, update it as appropriate for your release: - Subject: [VOTE] Apache Yetus 0.2.0-RC1 + Subject: [VOTE] Apache Yetus 0.7.0-RC1 Artifacts are available: - https://dist.apache.org/repos/dist/dev/yetus/0.2.0-RC1/ + https://dist.apache.org/repos/dist/dev/yetus/0.7.0-RC1/ As of this vote the relevant sha512 hashes are: - SHA512 (CHANGELOG.md) = b7f7894d686a59aad1a4afe2ae8fbb94 - SHA512 (RELEASENOTES.md) = e321ef2909e3e51ce40bbf701159b01e - SHA512 (yetus-0.2.0-bin.tar.gz) = e23fe4d34611a4c027df3f515cb46d7e - SHA512 (yetus-0.2.0-src.tar.gz) = e57b96533092356f3d5b9b4f47654fe9 + SHA512 (CHANGELOG.md) = 6dbb09360b3116d12aed275d223f43b50a95e80aab1981d5bb61886ceb4b3b57475c976e9465f3fb28daaf62b8cae113b8ee87eae35a212c861fbc434632073b + SHA512 (RELEASENOTES.md) = 72a12eb96f32d35a7660967caf2ce5261bd7829ddc56962c97c7b1e71cebfa026c055258a9db1b475581ca0a3ae13d9f9651724573cacaaad9972a89ff809875 + SHA512 (yetus-0.7.0-bin.tar.gz) = 28f8c94fb2e22a70674be6070f63badf98e1b022ee25c171fff9629d82ca899fc7eb509ffee2a5c50f2bec10cbb20632fb9fddcab5ebcf5c2511a3ae7edbc56b + SHA512 (yetus-0.7.0-src.tar.gz) = 316cf36c97b301233a9b163c8b8d7ec47bdd3d042b1821820b8ac917e5668e610ec8c35fd438e45a64e05215b183ce1ad7321065883fb84ccac8b4744a7fb73e Source repository commit: 1e8f4588906a51317207092bd97b35687f2e3fa3 Maven staging repository: https://repository.apache.org/content/repositories/orgapacheyetus-1011 @@ -204,21 +234,21 @@ Afterwards, the artifacts should be visible via the web under the same URL used Our KEYS file is at: https://dist.apache.org/repos/dist/release/yetus/KEYS All artifacts are signed with my key (DEADBEEF) - JIRA version: http://s.apache.org/yetus-0.2.0-jira + JIRA version: http://s.apache.org/yetus-0.7.0-jira Please take a few minutes to verify the release[1] and vote on releasing it: - [ ] +1 Release this package as Apache Yetus 0.2.0 + [ ] +1 Release this package as Apache Yetus 0.7.0 [ ] +0 no opinion [ ] -1 Do not release this package because... Vote will be subject to Majority Approval[2] and will close at 8:00PM - UTC on Monday, Xxx XXth, 2016[3]. + UTC on Monday, Xxx XXth, 2018[3]. [1]: http://www.apache.org/info/verification.html [2]: https://www.apache.org/foundation/glossary.html#MajorityApproval [3]: to find this in your local timezone see: - http://s.apache.org/yetus-0.2.0-rc1-close + http://s.apache.org/yetus-0.7.0-rc1-close That final short link should point to some online timezone conversion utility. ASF votes often use timeanddate.com's Event Time Announcer: http://www.timeanddate.com/worldclock/fixedform.html. 1. Close the vote after the deadline. Once the deadline in the vote thread passes, tally the vote and post a suitable response that changes the subject line to start with "[RESULT]". If the vote failed, ensure there are issues in JIRA for any problems brought up. When they are closed, repeat the steps for creating a release candidate. If the vote passed, proceed to the [Cleanup section](#cleanup) @@ -233,25 +263,26 @@ You will need to download the release candidate files, include the artifacts and For example, if we use the url from our exemplar VOTE email, the process would look like this: - $ wget --recursive --no-parent --quiet 'https://dist.apache.org/repos/dist/dev/yetus/0.2.0-RC1/' + $ wget --recursive --no-parent --quiet 'https://dist.apache.org/repos/dist/dev/yetus/0.7.0-RC1/' $ find dist.apache.org/ -type f - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/CHANGELOG.md - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/CHANGELOG.md.asc - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/CHANGELOG.md.sha512 - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/CHANGELOG.md.mds - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/index.html - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/RELEASENOTES.md - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/RELEASENOTES.md.asc - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/RELEASENOTES.md.sha512 - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/RELEASENOTES.md.mds - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/yetus-0.2.0-bin.tar.gz - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/yetus-0.2.0-bin.tar.gz.asc - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/yetus-0.2.0-bin.tar.gz.sha512 - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/yetus-0.2.0-bin.tar.gz.mds - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/yetus-0.2.0-src.tar.gz - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/yetus-0.2.0-src.tar.gz.asc - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/yetus-0.2.0-src.tar.gz.sha512 - dist.apache.org//repos/dist/dev/yetus/0.2.0-RC1/yetus-0.2.0-src.tar.gz.mds + + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/CHANGELOG.md + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/CHANGELOG.md.asc + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/CHANGELOG.md.sha512 + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/CHANGELOG.md.mds + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/index.html + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/RELEASENOTES.md + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/RELEASENOTES.md.asc + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/RELEASENOTES.md.sha512 + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/RELEASENOTES.md.mds + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/apache-yetus-0.7.0-bin.tar.gz + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/apache-yetus-0.7.0-bin.tar.gz.asc + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/apache-yetus-0.7.0-bin.tar.gz.sha512 + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/apache-yetus-0.7.0-bin.tar.gz.mds + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/apache-yetus-0.7.0-src.tar.gz + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/apache-yetus-0.7.0-src.tar.gz.asc + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/apache-yetus-0.7.0-src.tar.gz.sha512 + dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/apache-yetus-0.7.0-src.tar.gz.mds dist.apache.org//robots.txt Lastly, if you haven't verified a release before you'll need to download and import the public keys for the project's release managers. This is the KEYS file that should have been mentioned in the [VOTE] thread. The specific output of the follow commands will vary depending on how many release mangers there have been and which keys, if any, you have previously imported. @@ -268,18 +299,19 @@ ASF policies require that binding votes on releases be cast only after verifying 1. You MUST make sure each of the signatures match. For example, using gpg and taking a fictional source artifact: - $ cd dist.apache.org/repos/dist/dev/yetus/0.2.0-RC1/ - $ gpg --verify yetus-0.2.0-src.tar.gz.asc yetus-0.2.0-src.tar.gz + $ cd dist.apache.org/repos/dist/dev/yetus/0.7.0-RC1/ + $ gpg --verify apache-yetus-0.7.0-src.tar.gz.asc apache-yetus-0.7.0-src.tar.gz gpg: Signature made Fri Dec 11 11:50:56 2015 CST using RSA key ID 0D80DB7C gpg: Good signature from "Sean Busbey (CODE SIGNING KEY) " As noted in the informational page [What We Sign](http://www.apache.org/info/verification.html), if you don't have the signer's key in your web of trust the output of the verify command will point this out. You should refer to it for guidance. 1. You MUST make sure the provided hashes match the provided artifact. - $ gpg --print-mds yetus-0.2.0-src.tar.gz >yetus-0.2.0-src.tar.gz.my_mds - $ diff yetus-0.2.0-src.tar.gz.mds yetus-0.2.0-src.tar.gz.my_mds - $ shasum -a 512 yetus-0.2.0-src.tar.gz >yetus-0.2.0-src.tar.gz.my_sha512 - $ diff yetus-0.2.0-src.tar.gz.sha512 yetus-0.2.0-src.tar.gz.my_sha512 + $ gpg --print-mds apache-yetus-0.7.0-src.tar.gz >yetus-0.7.0-src.tar.gz.my_mds + $ diff apache-yetus-0.7.0-src.tar.gz.mds apache-yetus-0.7.0-src.tar.gz.my_mds + $ shasum -a 512 apache-yetus-0.7.0-src.tar.gz >yetus-0.7.0-src.tar.gz.my_sha512 + $ diff apache-yetus-0.7.0-src.tar.gz.sha512 apache-yetus-0.7.0-src.tar.gz.my_sha512 + 1. You MUST make sure artifacts abide by the ASF Licensing Policy. You should read through [the ASF Licensing Policy](https://www.apache.org/legal/resolved), especially if your vote will be binding. As a quick guide: * our software must be under the Apache Software License version 2.0 and this must be noted with a proper LICENSE and NOTICE file in each artifact that can hold them. * our source code must meet the ASF policy on proper license notifications. Read the ASF Legal Committee's [Source Header Licensing Guide](http://apache.org/legal/src-headers.html) @@ -288,19 +320,19 @@ As noted in the informational page [What We Sign](http://www.apache.org/info/ver * our software may only have a run time dependency on a product with a prohibit license if its use is optional; read [the Licensing Policy's Category X list for prohibited licenses](https://www.apache.org/legal/resolved#category-x) and [the Licensing Policy's explanation of optional runtime dependencies](https://www.apache.org/legal/resolved#optional). 1. You SHOULD make sure the source release artifact corresponds to the referenced commit hash in the [VOTE] thread. (This ASF policy is currently in DRAFT status.) Our eventual release tag is how we'll provide long term provinence information for our downstream users. Since the release's source code artifact will be the canonical represenation of the release we vote on, it's important that it match the contents of the version control system's tag. Given our example above, you can check this with recursive diff. - $ mkdir yetus-0.2.0-src_unpack - $ tar -C yetus-0.2.0-src_unpack -xzf yetus-0.2.0-src.tar.gz - $ git clone --single-branch --depth=1 --branch 0.2.0-RC1 'https://git1-us-west.apache.org/repos/asf/yetus.git' yetus-0.2.0-RC1-tag - $ diff -r yetus-0.2.0-RC1-tag yetus-0.2.0-src_unpack/yetus-0.2.0 + $ mkdir apache-yetus-0.7.0-src_unpack + $ tar -C apache-yetus-0.7.0-src_unpack -xzf apache-yetus-0.7.0-src.tar.gz + $ git clone --single-branch --depth=1 --branch 0.7.0-RC1 'https://git1-us-west.apache.org/repos/asf/yetus.git' apache-yetus-0.7.0-RC1-tag + $ diff -r apache-yetus-0.7.0-RC1-tag apache-yetus-0.7.0-src_unpack/yetus-0.7.0 $ echo $? 0 1. You MUST make sure any non-source artifacts can be derived from the source artifact. Since the source artifact is the canonical representation of our release, any other artifacts we distribute must be just for the convenience of our downstream users. As such, one must be able to derive them from the source artifact. Currently, you can generate all of the artifacts we distribute for convenience using the same build helper script used to create the release artifacts. - $ mkdir yetus-0.2.0-src_unpack - $ tar -C yetus-0.2.0-src_unpack -xzf yetus-0.2.0-src.tar.gz - $ cd yetus-0.2.0-src_unpack/yetus-0.2.0 - $ ./build.sh -This will create a target/ directory that contains the tarball binary distribution. That tarball will also include e.g. the java jars we'll push to maven for our Audience Annotations project. + $ mkdir apache-yetus-0.7.0-src_unpack + $ tar -C apache-yetus-0.7.0-src_unpack -xzf apache-yetus-0.7.0-src.tar.gz + $ cd apache-yetus-0.7.0-src_unpack/yetus-0.7.0 + $ mvn clean install +This will create a yetus-dist/target/ directory that contains the tarball binary distribution files. ### Community recommended checks @@ -390,13 +422,13 @@ If you've gone through all of the ASF required checks, you'll already have made | unit | /testptch/patchprocess/patch-unit-hbase-server-jdk1.7.0_95.txt | | unit test logs | /testptch/patchprocess/patch-unit-hbase-server-jdk1.8.0_72.txt /testptch/patchprocess/patch-unit-hbase-server-jdk1.7.0_95.txt | | modules | C: hbase-client hbase-server U: . | - | Powered by | Apache Yetus 0.2.0 http://yetus.apache.org | + | Powered by | Apache Yetus 0.7.0 http://yetus.apache.org | 1. Test Audience Annotations. If you have a downstream project that relies on the audience annotations project, you should be able to install the jars locally and test with the updated verison. - $ mkdir yetus-0.2.0-src_unpack - $ tar -C yetus-0.2.0-src_unpack -xzf yetus-0.2.0-src.tar.gz - $ cd yetus-0.2.0-src_unpack/yetus-0.2.0 - $ mvn --batch-mode -f yetus-project/pom.xml install + $ mkdir apache-yetus-0.7.0-src_unpack + $ tar -C apache-yetus-0.7.0-src_unpack -xzf apache-yetus-0.7.0-src.tar.gz + $ cd apache-yetus-0.7.0-src_unpack/yetus-0.7.0 + $ mvn --batch-mode install ...SNIP... [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS @@ -405,21 +437,8 @@ If you've gone through all of the ASF required checks, you'll already have made [INFO] Finished at: 2016-02-13T02:12:39-06:00 [INFO] Final Memory: 14M/160M [INFO] ------------------------------------------------------------------------ - $ mvn --batch-mode -f audience-annotations-component/pom.xml install - ...SNIP... - [INFO] Reactor Summary: - [INFO] - [INFO] Apache Yetus - Audience Annotations ................ SUCCESS [ 5.231 s] - [INFO] Apache Yetus - Audience Annotations Component ...... SUCCESS [ 0.037 s] - [INFO] ------------------------------------------------------------------------ - [INFO] BUILD SUCCESS - [INFO] ------------------------------------------------------------------------ - [INFO] Total time: 5.534 s - [INFO] Finished at: 2016-02-13T02:13:32-06:00 - [INFO] Final Memory: 24M/230M - [INFO] ------------------------------------------------------------------------ $ cd path/to/your/project - $ vim pom.xml # edit version to be e.g. 0.2.0 + $ vim pom.xml # edit version to be e.g. 0.7.0 $ mvn verify ...SNIP... [INFO] ------------------------------------------------------------------------ @@ -434,56 +453,56 @@ If you've gone through all of the ASF required checks, you'll already have made Once a release candidate obtains majority approval from the PMC, there are several final maintenance tasks you must perform to close out the release. -1. Create short cut links to the vote thread (e.g., http://s.apache.org/yetus-0.2.0-rc1-vote) and the result (e.g., http://s.apache.org/yetus-0.2.0-vote-passes) that point to the archives on mail-archives.apache.org. Be aware that it may take several hours for the archive to get the posts that need to be referenced. +1. Create short cut links to the vote thread (e.g., http://s.apache.org/yetus-0.7.0-rc1-vote) and the result (e.g., http://s.apache.org/yetus-0.7.0-vote-passes) that point to the archives on mail-archives.apache.org. Be aware that it may take several hours for the archive to get the posts that need to be referenced. -1. Produce a signed release tag. You should create a signed tag and push it to the asf repo. The tag's message should include an asf-shortened links to the vote and results. It should be named 'rel/_version_' so that it will be immutable due to ASF infra's git configuration. Presuming we're working on the 0.2.0 release and the RC1 example above has passed: +1. Produce a signed release tag. You should create a signed tag and push it to the asf repo. The tag's message should include an asf-shortened links to the vote and results. It should be named 'rel/_version_' so that it will be immutable due to ASF infra's git configuration. Presuming we're working on the 0.7.0 release and the RC1 example above has passed: $ git config --global user.signingkey # if you've never configured - $ git tag --sign rel/0.2.0 1e8f4588906a51317207092bd97b35687f2e3fa3 + $ git tag --sign rel/0.7.0 1e8f4588906a51317207092bd97b35687f2e3fa3 Example commit message: - YETUS-XXX. tag Apache Yetus 0.2.0 release. + YETUS-XXX. tag Apache Yetus 0.7.0 release. - vote thread: http://s.apache.org/yetus-0.2.0-rc1-vote + vote thread: http://s.apache.org/yetus-0.7.0-rc1-vote - results: http://s.apache.org/yetus-0.2.0-vote-passes + results: http://s.apache.org/yetus-0.7.0-vote-passes Then push: - $ git push origin rel/0.2.0 + $ git push origin rel/0.7.0 1. Move release artifacts to the distribution area. The release officially happens once the artifacts are pushed to the ASF distribution servers. From this server, the artifacts will automatically be copied to the long-term archive as well as the various mirrors that will be used by downstream users. These must be _exactly_ the artifacts from the RC that passed. Please note that currently only Yetus PMC members have write access to this space. If you are not yet on the PMC, please ask the PMC to post the artifacts. $ svn co https://dist.apache.org/repos/dist/release/yetus/ yetus-dist-release $ cd yetus-dist-release - $ mkdir 0.2.0 - $ cp path/to/yetus-dist-dev/0.2.0-RC1/* 0.2.0 - $ svn add 0.2.0 - $ svn commit -m "Publish Apache Yetus 0.2.0" + $ mkdir 0.7.0 + $ cp path/to/yetus-dist-dev/0.7.0-RC1/* 0.7.0 + $ svn add 0.7.0 + $ svn commit -m "Publish Apache Yetus 0.7.0" It may take up to 24 hours for the artifacts to make their way to the various mirrors. You should not announce the release until after this period. 1. Add the release to the ASF reporter tool. To make our project reports for the ASF Board easier, you should include the release in the [Apache Committee Report Helper website](https://reporter.apache.org/addrelease.html?yetus). Be sure to use the date release artifacts first were pushed to the distribution area, which should be the same release date as in JIRA. Note that this website is only available to PMC members. If you are not yet in the PMC, please ask them to add the release information. 1. Remove candidates from the staging area. Once you have moved the artifacts into the distribution area, they no longer need to be in the staging area and should be cleaned up as a courtesy to future release managers. $ svn co https://dist.apache.org/repos/dist/dev/yetus/ yetus-dist-dev $ cd yetus-dist-dev - $ svn rm 0.2.0-RC* - D 0.2.0-RC1/yetus-0.2.0-src.tar.gz.sha512 - D 0.2.0-RC1/yetus-0.2.0-bin.tar.gz.asc - D 0.2.0-RC1/RELEASENOTES.md - D 0.2.0-RC1/CHANGELOG.md.mds - D 0.2.0-RC1/CHANGELOG.md.sha512 - D 0.2.0-RC1/yetus-0.2.0-src.tar.gz - D 0.2.0-RC1/RELEASENOTES.md.asc - D 0.2.0-RC1/yetus-0.2.0-bin.tar.gz.mds - D 0.2.0-RC1/yetus-0.2.0-bin.tar.gz.sha512 - D 0.2.0-RC1/yetus-0.2.0-src.tar.gz.asc - D 0.2.0-RC1/CHANGELOG.md - D 0.2.0-RC1/RELEASENOTES.md.mds - D 0.2.0-RC1/CHANGELOG.md.asc - D 0.2.0-RC1/RELEASENOTES.md.sha512 - D 0.2.0-RC1/yetus-0.2.0-bin.tar.gz - D 0.2.0-RC1/yetus-0.2.0-src.tar.gz.mds - D 0.2.0-RC1 - $ svn commit -m "cleaning up release candidates from Apache 0.2.0 release process." - Deleting 0.2.0-RC1 + $ svn rm 0.7.0-RC* + D 0.7.0-RC1/apache-yetus-0.7.0-src.tar.gz.sha512 + D 0.7.0-RC1/apache-yetus-0.7.0-bin.tar.gz.asc + D 0.7.0-RC1/RELEASENOTES.md + D 0.7.0-RC1/CHANGELOG.md.mds + D 0.7.0-RC1/CHANGELOG.md.sha512 + D 0.7.0-RC1/apache-yetus-0.7.0-src.tar.gz + D 0.7.0-RC1/RELEASENOTES.md.asc + D 0.7.0-RC1/apache-yetus-0.7.0-bin.tar.gz.mds + D 0.7.0-RC1/apache-yetus-0.7.0-bin.tar.gz.sha512 + D 0.7.0-RC1/apache-yetus-0.7.0-src.tar.gz.asc + D 0.7.0-RC1/CHANGELOG.md + D 0.7.0-RC1/RELEASENOTES.md.mds + D 0.7.0-RC1/CHANGELOG.md.asc + D 0.7.0-RC1/RELEASENOTES.md.sha512 + D 0.7.0-RC1/apache-yetus-0.7.0-bin.tar.gz + D 0.7.0-RC1/apache-yetus-0.7.0-src.tar.gz.mds + D 0.7.0-RC1 + $ svn commit -m "cleaning up release candidates from Apache 0.7.0 release process." + Deleting 0.7.0-RC1 Committed revision 1772. 1. Resolve release issue; it should be marked as "fixed." @@ -498,76 +517,35 @@ It may take up to 24 hours for the artifacts to make their way to the various mi $ # change URL point to new version $ # update the sha256. e.g., shasum -a 256 bin.gz 1. Update the documentation in the git master branch for the new release. Due to some limitations in our website rendering library, this currently involves some extra symlinks (see YETUS-192). +1. You should update the documentation in the git master branch. Remove the oldest release and add the latest. $ cd asf-site-src $ # Add the release to the releases data file $ vim data/versions.yml - $ # create symlinks for where the documentation generation will go - $ cd source/documentation - $ ln -s ../../../target/0.2.0/ 0.2.0 - $ ln -s ../../../target/0.2.0.html.md 0.2.0.html.md - $ # add these symlinks to our rat exclusion file - $ cd ../../.. - $ vim .rat-excludes - $ # add changes to git + $ vim pom.xml + $ # add the two stanzas $ git add -p - $ git add asf-site-src/source/documentation/0.2.0* + $ git add asf-site-src/pom.xml $ git commit Example commit message: - YETUS-XXX. add release 0.2.0. + YETUS-XXX. add release 0.7.0. - list in releases - - add symlinks for markdown 3 workaround of per-version generated docs -This should result in a fairly small diff - - $ git diff HEAD^ - diff --git a/.rat-excludes b/.rat-excludes - index 9332463..7b5f415 100644 - --- a/.rat-excludes - +++ b/.rat-excludes - @@ -10,3 +10,5 @@ precommit-apidocs - VERSION - 0.1.0 - 0.1.0.html.md - +0.2.0 - +0.2.0.html.md - diff --git a/asf-site-src/data/versions.yml b/asf-site-src/data/versions.yml - index ac9861c..4a4d4b5 100644 - --- a/asf-site-src/data/versions.yml - +++ b/asf-site-src/data/versions.yml - @@ -16,3 +16,4 @@ - # under the License. - releases: - - '0.1.0' - + - '0.2.0' - diff --git a/asf-site-src/source/documentation/0.2.0 b/asf-site-src/source/documentation/0.2.0 - new file mode 120000 - index 0000000..158dc23 - --- /dev/null - +++ b/asf-site-src/source/documentation/0.2.0 - @@ -0,0 +1 @@ - +../../../target/0.2.0/ - \ No newline at end of file - diff --git a/asf-site-src/source/documentation/0.2.0.html.md b/asf-site-src/source/documentation/0.2.0.html.md - new file mode 120000 - index 0000000..c14ca73 - --- /dev/null - +++ b/asf-site-src/source/documentation/0.2.0.html.md - @@ -0,0 +1 @@ - +../../../target/0.2.0.html.md - \ No newline at end of file + - remove 0.4.0, add 0.7.0 to pom.xml + + You should then post this patch for review. Once you've gotten feedback, it's fine to push the patch to the ASF git repo immediately so long as the updated website is not published. 1. Publish website updates. After the 24 hour window needed for the release artifacts to make their way to the variety of mirrors, you should render the website and publish it using the instructions found in [Maintaining the Yetus Website](../website). 1. Remove old releases from distribution area. The ASF distribution area should only contain the most recent release for actively developed branches If your release is a maintenance release, delete the prior release. If your release marks the end of maintanence for an earlier minor or major release line, you should delete those versions from the distribution area. 1. Publish convenience artifacts (maven, homebrew, etc). Specifics to be documented later; see [YETUS-316](https://issues.apache.org/jira/browse/YETUS-316). 1. Draft an announcement email. The announcement email should briefly describe our project and provide links to our artifacts and documentation. For example, - Subject: [ANNOUNCE] Apache Yetus 0.2.0 release + Subject: [ANNOUNCE] Apache Yetus 0.7.0 release - Apache Yetus 0.2.0 Released! + Apache Yetus 0.7.0 Released! The Apache Software Foundation and the Apache Yetus Project are pleased to - announce the release of version 0.2.0 of Apache Yetus. + announce the release of version 0.7.0 of Apache Yetus. Apache Yetus is a collection of libraries and tools that enable contribution and release processes for software projects. It provides a robust system @@ -588,8 +566,8 @@ You should then post this patch for review. Once you've gotten feedback, it's fi The relevant checksums files are available at: - https://www.apache.org/dist/yetus/0.2.0/yetus-0.2.0-src.tar.gz.mds - https://www.apache.org/dist/yetus/0.2.0/yetus-0.2.0-bin.tar.gz.mds + https://www.apache.org/dist/yetus/0.7.0/apache-yetus-0.7.0-src.tar.gz.mds + https://www.apache.org/dist/yetus/0.7.0/apache-yetus-0.7.0-bin.tar.gz.mds Project member signature keys can be found at @@ -597,17 +575,17 @@ You should then post this patch for review. Once you've gotten feedback, it's fi PGP signatures are available at: - https://www.apache.org/dist/yetus/0.2.0/yetus-0.2.0-src.tar.gz.asc - https://www.apache.org/dist/yetus/0.2.0/yetus-0.2.0-bin.tar.gz.asc + https://www.apache.org/dist/yetus/0.7.0/apache-yetus-0.7.0-src.tar.gz.asc + https://www.apache.org/dist/yetus/0.7.0/apache-yetus-0.7.0-bin.tar.gz.asc The list of changes included in this release and release notes can be browsed at: - https://yetus.apache.org/documentation/0.2.0/CHANGELOG/ - https://yetus.apache.org/documentation/0.2.0/RELEASENOTES/ + https://yetus.apache.org/documentation/0.7.0/CHANGELOG/ + https://yetus.apache.org/documentation/0.7.0/RELEASENOTES/ Documentation for this release is at: - https://yetus.apache.org/documentation/0.2.0/ + https://yetus.apache.org/documentation/0.7.0/ On behalf of the Apache Yetus team, thanks to everyone who helped with this release! @@ -621,9 +599,9 @@ You should then post this patch for review. Once you've gotten feedback, it's fi Apache Yetus PMC If you'd like feedback on the draft, feel free to post it for review on your release issue. 1. Send announcement emails. After the 24 hour window needed for the release artifacts to make their way to the variety of mirrors, you should send the announcement email. The email should come from your apache.org email address and at a minimum should go to the dev@yetus.apache.org and announce@apache.org lists. For details see [the ASF Release Policy section How Should Releases Be Announced?](http://www.apache.org/dev/release.html#release-announcements). Additionally, you may want to send the announcement to the development lists of downstream projects we know are using Yetus components. -1. Send tweet. Once the message to the ASF-wide announce list has made it to the public archive, you should draft a tweet with a link to the announcement. You should use the ASF link shortener and a descriptive name. For example, the 0.2.0 release could use +1. Send tweet. Once the message to the ASF-wide announce list has made it to the public archive, you should draft a tweet with a link to the announcement. You should use the ASF link shortener and a descriptive name. For example, the 0.7.0 release could use - Apache Yetus 0.2.0 has been released: + Apache Yetus 0.7.0 has been released: - http://s.apache.org/yetus-0.2.0-announce + http://s.apache.org/yetus-0.7.0-announce This tweet should come from the offical [@ApacheYetus](https://twitter.com/ApacheYetus/) account. Currently only PMC members have access to it. If you are not yet on the PMC, please ask for the PMC to post the tweet once your email is available in the archives. diff --git a/asf-site-src/source/contribute/website.md b/asf-site-src/source/contribute/website.md index 19cd73a3b..89958df36 100644 --- a/asf-site-src/source/contribute/website.md +++ b/asf-site-src/source/contribute/website.md @@ -20,18 +20,22 @@ # Maintaining the Yetus Website We use [Middleman](https://middlemanapp.com/) to generate the website content from markdown and other -dynamic templates. The following steps assume you have a working -ruby 2.x environment setup: +dynamic templates.If you're interested in digging into how our site makes use of Middleman, or if you run into a problem, you should start +by reading [Middleman's excellent documentation](https://middlemanapp.com/basics/install/). + + NOTE: The Docker container launched by `./start-build-env.sh` should have everything you need to maintain the website. + + NOTE: You MUST have run `mvn install` at least once prior to running `mvn site`. + +The following steps assume you have a working ruby 2.x environment setup: ```bash -gem install bundler -bundle install +$ sudo gem install bundler +$ cd asf-site-src +$ bundle install ``` and a working python 2.x environment for [releasedocmaker](../in-progress/releasedocmaker/). -If you're interested in digging into how our site makes use of Middleman, or if you run into a problem, you should start -by reading [Middleman's excellent documentation](https://middlemanapp.com/basics/install/). - ## Make changes in asf-site-src/source Make any changes in the source directory: @@ -50,34 +54,27 @@ cd ../precommit/core.d vi 01-common.sh ``` - -e.g. Audience Annotations requires running Maven. - -```bash -cd ../audience-annotations-component -mvn -DskipTests -Pinclude-jdiff-module javadoc:aggregate -cd - -``` - ## Generating the website -To generate the static website for Apache Yetus run the following commands at the root asf-site-src directory: +To generate the static website for Apache Yetus run the following command at the root directory: ```bash -bundle exec middleman build +mvn --batch-mode install +mvn --batch-mode site ``` -This command will create a static website in the `publish` sub directory. You can load it in a web browser, e.g. assuming you are still in the asf-site-src directory on OS X: +Apache Yetus uses itself to build parts of its website. ('Flying our own airplanes') This command will first generate a full build of Apache Yetus and create a static website in the `asf-site-src/target/site` sub directory and a tarball of the site in yetus-dist/target/. You can load it in a web browser, e.g. assuming you are still in the asf-site-src directory on OS X: ```bash -open publish/index.html +open asf-site-src/target/site/index.html ``` ## Live Development Live development of the site enables automatic reload when changes are saved. -To enable run the following command and then open a browser and navigate to +To enable, run the following commands and then open a browser and navigate to [http://localhost:4567](http://localhost:4567/) ```bash +cd asf-site-src bundle exec middleman ``` @@ -92,9 +89,9 @@ $ git fetch origin $ git checkout master $ git reset --hard origin/master $ git clean -xdf -$ cd asf-site-src -$ bundle exec middleman build -$ rsync --quiet --checksum --inplace --recursive publish/ ../../yetus-site/ +$ mvn --batch-mode install +$ mvn --batch-mode site +$ rsync --quiet --checksum --inplace --recursive yetus-dist/target/apache-yetus-${project.version}-SNAPSHOT-site/ ../../yetus-site/ $ cd ../../yetus-site $ # check the set of differences $ git add -p diff --git a/asf-site-src/source/documentation/0.6.0 b/asf-site-src/source/documentation/0.6.0 deleted file mode 120000 index fd09f47e3..000000000 --- a/asf-site-src/source/documentation/0.6.0 +++ /dev/null @@ -1 +0,0 @@ -../../../target/0.6.0/ \ No newline at end of file diff --git a/asf-site-src/source/documentation/0.6.0.html.md b/asf-site-src/source/documentation/0.6.0.html.md deleted file mode 120000 index 3a0f567e1..000000000 --- a/asf-site-src/source/documentation/0.6.0.html.md +++ /dev/null @@ -1 +0,0 @@ -../../../target/0.6.0.html.md \ No newline at end of file diff --git a/asf-site-src/source/documentation/0.7.0 b/asf-site-src/source/documentation/0.7.0 deleted file mode 120000 index 2cbd33e44..000000000 --- a/asf-site-src/source/documentation/0.7.0 +++ /dev/null @@ -1 +0,0 @@ -../../../target/0.7.0/ \ No newline at end of file diff --git a/asf-site-src/source/documentation/0.7.0.html.md b/asf-site-src/source/documentation/0.7.0.html.md deleted file mode 120000 index 36c566f13..000000000 --- a/asf-site-src/source/documentation/0.7.0.html.md +++ /dev/null @@ -1 +0,0 @@ -../../../target/0.7.0.html.md \ No newline at end of file diff --git a/asf-site-src/source/documentation/0.8.0 b/asf-site-src/source/documentation/0.8.0 deleted file mode 120000 index 19c81202c..000000000 --- a/asf-site-src/source/documentation/0.8.0 +++ /dev/null @@ -1 +0,0 @@ -../../../target/0.8.0 \ No newline at end of file diff --git a/asf-site-src/source/documentation/0.8.0.html.md b/asf-site-src/source/documentation/0.8.0.html.md deleted file mode 120000 index 1aa7448b6..000000000 --- a/asf-site-src/source/documentation/0.8.0.html.md +++ /dev/null @@ -1 +0,0 @@ -../../../target/0.8.0.html.md \ No newline at end of file diff --git a/asf-site-src/src/main/assemblies/asf-site.xml b/asf-site-src/src/main/assemblies/asf-site.xml new file mode 100644 index 000000000..4aae53504 --- /dev/null +++ b/asf-site-src/src/main/assemblies/asf-site.xml @@ -0,0 +1,37 @@ + + + + asf-site + + dir + + false + + + ${project.build.directory}/site + docs + + * + + + + diff --git a/audience-annotations-component/audience-annotations-jdiff/pom.xml b/audience-annotations-component/audience-annotations-jdiff/pom.xml index abbb05dbb..f45aedccb 100644 --- a/audience-annotations-component/audience-annotations-jdiff/pom.xml +++ b/audience-annotations-component/audience-annotations-jdiff/pom.xml @@ -26,7 +26,7 @@ org.apache.yetus yetus-project 0.9.0-SNAPSHOT - ../../yetus-project + ../.. audience-annotations-jdiff Tools for managing JDiff generated javadocs @@ -47,6 +47,7 @@ true + jdk1.8 @@ -66,4 +67,33 @@ + + + + + org.apache.maven.plugins + maven-assembly-plugin + ${maven-assembly-plugin.version} + + + dist + package + + single + + + apache-yetus-${project.version} + false + false + + src/main/assemblies/${project.artifactId}.xml + + + + + + + + + diff --git a/audience-annotations-component/audience-annotations-jdiff/src/main/assemblies/audience-annotations-jdiff.xml b/audience-annotations-component/audience-annotations-jdiff/src/main/assemblies/audience-annotations-jdiff.xml new file mode 100644 index 000000000..86ddc0a29 --- /dev/null +++ b/audience-annotations-component/audience-annotations-jdiff/src/main/assemblies/audience-annotations-jdiff.xml @@ -0,0 +1,37 @@ + + + + audience-annotations-jdiff + + dir + + false + + + ${basedir}/target + lib/audience-annotations + + audience-annotations**-${project.version}.jar + + + + \ No newline at end of file diff --git a/audience-annotations-component/audience-annotations/pom.xml b/audience-annotations-component/audience-annotations/pom.xml index c6acacb89..8a1f130a7 100644 --- a/audience-annotations-component/audience-annotations/pom.xml +++ b/audience-annotations-component/audience-annotations/pom.xml @@ -26,7 +26,7 @@ org.apache.yetus yetus-project 0.9.0-SNAPSHOT - ../../yetus-project + ../.. audience-annotations Annotations for defining API boundaries and tools for managing javadocs @@ -51,4 +51,45 @@ + + + + + jdk.tools + jdk.tools + system + + true + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + ${maven-assembly-plugin.version} + + + dist + package + + single + + + apache-yetus-${project.version} + false + false + + src/main/assemblies/${project.artifactId}.xml + + + + + + + + + diff --git a/audience-annotations-component/audience-annotations/src/main/assemblies/audience-annotations.xml b/audience-annotations-component/audience-annotations/src/main/assemblies/audience-annotations.xml new file mode 100644 index 000000000..894b9084b --- /dev/null +++ b/audience-annotations-component/audience-annotations/src/main/assemblies/audience-annotations.xml @@ -0,0 +1,37 @@ + + + + audience-annotations + + dir + + false + + + ${basedir}/target + lib/audience-annotations + + audience-annotations**-${project.version}.jar + + + + \ No newline at end of file diff --git a/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceAudience.java b/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceAudience.java index 8461b4a4d..dac0e6f34 100644 --- a/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceAudience.java +++ b/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceAudience.java @@ -43,6 +43,7 @@ * might be {@link Public}, but a method may be {@link LimitedPrivate} * */ + @InterfaceAudience.Public @InterfaceStability.Evolving public class InterfaceAudience { @@ -51,7 +52,7 @@ public class InterfaceAudience { */ @Documented @Retention(RetentionPolicy.RUNTIME) - public @interface Public {} + public @interface Public { } /** * Intended only for the project(s) specified in the annotation. @@ -68,7 +69,7 @@ public class InterfaceAudience { */ @Documented @Retention(RetentionPolicy.RUNTIME) - public @interface Private {} + public @interface Private { } - private InterfaceAudience() {} // Audience can't exist on its own + private InterfaceAudience() { } // Audience can't exist on its own } diff --git a/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceStability.java b/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceStability.java index b20cfeaab..af7549ff2 100644 --- a/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceStability.java +++ b/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceStability.java @@ -46,14 +46,14 @@ public class InterfaceStability { */ @Documented @Retention(RetentionPolicy.RUNTIME) - public @interface Stable {} + public @interface Stable { } /** * Evolving, but can break compatibility at minor release (i.e. m.x) */ @Documented @Retention(RetentionPolicy.RUNTIME) - public @interface Evolving {} + public @interface Evolving { } /** * No guarantee is provided as to reliability or stability across any @@ -61,5 +61,5 @@ public class InterfaceStability { */ @Documented @Retention(RetentionPolicy.RUNTIME) - public @interface Unstable {} + public @interface Unstable { } } diff --git a/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/package-info.java b/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/package-info.java new file mode 100644 index 000000000..57c4df34b --- /dev/null +++ b/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/package-info.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +/** + * Audience annotations. + */ +package org.apache.yetus.audience; \ No newline at end of file diff --git a/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/StabilityOptions.java b/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/StabilityOptions.java index 8e227c331..8e7a93e60 100644 --- a/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/StabilityOptions.java +++ b/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/StabilityOptions.java @@ -30,9 +30,9 @@ class StabilityOptions { public static Integer optionLength(String option) { String opt = option.toLowerCase(Locale.ENGLISH); - if (opt.equals(UNSTABLE_OPTION)) return 1; - if (opt.equals(EVOLVING_OPTION)) return 1; - if (opt.equals(STABLE_OPTION)) return 1; + if (opt.equals(UNSTABLE_OPTION)) { return 1;} + if (opt.equals(EVOLVING_OPTION)) { return 1; } + if (opt.equals(STABLE_OPTION)) { return 1; } return null; } diff --git a/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/package-info.java b/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/package-info.java new file mode 100644 index 000000000..7d1b90a72 --- /dev/null +++ b/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/package-info.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +/** + * Audience annotations. + */ +package org.apache.yetus.audience.tools; \ No newline at end of file diff --git a/audience-annotations-component/pom.xml b/audience-annotations-component/pom.xml index f3e0224ff..97e7a0719 100644 --- a/audience-annotations-component/pom.xml +++ b/audience-annotations-component/pom.xml @@ -26,7 +26,7 @@ org.apache.yetus yetus-project 0.9.0-SNAPSHOT - ../yetus-project + .. audience-annotations-component Annotations for defining API boundaries and tools for managing javadocs @@ -35,13 +35,42 @@ audience-annotations + audience-annotations-jdiff - + + + + + + maven-javadoc-plugin + + + + org.apache.yetus.audience.* + + + + + + + maven-project-info-reports-plugin + + + + false + + + + + + + + diff --git a/build.sh b/build.sh deleted file mode 100755 index a6f2dc9d1..000000000 --- a/build.sh +++ /dev/null @@ -1,283 +0,0 @@ -#!/bin/bash -e -# -# 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. -# -# Temporary script for building tarballs. See YETUS-125 to help -# create a more sustainable build system. -# -# Pass --release to get release checks -# Pass --deploy to deploy maven snapshot artifacts -# -# Presumes you have -# * maven 3.2.0+ -# * jdk 1.7+ (1.7 in --release) -# * ruby + gems needed to run middleman -# * python + python-dateutil - -## @description Verify that all required dependencies exist -## @audience private -## @stability evolving -## @replaceable no -## @param true iff this is a release build -## @return 1 - Some dependencies are missing -## @return 0 - All dependencies exist -function detect_dependencies -{ - declare is_release=$1 - local exit_code=0 - if ! [ -x "$(command -v java)" ]; then - echo "Java not found! Must install JDK version >= 1.7" >&2 - exit_code=1 - fi - if ! [ -x "$(command -v mvn)" ]; then - echo "Apache Maven not found! Must install version >= 3.2.0" >&2 - echo "Download it at https://maven.apache.org/download.cgi" >&2 - exit_code=1 - fi - if ! [ -x "$(command -v bundle)" ]; then - echo "building docs requires a Ruby executable bundle." >&2 - echo "Install it by executing 'gem install bundler && bundle install'" >&2 - exit_code=1 - fi - - ! python -c 'import dateutil.parser' 2>/dev/null - if [ "$?" -eq "0" ]; then - echo "Building release docs requires the python-dateutil module" >&2 - echo "Install it by executing 'pip install python-dateutil'" >&2 - exit_code=1 - fi - - if ! [ -x "$(command -v tar)" ]; then - echo "Building archives requires the 'tar' command." >&2 - exit_code=1 - fi - - if [ "${is_release}" = "true" ] && ! [ -x "$(command -v pax)" ]; then - echo "building the release source archive requires the 'pax' command." >&2 - exit_code=1 - fi - - if [[ "${exit_code}" -ne "0" ]]; then - echo "Some dependencies are missing. Exit now." >&2 - fi - return ${exit_code} -} - -YETUS_VERSION=$(cat VERSION) -RAT_DOWNLOAD_URL=https://repo1.maven.org/maven2/org/apache/rat/apache-rat/0.11/apache-rat-0.11.jar - -release=false -offline=false -for arg in "$@"; do - case ${arg} in - --release) - release=true - ;; - --offline) - offline=true - ;; - --deploy) - deploy=true - ;; - esac -done - -echo "working on version '${YETUS_VERSION}'" - -detect_dependencies "${release}" -mkdir -p target - -if [ "${offline}" != "true" ]; then - JIRA_VERSION="${YETUS_VERSION%%-SNAPSHOT}" - echo "generating release docs." - # Note that we use the bare python here instead of the wrapper script, since we - # create said script. - release-doc-maker/releasedocmaker.py --lint=all --license --outputdir target \ - --project YETUS "--version=${JIRA_VERSION}" \ - --projecttitle="Apache Yetus" --usetoday -else - echo "in offline mode, skipping release notes." -fi - -MAVEN_ARGS=() -if [ "${offline}" = "true" ]; then - MAVEN_ARGS=("${MAVEN_ARGS[@]}" --offline) -fi - -if [ "${release}" = "true" ]; then - MAVEN_ARGS=("${MAVEN_ARGS[@]}" -Papache-release) - echo "hard reseting working directory." - git reset --hard HEAD - - if [ ! -f target/rat.jar ]; then - if [ "${offline}" != "true" ]; then - echo "downloading rat jar file to '$(pwd)/target/'" - curl -o target/rat.jar "${RAT_DOWNLOAD_URL}" - else - echo "in offline mode, can't retrieve rat jar. will skip license check." - fi - fi - echo "creating source tarball at '$(pwd)/target/'" - rm "target/yetus-${YETUS_VERSION}-src".tar* 2>/dev/null || true - pax -w -f "target/yetus-${YETUS_VERSION}-src.tar" -s "/target/yetus-${YETUS_VERSION}/" target/RELEASENOTES.md target/CHANGELOG.md - current=$(basename "$(pwd)") - #shellcheck disable=SC2038 - (cd ..; find "${current}" \( -name target -o -name publish -o -name .git \) -prune -o ! -type d -print | xargs pax -w -a -f "${current}/target/yetus-${YETUS_VERSION}-src.tar" -s "/${current}/yetus-${YETUS_VERSION}/") - gzip "target/yetus-${YETUS_VERSION}-src.tar" -fi - -echo "running maven builds for java components" -# build java components -if [[ "${deploy}" = true ]]; then - mvncmd=deploy -else - mvncmd=install -fi -mvn "${MAVEN_ARGS[@]}" "${mvncmd}" --file yetus-project/pom.xml -mvn "${MAVEN_ARGS[@]}" -Pinclude-jdiff-module "${mvncmd}" javadoc:aggregate --file audience-annotations-component/pom.xml - -echo "building documentation" -# build docs after javadocs -docs_out=$(cd asf-site-src && bundle exec middleman build) -echo "${docs_out}" - -bin_tarball="target/bin-dir/yetus-${YETUS_VERSION}" -echo "creating staging area for convenience binary at '$(pwd)/${bin_tarball}'" -rm -rf "${bin_tarball}" 2>/dev/null || true -mkdir -p "${bin_tarball}" - -for i in LICENSE NOTICE; do - lines=$(grep -n 'Apache Yetus Source' "${i}" | cut -f1 -d:) - if [[ -z "${lines}" ]]; then - cp -p "${i}" "${bin_tarball}" - else - ((lines=lines-2)) - head -n "${lines}" "${i}" > "${bin_tarball}/${i}" - fi -done - -cp target/RELEASENOTES.md target/CHANGELOG.md "${bin_tarball}" -cp -r asf-site-src/publish/documentation/in-progress "${bin_tarball}/docs" - -mkdir -p "${bin_tarball}/lib" -cp VERSION "${bin_tarball}/lib/" - -mkdir -p "${bin_tarball}/lib/yetus-project" -cp yetus-project/pom.xml "${bin_tarball}/lib/yetus-project/yetus-project-${YETUS_VERSION}.pom" - -mkdir -p "${bin_tarball}/lib/audience-annotations" -cp audience-annotations-component/audience-annotations/target/audience-annotations-*.jar \ - audience-annotations-component/audience-annotations-jdiff/target/audience-annotations-jdiff-*.jar \ - "${bin_tarball}/lib/audience-annotations/" - -cp -r shelldocs "${bin_tarball}/lib/" - -cp -r release-doc-maker "${bin_tarball}/lib/" - -cp -r precommit "${bin_tarball}/lib/" -ln -s test-patch.sh "${bin_tarball}/lib/precommit/qbt.sh" - -mkdir -p "${bin_tarball}/bin" - -# Make a special version of the shell wrapper for releasedocmaker -# that maintains the ability to have '--lint' mean '--lint=all' -cat >"${bin_tarball}/bin/releasedocmaker" <"${bin_tarball}/bin/${wrapper}" </dev/null || true -tar -C "$(dirname "${bin_tarball}")" -czf "${bin_file}" "$(basename "${bin_tarball}")" - -if [ "${release}" = "true" ] && [ -f target/rat.jar ]; then - echo "checking asf licensing requirements for source tarball '$(pwd)/target/yetus-${YETUS_VERSION}-src.tar.gz'." - rm -rf target/source-unpack 2>/dev/null || true - mkdir target/source-unpack - tar -C target/source-unpack -xzf "target/yetus-${YETUS_VERSION}-src.tar.gz" - java -jar target/rat.jar -E .rat-excludes -d target/source-unpack - - echo "checking asf licensing requirements for convenience binary '$(pwd)/${bin_file}'." - rm -rf target/bin-unpack 2>/dev/null || true - mkdir target/bin-unpack - tar -C target/bin-unpack -xzf "${bin_file}" - java -jar target/rat.jar -E .rat-excludes -d target/bin-unpack -fi -echo "All Done!" -echo "Find your output at:" -if [ "${release}" = "true" ] && [ -f "target/yetus-${YETUS_VERSION}-src.tar.gz" ]; then - echo " $(pwd)/target/yetus-${YETUS_VERSION}-src.tar.gz" -fi -if [ -f "${bin_file}" ]; then - echo " $(pwd)/${bin_file}" -fi diff --git a/hooks/build b/hooks/build new file mode 100755 index 000000000..21876dc7e --- /dev/null +++ b/hooks/build @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +# 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. + +if [[ -n "${DOCKERFILE_PATH}" ]]; then + docker build -t "${IMAGE_NAME}" \ + --build-arg DOCKER_TAG="${DOCKER_TAG}" \ + --build-arg DOCKER_REPO="${DOCKER_REPO}" \ + -f "${DOCKERFILE_PATH}" +else + docker build -t "${IMAGE_NAME}" \ + --build-arg DOCKER_TAG="${DOCKER_TAG}" \ + --build-arg DOCKER_REPO="${DOCKER_REPO}" \ + . +fi diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..50717c5fd --- /dev/null +++ b/pom.xml @@ -0,0 +1,386 @@ + + + + 4.0.0 + + org.apache + apache + 18 + + + + org.apache.yetus + yetus-project + 0.9.0-SNAPSHOT + Project-wide definitions for Apache Yetus + Apache Yetus Project + pom + + https://yetus.apache.org + 2015 + + + Apache Yetus Dev List + dev-subscribe@yetus.apache.org + dev-unsubscribe@yetus.apache.org + dev@yetus.apache.org + https://mail-archives.apache.org/mod_mbox/yetus-dev/ + + + + + 3.2.0 + 3.2 + 3.2.1 + 1.7 + 1.7 + 1.7 + 1.0-beta-5 + + 0.12 + 3.0.0 + 8.3 + 2.6 + 0.2 + 1.6.0 + 1.8 + 3.1.0 + 2.17 + 3.0.0 + 3.0.2 + 2.8.2 + 3.0.0-M1 + 2.9 + 3.0.2 + 3.1.0-RC7 + + + + + scm:git:git://git.apache.org/yetus.git + scm:git:https://git-wip-us.apache.org/repos/asf/yetus.git + https://git-wip-us.apache.org/repos/asf?p=yetus.git + + + JIRA + http://issues.apache.org/jira/browse/YETUS + + + + + + + + + com.github.spotbugs + spotbugs-maven-plugin + ${spotbugs-maven-plugin.version} + + + + org.apache.maven.plugins + maven-antrun-plugin + ${maven-antrun-plugin.version} + + + + org.apache.maven.plugins + maven-assembly-plugin + ${maven-assembly-plugin.version} + + gnu + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + + + validate + validate + + checkstyle.xml + UTF-8 + true + true + false + + + check + + + + + + + maven-clean-plugin + ${maven-clean-plugin.version} + + false + + + + + org.apache.maven.plugins + maven-dependency-plugin + ${maven-dependency-plugin.version} + + + + org.apache.maven.plugins + maven-deploy-plugin + ${maven-deploy-plugin.version} + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + ${maven-project-info-reports-plugin.version} + + + + org.apache.maven.plugins + maven-resources-plugin + ${maven-resources-plugin.version} + + + + + + org.codehaus.mojo + exec-maven-plugin + ${exec-maven-plugin.version} + + + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + org.codehaus.mojo + extra-enforcer-rules + ${extra.enforcer.version} + + + + + + enforce + + enforce + + + + + + + [${maven.min.version},) + Maven is out of date. + Yetus requires at least version ${maven.min.version} of Maven to properly build from source. + You appear to be using an older version. You can use either "mvn -version" or + "mvn enforcer:display-info" to verify what version is active. + See the contributor guide on building for more information: ${project.url}/contribute/ + + + + + [${java.min.version},) + Java is out of date. + Yetus requires at least version ${java.min.version} of the JDK to properly build from source. + You appear to be using an older version. You can use either "mvn -version" or + "mvn enforcer:display-info" to verify what version is active. + See the contributor guide on building for more information: ${project.url}/contribute/ + + + + + + + + + + org.apache.rat + apache-rat-plugin + + false + + .pylintrc + .rubocop.yml + + + + + + + + + + jdk1.7 + + 1.7 + + + + + jdk.tools + jdk.tools + 1.7 + system + ${java.home}/../lib/tools.jar + + + + + + jdk1.8 + + 1.8 + + + + + jdk.tools + jdk.tools + 1.8 + system + ${java.home}/../lib/tools.jar + + + + + + + + + + maven-project-info-reports-plugin + + + + true + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + false + + + aggregate + + 1024m + true + false + ${maven.compile.source} + ${maven.compile.encoding} + ${project.build.directory}/site + yetus-project/api + org.apache.yetus.audience.tools.IncludePublicAnnotationsStandardDoclet + + + org.apache.yetus + audience-annotations + ${project.version} + + + true + + + false + + + + org.apache.hadoop:hadoop-annotations + + + + + aggregate + + + + + + + + + + + yetus-minimaven-plugin + yetus-assemblies + audience-annotations-component + precommit + releasedocmaker + shelldocs + asf-site-src + yetus-dist + yetus-maven-plugin + + + diff --git a/precommit/pom.xml b/precommit/pom.xml new file mode 100644 index 000000000..1c11a8bb1 --- /dev/null +++ b/precommit/pom.xml @@ -0,0 +1,154 @@ + + + + + 4.0.0 + + org.apache.yetus + yetus-project + 0.9.0-SNAPSHOT + .. + + precommit + Build and Patch Management and Testing + Apache Yetus - Precommit + pom + + + + + + maven-antrun-plugin + + + mkdir-bin + initialize + + run + + + true + + + + + + + + + + + maven-assembly-plugin + + + org.apache.yetus + yetus-assemblies + ${project.version} + + + + + build + prepare-package + + single + + + dist/apache-yetus-${project.version} + false + false + + script-bundle + + + + + + module-dist + package + + single + + + false + true + + module-dist + + + + + + + + + org.apache.yetus + yetus-minimaven-plugin + ${project.version} + + + qbt.sh + compile + + symlink + + + test-patch.sh + dist/apache-yetus-${project.version}/lib/${project.artifactId}/qbt.sh + + + + bins4libs + prepare-package + + bin4libs + + + lib/precommit + ${project.build.directory}/dist/apache-yetus-${project.version} + + + + + + + maven-deploy-plugin + + true + + + + + org.apache.rat + apache-rat-plugin + + + src/main/python/unit-test-filter-file.example + + + + + + + + diff --git a/precommit/jenkins/jenkins-admin.py b/precommit/src/main/python/jenkins-admin.py similarity index 100% rename from precommit/jenkins/jenkins-admin.py rename to precommit/src/main/python/jenkins-admin.py diff --git a/precommit/jenkins/unit-test-filter-file.example b/precommit/src/main/python/unit-test-filter-file.example similarity index 100% rename from precommit/jenkins/unit-test-filter-file.example rename to precommit/src/main/python/unit-test-filter-file.example diff --git a/precommit/coprocs.d/README.md b/precommit/src/main/shell/coprocs.d/README.md similarity index 100% rename from precommit/coprocs.d/README.md rename to precommit/src/main/shell/coprocs.d/README.md diff --git a/precommit/coprocs.d/e_a_r_helper.sh b/precommit/src/main/shell/coprocs.d/e_a_r_helper.sh similarity index 100% rename from precommit/coprocs.d/e_a_r_helper.sh rename to precommit/src/main/shell/coprocs.d/e_a_r_helper.sh diff --git a/precommit/coprocs.d/process_counter.sh b/precommit/src/main/shell/coprocs.d/process_counter.sh similarity index 100% rename from precommit/coprocs.d/process_counter.sh rename to precommit/src/main/shell/coprocs.d/process_counter.sh diff --git a/precommit/coprocs.d/reaper.sh b/precommit/src/main/shell/coprocs.d/reaper.sh similarity index 100% rename from precommit/coprocs.d/reaper.sh rename to precommit/src/main/shell/coprocs.d/reaper.sh diff --git a/precommit/core.d/00-yetuslib.sh b/precommit/src/main/shell/core.d/00-yetuslib.sh similarity index 100% rename from precommit/core.d/00-yetuslib.sh rename to precommit/src/main/shell/core.d/00-yetuslib.sh diff --git a/precommit/core.d/01-common.sh b/precommit/src/main/shell/core.d/01-common.sh similarity index 95% rename from precommit/core.d/01-common.sh rename to precommit/src/main/shell/core.d/01-common.sh index e8dee0903..0d89106ea 100755 --- a/precommit/core.d/01-common.sh +++ b/precommit/src/main/shell/core.d/01-common.sh @@ -184,12 +184,15 @@ function common_args ;; esac done + + set_yetus_version + if [[ ${showhelp} == true ]]; then yetus_usage exit 0 fi if [[ ${showversion} == true ]]; then - cat "${BINDIR}/../VERSION" + echo "${VERSION}" exit 0 fi @@ -612,4 +615,29 @@ function pid_kill cmd=$(ps -o args "${pid}") yetus_error "ERROR: Unable to kill ${pid}: ${cmd}" fi +} + +## @description set VERSION to the current version if not set +## @audience private +## @stability evolving +## @replaceable yes +function set_yetus_version +{ + + if [[ -n "${VERSION}" ]]; then + return + fi + + if [[ -f "${BINDIR}/../VERSION" ]]; then + # old src version file + VERSION=$(cat "${BINDIR}/../VERSION") + elif [[ -f "${BINDIR}/VERSION" ]]; then + # dist version file + VERSION=$(cat "${BINDIR}/VERSION") + elif [[ -f "${BINDIR}/../../../pom.xml" ]]; then + # this way we have no dependency on Maven being installed + VERSION=$(${GREP} "" "${BINDIR}/../../../pom.xml" 2>/dev/null \ + | head -1 \ + | ${SED} -e 's|^ *||' -e 's|.*$||' 2>/dev/null) + fi } \ No newline at end of file diff --git a/precommit/core.d/builtin-bugsystem.sh b/precommit/src/main/shell/core.d/builtin-bugsystem.sh similarity index 100% rename from precommit/core.d/builtin-bugsystem.sh rename to precommit/src/main/shell/core.d/builtin-bugsystem.sh diff --git a/precommit/core.d/builtin-personality.sh b/precommit/src/main/shell/core.d/builtin-personality.sh similarity index 100% rename from precommit/core.d/builtin-personality.sh rename to precommit/src/main/shell/core.d/builtin-personality.sh diff --git a/precommit/core.d/docker.sh b/precommit/src/main/shell/core.d/docker.sh similarity index 100% rename from precommit/core.d/docker.sh rename to precommit/src/main/shell/core.d/docker.sh diff --git a/precommit/core.d/patchfiles.sh b/precommit/src/main/shell/core.d/patchfiles.sh similarity index 100% rename from precommit/core.d/patchfiles.sh rename to precommit/src/main/shell/core.d/patchfiles.sh diff --git a/precommit/core.d/reaper.sh b/precommit/src/main/shell/core.d/reaper.sh similarity index 100% rename from precommit/core.d/reaper.sh rename to precommit/src/main/shell/core.d/reaper.sh diff --git a/precommit/docker-cleanup.sh b/precommit/src/main/shell/docker-cleanup.sh similarity index 100% rename from precommit/docker-cleanup.sh rename to precommit/src/main/shell/docker-cleanup.sh diff --git a/precommit/it/it-tp.sh b/precommit/src/main/shell/it/it-tp.sh similarity index 100% rename from precommit/it/it-tp.sh rename to precommit/src/main/shell/it/it-tp.sh diff --git a/precommit/personality/accumulo.sh b/precommit/src/main/shell/personality/accumulo.sh similarity index 100% rename from precommit/personality/accumulo.sh rename to precommit/src/main/shell/personality/accumulo.sh diff --git a/precommit/personality/bigtop.sh b/precommit/src/main/shell/personality/bigtop.sh similarity index 100% rename from precommit/personality/bigtop.sh rename to precommit/src/main/shell/personality/bigtop.sh diff --git a/precommit/personality/drill.sh b/precommit/src/main/shell/personality/drill.sh similarity index 100% rename from precommit/personality/drill.sh rename to precommit/src/main/shell/personality/drill.sh diff --git a/precommit/personality/flink.sh b/precommit/src/main/shell/personality/flink.sh similarity index 100% rename from precommit/personality/flink.sh rename to precommit/src/main/shell/personality/flink.sh diff --git a/precommit/personality/geode.sh b/precommit/src/main/shell/personality/geode.sh similarity index 100% rename from precommit/personality/geode.sh rename to precommit/src/main/shell/personality/geode.sh diff --git a/precommit/personality/hadoop.sh b/precommit/src/main/shell/personality/hadoop.sh similarity index 100% rename from precommit/personality/hadoop.sh rename to precommit/src/main/shell/personality/hadoop.sh diff --git a/precommit/personality/hbase.sh b/precommit/src/main/shell/personality/hbase.sh similarity index 100% rename from precommit/personality/hbase.sh rename to precommit/src/main/shell/personality/hbase.sh diff --git a/precommit/personality/jmeter.sh b/precommit/src/main/shell/personality/jmeter.sh similarity index 100% rename from precommit/personality/jmeter.sh rename to precommit/src/main/shell/personality/jmeter.sh diff --git a/precommit/personality/kafka.sh b/precommit/src/main/shell/personality/kafka.sh similarity index 100% rename from precommit/personality/kafka.sh rename to precommit/src/main/shell/personality/kafka.sh diff --git a/precommit/personality/orc.sh b/precommit/src/main/shell/personality/orc.sh similarity index 100% rename from precommit/personality/orc.sh rename to precommit/src/main/shell/personality/orc.sh diff --git a/precommit/personality/pig.sh b/precommit/src/main/shell/personality/pig.sh similarity index 100% rename from precommit/personality/pig.sh rename to precommit/src/main/shell/personality/pig.sh diff --git a/precommit/personality/ratis.sh b/precommit/src/main/shell/personality/ratis.sh similarity index 100% rename from precommit/personality/ratis.sh rename to precommit/src/main/shell/personality/ratis.sh diff --git a/precommit/personality/samza.sh b/precommit/src/main/shell/personality/samza.sh similarity index 100% rename from precommit/personality/samza.sh rename to precommit/src/main/shell/personality/samza.sh diff --git a/precommit/personality/tajo.sh b/precommit/src/main/shell/personality/tajo.sh similarity index 100% rename from precommit/personality/tajo.sh rename to precommit/src/main/shell/personality/tajo.sh diff --git a/precommit/personality/tez.sh b/precommit/src/main/shell/personality/tez.sh similarity index 100% rename from precommit/personality/tez.sh rename to precommit/src/main/shell/personality/tez.sh diff --git a/precommit/src/main/shell/personality/yetus.sh b/precommit/src/main/shell/personality/yetus.sh new file mode 100755 index 000000000..3afa6d212 --- /dev/null +++ b/precommit/src/main/shell/personality/yetus.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# 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. + +personality_plugins "all" + +## @description Globals specific to this personality +## @audience private +## @stability evolving +function personality_globals +{ + # shellcheck disable=SC2034 + BUILDTOOL=maven + #shellcheck disable=SC2034 + PATCH_BRANCH_DEFAULT=master + #shellcheck disable=SC2034 + JIRA_ISSUE_RE='^YETUS-[0-9]+$' + #shellcheck disable=SC2034 + GITHUB_REPO="apache/yetus" +} diff --git a/precommit/smart-apply-patch.sh b/precommit/src/main/shell/smart-apply-patch.sh similarity index 100% rename from precommit/smart-apply-patch.sh rename to precommit/src/main/shell/smart-apply-patch.sh diff --git a/precommit/test-patch-docker/Dockerfile b/precommit/src/main/shell/test-patch-docker/Dockerfile similarity index 96% rename from precommit/test-patch-docker/Dockerfile rename to precommit/src/main/shell/test-patch-docker/Dockerfile index 8494d5ce7..2341dcfc1 100644 --- a/precommit/test-patch-docker/Dockerfile +++ b/precommit/src/main/shell/test-patch-docker/Dockerfile @@ -161,7 +161,7 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y python \ python-wheel \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -RUN pip2 install -v pylint==1.9.2 +RUN pip2 install -v pylint==1.9.2 python-dateutil==2.7.3 #### # Install ruby, rubocop, and ruby-lint @@ -198,6 +198,3 @@ RUN curl -L -s -S \ # include other requirements not needed by your development # (but not build) environment ### -RUN apt-get -q update && apt-get -q install --no-install-recommends -y sudo vim \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* diff --git a/precommit/test-patch-docker/Dockerfile-endstub b/precommit/src/main/shell/test-patch-docker/Dockerfile-endstub similarity index 100% rename from precommit/test-patch-docker/Dockerfile-endstub rename to precommit/src/main/shell/test-patch-docker/Dockerfile-endstub diff --git a/precommit/test-patch-docker/launch-test-patch.sh b/precommit/src/main/shell/test-patch-docker/launch-test-patch.sh similarity index 100% rename from precommit/test-patch-docker/launch-test-patch.sh rename to precommit/src/main/shell/test-patch-docker/launch-test-patch.sh diff --git a/precommit/test-patch.d/ant.sh b/precommit/src/main/shell/test-patch.d/ant.sh similarity index 100% rename from precommit/test-patch.d/ant.sh rename to precommit/src/main/shell/test-patch.d/ant.sh diff --git a/precommit/test-patch.d/asflicense.sh b/precommit/src/main/shell/test-patch.d/asflicense.sh similarity index 100% rename from precommit/test-patch.d/asflicense.sh rename to precommit/src/main/shell/test-patch.d/asflicense.sh diff --git a/precommit/test-patch.d/author.sh b/precommit/src/main/shell/test-patch.d/author.sh similarity index 100% rename from precommit/test-patch.d/author.sh rename to precommit/src/main/shell/test-patch.d/author.sh diff --git a/precommit/test-patch.d/autoconf.sh b/precommit/src/main/shell/test-patch.d/autoconf.sh similarity index 100% rename from precommit/test-patch.d/autoconf.sh rename to precommit/src/main/shell/test-patch.d/autoconf.sh diff --git a/precommit/test-patch.d/briefreport.sh b/precommit/src/main/shell/test-patch.d/briefreport.sh similarity index 100% rename from precommit/test-patch.d/briefreport.sh rename to precommit/src/main/shell/test-patch.d/briefreport.sh diff --git a/precommit/test-patch.d/bugzilla.sh b/precommit/src/main/shell/test-patch.d/bugzilla.sh similarity index 100% rename from precommit/test-patch.d/bugzilla.sh rename to precommit/src/main/shell/test-patch.d/bugzilla.sh diff --git a/precommit/test-patch.d/cc.sh b/precommit/src/main/shell/test-patch.d/cc.sh similarity index 100% rename from precommit/test-patch.d/cc.sh rename to precommit/src/main/shell/test-patch.d/cc.sh diff --git a/precommit/test-patch.d/checkstyle.sh b/precommit/src/main/shell/test-patch.d/checkstyle.sh similarity index 100% rename from precommit/test-patch.d/checkstyle.sh rename to precommit/src/main/shell/test-patch.d/checkstyle.sh diff --git a/precommit/test-patch.d/cmake.sh b/precommit/src/main/shell/test-patch.d/cmake.sh similarity index 100% rename from precommit/test-patch.d/cmake.sh rename to precommit/src/main/shell/test-patch.d/cmake.sh diff --git a/precommit/test-patch.d/ctest.sh b/precommit/src/main/shell/test-patch.d/ctest.sh similarity index 100% rename from precommit/test-patch.d/ctest.sh rename to precommit/src/main/shell/test-patch.d/ctest.sh diff --git a/precommit/test-patch.d/dupname.sh b/precommit/src/main/shell/test-patch.d/dupname.sh similarity index 100% rename from precommit/test-patch.d/dupname.sh rename to precommit/src/main/shell/test-patch.d/dupname.sh diff --git a/precommit/test-patch.d/findbugs.sh b/precommit/src/main/shell/test-patch.d/findbugs.sh similarity index 100% rename from precommit/test-patch.d/findbugs.sh rename to precommit/src/main/shell/test-patch.d/findbugs.sh diff --git a/precommit/test-patch.d/github.sh b/precommit/src/main/shell/test-patch.d/github.sh similarity index 100% rename from precommit/test-patch.d/github.sh rename to precommit/src/main/shell/test-patch.d/github.sh diff --git a/precommit/test-patch.d/gradle.sh b/precommit/src/main/shell/test-patch.d/gradle.sh similarity index 100% rename from precommit/test-patch.d/gradle.sh rename to precommit/src/main/shell/test-patch.d/gradle.sh diff --git a/precommit/test-patch.d/hadolint.sh b/precommit/src/main/shell/test-patch.d/hadolint.sh similarity index 100% rename from precommit/test-patch.d/hadolint.sh rename to precommit/src/main/shell/test-patch.d/hadolint.sh diff --git a/precommit/test-patch.d/htmlout.sh b/precommit/src/main/shell/test-patch.d/htmlout.sh similarity index 100% rename from precommit/test-patch.d/htmlout.sh rename to precommit/src/main/shell/test-patch.d/htmlout.sh diff --git a/precommit/test-patch.d/java.sh b/precommit/src/main/shell/test-patch.d/java.sh similarity index 100% rename from precommit/test-patch.d/java.sh rename to precommit/src/main/shell/test-patch.d/java.sh diff --git a/precommit/test-patch.d/jira.sh b/precommit/src/main/shell/test-patch.d/jira.sh similarity index 100% rename from precommit/test-patch.d/jira.sh rename to precommit/src/main/shell/test-patch.d/jira.sh diff --git a/precommit/test-patch.d/junit.sh b/precommit/src/main/shell/test-patch.d/junit.sh similarity index 100% rename from precommit/test-patch.d/junit.sh rename to precommit/src/main/shell/test-patch.d/junit.sh diff --git a/precommit/test-patch.d/make.sh b/precommit/src/main/shell/test-patch.d/make.sh similarity index 100% rename from precommit/test-patch.d/make.sh rename to precommit/src/main/shell/test-patch.d/make.sh diff --git a/precommit/test-patch.d/maven.sh b/precommit/src/main/shell/test-patch.d/maven.sh similarity index 100% rename from precommit/test-patch.d/maven.sh rename to precommit/src/main/shell/test-patch.d/maven.sh diff --git a/precommit/test-patch.d/nobuild.sh b/precommit/src/main/shell/test-patch.d/nobuild.sh similarity index 100% rename from precommit/test-patch.d/nobuild.sh rename to precommit/src/main/shell/test-patch.d/nobuild.sh diff --git a/precommit/test-patch.d/pathlen.sh b/precommit/src/main/shell/test-patch.d/pathlen.sh similarity index 100% rename from precommit/test-patch.d/pathlen.sh rename to precommit/src/main/shell/test-patch.d/pathlen.sh diff --git a/precommit/test-patch.d/perlcritic.sh b/precommit/src/main/shell/test-patch.d/perlcritic.sh similarity index 100% rename from precommit/test-patch.d/perlcritic.sh rename to precommit/src/main/shell/test-patch.d/perlcritic.sh diff --git a/precommit/test-patch.d/pylint.sh b/precommit/src/main/shell/test-patch.d/pylint.sh similarity index 100% rename from precommit/test-patch.d/pylint.sh rename to precommit/src/main/shell/test-patch.d/pylint.sh diff --git a/precommit/test-patch.d/rubocop.sh b/precommit/src/main/shell/test-patch.d/rubocop.sh similarity index 100% rename from precommit/test-patch.d/rubocop.sh rename to precommit/src/main/shell/test-patch.d/rubocop.sh diff --git a/precommit/test-patch.d/ruby-lint.sh b/precommit/src/main/shell/test-patch.d/ruby-lint.sh similarity index 100% rename from precommit/test-patch.d/ruby-lint.sh rename to precommit/src/main/shell/test-patch.d/ruby-lint.sh diff --git a/precommit/test-patch.d/scala.sh b/precommit/src/main/shell/test-patch.d/scala.sh similarity index 100% rename from precommit/test-patch.d/scala.sh rename to precommit/src/main/shell/test-patch.d/scala.sh diff --git a/precommit/test-patch.d/shellcheck.sh b/precommit/src/main/shell/test-patch.d/shellcheck.sh similarity index 94% rename from precommit/test-patch.d/shellcheck.sh rename to precommit/src/main/shell/test-patch.d/shellcheck.sh index 61b2cb325..f0450f7f5 100755 --- a/precommit/test-patch.d/shellcheck.sh +++ b/precommit/src/main/shell/test-patch.d/shellcheck.sh @@ -31,19 +31,21 @@ SHELLCHECK_CHECKFILES=() SHELLCHECK_FILTERFILES=() -# if it ends in an explicit .sh, then this is shell code. -# if it doesn't have an extension, then assume it is and -# we'll deal with it later function shellcheck_filefilter { declare filename=$1 if [[ ${filename} =~ \.sh$ ]]; then + # if it ends in an explicit .sh, then this is shell code. add_test shellcheck yetus_add_array_element SHELLCHECK_FILTERFILES "${filename}" - fi - - if [[ ! ${filename} =~ \. ]]; then + elif [[ ${BUILDTOOL} = maven && ${filename} =~ src/main/shell ]]; then + # if it is maven and in src/main/shell, assume it's shell code + add_test shellcheck + yetus_add_array_element SHELLCHECK_FILTERFILES "${filename}" + elif [[ ! ${filename} =~ \. ]]; then + # if it doesn't have an extension, then assume it is and + # we'll deal with it later add_test shellcheck yetus_add_array_element SHELLCHECK_FILTERFILES "${filename}" fi diff --git a/precommit/test-patch.d/shelldocs.sh b/precommit/src/main/shell/test-patch.d/shelldocs.sh similarity index 100% rename from precommit/test-patch.d/shelldocs.sh rename to precommit/src/main/shell/test-patch.d/shelldocs.sh diff --git a/precommit/test-patch.d/tap.sh b/precommit/src/main/shell/test-patch.d/tap.sh similarity index 100% rename from precommit/test-patch.d/tap.sh rename to precommit/src/main/shell/test-patch.d/tap.sh diff --git a/precommit/test-patch.d/test4tests.sh b/precommit/src/main/shell/test-patch.d/test4tests.sh similarity index 100% rename from precommit/test-patch.d/test4tests.sh rename to precommit/src/main/shell/test-patch.d/test4tests.sh diff --git a/precommit/test-patch.d/unitveto.sh b/precommit/src/main/shell/test-patch.d/unitveto.sh similarity index 100% rename from precommit/test-patch.d/unitveto.sh rename to precommit/src/main/shell/test-patch.d/unitveto.sh diff --git a/precommit/test-patch.d/whitespace.sh b/precommit/src/main/shell/test-patch.d/whitespace.sh similarity index 100% rename from precommit/test-patch.d/whitespace.sh rename to precommit/src/main/shell/test-patch.d/whitespace.sh diff --git a/precommit/test-patch.d/xml.sh b/precommit/src/main/shell/test-patch.d/xml.sh similarity index 100% rename from precommit/test-patch.d/xml.sh rename to precommit/src/main/shell/test-patch.d/xml.sh diff --git a/precommit/test-patch.sh b/precommit/src/main/shell/test-patch.sh similarity index 99% rename from precommit/test-patch.sh rename to precommit/src/main/shell/test-patch.sh index df1849b28..af19b57e3 100755 --- a/precommit/test-patch.sh +++ b/precommit/src/main/shell/test-patch.sh @@ -68,12 +68,9 @@ function setup_defaults common_defaults GLOBALTIMER=$("${AWK}" 'BEGIN {srand(); print srand()}') - if [[ -f "${BINDIR}/../VERSION" ]]; then - version=$(cat "${BINDIR}/../VERSION") - elif [[ -f "${BINDIR}/VERSION" ]]; then - version=$(cat "${BINDIR}/VERSION") - fi - if [[ ${version} =~ SNAPSHOT$ ]]; then + set_yetus_version + + if [[ ${VERSION} =~ SNAPSHOT$ ]]; then version="in-progress" fi @@ -1644,10 +1641,7 @@ function copytpbits # shellcheck disable=SC2164 (cd "${BINDIR}"; tar cpf - . ) | (cd "${PATCH_DIR}/precommit"; tar xpf - ) - if [[ ! -f "${BINDIR}/VERSION" - && -f "${BINDIR}/../VERSION" ]]; then - cp -p "${BINDIR}/../VERSION" "${PATCH_DIR}/precommit/VERSION" - fi + echo "${VERSION}" > "${PATCH_DIR}/precommit/VERSION" if [[ -n "${USER_PLUGIN_DIR}" && -d "${USER_PLUGIN_DIR}" ]]; then @@ -2411,18 +2405,12 @@ function bugsystem_finalreport declare version declare bugs - if [[ -f "${BINDIR}/../VERSION" ]]; then - version=$(cat "${BINDIR}/../VERSION") - elif [[ -f "${BINDIR}/VERSION" ]]; then - version=$(cat "${BINDIR}/VERSION") - fi - if [[ "${ROBOT}" = true && -n "${BUILD_URL}" && -n "${BUILD_URL_CONSOLE}" ]]; then add_footer_table "Console output" "${BUILD_URL}${BUILD_URL_CONSOLE}" fi - add_footer_table "Powered by" "Apache Yetus ${version} http://yetus.apache.org" + add_footer_table "Powered by" "Apache Yetus ${VERSION} http://yetus.apache.org" for bugs in ${BUGCOMMENTS}; do if declare -f ${bugs}_finalreport >/dev/null;then diff --git a/releasedocmaker/pom.xml b/releasedocmaker/pom.xml new file mode 100644 index 000000000..0c3891922 --- /dev/null +++ b/releasedocmaker/pom.xml @@ -0,0 +1,149 @@ + + + + 4.0.0 + + org.apache.yetus + yetus-project + 0.9.0-SNAPSHOT + .. + + releasedocmaker + JIRA-based Changelog and Release Notes Generator + Apache Yetus - releasedocmaker + jar + + + + org.scijava + jython-shaded + 2.7.1 + + + + + + + src/main/python + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + maven-assembly-plugin + + + org.apache.yetus + yetus-assemblies + ${project.version} + + + + + pre-dist + prepare-package + + single + + + dist/apache-yetus-${project.version} + false + false + + src/main/assemblies/${project.artifactId}.xml + + + + + + module-dist + package + + single + + + false + true + + module-dist + + + + + + make-jar-assembly + package + + single + + + + + org.apache.yetus.releasedocmaker.ReleaseDocMaker + + + + jar-with-dependencies + + + + + + + + + maven-deploy-plugin + + true + + + + + net.sf.mavenjython + jython-compile-maven-plugin + 2.0 + + + package + + jython + + + + --index-url=https://pypi.python.org/simple/ + python-dateutil + + + + + + + + + + diff --git a/releasedocmaker/src/main/assemblies/releasedocmaker.xml b/releasedocmaker/src/main/assemblies/releasedocmaker.xml new file mode 100644 index 000000000..af5eedc92 --- /dev/null +++ b/releasedocmaker/src/main/assemblies/releasedocmaker.xml @@ -0,0 +1,46 @@ + + + + releasedocmaker + + dir + + false + + + ${basedir}/src/main/python + lib/releasedocmaker + + ** + + 0755 + + + ${basedir}/src/main/shell + bin + + * + + 0755 + + + \ No newline at end of file diff --git a/releasedocmaker/src/main/java/org/apache/yetus/releasedocmaker/ReleaseDocMaker.java b/releasedocmaker/src/main/java/org/apache/yetus/releasedocmaker/ReleaseDocMaker.java new file mode 100644 index 000000000..563318082 --- /dev/null +++ b/releasedocmaker/src/main/java/org/apache/yetus/releasedocmaker/ReleaseDocMaker.java @@ -0,0 +1,45 @@ +/* + * 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.yetus.releasedocmaker; + +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; + +import org.python.core.Py; +import org.python.core.PyException; +import org.python.core.PySystemState; +import org.python.util.PythonInterpreter; + +public class ReleaseDocMaker { + public static void main(final String[] args) throws PyException { + List list = new LinkedList(Arrays.asList(args)); + list.add(0,"releasedocmaker"); + String[] newargs = list.toArray(new String[list.size()]); + PythonInterpreter.initialize(System.getProperties(), System.getProperties(), newargs); + PySystemState systemState = Py.getSystemState(); + PythonInterpreter interpreter = new PythonInterpreter(); + systemState.__setattr__("_jy_interpreter", Py.java2py(interpreter)); + String command = "try:\n " + + " import releasedocmaker\n " + + " releasedocmaker.main()\n" + + "except " + + " SystemExit: pass"; + interpreter.exec(command); + } +} diff --git a/releasedocmaker/src/main/python/releasedocmaker.py b/releasedocmaker/src/main/python/releasedocmaker.py new file mode 100755 index 000000000..63c2e000a --- /dev/null +++ b/releasedocmaker/src/main/python/releasedocmaker.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python2 +# +# 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. + +import sys +sys.dont_write_bytecode = True +# pylint: disable=wrong-import-position,import-self +import releasedocmaker +#pylint: disable=no-member +releasedocmaker.main() diff --git a/release-doc-maker/releasedocmaker.py b/releasedocmaker/src/main/python/releasedocmaker/__init__.py similarity index 99% rename from release-doc-maker/releasedocmaker.py rename to releasedocmaker/src/main/python/releasedocmaker/__init__.py index 2b2ada401..63476bf25 100755 --- a/release-doc-maker/releasedocmaker.py +++ b/releasedocmaker/src/main/python/releasedocmaker/__init__.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -30,7 +29,7 @@ import httplib import json sys.dont_write_bytecode = True -# pylint: disable=wrong-import-position +# pylint: disable=wrong-import-position,relative-import from utils import get_jira, to_unicode, sanitize_text, processrelnote, Outputs # pylint: enable=wrong-import-position @@ -944,4 +943,4 @@ def main(): if __name__ == "__main__": - main() + main() \ No newline at end of file diff --git a/release-doc-maker/utils.py b/releasedocmaker/src/main/python/releasedocmaker/utils.py similarity index 100% rename from release-doc-maker/utils.py rename to releasedocmaker/src/main/python/releasedocmaker/utils.py diff --git a/releasedocmaker/src/main/shell/releasedocmaker b/releasedocmaker/src/main/shell/releasedocmaker new file mode 100755 index 000000000..30b13b151 --- /dev/null +++ b/releasedocmaker/src/main/shell/releasedocmaker @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# 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. + + +# Make a special version of the shell wrapper for releasedocmaker +# that maintains the ability to have '--lint' mean '--lint=all' + +args=() +for arg in "${@}"; do + if [ "${arg}" = "-n" ] || [ "${arg}" = "--lint" ]; then + args=("${args[@]}" "--lint=all") + else + args=("${args[@]}" "${arg}") + fi +done + +exec "$(dirname -- "${BASH_SOURCE-0}")/../lib/releasedocmaker/releasedocmaker.py" "${args[@]}" diff --git a/shelldocs/pom.xml b/shelldocs/pom.xml new file mode 100644 index 000000000..81b1efe66 --- /dev/null +++ b/shelldocs/pom.xml @@ -0,0 +1,161 @@ + + + + 4.0.0 + + org.apache.yetus + yetus-project + 0.9.0-SNAPSHOT + .. + + shelldocs + API Documentation for Shell Scripts + Apache Yetus - shelldocs + jar + + + + org.scijava + jython-shaded + 2.7.1 + + + + + + + + src/main/python + + + + + + + net.sf.mavenjython + jython-compile-maven-plugin + 2.0 + + + package + + jython + + + + + + + maven-assembly-plugin + + + org.apache.yetus + yetus-assemblies + ${project.version} + + + + + + + make-jar-assembly + package + + single + + + + + org.apache.yetus.shelldocs.ShellDocs + + + + jar-with-dependencies + + + + + + build + prepare-package + + single + + + dist/apache-yetus-${project.version} + false + false + + script-bundle + + + + + + module-dist + package + + single + + + false + true + + module-dist + + + + + + + + + org.apache.yetus + yetus-minimaven-plugin + ${project.version} + + + bins4libs + prepare-package + + bin4libs + + + lib/shelldocs + ${project.build.directory}/dist/apache-yetus-${project.version} + + + + + + + maven-deploy-plugin + + true + + + + + + + diff --git a/shelldocs/src/main/java/org/apache/yetus/shelldocs/ShellDocs.java b/shelldocs/src/main/java/org/apache/yetus/shelldocs/ShellDocs.java new file mode 100644 index 000000000..facbc48e0 --- /dev/null +++ b/shelldocs/src/main/java/org/apache/yetus/shelldocs/ShellDocs.java @@ -0,0 +1,45 @@ +/* + * 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.yetus.shelldocs; + +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; + +import org.python.core.Py; +import org.python.core.PyException; +import org.python.core.PySystemState; +import org.python.util.PythonInterpreter; + +public class ShellDocs { + public static void main(final String[] args) throws PyException { + List list = new LinkedList(Arrays.asList(args)); + list.add(0,"shelldocs"); + String[] newargs = list.toArray(new String[list.size()]); + PythonInterpreter.initialize(System.getProperties(), System.getProperties(), newargs); + PySystemState systemState = Py.getSystemState(); + PythonInterpreter interpreter = new PythonInterpreter(); + systemState.__setattr__("_jy_interpreter", Py.java2py(interpreter)); + String command = "try:\n" + + " import shelldocs\n" + + " shelldocs.main()\n" + + "except" + + " SystemExit: pass"; + interpreter.exec(command); + } +} diff --git a/shelldocs/src/main/python/shelldocs.py b/shelldocs/src/main/python/shelldocs.py new file mode 100755 index 000000000..57f912f75 --- /dev/null +++ b/shelldocs/src/main/python/shelldocs.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python2 +# +# 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. + +import sys +sys.dont_write_bytecode = True +# pylint: disable=wrong-import-position,import-self +import shelldocs +# pylint: enable=wrong-import-position +# pylint: disable=no-member +shelldocs.main() diff --git a/shelldocs/shelldocs.py b/shelldocs/src/main/python/shelldocs/__init__.py similarity index 100% rename from shelldocs/shelldocs.py rename to shelldocs/src/main/python/shelldocs/__init__.py diff --git a/start-build-env.sh b/start-build-env.sh new file mode 100755 index 000000000..e773e4ad0 --- /dev/null +++ b/start-build-env.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash + +# 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. + +set -e # exit on error +ROOTDIR=$(cd -P -- "$(dirname -- "${BASH_SOURCE-$0}")" >/dev/null && pwd -P) + +# moving to the path of the Dockerfile reduces the context +cd "${ROOTDIR}/precommit/src/main/shell/test-patch-docker" + +BRANCH=$(git branch | grep '\*' | cut -d ' ' -f2) +if [[ "${BRANCH}" =~ HEAD ]]; then + BRANCH=$(git branch | grep '\*' | awk '{print $NF}' | sed -e s,rel/,,g -e s,\),,g ) +fi + +echo "Attempting a pull of apache/yetus-base:${BRANCH} and apache/yetus-base:latest to save time" +echo "Errors here will be ignored!" +docker pull "apache/yetus-base:${BRANCH}" || docker pull "apache/yetus-base:latest" || true + +docker build -t "apache/yetus-build:${BRANCH}" . + +USER_NAME=${SUDO_USER:=$USER} +USER_ID=$(id -u "${USER_NAME}") +GROUP_ID=$(id -g "${USER_NAME}") + +# When using SELinux, mounted directories may not be accessible +# to the container. To work around this, with Docker prior to 1.7 +# one needs to run the "chcon -Rt svirt_sandbox_file_t" command on +# the directories. With Docker 1.7 and later the z mount option +# does this automatically. +if command -v selinuxenabled >/dev/null && selinuxenabled; then + DCKR_VER=$(docker -v| + awk '$1 == "Docker" && $2 == "version" {split($3,ver,".");print ver[1]"."ver[2]}') + DCKR_MAJ=${DCKR_VER%.*} + DCKR_MIN=${DCKR_VER#*.} + if [[ "${DCKR_MAJ}" -eq 1 ]] && [[ "${DCKR_MIN}" -ge 7 ]] || + [[ "${DCKR_MAJ}" -gt 1 ]]; then + V_OPTS=:z + else + for d in "${PWD}" "${HOME}/.m2"; do + ctx=$(stat --printf='%C' "$d"|cut -d':' -f3) + if [ "$ctx" != svirt_sandbox_file_t ] && [ "$ctx" != container_file_t ]; then + printf 'INFO: SELinux is enabled.\n' + printf '\tMounted %s may not be accessible to the container.\n' "$d" + printf 'INFO: If so, on the host, run the following command:\n' + printf '\t# chcon -Rt svirt_sandbox_file_t %s\n' "$d" + fi + done + fi +fi + +cd "${ROOTDIR}/asf-site-src" +docker build \ + -t "apache/yetus-build-${USER_ID}:${BRANCH}" \ + --build-arg GROUP_ID="${GROUP_ID}" \ + --build-arg USER_ID="${USER_ID}" \ + --build-arg USER_NAME="${USER_NAME}" \ + --build-arg DOCKER_TAG="${BRANCH}" \ + . + +# now cd back +cd "${ROOTDIR}" +# By mapping the .m2 directory you can do an mvn install from +# within the container and use the result on your normal +# system. And this also is a significant speedup in subsequent +# builds because the dependencies are downloaded only once. +# Additionally, we mount GPG and SSH directories so that +# release managers can use the container to do releases +docker run --rm=true -i -t \ + -v "${PWD}:/home/${USER_NAME}/yetus${V_OPTS:-}" \ + -w "/home/${USER_NAME}/yetus" \ + -v "${HOME}/.m2:/home/${USER_NAME}/.m2${V_OPTS:-}" \ + -v "${HOME}/.gnupg:/home/${USER_NAME}/.gnupg" \ + -v "${HOME}/.ssh:/home/${USER_NAME}/.ssh" \ + -u "${USER_NAME}" \ + "apache/yetus-build-${USER_ID}:${BRANCH}" "$@" diff --git a/yetus-assemblies/pom.xml b/yetus-assemblies/pom.xml new file mode 100644 index 000000000..bfe913420 --- /dev/null +++ b/yetus-assemblies/pom.xml @@ -0,0 +1,47 @@ + + + + 4.0.0 + + org.apache.yetus + yetus-project + 0.9.0-SNAPSHOT + .. + + yetus-assemblies + Common Assemblies Creation + Apache Yetus - Assemblies + jar + + + + + maven-deploy-plugin + + true + + + + + + diff --git a/yetus-assemblies/src/main/resources/assemblies/module-dist.xml b/yetus-assemblies/src/main/resources/assemblies/module-dist.xml new file mode 100644 index 000000000..966596449 --- /dev/null +++ b/yetus-assemblies/src/main/resources/assemblies/module-dist.xml @@ -0,0 +1,38 @@ + + + + module-dist + + tar.gz + + false + + + ${project.build.directory}/dist/apache-yetus-${project.version} + apache-yetus-${project.version} + + ** + + 0755 + + + \ No newline at end of file diff --git a/yetus-assemblies/src/main/resources/assemblies/script-bundle.xml b/yetus-assemblies/src/main/resources/assemblies/script-bundle.xml new file mode 100644 index 000000000..5a28d76a4 --- /dev/null +++ b/yetus-assemblies/src/main/resources/assemblies/script-bundle.xml @@ -0,0 +1,46 @@ + + + + script-bundle + + dir + + false + + + ${basedir}/src/main/shell + lib/${project.artifactId} + + ** + + 0755 + + + ${basedir}/src/main/python + lib/${project.artifactId} + + ** + + 0755 + + + \ No newline at end of file diff --git a/yetus-dist/pom.xml b/yetus-dist/pom.xml new file mode 100644 index 000000000..5fa05a822 --- /dev/null +++ b/yetus-dist/pom.xml @@ -0,0 +1,273 @@ + + + + 4.0.0 + + org.apache.yetus + yetus-project + 0.9.0-SNAPSHOT + .. + + yetus-dist + Distrbution Creation + Apache Yetus - Distribution + pom + + + + + org.apache.yetus + asf-site + ${project.version} + + + org.apache.yetus + audience-annotations-component + ${project.version} + + + org.apache.yetus + precommit + ${project.version} + + + org.apache.yetus + releasedocmaker + ${project.version} + + + org.apache.yetus + shelldocs + ${project.version} + + + org.apache.yetus + yetus-minimaven-plugin + ${project.version} + + + + + + + + + maven-dependency-plugin + + + build + generate-sources + + unpack + + + + + ${project.groupId} + releasedocmaker + ${project.version} + tar.gz + ${project.build.directory} + + + ${project.groupId} + precommit + ${project.version} + tar.gz + ${project.build.directory} + + + ${project.groupId} + shelldocs + ${project.version} + tar.gz + ${project.build.directory} + + + + + + + + + + maven-resources-plugin + + + copy-resources + prepare-package + + copy-resources + + + ${project.build.directory}/apache-yetus-${project.version}/lib + + + src/main/resources + + VERSION + + true + + + + + + + + maven-assembly-plugin + + + pre-bin-dist + prepare-package + + single + + + apache-yetus-${project.version} + false + false + + src/main/assemblies/${project.artifactId}.xml + + + + + src-dist + package + + single + + + false + gnu + false + artifacts/apache-yetus-${project.version}-src + ${project.build.directory} + + src/main/assemblies/source.xml + + + + + pre-site-dist + pre-site + + single + + + false + gnu + false + apache-yetus-${project.version}-site + ${project.build.directory} + + src/main/assemblies/site.xml + + + + + bin-dist + package + + single + + + false + gnu + false + artifacts/apache-yetus-${project.version}-bin + + src/main/assemblies/bin-tgz.xml + + + + + site-dist + site + + single + + + false + gnu + false + artifacts/apache-yetus-${project.version}-site + + src/main/assemblies/site-tgz.xml + + + + + site-meta-dist + site + + single + + + false + gnu + false + artifacts + ${project.build.directory} + + src/main/assemblies/site-meta.xml + + + + + + + + org.apache.rat + apache-rat-plugin + + false + false + + src/main/resources/VERSION + target/apache-yetus-${project.version}/lib/VERSION + target/apache-yetus-${project.version}/lib/precommit/unit-test-filter-file.example + + + target/apache-yetus-${project.version}/** + + + + + + + + maven-deploy-plugin + + true + + + + + + + + diff --git a/yetus-dist/src/main/assemblies/bin-tgz.xml b/yetus-dist/src/main/assemblies/bin-tgz.xml new file mode 100644 index 000000000..180024df8 --- /dev/null +++ b/yetus-dist/src/main/assemblies/bin-tgz.xml @@ -0,0 +1,34 @@ + + + yetus-bin-tgz + + tar.gz + + false + + + ${project.build.directory}/apache-yetus-${project.version} + apache-yetus-${project.version} + + ** + + + + diff --git a/yetus-dist/src/main/assemblies/site-meta.xml b/yetus-dist/src/main/assemblies/site-meta.xml new file mode 100644 index 000000000..b9c4963dc --- /dev/null +++ b/yetus-dist/src/main/assemblies/site-meta.xml @@ -0,0 +1,38 @@ + + + + site-meta-pkg + + dir + + false + + + ../asf-site-src/source/documentation/in-progress/ + . + + CHANGELOG.md + RELEASENOTES.md + + + + \ No newline at end of file diff --git a/yetus-dist/src/main/assemblies/site-tgz.xml b/yetus-dist/src/main/assemblies/site-tgz.xml new file mode 100644 index 000000000..97c0392fe --- /dev/null +++ b/yetus-dist/src/main/assemblies/site-tgz.xml @@ -0,0 +1,34 @@ + + + yetus-site-tgz + + tar.gz + + false + + + ${project.build.directory}/apache-yetus-${project.version}-site + apache-yetus-${project.version}-site + + ** + + + + diff --git a/yetus-dist/src/main/assemblies/site.xml b/yetus-dist/src/main/assemblies/site.xml new file mode 100644 index 000000000..d1c2db6a7 --- /dev/null +++ b/yetus-dist/src/main/assemblies/site.xml @@ -0,0 +1,81 @@ + + + + site-pre-pkg + + dir + + false + + + ${project.build.directory}/../../audience-annotations-component/audience-annotations/target/site + . + + ** + + + + ${project.build.directory}/../../precommit/target/site + documentation/in-progress/audience-annotations-apidocs + + ** + + + + ${project.build.directory}/../../releasedocmaker/target/site + . + + ** + + + + ${project.build.directory}/../../shelldocs/target/site + . + + ** + + + + ${project.build.directory}/../../asf-site-src/target/site + . + + ** + + + + ${project.build.directory}/../../asf-site-src/target/release/${project.version} + . + + ** + + + + ${project.build.directory}/../.. + . + + LICENSE + NOTICE + README.md + + + + \ No newline at end of file diff --git a/yetus-dist/src/main/assemblies/source.xml b/yetus-dist/src/main/assemblies/source.xml new file mode 100644 index 000000000..eb6eb39b1 --- /dev/null +++ b/yetus-dist/src/main/assemblies/source.xml @@ -0,0 +1,43 @@ + + + yetus-src + + tar.gz + + true + + + .. + true + + .git/** + **/.gitignore + **/.svn + **/*.iws + **/*.ipr + **/*.iml + **/.classpath + **/.project + **/.settings + **/target/** + + + + diff --git a/yetus-dist/src/main/assemblies/yetus-dist.xml b/yetus-dist/src/main/assemblies/yetus-dist.xml new file mode 100644 index 000000000..251b14e53 --- /dev/null +++ b/yetus-dist/src/main/assemblies/yetus-dist.xml @@ -0,0 +1,60 @@ + + + + precommit + + dir + + false + + + ${project.build.directory}/../../audience-annotations-component/audience-annotations/target/apache-yetus-${project.version} + . + + ** + + + + ${project.build.directory}/../../audience-annotations-component/audience-annotations-jdiff/target/apache-yetus-${project.version} + . + + ** + + + + ${project.build.directory}/../../asf-site-src/target/release/${project.version} + . + + ** + + + + ${project.build.directory}/../.. + . + + LICENSE + NOTICE + README.md + + + + \ No newline at end of file diff --git a/yetus-dist/src/main/resources/VERSION b/yetus-dist/src/main/resources/VERSION new file mode 100644 index 000000000..f2ab45c3b --- /dev/null +++ b/yetus-dist/src/main/resources/VERSION @@ -0,0 +1 @@ +${project.version} \ No newline at end of file diff --git a/yetus-maven-plugin/pom.xml b/yetus-maven-plugin/pom.xml new file mode 100644 index 000000000..61db2d5d4 --- /dev/null +++ b/yetus-maven-plugin/pom.xml @@ -0,0 +1,138 @@ + + + + 4.0.0 + + org.apache.yetus + yetus-project + 0.9.0-SNAPSHOT + .. + + yetus-maven-plugin + Apache Yetus Maven Tools + Apache Yetus - Maven Plugin + maven-plugin + + + + org.apache.maven + maven-plugin-api + ${maven.plugin.api.version} + + + commons-io + commons-io + ${commons.io.version} + + + org.apache.yetus + audience-annotations + ${project.version} + + + org.apache.maven.plugin-tools + maven-plugin-annotations + ${maven.api.version} + provided + + + org.apache.yetus + releasedocmaker + ${project.version} + jar-with-dependencies + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${build-helper-maven-plugin.version} + + + add-source + generate-sources + + add-source + + + + ../yetus-minimaven-plugin/src/main + + + + + add-resource + generate-resources + + add-resource + + + + + ../yetus-minimaven-plugin/src/main/resources + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + ${maven-assembly-plugin.version} + + + create-internal-zip + prepare-package + + single + + + classes/yetus-bin + false + false + + src/main/assemblies/yetus-maven-plugin.xml + + + + + + + maven-compiler-plugin + + + maven-plugin-plugin + + + default-descriptor + compile + + + + + + + diff --git a/yetus-maven-plugin/src/main/assemblies/yetus-maven-plugin.xml b/yetus-maven-plugin/src/main/assemblies/yetus-maven-plugin.xml new file mode 100644 index 000000000..4e8c748ce --- /dev/null +++ b/yetus-maven-plugin/src/main/assemblies/yetus-maven-plugin.xml @@ -0,0 +1,37 @@ + + + + yetus-maven-plugin + + zip + + false + + + ${project.build.directory}/../../releasedocmaker/target/dist/apache-yetus-${project.version} + . + + ** + + + + \ No newline at end of file diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateDirsMojo.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateDirsMojo.java new file mode 100644 index 000000000..8c61cd422 --- /dev/null +++ b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateDirsMojo.java @@ -0,0 +1,97 @@ +/* + * 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. + */ +package org.apache.yetus.maven.plugin.fileops; + +import java.io.File; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; + +/** + * Goal which creates the X directories. + */ +@Mojo(name = "parallel-mkdirs", + defaultPhase = LifecyclePhase.GENERATE_TEST_RESOURCES, + threadSafe = true) +public final class CreateDirsMojo extends AbstractMojo { + + /** + * Location of the dirName. + */ + @Parameter(defaultValue = "${project.build.directory}/test-dir") + private File buildDir; + + /** + * Thread count. + */ + @Parameter(defaultValue = "1") + private String forkCount; + + /** + * Execute our plugin. + * @throws MojoExecutionException an error occurred + */ + public void execute() throws MojoExecutionException { + int numDirs = getForkCount(); + + mkParallelDirs(buildDir, numDirs); + } + + /** + * Get the real number of parallel threads. + * @return int number of threads + */ + public int getForkCount() { + int calcForkCount = 1; + if (forkCount != null) { + String trimProp = forkCount.trim(); + if (trimProp.endsWith("C")) { + double multiplier = Double.parseDouble( + trimProp.substring(0, trimProp.length() - 1)); + double calculated = multiplier * ((double) Runtime + .getRuntime() + .availableProcessors()); + if (calculated > 0d) { + calcForkCount = Math.max((int) calculated, 1); + } + } else { + calcForkCount = Integer.parseInt(forkCount); + } + } + return calcForkCount; + } + + /** + * Make the directories. + * @param pDir base directory + * @param numDirs number of directories to create + * @throws MojoExecutionException an error occurred + */ + private void mkParallelDirs(final File pDir, final int numDirs) + throws MojoExecutionException { + for (int i = 1; i <= numDirs; i++) { + File newDir = new File(pDir, String.valueOf(i)); + if (!newDir.exists()) { + getLog().info("Creating " + newDir.toString()); + if (!newDir.mkdirs()) { + throw new MojoExecutionException("Unable to create " + + newDir.toString()); + } + } + } + } +} diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java new file mode 100644 index 000000000..1a91cef80 --- /dev/null +++ b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +/** + * Utilities for various file operations. + */ +package org.apache.yetus.maven.plugin.fileops; diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/ReleaseDocMakerMojo.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/ReleaseDocMakerMojo.java new file mode 100644 index 000000000..8736ddd3a --- /dev/null +++ b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/ReleaseDocMakerMojo.java @@ -0,0 +1,234 @@ +/* + * 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. + */ +package org.apache.yetus.maven.plugin.rdm; + +import java.io.File; +import java.util.ArrayList; +import org.apache.yetus.maven.plugin.utils.Utils; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; + +import org.apache.yetus.releasedocmaker.ReleaseDocMaker; + +/** + * Goal which executes releasedocmaker. + */ +@Mojo(name = "releasedocmaker", + defaultPhase = LifecyclePhase.PRE_SITE, + threadSafe = true) +public final class ReleaseDocMakerMojo extends AbstractMojo { + + /** + * Location of output. + */ + @Parameter + private String baseUrl; + + /** + * Location of the dirName. + */ + @Parameter(defaultValue = "${project.build.directory}") + private File buildDir; + + /** + * Create diretory versions. + */ + @Parameter(defaultValue = "false") + private Boolean dirversions; + + /** + * Create file versions. + */ + @Parameter(defaultValue = "false") + private Boolean fileversions; + + /** + * label for incompatible issues + */ + @Parameter + private String incompatibleLabel; + + /** + * Create an index. + */ + @Parameter(defaultValue = "false") + private Boolean index; + + /** + * Put the ASF License on generated files. + */ + @Parameter(defaultValue = "false") + private Boolean license; + + /** + * Run in --lint mode. + */ + @Parameter(defaultValue = "false") + private Boolean lint; + + /** + * Location of output. + */ + @Parameter(defaultValue = "${project.build.directory}/generated-site/markdown") + private String outputDir; + + /** + * Put the ASF License on generated files. + */ + @Parameter(defaultValue = "${project.name}") + private String[] projects; + + /** + * Title of project. + */ + @Parameter + private String projectTitle; + + /** + * Treat versions as a range. + */ + @Parameter(defaultValue = "false") + private Boolean range; + + /** + * Drop reporter/assignee + */ + @Parameter(defaultValue = "false") + private Boolean skipcredits; + + /** + * Set the sort order + */ + @Parameter(defaultValue = "older") + private String sortorder; + + /** + * Set the type order + */ + @Parameter(defaultValue = "resolutiondate") + private String sorttype; + + /** + * Use today. + */ + @Parameter(defaultValue = "false") + private Boolean useToday; + + /** + * Version to generate. + */ + @Parameter(defaultValue = "${project.version}") + private String[] versions; + + /** + * Build our argument list to pass to the executor. + */ + private ArrayList argList = new ArrayList(); + + /** + * Execute our plugin. + * @throws MojoExecutionException an error occurred + */ + public void execute() throws MojoExecutionException { + + buildArgs(); + String [] args = argList.toArray(new String[0]); + + ReleaseDocMaker rdm=new ReleaseDocMaker(); + ReleaseDocMaker.main(args); + } + + + /** + * Based upon what we got from maven, build our rdm command line params. + */ + private void buildArgs() { + + if (baseUrl != null ) { + argList.add("--baseurl"); + argList.add(baseUrl); + } + + if (dirversions) { + argList.add("--dirversions"); + } + + if (fileversions) { + argList.add("--fileversions"); + } + + if (incompatibleLabel != null) { + argList.add("--incompatiblelabel"); + argList.add(incompatibleLabel); + } + + if (index) { + argList.add("--index"); + } + + if (license) { + argList.add("--license"); + } + + if (lint) { + argList.add("--lint"); + } + + argList.add("--outputdir"); + argList.add(outputDir); + + for (String p: projects) { + argList.add("--project"); + argList.add(p); + } + + if (projectTitle != null) { + argList.add("--projecttitle"); + argList.add(projectTitle); + } + + if (range) { + argList.add("--range"); + } + + if (skipcredits) { + argList.add("--skipcredits"); + } + + if (sortorder != null) { + argList.add("--sortorder"); + argList.add(sortorder); + } + + if (sorttype != null) { + argList.add("--sorttype"); + argList.add(sorttype); + } + + if (useToday) { + argList.add("--usetoday"); + } + + for (String v: versions) { + argList.add("--version"); + argList.add(v); + } + + } + +} diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/package-info.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/package-info.java new file mode 100644 index 000000000..04067bd39 --- /dev/null +++ b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/rdm/package-info.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +/** + * Utilities for running releasedocmaker. + */ +package org.apache.yetus.maven.plugin.rdm; diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/Utils.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/Utils.java new file mode 100644 index 000000000..e8616f94d --- /dev/null +++ b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/Utils.java @@ -0,0 +1,131 @@ +/* + * 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. + */ +package org.apache.yetus.maven.plugin.utils; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.util.Arrays; +import java.util.List; +import java.util.LinkedList; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; + + +import org.apache.yetus.audience.InterfaceAudience; +import org.apache.yetus.audience.InterfaceStability; + + +/** + * Random utilities for running Yetus components. + */ +@InterfaceAudience.Private +@InterfaceStability.Unstable +public final class Utils { + + /** + * Buffer size used while zipping and unzipping zip-ed archives. + */ + private static final int BUFFER_SIZE = 8192; + + + /** + * InputStream from the classpath that has our archive. + */ + private ZipInputStream zipFile; + + /** + * extracted dir+bin. + */ + private File binDir; + + + /** + * Constructor for generic utilities. + */ + public Utils() { + this.zipFile = new ZipInputStream(this.getClass() + .getClassLoader() + .getResourceAsStream("yetus-bin.zip")); + } + + /** + * Execute the yetus command with the given parameters. + * @param cmd command to execute + * @param args to that command + * @throws IOException an error occurred + * @throws InterruptedException an error occurred + * @return int process return code + */ + public int execCmd(final String cmd, final String... args) + throws IOException, InterruptedException { + File cmdFile = new File(binDir, cmd); + String realCmd = cmdFile.toString(); + + String[] params = args; + + List list = new LinkedList(Arrays.asList(args)); + list.add(0, realCmd); + params = list.toArray(new String[list.size()]); + + ProcessBuilder pb = new ProcessBuilder(params); + pb.inheritIO(); + Process p = pb.start(); + return p.waitFor(); + } + + /** + * Extract the yetus-bin file in the dest directory. + * @param destDir The unzip directory where to extractthe file. + * @throws IOException an error occurred + */ + public void extractYetus(final File destDir) throws IOException { + this.binDir = new File(destDir, "bin"); + + if (binDir.isDirectory()) { + return; + } + try { + ZipEntry entry; + while ((entry = zipFile.getNextEntry()) != null) { + if (!entry.isDirectory()) { + File file = new File(destDir, entry.getName()); + if (!file.getParentFile().mkdirs()) { + if (!file.getParentFile().isDirectory()) { + throw new IOException("Mkdirs failed to create " + + file.getParentFile().toString()); + } + } + OutputStream out = new FileOutputStream(file); + try { + byte[] buffer = new byte[BUFFER_SIZE]; + int i; + while ((i = zipFile.read(buffer)) != -1) { + out.write(buffer, 0, i); + } + } finally { + out.close(); + } + file.setExecutable(true); + file.setReadable(true); + file.setWritable(true); + } + } + } finally { + zipFile.close(); + } + } + +} diff --git a/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/package-info.java b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/package-info.java new file mode 100644 index 000000000..8e04ace10 --- /dev/null +++ b/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/utils/package-info.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +/** + * Utilities for running Yetus. + */ +package org.apache.yetus.maven.plugin.utils; diff --git a/yetus-minimaven-plugin/pom.xml b/yetus-minimaven-plugin/pom.xml new file mode 100644 index 000000000..49dd4e5b4 --- /dev/null +++ b/yetus-minimaven-plugin/pom.xml @@ -0,0 +1,83 @@ + + + + 4.0.0 + + org.apache.yetus + yetus-project + 0.9.0-SNAPSHOT + .. + + org.apache.yetus + yetus-minimaven-plugin + Apache Yetus Maven Build Tools + Apache Yetus - MiniMaven Plugin + maven-plugin + + + + org.apache.maven + maven-plugin-api + ${maven.plugin.api.version} + + + commons-io + commons-io + ${commons.io.version} + + + org.apache.maven.plugin-tools + maven-plugin-annotations + ${maven.api.version} + provided + + + + + + + maven-compiler-plugin + + + org.apache.maven.plugins + maven-plugin-plugin + ${maven.api.version} + + + default-descriptor + compile + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + + diff --git a/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java b/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java new file mode 100644 index 000000000..c93a9eddd --- /dev/null +++ b/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/CreateSymLinkMojo.java @@ -0,0 +1,94 @@ +/* + * 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. + */ +package org.apache.yetus.maven.plugin.fileops; + +import java.nio.file.Files; +import java.nio.file.FileAlreadyExistsException; +import java.nio.file.Path; +import java.nio.file.Paths; + +//import org.apache.maven.execution.MavenSession; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; + +/** + * Goal which creates symlinks. + */ +@Mojo(name = "symlink", + defaultPhase = LifecyclePhase.PACKAGE, + threadSafe = true) +public final class CreateSymLinkMojo extends AbstractMojo { + + /** + * Location of the target. + */ + @Parameter + private String target; + + /** + * the link to create. + */ + @Parameter + private String newLink; + + /** + * ignore already exists errors. + */ + @Parameter(defaultValue = "true") + private Boolean ignoreExist; + + + /** + * starting directory for relatives. + */ + @Parameter(defaultValue = "${project.build.directory}") + private String basedir; + + /** + * starting directory for relatives. + * @throws MojoExecutionException an error occurred + */ + public void execute() throws MojoExecutionException { + if (target == null) { + throw new MojoExecutionException("target of symlink is undefined."); + } + + if (newLink == null) { + throw new MojoExecutionException("newLink of symlink is undefined."); + } + + Path targetPath = Paths.get(target); + Path newLinkPath = Paths.get(newLink); + + if (!newLinkPath.isAbsolute()) { + newLinkPath = Paths.get(basedir, newLink); + } + + try { + Files.createSymbolicLink(newLinkPath, targetPath); + } catch (FileAlreadyExistsException x) { + if (!ignoreExist) { + throw new MojoExecutionException("Unable to create " + + newLinkPath.toString() + ": " + targetPath.toString() + " " + x); + } + } catch (Exception x) { + throw new MojoExecutionException("Unable to create " + + newLinkPath.toString() + ": " + targetPath.toString() + " " + x); + } + } +} diff --git a/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java b/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java new file mode 100644 index 000000000..cb6b2cc8c --- /dev/null +++ b/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/MakeBins4Libs.java @@ -0,0 +1,156 @@ +/* + * 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. + */ +package org.apache.yetus.maven.plugin.fileops; + +import java.io.File; +import java.io.PrintWriter; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.PosixFilePermission; +import java.util.HashSet; +import java.util.Set; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; + +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.io.IOUtils; + + +/** + * Goal which creates symlinks. + */ +@Mojo(name = "bin4libs", + defaultPhase = LifecyclePhase.PACKAGE, + threadSafe = true) +public final class MakeBins4Libs extends AbstractMojo { + + /** + * bin dir. + */ + @Parameter(defaultValue = "bin") + private String bindir; + + /** + * lib dir. + */ + @Parameter(defaultValue = "lib") + private String libdir; + + /** + * License to use as a header. + */ + @Parameter(defaultValue = "ASL20") + private String license; + + /** + * parent of bin and lib dir, if relative. + */ + @Parameter(defaultValue = + "${project.build.directory}/${project.artifactId}-${project.version}") + private String basedir; + + /** + * wrapper to put down. + */ + private String wrapper = "exec \"$(dirname -- \"${BASH_SOURCE-0}\")/../"; + + /** + * The file encoding to use when reading/writing the source files. + */ + @Parameter (property = "encoding", + defaultValue = "${project.build.sourceEncoding}") + private String encoding; + + /** + * Execute our plugin. + * @throws MojoExecutionException an error occurred + */ + public void execute() throws MojoExecutionException { + + Path libPath = Paths.get(libdir); + Path binPath = Paths.get(bindir); + + if (!libPath.isAbsolute()) { + libPath = Paths.get(basedir, libdir); + } + + if (!binPath.isAbsolute()) { + binPath = Paths.get(basedir, bindir); + } + + try { + binPath.toFile().mkdir(); + } catch (Exception x) { + throw new MojoExecutionException("Unable to create " + + binPath.toString() + ": " + x); + } + + Set perms = new HashSet(); + perms.add(PosixFilePermission.OWNER_READ); + perms.add(PosixFilePermission.OWNER_WRITE); + perms.add(PosixFilePermission.OWNER_EXECUTE); + perms.add(PosixFilePermission.GROUP_READ); + perms.add(PosixFilePermission.GROUP_EXECUTE); + perms.add(PosixFilePermission.OTHERS_READ); + perms.add(PosixFilePermission.OTHERS_EXECUTE); + + File libFile = libPath.toFile(); + if (libFile == null) { + throw new MojoExecutionException("Cannot convert " + + libPath.toString()); + } + + File[] libListOfFiles = libFile.listFiles(); + System.out.println("Processing dir " + libPath.toString()); + + for (int i = 0; i < libListOfFiles.length; i++) { + if (libListOfFiles[i].isFile()) { + String basename = FilenameUtils + .getBaseName(libListOfFiles[i].getName()); + String theName = FilenameUtils.getName(libListOfFiles[i].getName()); + String binName = Paths.get(binPath.toString(), basename).toString(); + System.out.println("Creating file " + binName); + + try { + PrintWriter binFile = new PrintWriter(binName, encoding); + String noneString = "none"; + + binFile.println("#!/usr/bin/env bash"); + + if (!license.equals(noneString)) { + InputStream inLicense = this.getClass() + .getClassLoader() + .getResourceAsStream("licenses/" + + license + ".txt"); + IOUtils.copy(inLicense, binFile); + inLicense.close(); + } + binFile.println(wrapper + libdir + "/" + theName + "\" \"$@\""); + binFile.close(); + Files.setPosixFilePermissions(Paths.get(binName), perms); + } catch (Exception x) { + throw new MojoExecutionException("Unable to create " + + binName + ": " + x); + + } + } + } + } +} diff --git a/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java b/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java new file mode 100644 index 000000000..b47390456 --- /dev/null +++ b/yetus-minimaven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +/** + * Mini-maven just has the bits necessary to build Apache Yetus. + */ +package org.apache.yetus.maven.plugin.fileops; diff --git a/yetus-minimaven-plugin/src/main/resources/licenses/ASL20.txt b/yetus-minimaven-plugin/src/main/resources/licenses/ASL20.txt new file mode 100644 index 000000000..ae1e83eeb --- /dev/null +++ b/yetus-minimaven-plugin/src/main/resources/licenses/ASL20.txt @@ -0,0 +1,14 @@ +# 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. diff --git a/yetus-project/pom.xml b/yetus-project/pom.xml deleted file mode 100644 index 2db8851ce..000000000 --- a/yetus-project/pom.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - 4.0.0 - - org.apache - apache - 17 - - - - org.apache.yetus - yetus-project - 0.9.0-SNAPSHOT - Project-wide definitions for Apache Yetus - Apache Yetus Project - pom - - https://yetus.apache.org - 2015 - - - Apache Yetus Dev List - dev-subscribe@yetus.apache.org - dev-unsubscribe@yetus.apache.org - dev@yetus.apache.org - https://mail-archives.apache.org/mod_mbox/yetus-dev/ - - - - - 3.2.0 - 1.7 - 1.7 - 1.7 - 1.0-beta-3 - - - - scm:git:git://git.apache.org/yetus.git - scm:git:https://git-wip-us.apache.org/repos/asf/yetus.git - https://git-wip-us.apache.org/repos/asf?p=yetus.git - - - JIRA - http://issues.apache.org/jira/browse/YETUS - - - - - - org.codehaus.mojo - extra-enforcer-rules - ${extra.enforcer.version} - - - jdk.tools - jdk.tools - 1.7 - system - ${java.home}/../lib/tools.jar - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - org.codehaus.mojo - extra-enforcer-rules - ${extra.enforcer.version} - - - - - - enforce - - enforce - - - - - - - [${maven.min.version},) - Maven is out of date. - Yetus requires at least version ${maven.min.version} of Maven to properly build from source. - You appear to be using an older version. You can use either "mvn -version" or - "mvn enforcer:display-info" to verify what version is active. - See the contributor guide on building for more information: ${project.url}/contribute/ - - - - - [${java.min.version},) - Java is out of date. - Yetus requires at least version ${java.min.version} of the JDK to properly build from source. - You appear to be using an older version. You can use either "mvn -version" or - "mvn enforcer:display-info" to verify what version is active. - See the contributor guide on building for more information: ${project.url}/contribute/ - - - - - - - - - - - - jdk1.7 - - 1.7 - - - - - jdk.tools - jdk.tools - 1.7 - system - ${java.home}/../lib/tools.jar - - - - - - jdk1.8 - - 1.8 - - - - - jdk.tools - jdk.tools - 1.8 - system - ${java.home}/../lib/tools.jar - - - - - - - From 4c99fe1a5cd47b5df5270764d727af467a0b1240 Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Fri, 2 Nov 2018 07:37:43 -0700 Subject: [PATCH 2/2] use more of apache-release --- README.md | 45 ++++-- asf-site-src/Dockerfile | 9 ++ asf-site-src/source/contribute/releases.md | 142 ++++++++++-------- .../audience-annotations-jdiff/pom.xml | 3 +- .../audience-annotations/pom.xml | 1 - pom.xml | 120 +++++---------- .../main/shell/test-patch-docker/Dockerfile | 5 +- releasedocmaker/pom.xml | 4 +- shelldocs/pom.xml | 4 +- yetus-dist/pom.xml | 45 +++++- yetus-maven-plugin/pom.xml | 1 - 11 files changed, 203 insertions(+), 176 deletions(-) diff --git a/README.md b/README.md index 46046cf76..a7dde3920 100644 --- a/README.md +++ b/README.md @@ -16,29 +16,50 @@ specific language governing permissions and limitations under the License. --> -# Apache Yetus Source +# Apache Yetus Apache Yetus is a collection of libraries and tools that enable contribution and release process for software projects. +## Components + Here is a list of the major components: * [Website source](asf-site-src/) Holds our documentation, which is presented via [our website](https://yetus.apache.org/). -See the [guide to contributing](asf-site-src/source/contribute.html.md) for instructions on building the rendered -version. * [Precommit](precommit/) -Precommit provides robust tools to deal with contributions, including applying patches from a variety of project sources -and evaluating them against project norms via a system of plugins. See the -[precommit overview](asf-site-src/source/documentation/in-progress/precommit-architecture.md) to get started working with -precommit. +Precommit provides robust tools to deal with contributions, including applying patches from a variety of project sources and evaluating them against project norms via a system of plugins. See the [precommit overview](asf-site-src/source/documentation/in-progress/precommit-architecture.md) to get started working with precommit. * [Audience Annotations](audience-annotations-component/) -Audience Annotations allows projects to use Java Annotations to delineate public and non-public parts of their APIs. -It also provides doclets to generate javadocs filtered by intended audience. Currently builds with Maven 3.2.0+. +Audience Annotations allows projects to use Java Annotations to delineate public and non-public parts of their APIs. It also provides doclets to generate javadocs filtered by the intended audience. Currently builds with Maven 3.2.0+. * [Shelldocs](shelldocs/) -Shelldocs processes comments on Bash functions for a annotations similar to Javadoc. It also includes built in -audience scoping functionality similar to the doclet from Audience Annotations. +Shelldocs processes comments on Bash functions for annotations similar to Javadoc. It also includes built-in audience scoping functionality similar to the doclet from Audience Annotations. * [Release Doc Maker](release-doc-maker/) Release Doc Maker analyzes Jira and Git information to produce Markdown formatted release notes. * [yetus-maven-plugin](yetus-maven-plugin/) -Provides some small utilities for some uncommon maven requirements (such as symlinks). \ No newline at end of file +Builds a maven plugin that provides some small utilities for some uncommon maven requirements (such as symlinks) in addition to being mavenized versions of some of the Apache Yetus functionality. + +## Building Quickstart + +For full instructions on how to build releases and the website, see the [guide to contributing](asf-site-src/source/contribute.html.md) for requirements and instructions. + +```bash +# Launch a Docker container that has all of the project's dependencies and a working build environment +./start-build-env.sh + +# Build the binary tarball, located in yetus-dist/target/artifacts: +mvn clean install + +# Build the binary and source tarballs and sign the content: +mvn clean install -Papache-release + +# Same, but if outside the container and need to let the system know that the OS uses 'gpg2' instead of 'gpg': +mvn clean install -Papache-release -Pgpg2 + +# Build the binary and source tarballs, but skip signing them: +mvn clean install -Papache-release -Dgpg.sign=skip + +# Build the website (requires a mvn install first) +mvn site +``` + +After executing one or more of the Apache Maven commands, artifacts will be in `yetus-dist/target/artifacts` or ready for a `mvn deploy`. \ No newline at end of file diff --git a/asf-site-src/Dockerfile b/asf-site-src/Dockerfile index 17e23d973..77f34a806 100644 --- a/asf-site-src/Dockerfile +++ b/asf-site-src/Dockerfile @@ -23,9 +23,13 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG GROUP_ID ARG USER_ID ARG USER_NAME + # hadolint ignore=DL3008 RUN apt-get -q update \ && apt-get -q install --no-install-recommends -y \ + gnupg2 \ + gnupg-agent \ + pinentry-curses \ pinentry-tty \ subversion \ sudo \ @@ -33,6 +37,10 @@ RUN apt-get -q update \ zlib1g-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* + +# we really want gpg2 to be the default gpg implementation +# it doesn't appear Xenial supports that though +RUN ln -s /usr/bin/gpg2 /usr/local/bin/gpg # pre-install most of the middleman stack to save time # on re-launches RUN gem install bundler \ @@ -45,6 +53,7 @@ RUN gem install bundler \ rake:10.3.1 \ nokogiri:1.8.5 RUN bundle config --global github.https true +RUN echo "export GPG_TTY=\$(tty)" >> /root/.bashrc RUN groupadd --non-unique -g "${GROUP_ID}" "${USER_NAME}" RUN useradd -g "${GROUP_ID}" -u "${USER_ID}" -k /root -m "${USER_NAME}" # shellcheck disable=SC2039,SC1117 diff --git a/asf-site-src/source/contribute/releases.md b/asf-site-src/source/contribute/releases.md index aed80acb5..f3c459e5f 100644 --- a/asf-site-src/source/contribute/releases.md +++ b/asf-site-src/source/contribute/releases.md @@ -19,42 +19,51 @@ # Managing a Release -The Apache Yetus community encourages all committers to help on driving releases. To that end, this section seeks to outline the tools and process you'll use when managing a release. Note that these are our community norms; they do not supercede foundation policy should the two disagree. +The Apache Yetus community encourages all committers to help on driving releases. To that end, this section seeks to outline the tools and process you'll use when managing a release. Note that these are our community norms; they do not supersede foundation policy should the two disagree. ## Dependencies First, let's review what you'll need to complete all steps of the process. ### Committer Access -While the Yetus project aims to get new contributors involved in as much of the project as possible, ASF policy requires that all [Release Managers be committers on the project](http://www.apache.org/foundation/glossary.html#ReleaseManager). As a practical matter, [release candidates are staged in a project-specific svn repository that only project commiters have write access to](https://www.apache.org/dev/release.html#stage). + +While the Yetus project aims to get new contributors involved in as much of the project as possible, ASF policy requires that all [Release Managers be committers on the project](https://www.apache.org/foundation/glossary.html#ReleaseManager). As a practical matter, [release candidates are staged in a project-specific svn repository that only project committers have write access to](https://www.apache.org/dev/release.html#stage). + ### Hardware You Own and Physically Control + ASF release policy requires that release manager verification and signing of artifacts take place on hardware you have as much control over as possible. This is because your private signing keys will be involved and those _should_ only be accessible on such hardware, to minimize the exposure to third parties. For more details, [see the ASF release policy's relevant text](https://www.apache.org/dev/release.html#owned-controlled-hardware). + ### Cryptographic Signing Tools and Keys -Everything distributed by an ASF project must be signed prior to distribution (ref ASF release policy [on releases](https://www.apache.org/dev/release.html#what-must-every-release-contain) and [supplemental artifacts](https://www.apache.org/dev/release.html#distribute-other-artifacts)). The short version of the rationale is that downstream users should be able to verify that the artifacts they make use of were ones blessed by the project PMC. For a longer explanation, [see the ASF release signing document's motivation section](https://www.apache.org/dev/release-signing.html#motivation). -In practice, the requirement for artifact signing is handled via OpenPGP signatures. For all practical purposes, this means you'll need to use Gnu Privacy Guard (aka GnuPG or GPG). It also means you'll need to have a public/private key pair you control that is published in your name. Thankfully, the ASF provides a good overview to using GPG in [the ASF OpenPGP guide](https://www.apache.org/dev/openpgp.html). In particular, if you don't already have a published key be sure to follow the instructions in the section [How To Generate A Strong Key](https://www.apache.org/dev/openpgp.html#generate-key). +Everything distributed by an ASF project must be signed before distribution (ref ASF release policy [on releases](https://www.apache.org/dev/release.html#what-must-every-release-contain) and [supplemental artifacts](https://www.apache.org/dev/release.html#distribute-other-artifacts)). The short version of the rationale is that downstream users should be able to verify that the artifacts they make use of were ones blessed by the project PMC. For a longer explanation, [see the ASF release signing document's motivation section](https://www.apache.org/dev/release-signing.html#motivation). + +In practice, the requirement for artifact signing is handled via OpenPGP signatures. For all practical purposes, this means you'll need to use Gnu Privacy Guard (aka GnuPG or GPG). It also means you'll need to have a public/private key pair you control that is published in your name. Thankfully, the ASF provides an excellent overview to using GPG in [the ASF OpenPGP guide](https://www.apache.org/dev/openpgp.html). In particular, if you don't already have a published key be sure to follow the instructions in the section [How To Generate A Strong Key](https://www.apache.org/dev/openpgp.html#generate-key). ### Version Control System Tools -In addition to the git tools you normally use to interact with the Yetus project, managing a release also requires a properly configured Subversion installation. This is because both the staging area for release candidates and the final distribution mechanism for PMC approved releases rely on Subversion. -The Subversion project provides a nice set of pointers to installing on various OSes, in most cases via package managers, on their page [Apache Subversion Binary Packages](http://subversion.apache.org/packages.html). Alternatively, you could start with a source release and manually build the necessary tools by starting at [Apache Subversion - Download Source Code](http://subversion.apache.org/download.cgi). +In addition to the git tools you normally use to interact with the Yetus project, managing a release also requires a properly configured Apache Subversion installation. This additional tool is because both the staging area for release candidates and the final distribution mechanism for PMC approved releases rely on Subversion. + +The Subversion project provides a nice set of pointers to installing on various OSes, in most cases via package managers, on their page [Apache Subversion Binary Packages](https://subversion.apache.org/packages.html). Alternatively, you could start with a source release and manually build the necessary tools by starting at [Apache Subversion - Download Source Code](https://subversion.apache.org/download.cgi). + ### Project Specific Build Tools -To create our convenience binary artifact, you'll need to build both our project docs and all of individual components. If you normally only work on one part of the project, say Yetus Precommit, this might require some additional programming languages and tools. -NOTE: All of these tools should be in the Docker container that is launched by using the `./start-build-dev.sh` script. +To create our convenience binary artifact and the Apache Maven plug-ins, you'll need to build both our project docs and all of the individual components. If you usually only work on one part of the project, say Yetus Precommit, this might require some additional programming languages and tools. + +All of these tools should be in the Docker container that is launched by using the `./start-build-dev.sh` script. If you wish to build outside of the container (not recommended), you will need: -- Yetus Audience Annotations will require Maven 3.2.0+ and Java 8. -- Yetus Precommit will require Python 2.7+ for generating documentation on its API via Yetus Shelldocs. -- The project documentation will require Ruby 2.x+ for rendering. -- We'll build release notes with Yetus Release Doc Maker, which will require Python 2.7+. -- Assembling release artifacts will make use of bash, tar, gzip, and shasum. +- Maven 3.2.0+ +- Java 8 +- Python 2.7 +- Ruby 2.x+ +- bash, tar, gzip, gpg, and shasum ## Setup -When you first start managing a given release you'll have to take care of the following tasks. With the exception of creating the release staging branch, these can be done in any order. +When you first start managing a given release, you'll have to take care of the following tasks. Except for creating the release staging branch, these can be done in any order. ### Ensure Your Public Key is in KEYS -Like many ASF projects, we provide a single file that downstream folks can use to verify our release artifacts. It's located in the project's distribution area: http://www.apache.org/dist/yetus/KEYS. You can read about this file in the ASF guide to release signing's section [The KEYS File](http://www.apache.org/dist/yetus/KEYS). If your public key is not already included in this file, you will need to add it. You can either follow the instructions in the previously mentioned guide or those at the top of the actual KEYS file. In any case, you will need to use Subversion to update the KEYS file in the project's distribution area. Note that this area is writable only by the project PMC. If you are not yet on the PMC, your last step should be providing a patch rather than commiting. + +Like many ASF projects, we provide a single file that downstream folks can use to verify our release artifacts. It's located in the project's distribution area: https://www.apache.org/dist/yetus/KEYS. You can read about this file in the ASF guide to release signing's section [The KEYS File](https://www.apache.org/dist/yetus/KEYS). If your public key is not already included in this file, you will need to add it. You can either follow the instructions in the previously mentioned guide or those at the top of the actual KEYS file. In any case, you will need to use Subversion to update the KEYS file in the project's distribution area. Note that this area is writable only by the project PMC. If you are not yet on the PMC, your last step should be providing a patch rather than committing. Example commands: @@ -67,38 +76,39 @@ $ svn commit -m "Added myself to KEYS." ``` ### Work in JIRA + Like the rest of our project activity, we'll use an issue in JIRA to track managing the release. You should create this issue and assign it to yourself. As you make your way through the process of creating and running votes on release candidates, this issue will give you a centralized place to collect pointers to your work. 1. Browse to the ASF JIRA instance's "create issue" page: https://issues.apache.org/jira/secure/CreateIssue!default.jspa 1. Select "Yetus" for the Project and "Task" for the issue type. Click "Next" 1. On the next screen, use a subject line like "Release VERSION", with an appropriate version number. Fill in the following fields and click "Create". - - Component should be "website and documentation" + - The component should be "website and documentation" - Affects Version and Fix Version should both be the version you are releasing - Assignee should be you - Add a description similar to "Generate release candidates as needed to create a VERSION release." with an appropriate version number. -Next, create a shortened link to the JIRA version's release notes. This should use the ASF link shortener, http://s.apache.org/. To find the appropriate release notes page: +Next, create a shortened link to the JIRA version's release notes. This link should use the ASF link shortener, https://s.apache.org/. To find the appropriate release notes page: 1. Browse to the Yetus JIRA versions page: https://issues.apache.org/jira/browse/YETUS/?selectedTab=com.atlassian.jira.jira-projects-plugin:versions-panel 1. Click on the Name of the release you are managing 1. Click on the "Release Notes" button. If it isn't shown, click on the "Summary" button in the left menu 1. Copy this URL -1. Browse to the ASF URL shortener: http://s.apache.org/ +1. Browse to the ASF URL shortener: https://s.apache.org/ 1. Paste the URL into the "URI" field 1. Set the optional key field to 'yetus-_version_-jira' -For example, on the 0.7.0 release you would use 'https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12318920&version=12334330' for the URI field and 'yetus-0.7.0-jira' for the key. +For example, on the 0.7.0 release, you would use 'https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12318920&version=12334330' for the URI field and 'yetus-0.7.0-jira' for the key. -Finally, you should create a JIRA version to correspond to the release _following_ the one you are managing. This is so that folks can continue to work on things that won't make it into the in-progress release while we evaluate candidates. +Finally, you should create a JIRA version that matches the release _following_ the one you are managing. This action is so that folks can continue to work on things that won't make it into the in-progress release while we evaluate candidates. 1. Browse to the ASF JIRA project management page for versions: https://issues.apache.org/jira/plugins/servlet/project-config/YETUS/versions -1. Fill in a version one minor version up from the release you're managing. E.g. when managing the 0.7.0 release, fill in 0.3.0. +1. Fill in a version one minor version up from the release you're managing. E.g., when managing the 0.7.0 release, fill in 0.3.0. 1. Set a start date of today. 1. Click "Add" ### Work in Git -Once you have a issue to track things, you can create the git branch for staging our release. This seperate branch will allow you to polish the release while regular work continues on the master branch. You will need to update master for the next SNAPSHOT version and the branch for the release. +Once you have an issue to track things, you can create the git branch for staging our release. This separate branch will allow you to polish the release while regular work continues on the master branch. You will need to update master for the next SNAPSHOT version and the branch for the release. Example commands, presuming the release under management is **0.7.0** and the JIRA issue is **YETUS-XXX**: @@ -117,7 +127,7 @@ Fast-forwarded master to origin/master. $ git status # On branch master nothing to commit (working directory clean) -$ # create branch and push without changes +$ # create a branch and push without changes $ git checkout -b YETUS-XXX Switched to a new branch 'YETUS-XXX' $ git push origin YETUS-XXX @@ -136,7 +146,7 @@ yetus-maven-plugin/pom.xml yetus-minimaven-plugin/pom.xml ``` -At this point you should edit the aforementioned files so they have the version we expect upon a successful release. Search for instances of *VERSION-SNAPSHOT* and replace with *VERSION*; e.g. *0.7.0-SNAPSHOT* should become *0.7.0*: +At this point, you should edit the files mentioned above. They must have the version we expect upon a successful release. Search for instances of *VERSION-SNAPSHOT* and replace with *VERSION*; e.g., *0.7.0-SNAPSHOT* should become *0.7.0*: ``` $ perl -pi -e 's,0.7.0-SNAPSHOT,0.7.0,g' $(find . -type f) @@ -164,7 +174,7 @@ yetus-maven-plugin/pom.xml yetus-minimaven-plugin/pom.xml ``` -Now update these files, but this time you should update them for the next minor version's SNAPSHOT. e.g. *0.7.0-SNAPSHOT* should become *0.8.0-SNAPSHOT*: +Now update these files, but this time you should update them for the next minor version's SNAPSHOT. e.g., *0.7.0-SNAPSHOT* should become *0.8.0-SNAPSHOT*: ``` @@ -179,20 +189,20 @@ $ git commit -m "YETUS-XXX. bump master version to 0.8.0-SNAPSHOT" $ git format-patch --stdout origin/master > path/to/patches/YETUS-XXX.1.patch ``` -Both of these patch files should be uploaded to your release issue for review. Once the patches get approval push them to the repository. +Both of these patch files should be uploaded to your release issue for review. Push them to the repository once the patches get approval. ## Release Candidate(s) Depending on how candidate evaluation goes, you may end up performing these steps multiple times. Before you start, you'll need to decide when you want each candidate's vote thread to end. ASF policy requires a minimum voting period of 72 hours (ref [ASF Voting Policy](https://www.apache.org/foundation/voting.html)), so you should ensure enough padding to complete the candidate generation process in time. Ideally, you would plan to post the vote thread on a Friday morning (US time) with a closing date on Monday morning (US time). -1. Update JIRA version release date. Browse to the JIRA project version management page (https://issues.apache.org/jira/plugins/servlet/project-config/YETUS/versions) and set the release date to when you expect your next vote thread to close. This date will be used by our generated release notes. -1. Update your `${HOME}/.m2/settings.xml` file to include the Maven snapshot information as indicated on http://www.apache.org/dev/publishing-maven-artifacts.html +1. Update JIRA version release date. Browse to the JIRA project version management page (https://issues.apache.org/jira/plugins/servlet/project-config/YETUS/versions) and set the release date to when you expect your next vote thread to close. Our generated release notes will use this date. +1. Update your `${HOME}/.m2/settings.xml` file to include the Maven snapshot information as indicated on https://www.apache.org/dev/publishing-maven-artifacts.html 1. Build release artifacts. You should use our convenience script to create the tarballs and markdown documents for a release. Run the following from the release staging branch and inspect the results: $ mvn --batch-mode clean install -Papache-release $ mvn --batch-mode site $ ls -lah yetus-dist/target/artifacts/* -1. Check out the staging area for release candidates and make a directory for this candidate, somewhere outside of the your working directory. Copy the artifacts (**except the site.tar.gz**) from the previous step into place. For example, when working on RC1 for the 0.7.0 release +1. Check out the staging area for release candidates and make a directory for this candidate, somewhere outside of your working directory. Copy the artifacts (**except for the site.tar.gz**) from the previous step into place. For example, when working on RC1 for the 0.7.0 release $ svn co https://dist.apache.org/repos/dist/dev/yetus/ yetus-dist-dev $ cd yetus-dist-dev @@ -212,9 +222,9 @@ Depending on how candidate evaluation goes, you may end up performing these step $ cd .. $ svn add 0.7.0-RC1 $ svn commit -m "stage Apache Yetus 0.7.0-RC1" -Afterwards, the artifacts should be visible via the web under the same URL used when checking out. In the case of 0.7.0-RC1: https://dist.apache.org/repos/dist/dev/yetus/0.7.0-RC1/ -1. Examine staged maven build. Go to the [ASF repository](http://repository.apache.org/) and log in with your asf LDAP credentials. Look for the staging repository with a name that includes "yetus". Clicking on it will give you a link to an "Open" repository. You can examine the structure in the Nexus API while you're logged in. If it looks essentially correct, "Close" the repository. Refreshing and clicking on the repository will give you a link in the Summary tab that other folks can use to interact with the repository. -1. Call a vote on the release candidate. At this point you have everything you need to call a vote. Your vote thread must contain "[VOTE]" in the subject line, a link to the candidate staging area you created, a source repository commit hash, and voting rules. It should also contain hashes for the artifacts. Here is an example draft for 0.7.0-RC1, update it as appropriate for your release: +Afterward, the artifacts should be visible via the web under the same URL used when checking out. In the case of 0.7.0-RC1: https://dist.apache.org/repos/dist/dev/yetus/0.7.0-RC1/ +1. Examine staged maven build. Go to the [ASF repository](https://repository.apache.org/) and log in with your asf LDAP credentials. Look for the staging repository with a name that includes "yetus". Clicking on it will give you a link to an "Open" repository. You can examine the structure in the Nexus API while you're logged in. If it looks essentially correct, "Close" the repository. Refreshing and clicking on the repository will give you a link in the Summary tab that other folks can use to interact with the repository. +1. Call a vote on the release candidate. At this point, you have everything you need to call a vote. Your vote thread must contain "[VOTE]" in the subject line, a link to the candidate staging area you created, a source repository commit hash, and voting rules. It should also contain hashes for the artifacts. Here is an example draft for 0.7.0-RC1, update it as appropriate for your release: Subject: [VOTE] Apache Yetus 0.7.0-RC1 @@ -231,10 +241,10 @@ Afterwards, the artifacts should be visible via the web under the same URL used Source repository commit: 1e8f4588906a51317207092bd97b35687f2e3fa3 Maven staging repository: https://repository.apache.org/content/repositories/orgapacheyetus-1011 - Our KEYS file is at: https://dist.apache.org/repos/dist/release/yetus/KEYS + Our KEYS file is at: https://www.apache.org/dist/yetus/KEYS All artifacts are signed with my key (DEADBEEF) - JIRA version: http://s.apache.org/yetus-0.7.0-jira + JIRA version: https://s.apache.org/yetus-0.7.0-jira Please take a few minutes to verify the release[1] and vote on releasing it: @@ -242,26 +252,26 @@ Afterwards, the artifacts should be visible via the web under the same URL used [ ] +0 no opinion [ ] -1 Do not release this package because... - Vote will be subject to Majority Approval[2] and will close at 8:00PM + The vote will be subject to Majority Approval[2] and will close at 8:00 PM UTC on Monday, Xxx XXth, 2018[3]. - [1]: http://www.apache.org/info/verification.html + [1]: https://www.apache.org/info/verification.html [2]: https://www.apache.org/foundation/glossary.html#MajorityApproval [3]: to find this in your local timezone see: - http://s.apache.org/yetus-0.7.0-rc1-close + https://s.apache.org/yetus-0.7.0-rc1-close That final short link should point to some online timezone conversion utility. ASF votes often use timeanddate.com's Event Time Announcer: http://www.timeanddate.com/worldclock/fixedform.html. 1. Close the vote after the deadline. Once the deadline in the vote thread passes, tally the vote and post a suitable response that changes the subject line to start with "[RESULT]". If the vote failed, ensure there are issues in JIRA for any problems brought up. When they are closed, repeat the steps for creating a release candidate. If the vote passed, proceed to the [Cleanup section](#cleanup) ## Verification -You are free to make whatever checks of our release candidate artifacts suit your use, but before voting there are certain checks you must perform according to ASF policy. This section will walk you through the required checks and give some guidelines on additional checks you may find useful. Besides the fact that downloading the release artifacts must happen first, generally you can perform these in any order that suites you. +You are free to make whatever checks of our release candidate artifacts suit your use, but before voting, there are certain checks you must perform according to ASF policy. This section will walk you through the required checks and give some guidelines on additional checks you may find useful. Besides the fact that downloading the release artifacts must happen first, generally, you can perform these in any order that suits you. ### Download release artifacts You will need to download the release candidate files, include the artifacts and accompanying signatures and checksum files. The directory containing them should be in the [VOTE] thread. You can use wget or a similar tool to recursively grab all the files rather than download them one at a time. If you are not familiar with wget, it will create a nested set of directories based on the structure of the hosting site for release candidates. -For example, if we use the url from our exemplar VOTE email, the process would look like this: +For example, if we use the URL from our exemplar VOTE email, the process would look like this: $ wget --recursive --no-parent --quiet 'https://dist.apache.org/repos/dist/dev/yetus/0.7.0-RC1/' $ find dist.apache.org/ -type f @@ -285,7 +295,7 @@ For example, if we use the url from our exemplar VOTE email, the process would l dist.apache.org//repos/dist/dev/yetus/0.7.0-RC1/apache-yetus-0.7.0-src.tar.gz.mds dist.apache.org//robots.txt -Lastly, if you haven't verified a release before you'll need to download and import the public keys for the project's release managers. This is the KEYS file that should have been mentioned in the [VOTE] thread. The specific output of the follow commands will vary depending on how many release mangers there have been and which keys, if any, you have previously imported. +Lastly, if you haven't verified a release before, you'll need to download and import the public keys for the project's release managers. The public keys are located in the KEYS file that should have been mentioned in the [VOTE] thread announcement. The specific output of the following commands will vary depending on how many release managers there have been and which keys, if any, you have previously imported. $ curl --output KEYS.yetus --silent 'https://www.apache.org/dist/yetus/KEYS' $ gpg --import KEYS.yetus @@ -295,15 +305,15 @@ Lastly, if you haven't verified a release before you'll need to download and imp ### ASF required checks -ASF policies require that binding votes on releases be cast only after verifying proper licensing and provenance. For specific details, you should read the [ASF Release Policy's section entitled What Must Every ASF Release Contain?](http://www.apache.org/dev/release.html#what-must-every-release-contain) as well as the informational page [What We Sign](http://www.apache.org/info/verification.html). The following is a non-normative set of guidelines. +ASF policies require that binding votes on releases be cast only after verifying proper licensing and provenance. For specific details, you should read the [ASF Release Policy's section entitled What Must Every ASF Release Contain?](https://www.apache.org/dev/release.html#what-must-every-release-contain) as well as the informational page [What We Sign](https://www.apache.org/info/verification.html). The following is a non-normative set of guidelines. -1. You MUST make sure each of the signatures match. For example, using gpg and taking a fictional source artifact: +1. You MUST make sure each of the signatures matches. For example, using gpg and taking a fictional source artifact: $ cd dist.apache.org/repos/dist/dev/yetus/0.7.0-RC1/ $ gpg --verify apache-yetus-0.7.0-src.tar.gz.asc apache-yetus-0.7.0-src.tar.gz gpg: Signature made Fri Dec 11 11:50:56 2015 CST using RSA key ID 0D80DB7C gpg: Good signature from "Sean Busbey (CODE SIGNING KEY) " -As noted in the informational page [What We Sign](http://www.apache.org/info/verification.html), if you don't have the signer's key in your web of trust the output of the verify command will point this out. You should refer to it for guidance. +As noted in the informational page [What We Sign](https://www.apache.org/info/verification.html), if you don't have the signer's key in your web of trust the output of the verify command will point this out. You should refer to it for guidance. 1. You MUST make sure the provided hashes match the provided artifact. @@ -314,11 +324,11 @@ As noted in the informational page [What We Sign](http://www.apache.org/info/ver 1. You MUST make sure artifacts abide by the ASF Licensing Policy. You should read through [the ASF Licensing Policy](https://www.apache.org/legal/resolved), especially if your vote will be binding. As a quick guide: * our software must be under the Apache Software License version 2.0 and this must be noted with a proper LICENSE and NOTICE file in each artifact that can hold them. - * our source code must meet the ASF policy on proper license notifications. Read the ASF Legal Committee's [Source Header Licensing Guide](http://apache.org/legal/src-headers.html) - * our LICENSE and NOTICE files must properly propogate licensing information for bundled products. The [Foundation's Licensing HOWTO Guide](http://www.apache.org/dev/licensing-howto.html) provides guidance on how these files should be maintained. + * our source code must meet the ASF policy on proper license notifications. Read the ASF Legal Committee's [Source Header Licensing Guide](https://apache.org/legal/src-headers.html) + * our LICENSE and NOTICE files must correctly propagate licensing information for bundled products. The [Foundation's Licensing HOWTO Guide](https://www.apache.org/dev/licensing-howto.html) provides guidance on how these files should be maintained. * our software must only bundle compatibly licensed products; read [the Licensing Policy's Category A list for compatible licenses](https://www.apache.org/legal/resolved#category-a). - * our software may only have a run time dependency on a product with a prohibit license if its use is optional; read [the Licensing Policy's Category X list for prohibited licenses](https://www.apache.org/legal/resolved#category-x) and [the Licensing Policy's explanation of optional runtime dependencies](https://www.apache.org/legal/resolved#optional). -1. You SHOULD make sure the source release artifact corresponds to the referenced commit hash in the [VOTE] thread. (This ASF policy is currently in DRAFT status.) Our eventual release tag is how we'll provide long term provinence information for our downstream users. Since the release's source code artifact will be the canonical represenation of the release we vote on, it's important that it match the contents of the version control system's tag. Given our example above, you can check this with recursive diff. + * our software may only have a runtime dependency on a product with a prohibit license if its use is optional; read [the Licensing Policy's Category X list for prohibited licenses](https://www.apache.org/legal/resolved#category-x) and [the Licensing Policy's explanation of optional runtime dependencies](https://www.apache.org/legal/resolved#optional). +1. You SHOULD make sure the source release artifact corresponds to the referenced commit hash in the [VOTE] thread. (This ASF policy is currently in DRAFT status.) The release tag is how we'll provide long-term provenance information for our downstream users. Since the release's source code artifact will be the canonical representation of the release we vote on, it is essential that it matches the contents of the version control system's tag. Given our example above, you can check this with recursive diff. $ mkdir apache-yetus-0.7.0-src_unpack $ tar -C apache-yetus-0.7.0-src_unpack -xzf apache-yetus-0.7.0-src.tar.gz @@ -326,7 +336,7 @@ As noted in the informational page [What We Sign](http://www.apache.org/info/ver $ diff -r apache-yetus-0.7.0-RC1-tag apache-yetus-0.7.0-src_unpack/yetus-0.7.0 $ echo $? 0 -1. You MUST make sure any non-source artifacts can be derived from the source artifact. Since the source artifact is the canonical representation of our release, any other artifacts we distribute must be just for the convenience of our downstream users. As such, one must be able to derive them from the source artifact. Currently, you can generate all of the artifacts we distribute for convenience using the same build helper script used to create the release artifacts. +1. You MUST make sure any non-source artifacts can be derived from the source artifact. Since the source artifact is the canonical representation of our release, any other artifacts we distribute must be just for the convenience of our downstream users. As such, one must be able to derive them from the source artifact. Currently, you can generate all of the artifacts we distribute for convenience using the same commands used to create the release artifacts. $ mkdir apache-yetus-0.7.0-src_unpack $ tar -C apache-yetus-0.7.0-src_unpack -xzf apache-yetus-0.7.0-src.tar.gz @@ -336,7 +346,7 @@ This will create a yetus-dist/target/ directory that contains the tarball binary ### Community recommended checks -If you've gone through all of the ASF required checks, you'll already have made use of both the shelldocs and releaddocmaker components and confirmed that the compilable components successfully compile. +If you've gone through all of the ASF required checks, you'll already have made use of both the shelldocs and releasedocmaker components and confirmed that the compilable components successfully compile. 1. Test Precommit. The smart-apply-patch and test-patch scripts don't get flexed as a part of the above candidate verification. If you have a downstream project you regularly use, it should suffice to attempt local verification of a contribution. If that project happens to be an ASF project with an example personality, this should be as simple as finding an issue in patch-available status. @@ -453,9 +463,9 @@ If you've gone through all of the ASF required checks, you'll already have made Once a release candidate obtains majority approval from the PMC, there are several final maintenance tasks you must perform to close out the release. -1. Create short cut links to the vote thread (e.g., http://s.apache.org/yetus-0.7.0-rc1-vote) and the result (e.g., http://s.apache.org/yetus-0.7.0-vote-passes) that point to the archives on mail-archives.apache.org. Be aware that it may take several hours for the archive to get the posts that need to be referenced. +1. Create shortcut links to the vote thread (e.g., https://s.apache.org/yetus-0.7.0-rc1-vote) and the result (e.g., https://s.apache.org/yetus-0.7.0-vote-passes) that point to the archives on mail-archives.apache.org. Be aware that it may take several hours for the archive to get the posts that need to be referenced. -1. Produce a signed release tag. You should create a signed tag and push it to the asf repo. The tag's message should include an asf-shortened links to the vote and results. It should be named 'rel/_version_' so that it will be immutable due to ASF infra's git configuration. Presuming we're working on the 0.7.0 release and the RC1 example above has passed: +1. Produce a signed release tag. You should create a signed tag and push it to the asf repo. The tag's message should include ASF-shortened links to the vote and results. It should be named 'rel/_version_' so that it will be immutable due to ASF infra's git configuration. Presuming we're working on the 0.7.0 release and the RC1 example above has passed: $ git config --global user.signingkey # if you've never configured $ git tag --sign rel/0.7.0 1e8f4588906a51317207092bd97b35687f2e3fa3 @@ -463,13 +473,13 @@ Example commit message: YETUS-XXX. tag Apache Yetus 0.7.0 release. - vote thread: http://s.apache.org/yetus-0.7.0-rc1-vote + vote thread: https://s.apache.org/yetus-0.7.0-rc1-vote - results: http://s.apache.org/yetus-0.7.0-vote-passes + results: https://s.apache.org/yetus-0.7.0-vote-passes Then push: $ git push origin rel/0.7.0 -1. Move release artifacts to the distribution area. The release officially happens once the artifacts are pushed to the ASF distribution servers. From this server, the artifacts will automatically be copied to the long-term archive as well as the various mirrors that will be used by downstream users. These must be _exactly_ the artifacts from the RC that passed. Please note that currently only Yetus PMC members have write access to this space. If you are not yet on the PMC, please ask the PMC to post the artifacts. +1. Move release artifacts to the distribution area. The release officially happens once the artifacts are pushed to the ASF distribution servers. From this server, the artifacts will automatically be copied to the long-term archive as well as the various mirrors that will be used by downstream users. These must be _exactly_ the artifacts from the RC that passed. Please note that currently, only Yetus PMC members have write access to this space. If you are not yet on the PMC, please ask the PMC to post the artifacts. $ svn co https://dist.apache.org/repos/dist/release/yetus/ yetus-dist-release $ cd yetus-dist-release @@ -478,7 +488,7 @@ Then push: $ svn add 0.7.0 $ svn commit -m "Publish Apache Yetus 0.7.0" It may take up to 24 hours for the artifacts to make their way to the various mirrors. You should not announce the release until after this period. -1. Add the release to the ASF reporter tool. To make our project reports for the ASF Board easier, you should include the release in the [Apache Committee Report Helper website](https://reporter.apache.org/addrelease.html?yetus). Be sure to use the date release artifacts first were pushed to the distribution area, which should be the same release date as in JIRA. Note that this website is only available to PMC members. If you are not yet in the PMC, please ask them to add the release information. +1. Add the release to the ASF reporter tool. To make our project reports for the ASF Board easier, you should include the release in the [Apache Committee Report Helper website](https://reporter.apache.org/addrelease.html?yetus). Be sure to use the date release artifacts first were pushed to the distribution area, which should be the same release date as in JIRA. Note that this website is only available to PMC members. If you are not yet in the PMC, please ask them to add the release information. 1. Remove candidates from the staging area. Once you have moved the artifacts into the distribution area, they no longer need to be in the staging area and should be cleaned up as a courtesy to future release managers. $ svn co https://dist.apache.org/repos/dist/dev/yetus/ yetus-dist-dev @@ -506,15 +516,15 @@ It may take up to 24 hours for the artifacts to make their way to the various mi Committed revision 1772. 1. Resolve release issue; it should be marked as "fixed." -1. Go to the [ASF repository](http://repository.apache.org/) and click 'Release' to put the RC Maven artifacts into the release repository. -1. Mark JIRA version as released. Browse to the [project version management page for the YETUS JIRA tracker](https://issues.apache.org/jira/plugins/servlet/project-config/YETUS/versions). Mouse over the version you are managing, click on the gear in the far right, and select Release. +1. Go to the [ASF repository](https://repository.apache.org/) and click 'Release' to put the RC Maven artifacts into the release repository. +1. Mark JIRA version as released. Browse to the [project version management page for the YETUS JIRA tracker](https://issues.apache.org/jira/plugins/servlet/project-config/YETUS/versions). Mouse over the version you are managing, click on the gear in the far right and select Release. 1. Delete staging branch. Now that there is an immutable tag for the release, all commits leading up to that release will be maintained by git. Should we need a future maintenance release after this version, we can reestablish the branch based off of the release tag. $ git push origin :YETUS-XXX 1. Update the Mac OS X Homebrew Formula: $ vim Formula/yetus.rb - $ # change URL point to new version + $ # change URL point to the new version $ # update the sha256. e.g., shasum -a 256 bin.gz 1. Update the documentation in the git master branch for the new release. Due to some limitations in our website rendering library, this currently involves some extra symlinks (see YETUS-192). 1. You should update the documentation in the git master branch. Remove the oldest release and add the latest. @@ -537,8 +547,8 @@ Example commit message: You should then post this patch for review. Once you've gotten feedback, it's fine to push the patch to the ASF git repo immediately so long as the updated website is not published. 1. Publish website updates. After the 24 hour window needed for the release artifacts to make their way to the variety of mirrors, you should render the website and publish it using the instructions found in [Maintaining the Yetus Website](../website). -1. Remove old releases from distribution area. The ASF distribution area should only contain the most recent release for actively developed branches If your release is a maintenance release, delete the prior release. If your release marks the end of maintanence for an earlier minor or major release line, you should delete those versions from the distribution area. -1. Publish convenience artifacts (maven, homebrew, etc). Specifics to be documented later; see [YETUS-316](https://issues.apache.org/jira/browse/YETUS-316). +1. Remove old releases from the distribution area. The ASF distribution area should only contain the most recent release for actively developed branches If your release is a maintenance release, delete the prior release. If your release marks the end of maintenance for an earlier minor or major release line, you should delete those versions from the distribution area. +1. Publish convenience artifacts (maven, homebrew, etc.). Specifics to be documented later; see [YETUS-316](https://issues.apache.org/jira/browse/YETUS-316). 1. Draft an announcement email. The announcement email should briefly describe our project and provide links to our artifacts and documentation. For example, Subject: [ANNOUNCE] Apache Yetus 0.7.0 release @@ -551,7 +561,7 @@ You should then post this patch for review. Once you've gotten feedback, it's fi and release processes for software projects. It provides a robust system for automatically checking new contributions against a variety of community accepted requirements, the means to document a well defined supported - interface for downstream projects, and tooling to help release managers + interface for downstream projects, and tools to help release managers generate release documentation based on the information provided by community issue trackers and source repositories. @@ -560,13 +570,15 @@ You should then post this patch for review. Once you've gotten feedback, it's fi work over the last X months. - To download please choose a mirror by visiting: + To download, please choose a mirror by visiting: https://yetus.apache.org/downloads/ The relevant checksums files are available at: + https://www.apache.org/dist/yetus/0.7.0/apache-yetus-0.7.0-src.tar.gz.sha512 https://www.apache.org/dist/yetus/0.7.0/apache-yetus-0.7.0-src.tar.gz.mds + https://www.apache.org/dist/yetus/0.7.0/apache-yetus-0.7.0-bin.tar.gz.sha512 https://www.apache.org/dist/yetus/0.7.0/apache-yetus-0.7.0-bin.tar.gz.mds Project member signature keys can be found at @@ -598,10 +610,10 @@ You should then post this patch for review. Once you've gotten feedback, it's fi Meg Smith Apache Yetus PMC If you'd like feedback on the draft, feel free to post it for review on your release issue. -1. Send announcement emails. After the 24 hour window needed for the release artifacts to make their way to the variety of mirrors, you should send the announcement email. The email should come from your apache.org email address and at a minimum should go to the dev@yetus.apache.org and announce@apache.org lists. For details see [the ASF Release Policy section How Should Releases Be Announced?](http://www.apache.org/dev/release.html#release-announcements). Additionally, you may want to send the announcement to the development lists of downstream projects we know are using Yetus components. +1. Send announcement emails. After the 24 hour window needed for the release artifacts to make their way to the variety of mirrors, you should send the announcement email. The email should come from your apache.org email address and at a minimum should go to the dev@yetus.apache.org and announce@apache.org lists. For details see [the ASF Release Policy section How Should Releases Be Announced?](https://www.apache.org/dev/release.html#release-announcements). Additionally, you may want to send the announcement to the development lists of downstream projects we know are using Yetus components. 1. Send tweet. Once the message to the ASF-wide announce list has made it to the public archive, you should draft a tweet with a link to the announcement. You should use the ASF link shortener and a descriptive name. For example, the 0.7.0 release could use Apache Yetus 0.7.0 has been released: - http://s.apache.org/yetus-0.7.0-announce -This tweet should come from the offical [@ApacheYetus](https://twitter.com/ApacheYetus/) account. Currently only PMC members have access to it. If you are not yet on the PMC, please ask for the PMC to post the tweet once your email is available in the archives. + https://s.apache.org/yetus-0.7.0-announce +This tweet should come from the official [@ApacheYetus](https://twitter.com/ApacheYetus/) account. Currently, only PMC members have access to it. If you are not yet on the PMC, please ask for the PMC to post the tweet once your email is available in the archives. diff --git a/audience-annotations-component/audience-annotations-jdiff/pom.xml b/audience-annotations-component/audience-annotations-jdiff/pom.xml index f45aedccb..f98991949 100644 --- a/audience-annotations-component/audience-annotations-jdiff/pom.xml +++ b/audience-annotations-component/audience-annotations-jdiff/pom.xml @@ -42,7 +42,7 @@ jdiff jdiff - 1.0.9 + ${jdiff.version} provided true @@ -73,7 +73,6 @@ org.apache.maven.plugins maven-assembly-plugin - ${maven-assembly-plugin.version} dist diff --git a/audience-annotations-component/audience-annotations/pom.xml b/audience-annotations-component/audience-annotations/pom.xml index 8a1f130a7..2af804854 100644 --- a/audience-annotations-component/audience-annotations/pom.xml +++ b/audience-annotations-component/audience-annotations/pom.xml @@ -69,7 +69,6 @@ org.apache.maven.plugins maven-assembly-plugin - ${maven-assembly-plugin.version} dist diff --git a/pom.xml b/pom.xml index 50717c5fd..334c8079b 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ org.apache apache - 18 + 21 @@ -50,28 +50,24 @@ 3.2.0 3.2 - 3.2.1 - 1.7 - 1.7 - 1.7 - 1.0-beta-5 + 3.5.4 + 1.8 + 1.8 + 1.8 + 1.0-beta-9 - 0.12 3.0.0 - 8.3 + 8.14 2.6 - 0.2 1.6.0 - 1.8 - 3.1.0 - 2.17 - 3.0.0 - 3.0.2 - 2.8.2 - 3.0.0-M1 - 2.9 - 3.0.2 - 3.1.0-RC7 + 1.0.9 + 2.0 + 2.7.1 + 3.0.0 + 3.0.0 + 3.1.7 + + source-release-tar @@ -82,7 +78,7 @@ JIRA - http://issues.apache.org/jira/browse/YETUS + https://issues.apache.org/jira/browse/YETUS @@ -90,31 +86,22 @@ + + org.codehaus.mojo + exec-maven-plugin + ${exec-maven-plugin.version} + + com.github.spotbugs spotbugs-maven-plugin ${spotbugs-maven-plugin.version} - - org.apache.maven.plugins - maven-antrun-plugin - ${maven-antrun-plugin.version} - - - - org.apache.maven.plugins - maven-assembly-plugin - ${maven-assembly-plugin.version} - - gnu - - org.apache.maven.plugins maven-checkstyle-plugin - ${maven-checkstyle-plugin.version} com.puppycrawl.tools @@ -142,42 +129,11 @@ maven-clean-plugin - ${maven-clean-plugin.version} false - - org.apache.maven.plugins - maven-dependency-plugin - ${maven-dependency-plugin.version} - - - - org.apache.maven.plugins - maven-deploy-plugin - ${maven-deploy-plugin.version} - - - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - ${maven-project-info-reports-plugin.version} - - - - org.apache.maven.plugins - maven-resources-plugin - ${maven-resources-plugin.version} - - - - org.codehaus.mojo - exec-maven-plugin - ${exec-maven-plugin.version} - @@ -267,21 +218,21 @@ - jdk1.7 + gpg2 - 1.7 + false - - - - jdk.tools - jdk.tools - 1.7 - system - ${java.home}/../lib/tools.jar - - - + + + + org.apache.maven.plugins + maven-gpg-plugin + + gpg2 + + + + jdk1.8 @@ -317,7 +268,6 @@ org.apache.maven.plugins maven-javadoc-plugin - ${maven-javadoc-plugin.version} false diff --git a/precommit/src/main/shell/test-patch-docker/Dockerfile b/precommit/src/main/shell/test-patch-docker/Dockerfile index 2341dcfc1..31f9f3bda 100644 --- a/precommit/src/main/shell/test-patch-docker/Dockerfile +++ b/precommit/src/main/shell/test-patch-docker/Dockerfile @@ -25,6 +25,9 @@ FROM ubuntu:xenial +## NOTE to committers: if this gets moved from Xenial to something else, be +## sure to also fix the gpg link in asf-site-src as appropriate + WORKDIR /root SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -37,9 +40,7 @@ ENV DEBCONF_TERSE true RUN apt-get -q update && apt-get -q install --no-install-recommends -y \ curl \ git \ - gnupg-agent \ locales \ - pinentry-curses \ pkg-config \ rsync \ software-properties-common \ diff --git a/releasedocmaker/pom.xml b/releasedocmaker/pom.xml index 0c3891922..75d541ddb 100644 --- a/releasedocmaker/pom.xml +++ b/releasedocmaker/pom.xml @@ -37,7 +37,7 @@ org.scijava jython-shaded - 2.7.1 + ${jython-shaded.version} @@ -126,7 +126,7 @@ net.sf.mavenjython jython-compile-maven-plugin - 2.0 + ${jython-compile-maven-plugin.version} package diff --git a/shelldocs/pom.xml b/shelldocs/pom.xml index 81b1efe66..c5c3ec351 100644 --- a/shelldocs/pom.xml +++ b/shelldocs/pom.xml @@ -37,7 +37,7 @@ org.scijava jython-shaded - 2.7.1 + ${jython-shaded.version} @@ -54,7 +54,7 @@ net.sf.mavenjython jython-compile-maven-plugin - 2.0 + ${jython-compile-maven-plugin.version} package diff --git a/yetus-dist/pom.xml b/yetus-dist/pom.xml index 5fa05a822..680d3d257 100644 --- a/yetus-dist/pom.xml +++ b/yetus-dist/pom.xml @@ -152,7 +152,7 @@ - + pre-site-dist pre-site @@ -270,4 +270,41 @@ + + + apache-release + + false + + + + + maven-dependency-plugin + + + src-copy + generate-sources + + copy + + + + + ${project.groupId} + yetus-project + source-release + ${project.version} + tar.gz + ${project.build.directory}/artifacts + apache-yetus-${project.version}-src.tar.gz + + + + + + + + + + diff --git a/yetus-maven-plugin/pom.xml b/yetus-maven-plugin/pom.xml index 61db2d5d4..13072d476 100644 --- a/yetus-maven-plugin/pom.xml +++ b/yetus-maven-plugin/pom.xml @@ -101,7 +101,6 @@ org.apache.maven.plugins maven-assembly-plugin - ${maven-assembly-plugin.version} create-internal-zip