You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by trixpan <gi...@git.apache.org> on 2017/01/16 16:49:07 UTC

[GitHub] nifi pull request #1422: NIFI-3015 - Corrects issue were RPM profile run.as ...

GitHub user trixpan opened a pull request:

    https://github.com/apache/nifi/pull/1422

    NIFI-3015 - Corrects issue were RPM profile run.as property was not b\u2026

    \u2026eing used
    
    This supersedes #1198
    
    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [X] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [X] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [X] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [X] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [X] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [-] Have you written or updated unit tests to verify your changes?
    - [-] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [-] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [-] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [-] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [-] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


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

    $ git pull https://github.com/trixpan/nifi NIFI-3015

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

    https://github.com/apache/nifi/pull/1422.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 #1422
    
----
commit 849c5cf26c4db516ce8499f4e9fa750ab8e1fe0c
Author: Andre F de Miranda <tr...@users.noreply.github.com>
Date:   2017-01-16T16:44:55Z

    NIFI-3015 - Corrects issue were RPM profile run.as property was not being used
    
    This supersedes #1198

----


---
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 issue #1422: NIFI-3015 - Corrects issue were RPM profile run.as propert...

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

    https://github.com/apache/nifi/pull/1422
  
    @fidget83 and @jfrazee mind having a look and let me know if it addresses the issue?
    
    Cheers


---
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 pull request #1422: NIFI-3015 - Corrects issue were RPM profile run.as ...

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

    https://github.com/apache/nifi/pull/1422#discussion_r96313139
  
    --- Diff: nifi-assembly/pom.xml ---
    @@ -19,6 +19,10 @@ language governing permissions and limitations under the License. -->
         <artifactId>nifi-assembly</artifactId>
         <packaging>pom</packaging>
         <description>This is the assembly Apache NiFi</description>
    +    <!--Add a blank run.as in case RPM isn't being used -->
    +    <properties>
    +        <nifi.run.as />
    --- End diff --
    
    @trixpan I guess what I'm saying is that with this change I think -Prpm makes a good rpm but not a good .tar.gz or .zip since the user will now need to edit bootstrap.conf if they're using the archive package; install.sh doesn't create the nifi user, right? I think somehow or other it needs to use the defaultUsername that the maven-rpm-plugin is using but I'm not sure how without digging further.


---
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 pull request #1422: NIFI-3015 - Corrects issue were RPM profile run.as ...

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

    https://github.com/apache/nifi/pull/1422#discussion_r96984003
  
    --- Diff: nifi-assembly/pom.xml ---
    @@ -19,6 +19,10 @@ language governing permissions and limitations under the License. -->
         <artifactId>nifi-assembly</artifactId>
         <packaging>pom</packaging>
         <description>This is the assembly Apache NiFi</description>
    +    <!--Add a blank run.as in case RPM isn't being used -->
    +    <properties>
    +        <nifi.run.as />
    --- End diff --
    
    I find it overkill (the person would be voluntarily building the RPM) but doable. 
    
    Will adjust the PR


---
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 pull request #1422: NIFI-3015 - Corrects issue were RPM profile run.as ...

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

    https://github.com/apache/nifi/pull/1422


---
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 pull request #1422: NIFI-3015 - Corrects issue were RPM profile run.as ...

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

    https://github.com/apache/nifi/pull/1422#discussion_r96312325
  
    --- Diff: nifi-assembly/pom.xml ---
    @@ -19,6 +19,10 @@ language governing permissions and limitations under the License. -->
         <artifactId>nifi-assembly</artifactId>
         <packaging>pom</packaging>
         <description>This is the assembly Apache NiFi</description>
    +    <!--Add a blank run.as in case RPM isn't being used -->
    +    <properties>
    +        <nifi.run.as />
    --- End diff --
    
    @jfrazee yes it is expected as the pom file is shared across all packages. 


---
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 pull request #1422: NIFI-3015 - Corrects issue were RPM profile run.as ...

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

    https://github.com/apache/nifi/pull/1422#discussion_r96305976
  
    --- Diff: nifi-assembly/pom.xml ---
    @@ -19,6 +19,10 @@ language governing permissions and limitations under the License. -->
         <artifactId>nifi-assembly</artifactId>
         <packaging>pom</packaging>
         <description>This is the assembly Apache NiFi</description>
    +    <!--Add a blank run.as in case RPM isn't being used -->
    +    <properties>
    +        <nifi.run.as />
    --- End diff --
    
    @trixpan Including this at the top level means that with the rpm profile, the bootstrap.conf included in the .tar.gz and .zip packages has run.as=nifi. Is this the right behavior?


