Bug 1193447 - Syntax error on Solaris 10 on applying JON 3.3.1.CR01 patch
Summary: Syntax error on Solaris 10 on applying JON 3.3.1.CR01 patch
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Installer
Version: JON 3.3.1
Hardware: x86_64
OS: Solaris
unspecified
urgent
Target Milestone: CR03
: JON 3.3.1
Assignee: Libor Zoubek
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 1088046
TreeView+ depends on / blocked
 
Reported: 2015-02-17 11:03 UTC by Sunil Kondkar
Modified: 2015-11-02 00:44 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-02-27 19:58:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sunil Kondkar 2015-02-17 11:03:29 UTC
Description of problem:

When trying to apply the patch on JON 3.3.0.GA on Solaris 10, it displays a syntax error:

# ./apply-updates.sh /export/home/JON3.3GA/jon-server-3.3.0.GA
./apply-updates.sh: syntax error at line 122: `LINES_TO_REMOVE=$' unexpected

-------------------------------

The line#122 in ./apply-updates.sh script has below:

LINES_TO_REMOVE=$(wc -l < "$FILES_TO_MOVE");

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

JON 3.3.1.CR01

Environment details:

# uname -a
SunOS solaris10 5.10 Generic_147148-26 i86pc i386 i86pc

# isainfo -kv
64-bit amd64 kernel modules


How reproducible:

Always


Steps to Reproduce:

-Install JON 3.3.0.GA
-Apply the JON 3.3.1.CR01 patch with ./apply-updates.sh
./apply-updates.sh /export/home/JON3.3GA/jon-server-3.3.0.GA

Actual results:

syntax error

Expected results:

Patch should be executed successfully.

Additional info:

Comment 1 Libor Zoubek 2015-02-17 13:02:19 UTC
This is regression caused when fixing Bug 1081114

Comment 3 Simeon Pinder 2015-02-19 05:26:31 UTC
Cherry-picked to release/jon3.3.x with commit: d3e4fac26b20b36b03e

Moving to MODIFIED for testing in latest build.

Comment 4 Simeon Pinder 2015-02-19 05:49:51 UTC
Moving to ON_QA as available to test with latest CP build:
http://download.devel.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/19/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip
*Note: jon-server-patch-3.3.0.GA.zip maps to CR02 build of jon-server-3.3.0.GA-update-01.zip.

Comment 5 Sunil Kondkar 2015-02-19 08:50:48 UTC
Tested on JON 3.3.1.CR02

When tried to apply the patch, there is no syntax error, however it shows below and the patch could not be executed:
 ./apply-updates.sh: test: argument expected

Steps to Reproduce:

-Install JON 3.3.0.GA
-Stop with ./rhqctl stop
-Apply the JON 3.3.1.CR02 patch with ./apply-updates.sh

# ./apply-updates.sh /export/home/JON3.3GA/jon-server-3.3.0.GA
 
Testing for INSTALL_PATCH_DEST[JON Server|JON agent] directory.
        Successfully detected server [/export/home/JON3.3GA/jon-server-3.3.0.GA] to be upgraded. Proceeding...
        Proceeding with application of patch '01' to /export/home/JON3.3GA/jon-server-3.3.0.GA
        Checking [Server] file permissions...
./apply-updates.sh: test: argument expected

Comment 7 Simeon Pinder 2015-02-23 06:50:39 UTC
One more commit(2dcb4c4d66bff80b) to catch a few more changes needed for solaris to remove bash remnants to make the script more posix compliant.

Available for test in the following build:
http://download.devel.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/21/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip

Moving to ON_QA.

Comment 8 Sunil Kondkar 2015-02-23 08:27:09 UTC
Verified on JON 3.3.1.CR03

The patch is applied successfully to JON 3.3.0.GA. No errors while execution of apply-updates.sh on Solaris 10.


Note You need to log in before you can comment on or make changes to this bug.