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:
This is regression caused when fixing Bug 1081114
Cherry-picked to release/jon3.3.x with commit: d3e4fac26b20b36b03e Moving to MODIFIED for testing in latest build.
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.
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
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.
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.