[
https://issues.apache.org/jira/browse/YETUS-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15002223#comment-15002223
]
Kengo Seki commented on YETUS-179:
----------------------------------
The following exclude file removes the false-alarms:
{code}
[sekikn@mobile yetus]$ cat /tmp/excludes
\..*
assets
Gemfile.lock
[sekikn@mobile yetus]$ precommit/test-patch.sh --build-tool=nobuild
--plugins=all --resetrepo
--asflicense-rat-jar=/tmp/apache-rat-0.11/apache-rat-0.11.jar
--asflicense-rat-excludes=/tmp/excludes YETUS-177
(snip)
============================================================================
============================================================================
Determining number of patched ASF License errors
============================================================================
============================================================================
cd /Users/sekikn/yetus
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java -jar
/tmp/apache-rat-0.11/apache-rat-0.11.jar -s
/private/tmp/yetus-24399.4156/asf.xsl -E /tmp/excludes -d /Users/sekikn/yetus >
/private/tmp/yetus-24399.4156/patch-asflicense.txt 2>&1
There appear to be 0 ASF License warnings after applying the patch.
(snip)
| Vote | Subsystem | Runtime | Comment
============================================================================
| 0 | reexec | 0m 07s | precommit patch detected.
| +1 | @author | 0m 00s | The patch does not contain any @author
| | | | tags.
| +1 | shellcheck | 0m 06s | There were no new shellcheck issues.
| +1 | whitespace | 0m 00s | Patch has no whitespace issues.
| +1 | asflicense | 0m 02s | Patch does not generate ASF License
| | | | warnings.
| | | 0m 22s |
{code}
And it correctly fails if a license error exists:
{code}
[sekikn@mobile yetus]$ cat /tmp/p
diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh
index 5cd5912..adaed40 100755
--- a/precommit/test-patch.sh
+++ b/precommit/test-patch.sh
@@ -1,19 +1,3 @@
-#!/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 sure that bash version meets the pre-requisite
if [[ -z "${BASH_VERSINFO}" ]] \
[sekikn@mobile yetus]$ precommit/test-patch.sh --build-tool=nobuild
--plugins=all --resetrepo
--asflicense-rat-jar=/tmp/apache-rat-0.11/apache-rat-0.11.jar
--asflicense-rat-excludes=/tmp/excludes /tmp/p
(snip)
============================================================================
============================================================================
Determining number of patched ASF License errors
============================================================================
============================================================================
cd /Users/sekikn/yetus
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java -jar
/tmp/apache-rat-0.11/apache-rat-0.11.jar -s /private/tmp/yetus-950.159/asf.xsl
-E /tmp/excludes -d /Users/sekikn/yetus >
/private/tmp/yetus-950.159/patch-asflicense.txt 2>&1
There appear to be 1 ASF License warnings after applying the patch.
(snip)
| Vote | Subsystem | Runtime | Comment
============================================================================
| 0 | reexec | 0m 04s | precommit patch detected.
| +1 | @author | 0m 00s | The patch does not contain any @author
| | | | tags.
| -1 | shellcheck | 0m 04s | The applied patch generated 1 new
| | | | shellcheck issues (total was 16, now 17).
| +1 | whitespace | 0m 00s | Patch has no whitespace issues.
| -1 | asflicense | 0m 02s | Patch generated 1 ASF License warnings.
| | | 0m 14s |
|| Subsystem || Report/Notes ||
============================================================================
| Optional Tests | asflicense shellcheck |
| uname | Darwin mobile.local 15.0.0 Darwin Kernel Version 15.0.0: Sat Sep 19
15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64 |
| Build tool | nobuild |
| git revision | master / a2f7e4d |
| Default Java | 1.8.0_45 |
| shellcheck | v0.4.1 |
| shellcheck | /private/tmp/yetus-950.159/diff-patch-shellcheck.txt |
| asflicense | /private/tmp/yetus-950.159/patch-asflicense-problems.txt |
| modules | C: U: |
| Powered by | Apache Yetus http://yetus.apache.org |
(snip)
[sekikn@mobile yetus]$ cat
/private/tmp/yetus-950.159/patch-asflicense-problems.txt
Lines that start with ????? in the ASF License report indicate files that do
not have an Apache license header:
!????? /Users/sekikn/yetus/precommit/test-patch.sh
[sekikn@mobile yetus]$
{code}
But where should we put this file in the source tree? Right under precommit?
> Clean up asflicense errors
> --------------------------
>
> Key: YETUS-179
> URL: https://issues.apache.org/jira/browse/YETUS-179
> Project: Yetus
> Issue Type: Bug
> Components: build
> Affects Versions: 0.1.0
> Reporter: Sean Busbey
> Priority: Blocker
>
> we have failures in pre-check from asf license
> * some third party software that won't come with a header
> * some dotfiles
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)