Bug 1094163

Summary: PortalSetupCommand does not ensure that initialpassword is written on a new line
Product: [JBoss] JBoss Enterprise Portal Platform 6 Reporter: Peter Palaga <ppalaga>
Component: PortalAssignee: Peter Palaga <ppalaga>
Status: VERIFIED --- QA Contact: Marek Baluch <mbaluch>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: epp-bugs
Target Milestone: ER02   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A bug in the portal-setup.sh tool caused issues with setting the root password if configuration.properties was not terminated by a new line. The portal-setup.sh tool now ensures a new line is appended to the end of configuration.properties before adding the initial root password.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Palaga 2014-05-05 08:09:57 UTC
The portal-setup.sh tool does not set the initial root password properly. 

Version-Release number of selected component (if applicable):
JBoss Portal 6.2.0.ER1

How reproducible:
Always


Steps to Reproduce:
Steps to reproduce:
(1) Ensure that $JBOSS_HOME/standalone/configuration/gatein/configuration.properties do not contain gatein.portal.setup.initialpassword.root in any form: commented or active.
(2) Ensure that the last key value pair is not terminated with a new line character
(3) run $JBOSS_HOME/bin/portal-setup.sh -p "secret" 
Not OK: The configuration.properties file ends with
Unable to find source-code formatter for language: plain. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
# Logged user keep alive
gatein.webui.keepalive.enabled=true
gatein.webui.keepalive.interval=60000gatein.portal.setup.initialpassword.root=6MSyXIj3kkQ= # Modified by portal-setup.sh
Expected:
Unable to find source-code formatter for language: plain. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
# Logged user keep alive
gatein.webui.keepalive.enabled=true
gatein.webui.keepalive.interval=60000
gatein.portal.setup.initialpassword.root=6MSyXIj3kkQ= # Modified by portal-setup.sh

Comment 1 Peter Palaga 2014-05-05 08:10:23 UTC
The fix was merged in inupstream https://github.com/gatein/gatein-portal/commit/1c722a1ee8c9bb8e12a62e9ca8fd434184a5bc57

Comment 3 Petr Mensik 2014-05-26 11:57:36 UTC
I verified it's ok now.