You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by apiri <gi...@git.apache.org> on 2017/05/23 17:22:24 UTC

[GitHub] nifi-minifi-cpp pull request #103: MINIFI-177 Incorporating Apache RAT to bu...

GitHub user apiri opened a pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/103

    MINIFI-177 Incorporating Apache RAT to build with a custom target of

    apache-rat.  Updating non-compliant files and/or listing exclusions
    in .rat-excludes
    
    This commit introduces a separate CMake file to manage the acquisition
    of the RAT binary.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apiri/nifi-minifi-cpp MINIFI-177

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi-minifi-cpp/pull/103.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #103
    
----
commit 89477ff66977432665c42e5fe24baf792267246b
Author: Aldrin Piri <al...@apache.org>
Date:   2017-05-23T16:47:12Z

    MINIFI-177 Incorporating Apache RAT to build with a custom target of
    apache-rat.  Updating non-compliant files and/or listing exclusions
    in .rat-excludes
    
    This commit introduces a separate CMake file to manage the acquisition
    of the RAT binary.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #103: MINIFI-177 Incorporating Apache RAT to bu...

Posted by brosander <gi...@git.apache.org>.
Github user brosander commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/103#discussion_r119398723
  
    --- Diff: cmake/RunApacheRAT.cmake ---
    @@ -0,0 +1,44 @@
    +# 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.
    +
    +# Find the preferred Apache mirror to use for the download by querying the list of mirrors and filtering out 'preferred'
    +execute_process(COMMAND curl -s https://www.apache.org/dyn/closer.lua/?asjson=1
    +        COMMAND grep preferred
    +        COMMAND awk "{print $2}"
    +        COMMAND tr -d "\""
    +        TIMEOUT 10
    +        OUTPUT_STRIP_TRAILING_WHITESPACE
    +        OUTPUT_VARIABLE MIRROR_URL )
    +
    +ExternalProject_Add(
    +        rat-binary
    +        PREFIX "apache-rat"
    +        URL "${MIRROR_URL}creadur/apache-rat-0.12/apache-rat-0.12-bin.tar.gz"
    +        URL_HASH SHA1=e84dffe8b354871c29f5078b823a726508474a6c
    --- End diff --
    
    @apiri can we use sha256 or sha512? if it's not available from the apache mirror, we could precalculate it since it shouldn't change until we upgrade rat


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #103: MINIFI-177 Incorporating Apache RAT to bu...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/103#discussion_r119633841
  
    --- Diff: cmake/RunApacheRAT.cmake ---
    @@ -0,0 +1,44 @@
    +# 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.
    +
    +# Find the preferred Apache mirror to use for the download by querying the list of mirrors and filtering out 'preferred'
    +execute_process(COMMAND curl -s https://www.apache.org/dyn/closer.lua/?asjson=1
    +        COMMAND grep preferred
    +        COMMAND awk "{print $2}"
    +        COMMAND tr -d "\""
    +        TIMEOUT 10
    +        OUTPUT_STRIP_TRAILING_WHITESPACE
    +        OUTPUT_VARIABLE MIRROR_URL )
    +
    +ExternalProject_Add(
    +        rat-binary
    +        PREFIX "apache-rat"
    +        URL "${MIRROR_URL}creadur/apache-rat-0.12/apache-rat-0.12-bin.tar.gz"
    +        URL_HASH SHA1=e84dffe8b354871c29f5078b823a726508474a6c
    --- End diff --
    
    yep, can do


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp issue #103: MINIFI-177 Incorporating Apache RAT to build wit...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/103
  
    may have to rework structure a bit to cache the binary and/or make use of the mirror provided by the ASF closer.lua for getting this.  I think the selected endpoint in this case blacklisted the node or had issues. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #103: MINIFI-177 Incorporating Apache RAT to bu...

Posted by brosander <gi...@git.apache.org>.
Github user brosander commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/103#discussion_r119398420
  
    --- Diff: cmake/RunApacheRAT.cmake ---
    @@ -0,0 +1,44 @@
    +# 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.
    +
    +# Find the preferred Apache mirror to use for the download by querying the list of mirrors and filtering out 'preferred'
    +execute_process(COMMAND curl -s https://www.apache.org/dyn/closer.lua/?asjson=1
    +        COMMAND grep preferred
    +        COMMAND awk "{print $2}"
    +        COMMAND tr -d "\""
    +        TIMEOUT 10
    +        OUTPUT_STRIP_TRAILING_WHITESPACE
    +        OUTPUT_VARIABLE MIRROR_URL )
    +
    +ExternalProject_Add(
    --- End diff --
    
    @apiri can we make it so this is only downloaded when we run the rat target?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp issue #103: MINIFI-177 Incorporating Apache RAT to build wit...

Posted by brosander <gi...@git.apache.org>.
Github user brosander commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/103
  
    +1 LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp issue #103: MINIFI-177 Incorporating Apache RAT to build wit...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/103
  
    Updated to pull the artifact from a mirror provided by the ASF closer.lua script. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp issue #103: MINIFI-177 Incorporating Apache RAT to build wit...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/103
  
    @phrocker Good call.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #103: MINIFI-177 Incorporating Apache RAT to bu...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/103#discussion_r119681851
  
    --- Diff: cmake/RunApacheRAT.cmake ---
    @@ -0,0 +1,44 @@
    +# 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.
    +
    +# Find the preferred Apache mirror to use for the download by querying the list of mirrors and filtering out 'preferred'
    +execute_process(COMMAND curl -s https://www.apache.org/dyn/closer.lua/?asjson=1
    +        COMMAND grep preferred
    +        COMMAND awk "{print $2}"
    +        COMMAND tr -d "\""
    +        TIMEOUT 10
    +        OUTPUT_STRIP_TRAILING_WHITESPACE
    +        OUTPUT_VARIABLE MIRROR_URL )
    +
    +ExternalProject_Add(
    --- End diff --
    
    adjusted this to use the script mode of cmake and perform that check/download only when the specific target is invoked.  what is a little tricky is that CMake handles the file downloading across at configuration time and also has the built in facilities to handle this wherever CMake runs.  May be a better way, but this one came to mind without having to sling around additional arguments/variables for the invoking command


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp issue #103: MINIFI-177 Incorporating Apache RAT to build wit...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/103
  
    After performing cmake configuration, the RAT check can be performed via
    
    ```
    make apache-rat
    
    <lots of output>
    *****************************************************
    Summary
    -------
    Generated at: 2017-05-23T13:21:38-04:00
    
    Notes: 2
    Binaries: 9
    Archives: 0
    Standards: 194
    
    Apache Licensed: 194
    Generated Documents: 0
    
    JavaDocs are generated, thus a license header is optional.
    Generated files do not require license headers.
    
    0 Unknown Licenses
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp issue #103: MINIFI-177 Incorporating Apache RAT to build wit...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/103
  
    Also of note is that this isn't a pass/fail operation but provides output of the analysis.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-minifi-cpp pull request #103: MINIFI-177 Incorporating Apache RAT to bu...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi-minifi-cpp/pull/103


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---