---
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 pull request #1422: NIFI-3015 - Corrects issue were RPM profile run.as ...

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

    https://github.com/apache/nifi/pull/1422#discussion_r96322520
  
    --- Diff: nifi-assembly/pom.xml ---
    @@ -19,6 +19,10 @@ language governing permissions and limitations under the License. -->
         <artifactId>nifi-assembly</artifactId>
         <packaging>pom</packaging>
         <description>This is the assembly Apache NiFi</description>
    +    <!--Add a blank run.as in case RPM isn't being used -->
    +    <properties>
    +        <nifi.run.as />
    --- End diff --
    
    I got what you are saying. 
    
    The challenge is that the run.as user comes from a pom attribute before the RPM creation is started, meaning the the build-root used by the RPM packager already contains the correct run.as 
    
    The sequence seems to be:
    
    If -Prpm is enable used the line you highlighted above, if not, use https://github.com/apache/nifi/blob/master/nifi-assembly/pom.xml#L429
    
    The only other way I imagine being possible would be using sed to replace the `run.as=` with `run.as=nifi` prior to RPM the built-root folder?


---
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 pull request #1422: NIFI-3015 - Corrects issue were RPM profile run.as ...

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

    https://github.com/apache/nifi/pull/1422#discussion_r97304871
  
    --- Diff: nifi-assembly/pom.xml ---
    @@ -19,6 +19,10 @@ language governing permissions and limitations under the License. -->
         <artifactId>nifi-assembly</artifactId>
         <packaging>pom</packaging>
         <description>This is the assembly Apache NiFi</description>
    +    <!--Add a blank run.as in case RPM isn't being used -->
    +    <properties>
    +        <nifi.run.as />
    --- End diff --
    
    @jfrazee just found time to chase this and it look good. Give me a few more minutes and a new iteration will be available.


---
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 issue #1422: NIFI-3015 - Corrects issue were RPM profile run.as propert...

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

    https://github.com/apache/nifi/pull/1422
  
    @jfrazee should be ready to review.


---
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 issue #1422: NIFI-3015 - Corrects issue were RPM profile run.as propert...

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

    https://github.com/apache/nifi/pull/1422
  
    LGTM +1
    
    Verified builds on Amazon Linux w/ and w/o -Prpm and checked rpm vs. tar.gz and .zip installs to verify correct bootstrap.conf.


---
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 pull request #1422: NIFI-3015 - Corrects issue were RPM profile run.as ...

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

    https://github.com/apache/nifi/pull/1422#discussion_r96983531
  
    --- Diff: nifi-assembly/pom.xml ---
    @@ -19,6 +19,10 @@ language governing permissions and limitations under the License. -->
         <artifactId>nifi-assembly</artifactId>
         <packaging>pom</packaging>
         <description>This is the assembly Apache NiFi</description>
    +    <!--Add a blank run.as in case RPM isn't being used -->
    +    <properties>
    +        <nifi.run.as />
    --- End diff --
    
    @trixpan So from my point of view running the rpm profile should be additive and not change the .tar.gz or .zip. I think we can use installScriptlet or postinstallScriptlet to do a sed replace of the run.as= and not have to fuss with modifying bootstrap.conf outside of the rpm. Thoughts?


---
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 issue #1422: NIFI-3015 - Corrects issue were RPM profile run.as propert...

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

    https://github.com/apache/nifi/pull/1422
  
    @trixpan thanks for the contrib!  @jfrazee thanks for the review.  Merging based on your findings.  Running a quick build.  Thanks


---
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 issue #1422: NIFI-3015 - Corrects issue were RPM profile run.as propert...

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

    https://github.com/apache/nifi/pull/1422
  
    Reviewers:
    
    Key here is that bootstrap.conf with RPM profile should result on `run.as=nifi` while vanilla build should result in `run.as=`
    
    (naturally assuming nothing else breaks)


---
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 issue #1422: NIFI-3015 - Corrects issue were RPM profile run.as propert...

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

    https://github.com/apache/nifi/pull/1422
  
    @trixpan Starting review of this right now.


---
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.
---