Bug 6093 - globus_java_container_admin_tools_setup depends on JAVA_HOME
: globus_java_container_admin_tools_setup depends on JAVA_HOME
Status: RESOLVED FIXED
: Java WS Core
globus_wsrf_core
: unspecified
: Macintosh All
: P3 blocker
: 4.2.0
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-05-20 15:36 by
Modified: 2008-05-21 09:35 (History)


Attachments


Note

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


Description From 2008-05-20 15:36:51
On a Mac, JAVA_HOME does not need to be set to use java.  Nothing else in the
toolkit requires JAVA_HOME to be set, as long as java works normally when used.
 setup-globus-java-container-admin-tools requires that it be set, though, which
causes the following failure:

running
/Users/bacon/pkgs/rc2/setup/globus/setup-globus-java-container-admin-tools..[
Changing to /Users/bacon/pkgs/rc2/setup/globus ]
creating etc/init.d/globus-ws-java-container
configure-globus-java-container-admin-tools: error: JAVA_HOME is not set
cp: /Users/bacon/pkgs/rc2/setup/globus//globus-ws-java-container: No such file
or directory
chmod: /Users/bacon/pkgs/rc2/etc/init.d/globus-ws-java-container: No such file
or directory
Done
..Done

There are two things wrong here.
1)  The setup failed, but the package reported success
2)  It shouldn't have failed for this reason anyway.

This blocks correct installation on Mac OS, so I'm marking it a 4.2.0 blocker.
------- Comment #1 From 2008-05-21 09:27:02 -------
The following patches should still set JAVA_HOME if it is set, but let it go
through unset if it is not set.

Index: configure-globus-java-container-admin-tools.in
===================================================================
RCS file:
/home/globdev/CVS/globus-packages/wsrf/java/container_tools/setup/configure-globus-java-container-admin-tools.in,v
retrieving revision 1.1
diff -u -r1.1 configure-globus-java-container-admin-tools.in
--- configure-globus-java-container-admin-tools.in    15 Nov 2005 22:25:42
-0000    1.1
+++ configure-globus-java-container-admin-tools.in    21 May 2008 14:25:11
-0000
@@ -1,4 +1,4 @@
-AC_REVISION($Revision: 1.1 $)
+AC_REVISION($Revision: 1.2 $)
 AC_INIT(globus-ws-java-container.in)

 if test "x$GLOBUS_LOCATION" = "x"; then
@@ -13,15 +13,18 @@
     AC_MSG_ERROR(Unable to find Java. Check your path)
 else
     if test "x$JAVA_HOME" = "x"; then
-        AC_MSG_ERROR(JAVA_HOME is not set)
+        AC_MSG_WARN(JAVA_HOME is not set.  Not adding JAVA_HOME to
globus-ws-java-container)
+        JHOME="#JAVA_HOME= not defined at time of installation"
     else
         if test "$JAVA_PATH" != "$JAVA_HOME/bin/java"; then
             AC_MSG_WARN(the java in your path is not from your \$JAVA_HOME
environment)
         fi
+        JHOME="JAVA_HOME=$JAVA_HOME"
     fi
 fi
-AC_SUBST(JAVA_PATH, $JAVA_PATH)
-AC_SUBST(JAVA_HOME, $JAVA_HOME)
+JPATH=`dirname $JAVA_PATH`
+AC_SUBST(JAVA_PATH, $JPATH)
+AC_SUBST(JAVA_HOME, $JHOME)


 AC_OUTPUT(
Index: globus-ws-java-container.in
===================================================================
RCS file:
/home/globdev/CVS/globus-packages/wsrf/java/container_tools/setup/globus-ws-java-container.in,v
retrieving revision 1.4
diff -u -r1.4 globus-ws-java-container.in
--- globus-ws-java-container.in    25 Feb 2006 01:18:51 -0000    1.4
+++ globus-ws-java-container.in    21 May 2008 14:25:11 -0000
@@ -10,8 +10,8 @@
 set -e

 # JVM. If Java is upgraded, or the location changes, edit this.
-JAVA_HOME=@JAVA_HOME@
-PATH=${JAVA_HOME}/bin:${PATH}
+@JAVA_HOME@
+PATH=@JAVA_PATH@:${PATH}
 export PATH

 # GLOBUS_LOCATION - do not change
cvs diff: Diffing pkgdata
------- Comment #2 From 2008-05-21 09:35:21 -------
Applied Charles' patch