Bug 827571

Summary: jboss-as-cp script is missing argument placeholder for c optarg
Product: [Fedora] Fedora Reporter: Dan Allen <dallen>
Component: jboss-asAssignee: Marek Goldmann <mgoldman>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 17CC: mgoldman, rruss, smarlow
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-04 10:28:28 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 Dan Allen 2012-06-01 19:09:05 UTC
Description of problem:

The jboss-as-cp script is missing the argument placeholder for the c optarg.

Version-Release number of selected component (if applicable):

7.1.1-2.fc17-noarch

How reproduciable:

Any time you use the -c argument with a value (or otherwise), the command fails to copy a configuration file from the /usr/share/jboss-as/docs/examples/configs directory. 

Steps to Reproduce:
1. Execute:
jboss-as-cp -l $HOME/jboss-as-user-instance -c standalone-web.xml

2. Observe the message:

cp: omitting directory `/usr/share/jboss-as/docs/examples/configs/'
  
Actual results:

The config specified on the commandline (in this case standalone-web.xml) should be copied from /usr/share/jboss-as/docs/examples/configs (in this case /usr/share/jboss-as/docs/examples/configs/standalone-web.xml) to the configuration directory of the user instance being created (in this case $HOME/jboss-as-user-instance/configuration/)

Expected results:

The config specified on the commandline (in this case standalone-web.xml) should be copied to the configuration directory of the user instance being created (in this case $HOME/jboss-as-user-instance/configuration

Additional info:

The problem is that the colon is missing after the optarg in the following line in the script:

while getopts “hcl:” OPTION

It should be:

while getopts “hc:l:” OPTION

As a result of the missing colon, the value of the STANDALONE_XML variable is empty.

Comment 1 Marek Goldmann 2012-06-04 10:16:12 UTC
I can confirm this. It'll be fixed soon.

Comment 2 Marek Goldmann 2012-06-04 10:28:28 UTC
Fixed in upstream:

https://github.com/fedora-jboss-as/jboss-as-rpm/commit/54e0c87067da3c39ce30ad6812fd944d53e7eb63

It'll be available in jboss-as-7.1.1-4.

Comment 3 Fedora Update System 2012-07-04 09:41:23 UTC
jboss-as-7.1.1-4.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/jboss-as-7.1.1-4.fc17

Comment 4 Fedora Update System 2012-07-23 20:28:01 UTC
jboss-as-7.1.1-4.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.