diff --git a/CASA-auth-token/server/AuthTokenValidate/Svc/linux/CasaAuthtokenValidateD b/CASA-auth-token/server/AuthTokenValidate/Svc/linux/CasaAuthtokenValidateD index eb783715..2fd2f8a5 100644 --- a/CASA-auth-token/server/AuthTokenValidate/Svc/linux/CasaAuthtokenValidateD +++ b/CASA-auth-token/server/AuthTokenValidate/Svc/linux/CasaAuthtokenValidateD @@ -90,7 +90,16 @@ StartDAEMON() # Start the daemon echo -n "Starting casa_atvd..." - $START_DAEMON_CMD $START_DAEMON_CMD_FLAG $DAEMON_USER $DAEMON -d + if [ "${JVM_VER}" = "SUN" ]; then + # We need to specify the single-threaded option :-( due to Sun's + # JVM bug (Bug 221420). This will be changed once the issue is + # resolved. + echo "Starting daemon using single threaded mode :-(" + $START_DAEMON_CMD $START_DAEMON_CMD_FLAG $DAEMON_USER $DAEMON -d -s + else + $START_DAEMON_CMD $START_DAEMON_CMD_FLAG $DAEMON_USER $DAEMON -d + fi + RVAL=$? $ECHO } diff --git a/CASA-auth-token/server/AuthTokenValidate/Svc/linux/Makefile.am b/CASA-auth-token/server/AuthTokenValidate/Svc/linux/Makefile.am index aa8bd9dc..4d75aa02 100644 --- a/CASA-auth-token/server/AuthTokenValidate/Svc/linux/Makefile.am +++ b/CASA-auth-token/server/AuthTokenValidate/Svc/linux/Makefile.am @@ -40,8 +40,10 @@ ROOT = ../../.. LIBDIR = $(ROOT)/$(LIB) BINDIR = $(ROOT)/$(BIN) -JAVA_LIBDIR = /usr/lib/jvm/java-1.5.0-ibm/jre/bin -JAVA_INCDIR = /usr/lib/jvm/java-1.5.0-ibm/include + +IBM_JAVA_LIBDIR = /usr/lib/jvm/jre-1.5.0/bin +SUN_JAVA_LIBDIR = /usr/lib/jvm/jre-1.5.0/lib/$(HOSTTYPE)/server +JAVA_INCDIR = /usr/lib/jvm/java-1.5.0/include # handle Mono secondary dependencies export MONO_PATH := $(MONO_PATH) @@ -53,7 +55,7 @@ CFILES = CPPFILES = server.cpp CSFILES_CSC := -INCLUDES = -I. -I$(ROOT)/include -I$(JAVA_INCDIR) +INCLUDES = -I. -I$(ROOT)/include -I$(JAVA_INCDIR) -I$(JAVA_INCDIR)/linux RESOURCES = if LIB64 @@ -62,8 +64,14 @@ endif CFLAGS += -Wno-format-extra-args -fno-strict-aliasing $(INCLUDES) $(DEFINES) CPPFLAGS += -Wno-format-extra-args -fno-strict-aliasing -fPIC $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) -LIBS = -lpthread -lcasa_s_ipc -ljvm -ljsig -lj9thr23 -LDFLAGS = -L$(LIBDIR)/$(TARGET_CFG) -L$(JAVA_LIBDIR) -L$(JAVA_LIBDIR)/classic + +if IBM_JVM +LIBS += -lpthread -lcasa_s_ipc -ljvm -ljsig -lj9thr23 +LDFLAGS += -L$(LIBDIR)/$(TARGET_CFG) -L$(IBM_JAVA_LIBDIR) -L$(IBM_JAVA_LIBDIR)/classic +else +LIBS += -lpthread -lcasa_s_ipc -ljvm -ljsig +LDFLAGS += -L$(LIBDIR)/$(TARGET_CFG) -L$(SUN_JAVA_LIBDIR) +endif OBJDIR = ./$(TARGET_CFG)/$(LIB) OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o)) $(addprefix $(OBJDIR)/, $(CPPFILES:%.cpp=%.o)) diff --git a/CASA-auth-token/server/AuthTokenValidate/Svc/linux/envvars b/CASA-auth-token/server/AuthTokenValidate/Svc/linux/envvars index b04f9f15..78782233 100644 --- a/CASA-auth-token/server/AuthTokenValidate/Svc/linux/envvars +++ b/CASA-auth-token/server/AuthTokenValidate/Svc/linux/envvars @@ -30,6 +30,15 @@ # /var/novell/xtier folder. # # # ############################################################ -LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}":/usr/lib/jvm/java-1.5.0-ibm/jre/bin:/usr/lib/jvm/java-1.5.0-ibm/jre/bin/classic +TEST_IBM_JVM=$(/usr/lib/jvm/jre-1.5.0/bin/java -version 2>&1 | grep -i ibm) +if [ -z "${TEST_IBM_JVM}" ]; then + # Assume Sun JVM + JVM_VER=SUN + LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}":/usr/lib/jvm/jre-1.5.0/lib/$HOSTTYPE/server +else + JVM_VER=IBM + LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}":/usr/lib/jvm/jre-1.5.0/bin:/usr/lib/jvm/jre-1.5.0/bin/classic +fi +export JVM_VER export LD_LIBRARY_PATH diff --git a/CASA-auth-token/server/autogen.sh b/CASA-auth-token/server/autogen.sh index 19ad55ec..a4db92b0 100755 --- a/CASA-auth-token/server/autogen.sh +++ b/CASA-auth-token/server/autogen.sh @@ -4,9 +4,17 @@ srcdir=`dirname $0` test -z "$srcdir" && srcdir=. +test_ibm_jvm=$(/usr/lib/jvm/jre-1.5.0/bin/java -version 2>&1 | grep -i ibm) +if [ -z "${test_ibm_jvm}" ]; then + # Assume Sun JVM + jvm_ver=sun +else + jvm_ver=ibm +fi + ORIGDIR=`pwd` cd $srcdir -PROJECT=CASA_auth_token_native +PROJECT=CASA_auth_token_server TEST_TYPE=-f FILE=configure.in diff --git a/CASA-auth-token/server/configure.in b/CASA-auth-token/server/configure.in index 1fdca6a2..0f3e26f9 100644 --- a/CASA-auth-token/server/configure.in +++ b/CASA-auth-token/server/configure.in @@ -199,6 +199,21 @@ case $host_os in ;; esac +# +# Check for IBM JVM +# +case $jvm_ver in + sun*) + JVM_VER=SUN + ;; + ibm*) + JVM_VER=IBM + ;; +esac +AC_SUBST(JVM_VER) +AM_CONDITIONAL(IBM_JVM, test "$JVM_VER" = IBM) + + # # Handle --enable-debug # diff --git a/CASA-auth-token/server/package/linux/CASA_auth_token_server.changes b/CASA-auth-token/server/package/linux/CASA_auth_token_server.changes index 87539b05..99b46144 100644 --- a/CASA-auth-token/server/package/linux/CASA_auth_token_server.changes +++ b/CASA-auth-token/server/package/linux/CASA_auth_token_server.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 17 19:11:12 MST 2006 - jluciani@novell.com + +- Removed hard dependency on IBM JVM. + ------------------------------------------------------------------- Mon Nov 13 10:44:47 MST 2006 - jluciani@novell.com diff --git a/CASA-auth-token/server/package/linux/CASA_auth_token_server.spec.in b/CASA-auth-token/server/package/linux/CASA_auth_token_server.spec.in index 6860126d..b7c97c13 100644 --- a/CASA-auth-token/server/package/linux/CASA_auth_token_server.spec.in +++ b/CASA-auth-token/server/package/linux/CASA_auth_token_server.spec.in @@ -15,7 +15,7 @@ Name: CASA_auth_token_server %define debug_opt "" URL: http://www.novell.com/products -BuildRequires: CASA-devel apache2-devel expat gcc-c++ glib2-devel libstdc++ libstdc++-devel mono-devel pam-devel pkgconfig update-alternatives java-1_5_0-ibm java-1_5_0-ibm-devel java-1_5_0-ibm-alsa sysvinit insserv glade-sharp glade-sharp2 +BuildRequires: CASA-devel apache2-devel expat gcc-c++ glib2-devel libstdc++ libstdc++-devel mono-devel pam-devel pkgconfig update-alternatives java-sdk-1.5.0 sysvinit insserv glade-sharp glade-sharp2 %define prefix /usr License: LGPL Group: System/Libraries @@ -26,7 +26,8 @@ Release: 1 Summary: Novell CASA Authentication Token Libraries for C/C++ Server Applications Source: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires: expat binutils java-1_5_0-ibm CASA_auth_token_jaas_support sysvinit insserv +Requires: java-1_5_0 >= 1.5.0 +Requires: expat binutils CASA_auth_token_jaas_support sysvinit insserv PreReq: %fillup_prereq %insserv_prereq PreReq: /usr/bin/awk, /usr/bin/test, /bin/grep, /bin/cat, /usr/bin/install, /bin/pwd PreReq: /usr/sbin/groupadd, /usr/sbin/useradd, /usr/sbin/userdel, /usr/bin/getent