Repository: hadoop Updated Branches: refs/heads/HADOOP-12111 0a607a24c -> dcde7e4a2
HADOOP-12127. some personalities are still using releaseaudit instead of asflicense (aw) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/76ce1ce7 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/76ce1ce7 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/76ce1ce7 Branch: refs/heads/HADOOP-12111 Commit: 76ce1ce73b2df077a64db8f848443094460ae534 Parents: 0a607a2 Author: Allen Wittenauer <[email protected]> Authored: Mon Jul 6 15:47:32 2015 -0700 Committer: Allen Wittenauer <[email protected]> Committed: Mon Jul 6 15:47:32 2015 -0700 ---------------------------------------------------------------------- dev-support/personality/flink.sh | 2 +- dev-support/personality/hadoop.sh | 2 +- dev-support/personality/hbase.sh | 2 +- dev-support/personality/tajo.sh | 2 +- dev-support/personality/tez.sh | 2 +- dev-support/test-patch.d/apache-rat.sh | 84 ----------------------------- dev-support/test-patch.d/asflicense.sh | 84 +++++++++++++++++++++++++++++ 7 files changed, 89 insertions(+), 89 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/76ce1ce7/dev-support/personality/flink.sh ---------------------------------------------------------------------- diff --git a/dev-support/personality/flink.sh b/dev-support/personality/flink.sh index a32e2d6..de2a0f1 100755 --- a/dev-support/personality/flink.sh +++ b/dev-support/personality/flink.sh @@ -113,7 +113,7 @@ function personality_modules fi return ;; - releaseaudit) + asflicense) # this is very fast and provides the full path if we do it from # the root of the source personality_enqueue_module . http://git-wip-us.apache.org/repos/asf/hadoop/blob/76ce1ce7/dev-support/personality/hadoop.sh ---------------------------------------------------------------------- diff --git a/dev-support/personality/hadoop.sh b/dev-support/personality/hadoop.sh index 059d051..7722afb 100755 --- a/dev-support/personality/hadoop.sh +++ b/dev-support/personality/hadoop.sh @@ -183,7 +183,7 @@ function personality_modules return fi ;; - releaseaudit) + asflicense) # this is very fast and provides the full path if we do it from # the root of the source personality_enqueue_module . http://git-wip-us.apache.org/repos/asf/hadoop/blob/76ce1ce7/dev-support/personality/hbase.sh ---------------------------------------------------------------------- diff --git a/dev-support/personality/hbase.sh b/dev-support/personality/hbase.sh index 46ad390..d8ca901 100755 --- a/dev-support/personality/hbase.sh +++ b/dev-support/personality/hbase.sh @@ -50,7 +50,7 @@ function personality_modules fi return ;; - releaseaudit) + asflicense) # this is very fast and provides the full path if we do it from # the root of the source personality_enqueue_module . -DHBasePatchProcess http://git-wip-us.apache.org/repos/asf/hadoop/blob/76ce1ce7/dev-support/personality/tajo.sh ---------------------------------------------------------------------- diff --git a/dev-support/personality/tajo.sh b/dev-support/personality/tajo.sh index 719bada..56e5442 100755 --- a/dev-support/personality/tajo.sh +++ b/dev-support/personality/tajo.sh @@ -40,7 +40,7 @@ function personality_modules fi return ;; - releaseaudit) + asflicense) # this is very fast and provides the full path if we do it from # the root of the source personality_enqueue_module . http://git-wip-us.apache.org/repos/asf/hadoop/blob/76ce1ce7/dev-support/personality/tez.sh ---------------------------------------------------------------------- diff --git a/dev-support/personality/tez.sh b/dev-support/personality/tez.sh index 77ad624..1d6a227 100755 --- a/dev-support/personality/tez.sh +++ b/dev-support/personality/tez.sh @@ -40,7 +40,7 @@ function personality_modules fi return ;; - releaseaudit) + asflicense) # this is very fast and provides the full path if we do it from # the root of the source personality_enqueue_module . http://git-wip-us.apache.org/repos/asf/hadoop/blob/76ce1ce7/dev-support/test-patch.d/apache-rat.sh ---------------------------------------------------------------------- diff --git a/dev-support/test-patch.d/apache-rat.sh b/dev-support/test-patch.d/apache-rat.sh deleted file mode 100755 index 27349bf..0000000 --- a/dev-support/test-patch.d/apache-rat.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/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 [[ ${BUILDTOOL} == maven - || ${BUILDTOOL} == ant ]]; then - add_plugin asflicense - add_test asflicense -fi - -## @description Verify all files have an Apache License -## @audience private -## @stability evolving -## @replaceable no -## @return 0 on success -## @return 1 on failure -function asflicense_postapply -{ - local numpatch - - big_console_header "Determining number of patched ASF License errors" - - start_clock - - personality_modules patch asflicense - case ${BUILDTOOL} in - maven) - modules_workers patch asflicense apache-rat:check - ;; - ant) - modules_workers patch asflicense releaseaudit - ;; - *) - return 0 - ;; - esac - - # RAT fails the build if there are license problems. - # so let's take advantage of that a bit. - if [[ $? == 0 ]]; then - add_vote_table 1 asflicense "Patch does not generate ASF License warnings." - return 0 - fi - - #shellcheck disable=SC2038 - find "${BASEDIR}" -name rat.txt -o -name releaseaudit_report.txt \ - | xargs cat > "${PATCH_DIR}/patch-asflicense.txt" - - if [[ -s "${PATCH_DIR}/patch-asflicense.txt" ]] ; then - numpatch=$("${GREP}" -c '\!?????' "${PATCH_DIR}/patch-asflicense.txt") - echo "" - echo "" - echo "There appear to be ${numpatch} ASF License warnings after applying the patch." - if [[ -n ${numpatch} - && ${numpatch} -gt 0 ]] ; then - add_vote_table -1 asflicense "Patch generated ${numpatch} ASF License warnings." - - echo "Lines that start with ????? in the ASF License "\ - "report indicate files that do not have an Apache license header:" \ - > "${PATCH_DIR}/patch-asflicense-problems.txt" - - ${GREP} '\!?????' "${PATCH_DIR}/patch-asflicense.txt" \ - >> "${PATCH_DIR}/patch-asflicense-problems.txt" - - add_footer_table asflicense "@@BASE@@/patch-asflicense-problems.txt" - fi - else - # if we're here, then maven actually failed - modules_messages patch asflicense true - fi - return 1 -} http://git-wip-us.apache.org/repos/asf/hadoop/blob/76ce1ce7/dev-support/test-patch.d/asflicense.sh ---------------------------------------------------------------------- diff --git a/dev-support/test-patch.d/asflicense.sh b/dev-support/test-patch.d/asflicense.sh new file mode 100755 index 0000000..27349bf --- /dev/null +++ b/dev-support/test-patch.d/asflicense.sh @@ -0,0 +1,84 @@ +#!/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 [[ ${BUILDTOOL} == maven + || ${BUILDTOOL} == ant ]]; then + add_plugin asflicense + add_test asflicense +fi + +## @description Verify all files have an Apache License +## @audience private +## @stability evolving +## @replaceable no +## @return 0 on success +## @return 1 on failure +function asflicense_postapply +{ + local numpatch + + big_console_header "Determining number of patched ASF License errors" + + start_clock + + personality_modules patch asflicense + case ${BUILDTOOL} in + maven) + modules_workers patch asflicense apache-rat:check + ;; + ant) + modules_workers patch asflicense releaseaudit + ;; + *) + return 0 + ;; + esac + + # RAT fails the build if there are license problems. + # so let's take advantage of that a bit. + if [[ $? == 0 ]]; then + add_vote_table 1 asflicense "Patch does not generate ASF License warnings." + return 0 + fi + + #shellcheck disable=SC2038 + find "${BASEDIR}" -name rat.txt -o -name releaseaudit_report.txt \ + | xargs cat > "${PATCH_DIR}/patch-asflicense.txt" + + if [[ -s "${PATCH_DIR}/patch-asflicense.txt" ]] ; then + numpatch=$("${GREP}" -c '\!?????' "${PATCH_DIR}/patch-asflicense.txt") + echo "" + echo "" + echo "There appear to be ${numpatch} ASF License warnings after applying the patch." + if [[ -n ${numpatch} + && ${numpatch} -gt 0 ]] ; then + add_vote_table -1 asflicense "Patch generated ${numpatch} ASF License warnings." + + echo "Lines that start with ????? in the ASF License "\ + "report indicate files that do not have an Apache license header:" \ + > "${PATCH_DIR}/patch-asflicense-problems.txt" + + ${GREP} '\!?????' "${PATCH_DIR}/patch-asflicense.txt" \ + >> "${PATCH_DIR}/patch-asflicense-problems.txt" + + add_footer_table asflicense "@@BASE@@/patch-asflicense-problems.txt" + fi + else + # if we're here, then maven actually failed + modules_messages patch asflicense true + fi + return 1 +}
