Repository: nifi
Updated Branches:
  refs/heads/master adfaffc77 -> 76e31dfd1


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

This supersedes #1198


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/76e31dfd
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/76e31dfd
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/76e31dfd

Branch: refs/heads/master
Commit: 76e31dfd19d1ccc0d4c7431d81774f56ad5ab905
Parents: adfaffc
Author: Andre F de Miranda <[email protected]>
Authored: Tue Jan 17 03:44:55 2017 +1100
Committer: joewitt <[email protected]>
Committed: Mon Feb 6 09:36:52 2017 -0500

----------------------------------------------------------------------
 nifi-assembly/pom.xml | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/76e31dfd/nifi-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/nifi-assembly/pom.xml b/nifi-assembly/pom.xml
index e015e03..ca5497c 100755
--- a/nifi-assembly/pom.xml
+++ b/nifi-assembly/pom.xml
@@ -485,6 +485,15 @@ language governing permissions and limitations under the 
License. -->
                             <defaultFilemode>640</defaultFilemode>
                             <defaultUsername>nifi</defaultUsername>
                             <defaultGroupname>nifi</defaultGroupname>
+                            <!-- This allows the stanza to produce 
bootstrap.conf that is pre-configured with run.as=nifi
+                            given the uid is created by the 
preinstallScriptlet below. Meanwhile, normal zip and tar.gz
+                            ship without this particular property set -->
+                            <installScriptlet>
+                                <!-- It is important to note because of the 
way the plugin calls the command, the sed backup
+                                parameter -i and the sed command do not beed 
to be wrapped by single or double quotes.
+                                Also note maven properties are processed 
before RPM variables and before sed commands -->
+                                <script>sed -i 
s/^run\.as=$/run\.as=${nifi.run.as}/ 
$RPM_BUILD_ROOT/opt/nifi/nifi-${project.version}/conf/bootstrap.conf</script>
+                            </installScriptlet>
                             <preinstallScriptlet>
                                 <script>
                                     /usr/bin/getent group nifi &gt;/dev/null 
|| /usr/sbin/groupadd -r nifi; /usr/bin/getent passwd nifi &gt;/dev/null || 
/usr/sbin/useradd -r -g nifi -d /opt/nifi -s /sbin/nologin -c "NiFi System 
User" nifi

Reply via email to