Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1063253

Summary: Installer - cannot use relative path in console installation if target directory doesn't exist
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Petr Kremensky <pkremens>
Component: InstallerAssignee: Miles Tjandrawidjaja <mtjandra>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kremensky <pkremens>
Severity: medium Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.3.0CC: mtjandra, thauser
Target Milestone: ER5   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-28 15:40:22 UTC 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 Petr Kremensky 2014-02-10 11:26:54 UTC
Description of problem:
 User cannot use relative path to install eap into non-existing directory (console installer).

Version-Release number of selected component (if applicable):
 EAP 6.2.0
 
How reproducible:
 Always

Steps to Reproduce:
 1. Navigate into empty directory (referred as $workspace) and copy installer.jar here. Start the console installation.
 2. Continue on 'Select the installation path' dialogue.
 3. Enter 'eap' ($workspace/eap target location should be used)

Actual results:
 'This directory can not be written. Please choose another directory.' message will appear.

Expected results:
 EAP is installer into $workspace/eap directory.

Additional info:
 Relative path can be used once the first directory exists. 
  - create new directory called 'test' inside $workspace directory.
  - run the console installation
  - enter 'test/eap' as installation path
  - EAP is installed into $workspace/test/eap as expected

 Relative installation path cannot be used on windows at all, but I believe this is already covered by BZ1035866.

Comment 1 Miles Tjandrawidjaja 2014-02-10 20:30:33 UTC
You should now be able to create an installation based on your relative path.
Relative base path depends on what directory you're in when your run the jar.
Ex. 
$ pwd -> /home/here
$ java -jar this/installer.jar
Then use "eap" as target directory
Installation will be located in /home/here/eap 
Rather than /home/here/this/eap

This should work on both linux and windows.

http://git.app.eng.bos.redhat.com/izpack.git/commit/?h=izpack-wip&id=0942776e15a3b6b737be51aff8e6b257e7e8106b

A few more commits were added after this to account backslashes and window specific things.

Comment 2 Miles Tjandrawidjaja 2014-05-14 15:10:37 UTC
See also https://bugzilla.redhat.com/show_bug.cgi?id=1035866

Comment 3 Petr Kremensky 2014-05-15 08:50:26 UTC
Miles, 
I found the source of validation problems. It matter where is the installation started from.

1) starting from some inner directory (W:\test) -> I can use relative path as expected
2) starting from drive root gives me validation error: Validation error:: Please do not use a path that contains special characters such as (; | [ ] :) or multiple consecutive spaces, as this may
 cause problems for some installed components.

The same applies for BZ1035866. If I run the installation script from drive root (W:\) installation fails, but running the same script from some inner directory (eg. W:\test) works fine.

Some strange behaviour in case 2), I get validation error, but than I am able to go on without any changes
W:\>java -jar jboss-eap-6.3.0.ER4-installer.jar -console
...
Select the installation path:  [C:\Users\Administrator\EAP-6.3.0]
test\eap
press 1 to continue, 2 to quit, 3 to redisplay.
1

Validation error:: Please do not use a path that contains special characters such as (; | [ ] :) or multiple consecutive spaces, as this may
 cause problems for some installed components.

Select the installation path:  [W:\\test\eap\]
<PRESS ENTER HERE>
press 1 to continue, 2 to quit, 3 to redisplay.
1

Select the packs you want to install:
...

Comment 4 Miles Tjandrawidjaja 2014-05-20 13:44:57 UTC
Relative paths issue should now be fixed.
Issue was that the paths were not being normalized.

https://code.engineering.redhat.com/gerrit/gitweb?p=izpack.git;a=commit;h=4c86693618afb49078b229237e33c34ad1ee0051

Comment 5 Petr Kremensky 2014-06-02 06:54:48 UTC
Verified on EAP 6.3.0.ER5 installer.