[gridengine] - Update to svn 115 - Add back SysV init script handling for EL builds - Drop inst, db, lesstif, lib

Orion Poplawski orion at fedoraproject.org
Wed Mar 21 17:11:33 UTC 2012


commit 6eff3e552ae2595de56220d68a6d117b09553568
Author: Orion Poplawski <orion at cora.nwra.com>
Date:   Wed Mar 21 11:11:12 2012 -0600

    - Update to svn 115
    - Add back SysV init script handling for EL builds
    - Drop inst, db, lesstif, libs, error, openssl, qtcsh patches fixed upstream
    - Build with -sys-libssl
    - Use sge_/SGE_ names in man pages

 gridengine-6.2-db.patch           |   20 -
 gridengine-6.2beta2-error.patch   |   25 -
 gridengine-6.2beta2-lesstif.patch |   84 --
 gridengine-6.2u2_1-libs.patch     |   11 -
 gridengine-6.2u3-openssl.patch    |   30 -
 gridengine-inst.patch             |   16 -
 gridengine-qtcsh.patch            |   12 -
 gridengine-rpath.patch            |    9 +-
 gridengine-svn.patch              | 2255 +++++++++++++++++++++++++++++++++++--
 gridengine.spec                   |   89 +-
 10 files changed, 2227 insertions(+), 324 deletions(-)
---
diff --git a/gridengine-rpath.patch b/gridengine-rpath.patch
index 7d43f1d..860d4ff 100644
--- a/gridengine-rpath.patch
+++ b/gridengine-rpath.patch
@@ -1,9 +1,8 @@
-diff -up GE2011.11/source/3rdparty/qmake/config/config.rpath GE2011.11/source/3rdparty/qmake/config/config
 diff -up GE2011.11/source/aimk.rpath GE2011.11/source/aimk
---- GE2011.11/source/aimk.rpath	2012-02-08 10:54:22.572114023 -0700
-+++ GE2011.11/source/aimk	2012-02-08 11:08:02.408199226 -0700
-@@ -1600,10 +1600,8 @@ case LINUXX64:
-    endif
+--- GE2011.11/source/aimk.rpath	2012-03-21 09:33:14.000000000 -0600
++++ GE2011.11/source/aimk	2012-03-21 09:35:10.244582861 -0600
+@@ -1645,10 +1645,8 @@ case LINUX*:
+ 
     set JAVA_ARCH = "linux"
  
 -   # due to -rpath relative_path the LD_LIBRARY_PATH not needed anymore
diff --git a/gridengine-svn.patch b/gridengine-svn.patch
index f87d832..eb1bd74 100644
--- a/gridengine-svn.patch
+++ b/gridengine-svn.patch
@@ -1,10 +1,46 @@
 diff -ruN --exclude .svn GE2011.11/Changelog gridscheduler-trunk/Changelog
 --- GE2011.11/Changelog	2011-11-14 12:01:27.000000000 -0700
-+++ gridscheduler-trunk/Changelog	2012-03-14 15:42:57.711012971 -0600
-@@ -5,6 +5,30 @@
++++ gridscheduler-trunk/Changelog	2012-03-21 09:25:10.628915802 -0600
+@@ -5,6 +5,66 @@
  ################################################################################
            1         2         3         4         5         6         7
  01234567890123456789012345678901234567890123456789012345678901234567890123456789
++RH-2012-03-20-3:  Misc.       -Wno-strict-aliasing is needed for -Werror
++
++RH-2012-03-20-2:  Enhancem.   qmon is now optional
++
++RH-2012-03-20-1:  Enhancem.   LessTif support (from Fedora)
++
++RH-2012-03-20-0:  Enhancem.   Quick fix for Solaris 11
++
++RH-2012-03-18-0:  Enhancem.   Reduce the no. of X11 libs for libXltree link line
++
++RH-2012-03-17-5:  Bugfix:     Changes for OpenSSL API diff. 
++
++RH-2012-03-17-4:  Enhancem.   Fine-grained CheckBinaries()
++
++RH-2012-03-17-3:  Enhancem.   remove unused -R compiler flag in qtcsh
++
++RH-2012-03-17-2:  Enhancem.   include header file for NetBSD & FreeBSD
++
++RH-2012-03-17-1:  Enhancem.   Break warn extra error into a separate flag
++
++RH-2012-03-17-0:  Enhancem.   More aimk improvements
++
++RH-2012-03-16-3:  Enhancem.   improve sys #ifdef
++
++RH-2012-03-16-2:  Enhancem.   minor aimk cleanup
++
++RH-2012-03-16-1:  Enhancem.   added aimk flag: -sys-libssl
++
++RH-2012-03-16-0:  Enhancem.   Set $PATH in bdb_checkpoint.sh
++
++RH-2012-03-15-2:  Enhancem.   Misc. cleanup
++
++RH-2012-03-15-1:  Enhancem.   Cygwin cleanup
++
++RH-2012-03-15-0:  Enhancem.   sge_edit cleanup
++
 +RH-2012-03-12-0:  Enhancem.   aimk cleanup
 +
 +RH-2012-02-15-0:  Enhancem.:  - cleanup inst_sge
@@ -32,7 +68,7 @@ diff -ruN --exclude .svn GE2011.11/Changelog gridscheduler-trunk/Changelog
  
  RH-2011-11-14-1:  Enhancem.   manpage update
  
-@@ -97,7 +121,7 @@
+@@ -97,7 +157,7 @@
  
  -------------------------------------------------------------------------------
  
@@ -41,7 +77,7 @@ diff -ruN --exclude .svn GE2011.11/Changelog gridscheduler-trunk/Changelog
  
  RC-2011-03-27-0: Cleanup:     more cleanups
  
-@@ -132,7 +156,7 @@
+@@ -132,7 +192,7 @@
  
  -------------------------------------------------------------------------------
  
@@ -50,25 +86,323 @@ diff -ruN --exclude .svn GE2011.11/Changelog gridscheduler-trunk/Changelog
  
  SD-2010-09-15-0: Bugfix:      slotwise preemption fails to unsuspend one job 
                                per host
-@@ -146,4 +170,4 @@
+@@ -146,4 +206,4 @@
  
  -------------------------------------------------------
  
 -RC-2010-08-18-0: CVS:         created from V62u5_TAG
 +RC-2010-08-18-0: SVN:         created from V62u5_TAG
+diff -ruN --exclude .svn GE2011.11/source/3rdparty/qmon/iconlist/IconList.c gridscheduler-trunk/source/3rdparty/qmon/iconlist/IconList.c
+--- GE2011.11/source/3rdparty/qmon/iconlist/IconList.c	2011-11-14 12:01:02.000000000 -0700
++++ gridscheduler-trunk/source/3rdparty/qmon/iconlist/IconList.c	2012-03-21 09:25:10.292927761 -0600
+@@ -50,9 +50,7 @@
+ #include <Xm/Traversal.h>
+ #endif
+ 
+-#ifdef LesstifVersion
+-#undef NeedWidePrototypes
+-#endif
++#ifndef LesstifVersion
+ 
+ #ifndef SOLARIS
+ #if XmVersion >= 2000
+@@ -97,6 +95,7 @@
+ 
+ #endif
+ #endif
++#endif
+ 
+ #include "DumbClip.h"
+ #include "IconListP.h"
+diff -ruN --exclude .svn GE2011.11/source/3rdparty/qmon/ltree/Makefile.aimk gridscheduler-trunk/source/3rdparty/qmon/ltree/Makefile.aimk
+--- GE2011.11/source/3rdparty/qmon/ltree/Makefile.aimk	2011-11-14 12:01:02.000000000 -0700
++++ gridscheduler-trunk/source/3rdparty/qmon/ltree/Makefile.aimk	2012-03-21 09:25:10.341926017 -0600
+@@ -27,7 +27,7 @@
+ 	$(RANLIB) libXltree.a
+ 
+ libXltree$(SHAREDEXT): $(XLTREE_OBJS)
+-	$(SHAREDLD) $(XLFLAGS) $(GSHARED_LFLAGS) -o libXltree$(SHAREDEXT) $(XLTREE_OBJS) $(XLIBS)
++	$(SHAREDLD) $(XLFLAGS) $(GSHARED_LFLAGS) -o libXltree$(SHAREDEXT) $(XLTREE_OBJS) $(XMLIBS)
+ 
+ Xltree_clean:
+ 	$(RM) $(XLTREE_OBJS) libXltree.a libXltree$(SHAREDEXT)
+diff -ruN --exclude .svn GE2011.11/source/3rdparty/qmon/spinbox/Spinbox.c gridscheduler-trunk/source/3rdparty/qmon/spinbox/Spinbox.c
+--- GE2011.11/source/3rdparty/qmon/spinbox/Spinbox.c	2011-11-14 12:01:02.000000000 -0700
++++ gridscheduler-trunk/source/3rdparty/qmon/spinbox/Spinbox.c	2012-03-21 09:25:10.089934986 -0600
+@@ -1797,7 +1797,7 @@
+ #ifdef CRAY
+    errno = 0;
+ #elif !defined(LINUX) && !defined(SOLARIS) && !defined(DARWIN) && !defined(FREEBSD) && !defined(NETBSD) && \
+-   !defined(AIX51) && !defined(AIX43) && !defined(ALPHA) && !defined(HP1164) && !defined(HPUX) && !defined(IRIX) 
++   !defined(AIX) && !defined(ALPHA) && !defined(HP1164) && !defined(HPUX) && !defined(IRIX) 
+    int errno = 0; 
+ #endif
+    *value = strtol ( buffer, NULL, 10 );
+diff -ruN --exclude .svn GE2011.11/source/3rdparty/qmon/Xmt310/Xmt/Layout.c gridscheduler-trunk/source/3rdparty/qmon/Xmt310/Xmt/Layout.c
+--- GE2011.11/source/3rdparty/qmon/Xmt310/Xmt/Layout.c	2011-11-14 12:01:04.000000000 -0700
++++ gridscheduler-trunk/source/3rdparty/qmon/Xmt310/Xmt/Layout.c	2012-03-21 09:25:10.423923097 -0600
+@@ -490,8 +490,16 @@
+      * the renderTable.
+      */
+     if (!lw->layout.font)
+-        XmeRenderTableGetDefaultFont(lw->layout.render_table,
+-                                     &lw->layout.font);
++        XmeRenderTableGetDefaultFont(lw->layout.render_table, &lw->layout.font);
++
++#ifdef LesstifVersion
++     /*
++      * The previous fails with lesstif, try again...
++      */
++     if (!lw->layout.font)
++         _XmFontListGetDefaultFont(lw->layout.font_list, &lw->layout.font);
++#endif /* LesstifVersion */
++
+ #endif
+     
+     /* figure out resolution independence values */
+diff -ruN --exclude .svn GE2011.11/source/3rdparty/qmon/Xmt310/Xmt/PixmapCvt.c gridscheduler-trunk/source/3rdparty/qmon/Xmt310/Xmt/PixmapCvt.c
+--- GE2011.11/source/3rdparty/qmon/Xmt310/Xmt/PixmapCvt.c	2011-11-14 12:01:04.000000000 -0700
++++ gridscheduler-trunk/source/3rdparty/qmon/Xmt310/Xmt/PixmapCvt.c	2012-03-21 09:25:10.425923027 -0600
+@@ -72,12 +72,14 @@
+     XmRPrimForegroundPixmap,
+     XmRManForegroundPixmap,
+     XmRGadgetPixmap
++#ifndef LesstifVersion
+ #if XmVersion >= 2000
+     ,
+     XmRLargeIconPixmap ,
+     XmRSmallIconPixmap,
+     XmRDynamicPixmap
+ #endif
++#endif /* LesstifVersion */
+     
+ };
+ 
+diff -ruN --exclude .svn GE2011.11/source/3rdparty/qtcsh/configure gridscheduler-trunk/source/3rdparty/qtcsh/configure
+--- GE2011.11/source/3rdparty/qtcsh/configure	2011-11-14 12:00:57.000000000 -0700
++++ gridscheduler-trunk/source/3rdparty/qtcsh/configure	2012-03-21 09:25:10.005937973 -0600
+@@ -2691,7 +2691,7 @@
+ fi;
+ if test "$sge" != no; then
+    GRDDEF="-I../../../libs/gdi"
+-   GRDLIB="-L../../../$sge -R${SGE_ROOT}/lib/${SGE_ARCH} \$(SGE_LIBS) ${LDFLAGS}"
++   GRDLIB="-L../../../$sge \$(SGE_LIBS) ${LDFLAGS}"
+    CFLAGS="$CFLAGS -DPROG_NAME='\"qtcsh\"' -D$sge"
+ fi
+ 
+diff -ruN --exclude .svn GE2011.11/source/3rdparty/qtcsh/configure.in gridscheduler-trunk/source/3rdparty/qtcsh/configure.in
+--- GE2011.11/source/3rdparty/qtcsh/configure.in	2011-11-14 12:00:57.000000000 -0700
++++ gridscheduler-trunk/source/3rdparty/qtcsh/configure.in	2012-03-21 09:25:09.983938759 -0600
+@@ -265,7 +265,7 @@
+             [grd="$withval"], [grd=no])
+ if test "$grd" != no; then
+    GRDDEF="-I../../../libs/gdi"
+-   GRDLIB="-L../../../$grd -R${SGE_ROOT}/lib/${SGE_ARCH} \$(SGE_LIBS) ${LDFLAGS}"
++   GRDLIB="-L../../../$grd \$(SGE_LIBS) ${LDFLAGS}"
+    CFLAGS="$CFLAGS -DPROG_NAME='\"qtcsh\"' -D$grd"
+ fi
+ AC_SUBST(GRDDEF)
+diff -ruN --exclude .svn GE2011.11/source/3rdparty/qtcsh/tc.alloc.c gridscheduler-trunk/source/3rdparty/qtcsh/tc.alloc.c
+--- GE2011.11/source/3rdparty/qtcsh/tc.alloc.c	2011-11-14 12:00:57.000000000 -0700
++++ gridscheduler-trunk/source/3rdparty/qtcsh/tc.alloc.c	2012-03-21 09:25:10.003938049 -0600
+@@ -65,7 +65,7 @@
+ # define realloc	frealloc
+ #endif /* WINNT */
+ 
+-#if defined(AIX51) || defined(AIX43)
++#if defined(AIX)
+ #define SYSMALLOC
+ #endif
+ 
+diff -ruN --exclude .svn GE2011.11/source/3rdparty/qtcsh/tc.who.c gridscheduler-trunk/source/3rdparty/qtcsh/tc.who.c
+--- GE2011.11/source/3rdparty/qtcsh/tc.who.c	2011-11-14 12:00:57.000000000 -0700
++++ gridscheduler-trunk/source/3rdparty/qtcsh/tc.who.c	2012-03-21 09:25:10.002938087 -0600
+@@ -45,6 +45,12 @@
+  */
+ #include <ctype.h>
+ 
++#ifdef __SunOS
++  #ifdef _PATH_UTMP
++    #undef _PATH_UTMP
++  #endif
++#endif
++
+ #ifdef HAVEUTMPX
+ # include <utmpx.h>
+ /* I just redefine a few words here.  Changing every occurrence below
 diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
 --- GE2011.11/source/aimk	2011-11-14 12:01:16.000000000 -0700
-+++ gridscheduler-trunk/source/aimk	2012-03-14 15:42:57.341026112 -0600
-@@ -214,6 +214,8 @@
-    echo "-spool-classic    -> use classic flatfile spooling"
-    echo "-spool-targets    -> only create qmaster, spooldefaults and spoolinit"
-    echo "-sunman           -> create man pages for Sun branded man pages (with -man[kv])"
-+   echo "-sys-hwloc        -> use the hwloc library provided by the system"
-+   echo "-sys-jemalloc     -> use the jemalloc library provided by the system"
-    echo "-tight-ssh        -> compile SSH daemon with tight SGE integration"
-    echo "-umap             -> compile with usermapping and hostgroup feature"
-    echo "-werror           -> turn all compiler warnings into errors"
-@@ -257,12 +259,14 @@
++++ gridscheduler-trunk/source/aimk	2012-03-21 09:25:10.584917368 -0600
+@@ -58,6 +58,7 @@
+ set UNMODIFIED_ARGUMENTS = ( $argv )
+ set FORCE_32BIT = 0
+ set WERR        = 0
++set WEXTRA      = 0
+ set STACKPROTECT = 0
+ 
+ if ( -f dist/util/arch ) then
+@@ -149,81 +150,87 @@
+    echo "usage: aimk <OPTIONS>"
+    echo "OPTIONS are: "
+    echo ""
+-   echo "-32               -> create 32 bit binaries (where supported)"
+-   echo "-64               -> create 64 bit binaries (where supported)"
+-   echo "-D*               -> include a macro definition in CFLAGS"
+-   echo "-add-copyright    -> insert a special copyright string in each binary"
+-   echo "-add-sun-copyright-> insert a Sun copyright string in each binary" 
+-   echo "-adoc             -> create source code documentation in adoc format"
+-   echo "-catman           -> generate man pages in catman format"
+-   echo "-cc               -> use cc/CC to compile c/c++ code"
+-   echo "-cov              -> complile for code coverage analysis"
+-   echo "-dce              -> enable dce security"
+-   echo "-debug            -> compile with debug information"
+-   echo "-efence           -> compile in debug mode and detect memory leaks"
+-   echo "-f                -> specify other Makefile instead of common/Makefile"
+-   echo "-flags            -> print C_FLAGS and INCLUDE_FLAGS to stdout, used by gelint"
+-   echo "-gcc              -> use gcc instead of system compiler (where supported)"
+-   echo "-gettext          -> build the gettext libraries"
+-   echo "-gprof            -> enable gprof profiling"
+-   echo "-gss              -> enable gss security"
+-   echo "-help             -> show this help"
+-   echo "-htmlman          -> generate man and html pages"
+-   echo "-htmlmankv        -> generate man and html pages checked out with '-kv' flag"
+-   echo "-insure           -> compile in debug mode and detect memory leaks"
+-   echo "-intl             -> compile with internationalization library (libintl)"
+-   echo "-javadoc          -> create source code documentation in Javadoc[TM] tool format"
+-   echo "-kerberos         -> enable kerberos authentication"
+-   echo "-man              -> generate man pages"
+-   echo "-mankv            -> generate man pages checked out with '-kv' flag"
+-   echo "-mo               -> generate the message catalogues (Solaris only)"
+-   echo "-no-core          -> don't compile the core system"
+-   echo "-no-java          -> don't compile Java[TM] class files"
+-   echo "-no-gui-inst      -> don't compile Java[TM] GUI installer"
+-   echo "-no-jni           -> don't compile JNI library"
+-   echo "-no-intl          -> do not compile with internationalization library"
+-   echo "-no-mk            -> only return the specific architecture string"
+-   echo "-no-opt           -> compile with no optimization"
+-   echo "-no-perfstat      -> don't use Perfstat Library on AIX"
+-   echo "-no-qmake         -> don't compile qmake"
+-   echo "-no-qmon          -> don't compile qmon 3rdparty libs and qmon client"
+-   echo "-no-qtcsh         -> don't compile qtcsh"
+-   echo "-no-remote        -> don't compile 3rdparty remote module (rsh, rshd, rlogin)"
+-   echo "-no-rmon          -> disable rmon debug output"
+-   echo "-no-secure        -> disable ssl security (enabled by default)"
+-   echo "-no-jemalloc      -> disable jemalloc (enabled by default on Linux hosts)"
+-   echo "-no-mtmalloc      -> disable mtmalloc (this is needed for dbx debugging)"
+-   echo "-only-core        -> build only the core system"
+-   echo "-only-depend      -> only compile 3rdparty/sge_depend"
+-   echo "-only-java        -> only compile Java[TM] class files"
+-   echo "-only-gui-inst    -> only compile Java[TM] GUI installer"
+-   echo "-only-jemalloc    -> build only the jemalloc library"
+-   echo "-only-qmake       -> build only qmake"
+-   echo "-only-qmon        -> build only qmon 3rdparty libs and qmon client"
+-   echo "-only-qtcsh       -> build only qtcsh"
+-   echo "-only-remote      -> build only 3rdparty remote module (rsh, rshd, rlogin)"
+-   echo "-only-64          -> build only 64 bit shared libraries for SOLARIS64, don't build 32 bit shared libraries"
+-   echo "-parallel n       -> spawn multiple make processes by passing option -j n to make"
+-   echo "-po               -> merge gridengine .pot with translations (Linux)"
+-   echo "-pot              -> extract message template to gridengine .pot file (Linux)"
+-   echo "-protected        -> create complete class file documentation"
+-   echo "-purify           -> instrument code with purify (implies -debug)"
+-   echo "-qmake            -> use qmake instead of make"
+-   echo "-shared-libs      -> create libraries as shared libs"
+-   echo "-spool-berkeleydb -> use berkeleydb spooling"
+-   echo "-spool-classic    -> use classic flatfile spooling"
+-   echo "-spool-targets    -> only create qmaster, spooldefaults and spoolinit"
+-   echo "-sunman           -> create man pages for Sun branded man pages (with -man[kv])"
+-   echo "-tight-ssh        -> compile SSH daemon with tight SGE integration"
+-   echo "-umap             -> compile with usermapping and hostgroup feature"
+-   echo "-werror           -> turn all compiler warnings into errors"
+-   echo "-with-jemalloc    -> build SGE with the jemalloc library"
++   echo " -32               -> create 32 bit binaries (where supported)"
++   echo " -64               -> create 64 bit binaries (where supported)"
++   echo " -D*               -> include a macro definition in CFLAGS"
++   echo " -add-copyright    -> insert a special copyright string in each binary"
++   echo " -add-sun-copyright-> insert a Sun copyright string in each binary" 
++   echo " -adoc             -> create source code documentation in adoc format"
++   echo " -catman           -> generate man pages in catman format"
++   echo " -cc               -> use cc/CC to compile c/c++ code"
++   echo " -cov              -> complile for code coverage analysis"
++   echo " -dce              -> enable dce security"
++   echo " -debug            -> compile with debug information"
++   echo " -efence           -> compile in debug mode and detect memory leaks"
++   echo " -f                -> specify other Makefile instead of common/Makefile"
++   echo " -flags            -> print C_FLAGS and INCLUDE_FLAGS to stdout, used by gelint"
++   echo " -gcc              -> use gcc instead of system compiler (where supported)"
++   echo " -gettext          -> build the gettext libraries"
++   echo " -gprof            -> enable gprof profiling"
++   echo " -gss              -> enable gss security"
++   echo " -help             -> show this help"
++   echo " -htmlman          -> generate man and html pages"
++   echo " -htmlmankv        -> generate man and html pages checked out with '-kv' flag"
++   echo " -insure           -> compile in debug mode and detect memory leaks"
++   echo " -intl             -> compile with internationalization library (libintl)"
++   echo " -javadoc          -> create source code documentation in Javadoc[TM] tool format"
++   echo " -kerberos         -> enable kerberos authentication"
++   echo " -man              -> generate man pages"
++   echo " -mankv            -> generate man pages checked out with '-kv' flag"
++   echo " -mo               -> generate the message catalogues (Solaris only)"
++   echo " -no-core          -> don't compile the core system"
++   echo " -no-java          -> don't compile Java[TM] class files"
++   echo " -no-gui-inst      -> don't compile Java[TM] GUI installer"
++   echo " -no-jni           -> don't compile JNI library"
++   echo " -no-intl          -> do not compile with internationalization library"
++   echo " -no-mk            -> only return the specific architecture string"
++   echo " -no-opt           -> compile with no optimization"
++   echo " -no-perfstat      -> don't use Perfstat Library on AIX"
++   echo " -no-qmake         -> don't compile qmake"
++   echo " -no-qmon          -> don't compile qmon 3rdparty libs and qmon client"
++   echo " -no-qtcsh         -> don't compile qtcsh"
++   echo " -no-remote        -> don't compile 3rdparty remote module (rsh, rshd, rlogin)"
++   echo " -no-rmon          -> disable rmon debug output"
++   echo " -no-secure        -> disable ssl security (enabled by default)"
++   echo " -no-jemalloc      -> disable jemalloc (enabled by default on Linux hosts)"
++   echo " -no-mtmalloc      -> disable mtmalloc (this is needed for dbx debugging)"
++   echo " -only-core        -> build only the core system"
++   echo " -only-depend      -> only compile 3rdparty/sge_depend"
++   echo " -only-java        -> only compile Java[TM] class files"
++   echo " -only-gui-inst    -> only compile Java[TM] GUI installer"
++   echo " -only-jemalloc    -> build only the jemalloc library"
++   echo " -only-qmake       -> build only qmake"
++   echo " -only-qmon        -> build only qmon 3rdparty libs and qmon client"
++   echo " -only-qtcsh       -> build only qtcsh"
++   echo " -only-remote      -> build only 3rdparty remote module (rsh, rshd, rlogin)"
++   echo " -only-64          -> build only 64 bit shared libraries for SOLARIS64, don't build 32 bit shared libraries"
++   echo " -parallel n       -> spawn multiple make processes by passing option -j n to make"
++   echo " -po               -> merge gridengine .pot with translations (Linux)"
++   echo " -pot              -> extract message template to gridengine .pot file (Linux)"
++   echo " -protected        -> create complete class file documentation"
++   echo " -purify           -> instrument code with purify (implies -debug)"
++   echo " -qmake            -> use qmake instead of make"
++   echo " -shared-libs      -> create libraries as shared libs"
++   echo " -spool-berkeleydb -> use berkeleydb spooling"
++   echo " -spool-classic    -> use classic flatfile spooling"
++   echo " -spool-targets    -> only create qmaster, spooldefaults and spoolinit"
++   echo " -sunman           -> create man pages for Sun branded man pages (with -man[kv])"
++   echo " -tight-ssh        -> compile SSH daemon with tight SGE integration"
++   echo " -umap             -> compile with usermapping and hostgroup feature"
++   echo " -werror           -> turn all compiler warnings into errors"
++   echo " -wextra           -> turn on extra compiler warnings"
++   echo " -with-jemalloc    -> build SGE with the jemalloc library"
++   echo ""
++   echo "Linking against system libraries"
++   echo " -sys-hwloc        -> use the hwloc library provided by the system"
++   echo " -sys-jemalloc     -> use the jemalloc library provided by the system"
++   echo " -sys-libssl       -> use the ssl library provided by the system"
+    echo ""
+    echo "Deprecated Features (support will be removed by 2013 Q3)"
+-   echo "-plpa                 -> PLPA hardware topology support"
+-   echo "-solaris-pset         -> enable Solaris Processor Set binding support"
+-   echo "-spool-berkeleydb-rpc -> enable BerkeleyDB RPC server support"
+-   echo "-DOGLIBC_LINUX        -> support glibc 2.1 or older (Linux only)"
++   echo " -plpa                 -> PLPA hardware topology support"
++   echo " -solaris-pset         -> enable Solaris Processor Set binding support"
++   echo " -spool-berkeleydb-rpc -> enable BerkeleyDB RPC server support"
++   echo " -DOGLIBC_LINUX        -> support glibc 2.1 or older (Linux only)"
+ 
+   exit
+ }
+@@ -257,12 +264,14 @@
  set REMOTE           = 1
  set QMAKE            = 1
  set QMAKELIB         = ""
@@ -85,7 +419,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
  set MAKESTRPTIME     = 0
  set MAKESNPRINTF     = 0
  set MAKEFNMATCH      = 0
-@@ -285,7 +289,7 @@
+@@ -285,7 +294,7 @@
  set CC               = cc
  set CXX              = CC
  set CFLAGS           = "-D$TARGET_BITS $INP_CFLAGS"
@@ -94,7 +428,15 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
  set DEBUG_FLAG       = ""
  set INSURE_FLAG      = ""
  set JEMALLOC_CFLAGS  = ""
-@@ -429,6 +433,7 @@
+@@ -308,6 +317,7 @@
+ set LFLAGS           = "-L."
+ set XLFLAGS          = ""
+ set XLIBS            = ""
++set XMLIBS           = ""
+ set LIBS             = "-lm -lpthread"
+ set LIBRARY_LIBS     = ""  # used for linking shared objects like drmaa.so or jgdi.so. Overwritten by $LIBS if empty
+ set LD_WRAPPER       = ""
+@@ -429,6 +439,7 @@
  switch ($BUILDARCH) 
     case LINUXX64:
       set MAKEJEMALLOCLIB  = 1
@@ -102,7 +444,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
       set WITH_GETTEXT = 1
       breaksw
     case LINUX*:
-@@ -508,6 +513,7 @@
+@@ -508,6 +519,7 @@
        set QMAKE  = 0
        set PLPA   = 0
        set HWLOC  = 0
@@ -110,7 +452,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        set QMON   = 0
        set QTCSH  = 0
        set REMOTE = 0
-@@ -631,7 +637,7 @@
+@@ -631,7 +643,7 @@
        set BUILDMAN   = 1
        set KVMAN      = 1
        breaksw
@@ -119,7 +461,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        echo "BUILDARCH=$BUILDARCH"
        if ( $BUILDARCH == sol-sparc || $BUILDARCH == sol-sparc64 ) then
           scripts/msgmerge.csh
-@@ -646,16 +652,16 @@
+@@ -646,16 +658,16 @@
     case "-no-dump":
        set DUMP = 0
        breaksw
@@ -140,7 +482,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        set WITH_GETTEXT = 0
        breaksw
     case "-no-mk":
-@@ -692,20 +698,24 @@
+@@ -692,20 +704,24 @@
        breaksw
     case "-no-jemalloc":
        set MAKEJEMALLOCLIB = 0
@@ -166,7 +508,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        breaksw
     case "-only-core":
        set CORE   = 1
-@@ -714,6 +724,7 @@
+@@ -714,6 +730,7 @@
        set QMAKE  = 0
        set PLPA   = 0
        set HWLOC  = 0
@@ -174,7 +516,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        set QMON   = 0
        set QTCSH  = 0
        set REMOTE = 0
-@@ -728,20 +739,22 @@
+@@ -728,20 +745,22 @@
        set QMAKE      = 0
        set PLPA       = 0
        set HWLOC      = 0
@@ -200,7 +542,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        set JAVA_GUI_INST = 2
        set ONLY_PARAM_SPEC = 1
        breaksw
-@@ -754,7 +767,8 @@
+@@ -754,7 +773,8 @@
        set QMON   = 0
        set QTCSH  = 0
        set REMOTE = 0
@@ -210,7 +552,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        set MAKEWINGRIDAPP = 0
        set MAKEWINGRIDLIB = 0
        set ONLY_PARAM_SPEC = 1
-@@ -766,6 +780,7 @@
+@@ -766,6 +786,7 @@
        set QMAKE  = 1
        set PLPA   = 0
        set HWLOC  = 0
@@ -218,7 +560,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        set QMON   = 0
        set QTCSH  = 0
        set REMOTE = 0
-@@ -776,6 +791,7 @@
+@@ -776,6 +797,7 @@
     case "-only-plpa":
        set PLPA   = 1
        set HWLOC  = 0
@@ -226,7 +568,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        set CORE   = 0
        set JAVA   = 0
        set JAVA_GUI_INST = 0
-@@ -794,6 +810,7 @@
+@@ -794,6 +816,7 @@
        set QMAKE  = 0
        set PLPA   = 0
        set HWLOC  = 0
@@ -234,7 +576,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        set QMON   = 1
        set QTCSH  = 0
        set REMOTE = 0
-@@ -808,6 +825,7 @@
+@@ -808,6 +831,7 @@
        set QMAKE  = 0
        set PLPA   = 0
        set HWLOC  = 0
@@ -242,7 +584,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
  
        set QMON   = 0
        set QTCSH  = 1
-@@ -823,6 +841,7 @@
+@@ -823,6 +847,7 @@
        set QMAKE  = 0
        set PLPA   = 0
        set HWLOC  = 0
@@ -250,7 +592,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        set QMON   = 0
        set QTCSH  = 0
        set REMOTE = 0
-@@ -837,6 +856,7 @@
+@@ -837,6 +862,7 @@
        set QMAKE  = 0
        set PLPA   = 0
        set HWLOC  = 0
@@ -258,7 +600,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        set QMON   = 0
        set QTCSH  = 0
        set REMOTE = 1
-@@ -855,7 +875,7 @@
+@@ -855,7 +881,7 @@
        set PERLGUI = "perlgui_all"
        set PERLGUI_CLEAN = "perlgui_clean"
        breaksw
@@ -267,7 +609,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        if ( $buildarch == linux-x86 ) then
           scripts/msgmerge.csh merge
           echo ""
-@@ -867,7 +887,7 @@
+@@ -867,7 +893,7 @@
        endif
        exit 0
        breaksw
@@ -276,7 +618,22 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        if ( $buildarch != linux-x86 ) then
           echo "Must be done on linux-86 architecture"
           exit 1
-@@ -943,6 +963,12 @@
+@@ -903,14 +929,6 @@
+       breaksw
+    case "-plpa" 
+       breaksw
+-   case "-secure"
+-      echo "___________W_A_R_N_I_N_G_____________"
+-      echo "The -secure option is no longer supported as security is now enabled"
+-      echo "by default.  Please remove the -secure option from your aimk.site and"
+-      echo "aimk.private files.  To disable security, you may use the -no-secure"
+-      echo "option."
+-      echo
+-      breaksw
+    case "-shared-libs":
+       set SHAREDLIBS = 1
+       breaksw
+@@ -943,6 +961,17 @@
     case "-sunman":
        set SGE_PRODUCT_MODE=sge
        breaksw
@@ -286,10 +643,23 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
 +   case "-sys-hwloc":
 +      setenv SGE_SYSHWLOC "SGE_SYSHWLOC"
 +      breaksw
++   case "-sys-libssl":
++      set SECFLAGS="-DSECURE"
++      set SECLIBS_STATIC="-lssl -lcrypto"
++      set KLFLAGS=""
++      breaksw
     case "-umap"
        set WITH_USERMAPPING = 1
        breaksw
-@@ -957,6 +983,7 @@
+@@ -952,11 +981,15 @@
+    case "-werror":
+       set WERR = 1
+       breaksw
++   case "-wextra":
++      set WEXTRA = 1
++      breaksw
+    case "-stackprotect":
+       set STACKPROTECT = 1
        breaksw
     case "-with-jemalloc"
        set MAKEJEMALLOCLIB = 1
@@ -297,7 +667,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        breaksw
     default:
        unset found
-@@ -974,6 +1001,16 @@
+@@ -974,6 +1007,16 @@
     set MAKEOPT = "-verbose $MAKEOPT"
  endif
  
@@ -314,7 +684,25 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
  set CFLAGS = "$CFLAGS -DSPOOLING_$SPOOLING_METHOD $SECFLAGS"
  
  #---------------------------------------------------------------------------
-@@ -1040,7 +1077,7 @@
+@@ -1022,25 +1065,10 @@
+    endif
+ endif
+ 
+-#---------------------------------------------------------------------------
+-if ( $JAVA > 0 || $BUILDJAVADOC == 1 || $JNI == 1 ) then
+-   # Make sure we can find JAVA_HOME
+-   if ( ${?JAVA_HOME} == 0 ) then
+-      echo "Please set JAVA_HOME"
+-      exit 1
+-   endif
+-   if ( ${JAVA_HOME} == "/usr" ) then
+-      echo 'Warning:'
+-      echo 'Setting $JAVA_HOME to "/usr" causes problems on some systems, '
+-      echo 'because the associated include path will be "/usr/include", '
+-      echo 'which is a reserved system include path.'
+-      echo
+-   endif
+-endif
  
  switch ($BUILDARCH)
  case AIX43:
@@ -323,7 +711,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
     set MAKEWINGRIDLIB   = 0
     set MAKEWINGRIDAPP   = 0
     set COMPILE_DC = 1
-@@ -1054,11 +1091,13 @@
+@@ -1054,11 +1082,13 @@
     if ( $DEBUGGED == 1 ) then
        set DEBUG_FLAG = "$DEBUG_FLAG -qinitauto=01 -qro -qroconst"
     endif
@@ -337,7 +725,11 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
     set CC       = xlc_r
     set CXX      = xlC_r
     set CFLAGS   = "$OFLAG -DAIX -D$BUILDARCH -D_LARGE_FILES -DUSE_STDARG -DUSE_SGE_UNSETENV -DGETHOSTBYADDR_R5 -DGETHOSTBYNAME_R3 $DEBUG_FLAG $CFLAGS -bnoquiet"
-@@ -1072,6 +1111,7 @@
+@@ -1069,9 +1099,11 @@
+    set XLIBD    = ""
+    set XLFLAGS  = "$XLIBD"
+    set XLIBS    = "-lXm  -lXt -lXext -lX11 -lm -liconv -lc"
++   set XMLIBS   = "$XLIBS"
  
     if ("$PERFSTAT" == 1) then
        set CFLAGS = "$CFLAGS -DHAS_AIX_PERFLIB"
@@ -345,7 +737,13 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
     endif
  
     if ("$WERR" == 1) then
-@@ -1138,11 +1178,13 @@
+@@ -1133,16 +1165,19 @@
+    set XLIBD    = ""
+    set XLFLAGS  = "-taso $XLIBD"
+    set XLIBS    = "-lXm -lXt -lXext -lX11 -lSM -lICE -lPW -ldnet_stub"
++   set XMLIBS   = "$XLIBS"
+    set LIBS     = "-lpset -lmach $LIBS"
+    set JAVA_ARCH = "alpha"
     breaksw
  
  case DARWIN_X86:
@@ -359,7 +757,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
  
     if ( $OPTIMIZATION == 1 ) then
        set OFLAG = "-O3"
-@@ -1167,33 +1209,34 @@
+@@ -1167,28 +1202,29 @@
        set DEBUG_FLAG = "$DEBUG_FLAG -fprofile-arcs -ftest-coverage"
     endif
  
@@ -402,13 +800,23 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        breaksw
     endsw
  
-    if ("$WERR" == 1) then
--      set CFLAGS = "$CFLAGS -Werror"
-+      set CFLAGS = "$CFLAGS -Werror -Wextra"
+@@ -1196,6 +1232,10 @@
+       set CFLAGS = "$CFLAGS -Werror"
     endif
  
++   if ("$WEXTRA" == 1) then
++      set CFLAGS = "$CFLAGS -Wextra"
++   endif
++
     if ("$STACKPROTECT" == 1) then
-@@ -1229,19 +1272,7 @@
+       set CFLAGS = "$CFLAGS -fstack-protector-all"
+    endif
+@@ -1225,23 +1265,12 @@
+    set XCFLAGS  = "-DNeedFunctionPrototypes -DNeedVarargsPrototypes -Wno-error $XMTDEF $XINCD $XCFLAGS"
+    set XLIBD    = "-L$MOTIFHOME/lib -L/usr/X11R6/lib"
+    set XLIBS    = "-lXm -lXpm -lXt -lXext -lX11 -lSM -lICE"
++   set XMLIBS   = "$XLIBS"
+    if ("$ADOC" == 1) then
        set CFLAGS = "$CFLAGS -Wno-error"
     endif
  
@@ -429,7 +837,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
  
     set NOERR_CFLAG = "-Wno-error"
     set NOERR_PROTO = "-Wno-strict-prototypes"
-@@ -1268,9 +1299,9 @@
+@@ -1268,9 +1297,9 @@
     set CC       = gcc
     set CXX      = g++
     set DLLIB	 = ""
@@ -440,7 +848,25 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
     set NOERR_CFLAG = "-Wno-error"
     set LFLAGS   = "$DEBUG_FLAG $LFLAGS -export-dynamic"
     set LIBS     = "$LIBS -lkvm"
-@@ -1299,9 +1330,9 @@
+@@ -1285,6 +1314,7 @@
+    set XLIBD    = "-L/usr/X11R6/lib"
+    set XLFLAGS  = "$XLIBD"
+    set XLIBS    = " -Xlinker -lXm -Xlinker -Bdynamic -lXpm -lXt -lXext -lX11 -lSM -lICE -lXp"
++   set XMLIBS   = "$XLIBS"
+    set RM	= "rm -f"
+    set JAVA_ARCH = "linux"
+    breaksw 
+@@ -1293,15 +1323,19 @@
+    set MAKEWINGRIDLIB   = 0
+    set MAKEWINGRIDAPP   = 0
+    set COMPILE_DC = 1
++
++   set HWLOC      = 0
++   set MAKEHWLOC  = 0
++
+    set MAKE = gmake
+    set OFLAG = "-O"
+    set ARFLAGS  = rcv
     set CC       = gcc
     set CXX      = g++
     set DLLIB    = ""
@@ -451,7 +877,41 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
     set NOERR_CFLAG = "-Wno-error"
     set LFLAGS   = "$DEBUG_FLAG $LFLAGS -export-dynamic"
     set LIBS     = "$LIBS -lkvm"
-@@ -1456,19 +1487,7 @@
+@@ -1316,6 +1350,7 @@
+    set XLIBD    = "-L/usr/X11R6/lib -R/usr/X11R6/lib -L/usr/pkg/lib -R /usr/pkg/lib"
+    set XLFLAGS  = "$XLIBD"
+    set XLIBS    = " -lXm -lXpm -lXt -lXext -lX11 -lSM -lICE -lXp"
++   set XMLIBS   = "$XLIBS"
+    set RM       = "rm -f"
+    set JAVA_ARCH = "netbsd"
+    breaksw
+@@ -1340,6 +1375,9 @@
+    set COMPILE_DC = 1
+    set MAKE = gmake
+ 
++   set HWLOC      = 0
++   set MAKEHWLOC  = 0
++
+    set CFLAGS   = "$OFLAG -Werror -woff 1035,3201,3496 -n32 -mips3 -mp -DFD_SETSIZE=8192 -DIRIX -D$BUILDARCH -DGETHOSTBYNAME_M -DGETHOSTBYADDR_M $DEBUG_FLAG -DUSE_SGE_UNSETENV $CFLAGS"
+    set NOERR_CFLAG = "-woff 47,1110,1174,1209"
+    set DEPEND_FLAGS = "$CFLAGS $XMTINCD"
+@@ -1351,6 +1389,7 @@
+    set XLIBD    = ""
+    set XLFLAGS  = "$XLIBD"
+    set XLIBS    = "-lXm -lXt -lXext -lX11 -lPW -lm"
++   set XMLIBS   = "$XLIBS"
+    set RANLIB   = echo
+ 
+    # set SONAME_LFLAG_DRMAA10 = "-W l,-soname,libdrmaa.so.1.0"
+@@ -1433,6 +1472,7 @@
+    set XLIBD    = ""
+    set XLFLAGS  = "$XLIBD"
+    set XLIBS    = "-lXm -lXt -lXext -lXhp11 -lX11 -lm"
++   set XMLIBS   = "$XLIBS"
+ 
+    set SHAREDEXT = ".sl"
+    set JAVA_ARCH = "hp-ux"
+@@ -1456,19 +1496,7 @@
     breaksw
     
  case ALINUX:
@@ -472,23 +932,28 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
     set MAKEWINGRIDLIB   = 0
     set MAKEWINGRIDAPP   = 0
     set AUTHLIBS = "-lcrypt -lpam"
-@@ -1532,12 +1551,12 @@
+@@ -1532,14 +1560,17 @@
        endif
     endif
  
 -   set CFLAGS = "$CFLAGS -Wno-strict-aliasing"
-+#   set CFLAGS = "$CFLAGS -Wno-strict-aliasing"
- 
+-
 -   set CFLAGS = "$OFLAG -Wall -Wstrict-prototypes -DUSE_POLL -DLINUX -D$BUILDARCH -D$COMPILE_ARCH -D_GNU_SOURCE -DGETHOSTBYNAME_R6 -DGETHOSTBYADDR_R8 -DHAS_VSNPRINTF $DEBUG_FLAG $CFLAGS"
 +   set CFLAGS = "$OFLAG -Wall -Wstrict-prototypes -DUSE_POLL -DLINUX -DLINUX_NATIVE -D$BUILDARCH -D$COMPILE_ARCH -D_GNU_SOURCE -DGETHOSTBYNAME_R6 -DGETHOSTBYADDR_R8 -DHAS_VSNPRINTF $DEBUG_FLAG $CFLAGS"
  
     if ("$WERR" == 1) then
--      set CFLAGS = "$CFLAGS -Werror"
-+      set CFLAGS = "$CFLAGS -Werror -Wextra"
++      set CFLAGS = "$CFLAGS -Wno-strict-aliasing"
+       set CFLAGS = "$CFLAGS -Werror"
     endif
  
++   if ("$WEXTRA" == 1) then
++      set CFLAGS = "$CFLAGS -Wextra"
++   endif
++
     if ("$STACKPROTECT" == 1) then
-@@ -1547,9 +1566,11 @@
+       set CFLAGS = "$CFLAGS -fstack-protector-all"
+    endif
+@@ -1547,9 +1578,11 @@
     if ("$ADOC" == 1) then
        set CFLAGS = "$CFLAGS -Wno-error"
     endif
@@ -500,7 +965,16 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
     set LFLAGS   = "$DEBUG_FLAG $LFLAGS"
  
     set SHAREDLD = $CC
-@@ -1618,16 +1639,110 @@
+@@ -1608,6 +1641,8 @@
+       set XCFLAGS  = "-DNeedFunctionPrototypes -Wno-error $XMTDEF $XINCD $XCFLAGS"
+       set XLIBS    = "-Xlinker -Bstatic -Xlinker -Bdynamic -lXpm -lXt -lXext -lX11 -lSM -lICE -lXp -lXm"
+    endif
++   set XMLIBS   = "-lXt -lXm -lX11"
++
+    set JAVA_ARCH = "linux"
+ 
+    # due to -rpath relative_path the LD_LIBRARY_PATH not needed anymore
+@@ -1618,16 +1653,118 @@
     if ( $COMPILE_ARCH == "ULINUX86" || $COMPILE_ARCH == "ULINUXX64" ) then
        echo "Ignore jemalloc for unsupported architectures!"
        set MAKEJEMALLOCLIB = 0
@@ -533,6 +1007,9 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
 +      set OFLAG = ""
 +   endif
 +
++   set HWLOC      = 0
++   set MAKEHWLOC  = 0
++
 +   set CC  = gcc
 +   set CXX = g++
 +
@@ -550,10 +1027,14 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
 +
 +   set CFLAGS = "$CFLAGS -Wno-strict-aliasing"
 +
-+   set CFLAGS = "$OFLAG -Wall -Wstrict-prototypes -DUSE_POLL -DLINUX -DCYGWIN -D$BUILDARCH -D$COMPILE_ARCH -D_GNU_SOURCE -DGETHOSTBYNAME -DGETHOSTBYADDR -DHAS_VSNPRINTF $DEBUG_FLAG $CFLAGS"
++   set CFLAGS = "$OFLAG -Wall -Wstrict-prototypes -DUSE_POLL -DLINUX -DOGLIBC_LINUX -DCYGWIN -D$BUILDARCH -D$COMPILE_ARCH -D_GNU_SOURCE -DGETHOSTBYNAME -DGETHOSTBYADDR -DHAS_VSNPRINTF $DEBUG_FLAG $CFLAGS"
 +
 +   if ("$WERR" == 1) then
-+      set CFLAGS = "$CFLAGS -Werror -Wextra"
++      set CFLAGS = "$CFLAGS -Werror"
++   endif
++
++   if ("$WEXTRA" == 1) then
++      set CFLAGS = "$CFLAGS -Wextra"
 +   endif
 +
 +   if ("$STACKPROTECT" == 1) then
@@ -600,6 +1081,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
 +   set XINCD    = "$XMTINCD $XINCD -I/usr/X11R6/include"
 +   set XCFLAGS  = "-Wno-strict-prototypes -Wno-error $XMTDEF $XINCD $XCFLAGS"
 +   set XLIBS    = "-lXm -lXpm -lXt -lXext -lXmu -lX11 -lSM -lICE -lXp"
++   set XMLIBS   = "$XLIBS"
 +
 +   set JAVA_ARCH = "linux"
 +
@@ -613,7 +1095,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
  case WIN32_X86:
     setenv LD_LIBRARY_PATH /usr/lib/x86:/usr/local/lib
     set CC = gcc
-@@ -1644,6 +1759,7 @@
+@@ -1644,6 +1781,7 @@
     set WITH_USERMAPPING = 0 # Compile without usermapping feature
     set COMPILE_DC       = 1
     set HWLOC            = 0
@@ -621,16 +1103,48 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
     set AUTHLIBS         = ""
     set JUTI_ALL         = ""
     set JUTI_DEPEND      = ""
-@@ -1682,7 +1798,7 @@
-       #set LFLAGS = "-Wl,-EL,-b=pe-i1386 $LFLAGS"
- 
+@@ -1684,6 +1822,10 @@
        if ("$WERR" == 1) then
--        set CFLAGS = "$CFLAGS -Werror"
-+        set CFLAGS = "$CFLAGS -Werror -Wextra"
+         set CFLAGS = "$CFLAGS -Werror"
        endif
++
++      if ("$WEXTRA" == 1) then
++        set CFLAGS = "$CFLAGS -Wextra"
++      endif
     else
        set CC  = cc
-@@ -1937,13 +2053,12 @@
+       set CXX = cc
+@@ -1722,6 +1864,7 @@
+    set XINCD        = "$XMTINCD $XINCD -I/usr/X11R6/include -I/usr/local/include/bind"
+    set XCFLAGS      = "-Wno-strict-prototypes -Wno-error $XMTDEF $XINCD $XCFLAGS"
+    set XLIBS        = "-lXm -lXpm -lXt -lXext -lXmu -lX11 -lSM -lICE -lXp"
++   set XMLIBS       = "$XLIBS"
+ 
+    if ( $DEBUGGED == 1 ) then
+       set WINCFLAGS = "/Od /D "WIN32" /D "_DEBUG" /MTd /Zi"
+@@ -1763,6 +1906,10 @@
+ #
+    set INTERACTTARGETS = ""
+    set COMPILE_DC = 1
++
++   set HWLOC      = 0
++   set MAKEHWLOC  = 0
++
+    set MAKE = make
+    set CFLAGS = "-DNECSX4 -DGETHOSTBYNAME_M -DGETHOSTBYADDR_M -dir,novec,nopar,nopthr -hfloat0 $DEBUG_FLAG $CFLAGS"
+    set DEPEND_FLAGS = "$CFLAGS $XMTINCD"
+@@ -1784,6 +1931,10 @@
+    set MAKEWINGRIDAPP   = 0
+    set INTERACTTARGETS = ""
+    set COMPILE_DC = 1
++
++   set HWLOC      = 0
++   set MAKEHWLOC  = 0
++
+    if ( $CORE == 1 ) then
+       set MAKESTRPTIME = 1
+       set MAKEFNMATCH = 1
+@@ -1937,7 +2088,6 @@
        endif
        set CFLAGS = "-Xc -v $OFLAG $MEMFLAG -ftrap=division $CFLAGS $DEBUG_FLAG"
     else if ( $CC == gcc) then
@@ -638,14 +1152,26 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
        set CFLAGS = "-Wall -Wstrict-prototypes $CFLAGS"
        set SHARED_CFLAGS = "-fPIC"
        set SHARED_LFLAGS = "$SHARED_LFLAGS -L. -shared"
- 
-       if ("$WERR" == 1) then
--        set CFLAGS = "$CFLAGS -Werror"
-+        set CFLAGS = "$CFLAGS -Werror -Wextra"
+@@ -1946,6 +2096,10 @@
+         set CFLAGS = "$CFLAGS -Werror"
        endif
  
++      if ("$WEXTRA" == 1) then
++        set CFLAGS = "$CFLAGS -Wextra"
++      endif
++
        if ( $BUILDARCH == SOLARIS64 ) then
-@@ -2023,11 +2138,15 @@
+          set CFLAGS = "-m64 $CFLAGS"
+          set MEMFLAG = "-m64"
+@@ -2008,6 +2162,7 @@
+    
+    set XLFLAGS  = "$XLIBD"
+    set XLIBS    = "-lXm -lXt -lXext -lXmu -lX11 -lw -lgen"
++   set XMLIBS   = "$XLIBS"
+ 
+    set RANLIB   = "echo"
+    set JAVA_ARCH = "solaris"
+@@ -2023,11 +2178,15 @@
  
     set LFLAGS   = "$LFLAGS $DEBUG_FLAG"
     set LIBRARY_LIBS = "$LIBS"
@@ -662,7 +1188,83 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
           set LIBS = "-lmtmalloc $LIBS"
        endif
     endif
-@@ -2114,7 +2233,11 @@
+@@ -2038,6 +2197,10 @@
+    set MAKEWINGRIDLIB   = 0
+    set MAKEWINGRIDAPP   = 0
+    set INTERACTTARGETS = ""
++
++   set HWLOC      = 0
++   set MAKEHWLOC  = 0
++
+    set MAKE = gmake
+    set ARFLAGS = rcv
+    switch ($BUILDARCH)
+@@ -2066,6 +2229,7 @@
+          set XLIBS    = "-lXm -lXt -lXext -lX11 -lSM -lICE"
+          breaksw
+    endsw
++   set XMLIBS   = "$XLIBS"
+    set XCFLAGS  = "$XMTDEF $XINCD $XCFLAGS"
+    set XLFLAGS  = "$XLIBD"
+    set COMPILE_DC = 1
+@@ -2091,11 +2255,54 @@
+ set CFLAGS       = "-D$ARCH_STRING $CFLAGS"
+ set DEPEND_FLAGS = "-D$ARCH_STRING $DEPEND_FLAGS"
+ 
++#---------------------------------------------------------------------------
++if ( $JAVA > 0 || $BUILDJAVADOC == 1 || $JNI == 1 ) then
++
++   # Make sure we can find JAVA_HOME
++   if ( ${?JAVA_HOME} == 0 ) then
++      echo "Please set JAVA_HOME or disable Java & JGDI support"
++      echo "with aimk flags: -no-java -no-jni"
++      exit 1
++   endif
++
++   if ( ${JAVA_HOME} == "/usr" ) then
++      echo 'WARNING:'
++      echo 'Setting $JAVA_HOME to "/usr" causes problems on some systems, '
++      echo 'because the associated include path will be "/usr/include", '
++      echo 'which is a reserved system include path.'
++      echo
++      echo 'Please either set $JAVA_HOME correctly or disable Java & JGDI support'
++      echo 'with aimk flags: -no-java -no-jni'
++      echo
++      echo 'Contining without Java & JGDI support'
++      echo
++
++      if ( ${?JAVA_HOME_SET_BY_SGE} ) then
++         unsetenv JAVA_HOME
++      endif
++
++      set JNI = 0
++      set JAVA = 0
++   endif
++endif
++
+ if ( $JNI == 1 ) then
+-   set CORE_INCLUDE = "$CORE_INCLUDE -I${JAVA_HOME}/${JAVA_INCL}"
++
++   set JAVA_INCL_DIR = "${JAVA_HOME}/${JAVA_INCL}"
++
++   if ( ! -d "$JAVA_INCL_DIR" ) then
++      echo 'WARNING:'
++      echo 'Java include directory not found.'
++      echo
++      echo 'Please either set $JAVA_HOME correctly or disable Java & JGDI support'
++      echo 'with aimk flags: -no-java -no-jni'
++      exit 1
++   else
++      set CORE_INCLUDE = "$CORE_INCLUDE -I${JAVA_INCL_DIR}"
++   endif
+ 
+    if ("$JAVA_ARCH" != "") then
+-      set CORE_INCLUDE = "$CORE_INCLUDE -I${JAVA_HOME}/${JAVA_INCL}/${JAVA_ARCH}"
++      set CORE_INCLUDE = "$CORE_INCLUDE -I${JAVA_INCL_DIR}/${JAVA_ARCH}"
+       switch ($buildarch)
+          case linux-x86:
+          case nbsd-i386:
+@@ -2114,7 +2321,11 @@
               breaksw
           case linux-x64:
           case sol-amd64:
@@ -675,7 +1277,16 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
               breaksw
           case linux-ia64:
               set JAVA_LIB_ARCH = ia64
-@@ -2159,9 +2282,9 @@
+@@ -2143,7 +2354,7 @@
+          case tru64:
+              set JAVA_LIB_ARCH = "" 
+              breaksw
+-         case aix5:
++         case aix:
+              set JAVA_LIB_ARCH = "" 
+              breaksw
+          default:
+@@ -2159,9 +2370,9 @@
     #
     # special treatment
     #
@@ -687,7 +1298,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
       set JAVA_LFLAGS="-L$JAVA_HOME/../Libraries"
     else if ( $buildarch == irix65 ) then
       set JAVA_LFLAGS="-L$JAVA_HOME/jre/lib32/mips"
-@@ -2180,19 +2303,6 @@
+@@ -2180,19 +2391,6 @@
  
  set MAKEOPT = "$MAKEOPT $PARALLEL"
  
@@ -707,7 +1318,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
  # pass -DCOMPILE_DC define to compile where PTF and PDC are ported
  #
  if ( $COMPILE_DC == 1 ) then
-@@ -2246,13 +2356,17 @@
+@@ -2246,13 +2444,17 @@
  
  if ( $HWLOC == 1 ) then
     set CFLAGS = "$CFLAGS -DTHREADBINDING -DHWLOC"
@@ -729,7 +1340,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
  # create shared lib from LGPL code  - use $SHAREDEXT for shared lib extension
  #
  set GSHARED_CFLAGS = "$SHARED_CFLAGS"
-@@ -2444,7 +2558,8 @@
+@@ -2444,7 +2646,8 @@
  
     if ( "$HWLOC" == 1 ) then
        echo "No dependencies for 3rd_party hwloc ... skipping"
@@ -739,7 +1350,7 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
     endif
  
     if ( "$QMAKE" == 1 ) then
-@@ -2581,7 +2696,7 @@
+@@ -2581,7 +2784,7 @@
     cd $SOURCE
  endif
  
@@ -748,6 +1359,131 @@ diff -ruN --exclude .svn GE2011.11/source/aimk gridscheduler-trunk/source/aimk
     echo _________3_r_d_p_a_r_t_y__H_W_L_O_C_______
  
        set maj_ver = `echo $HWLOC_VERSION| cut -f 1 -d .`
+@@ -2768,7 +2971,7 @@
+          "KRBLIB=$KRBLIB" "GSSDEPEND=$GSSDEPEND" \
+          "GSSCLEAN=$GSSCLEAN" "MSDIR=$MSDIR" "SLIBS=$GSSLIBS $KLIBS" "LIBS=$LIBS" \
+          "XCFLAGS=$XCFLAGS" "XLFLAGS=$XLFLAGS" \
+-         "XLIBS=$XLIBS" "LFLAGS=$LFLAGS $KLFLAGS" "STRIP=$STRIP" \
++         "XLIBS=$XLIBS" "XMLIBS=$XMLIBS" "LFLAGS=$LFLAGS $KLFLAGS" "STRIP=$STRIP" \
+          "RANLIB=$RANLIB" "AR=$AR" "ARFLAGS=$ARFLAGS" \
+          "NOERR_PROTO=$NOERR_PROTO" "NOERR_CFLAG=$NOERR_CFLAG" \
+          "COMPILE_DC=$COMPILE_DC" "LOADAVGLIBS=$LOADAVGLIBS" \
+@@ -2870,7 +3073,7 @@
+          "CFLAGS=$CFLAGS" "SDIR=$SDIR" "SOURCE=$SOURCE" \
+          "COMPILE_ARCH=$COMPILE_ARCH" \
+          "XCFLAGS=$XCFLAGS" "XLFLAGS=$XLFLAGS" "KRBLIBS=$KRBLIBS" \
+-         "XLIBS=$XLIBS" "LFLAGS=$LFLAGS $KLFLAGS" "STRIP=$STRIP" "RANLIB=$RANLIB" \
++         "XLIBS=$XLIBS" "XMLIBS=$XMLIBS" "LFLAGS=$LFLAGS $KLFLAGS" "STRIP=$STRIP" "RANLIB=$RANLIB" \
+          "AR=$AR" "ARFLAGS=$ARFLAGS" "TPLIB=$TPLIB" \
+          "MEMCFLAG=$MEMCFLAG"  \
+          "SHARED_CFLAGS=$SHARED_CFLAGS" "SHARED_LFLAGS=$SHARED_LFLAGS" \
+@@ -2897,7 +3100,7 @@
+          "KRBLIBS=$KRBLIBS" "KRBLIB=$KRBLIB" "GSSDEPEND=$GSSDEPEND" \
+          "GSSCLEAN=$GSSCLEAN" "MSDIR=$MSDIR" "SLIBS=$GSSLIBS $KLIBS" "LIBS=$LIBS" \
+          "XCFLAGS=$XCFLAGS" "XLFLAGS=$XLFLAGS" \
+-         "XLIBS=$XLIBS" "LFLAGS=$LFLAGS $KLFLAGS" "STRIP=$STRIP" \
++         "XLIBS=$XLIBS" "XMLIBS=$XMLIBS" "LFLAGS=$LFLAGS $KLFLAGS" "STRIP=$STRIP" \
+          "RANLIB=$RANLIB" "AR=$AR" "ARFLAGS=$ARFLAGS" \
+          "NOERR_PROTO=$NOERR_PROTO" \
+          "NOERR_CFLAG=$NOERR_CFLAG" \
+diff -ruN --exclude .svn GE2011.11/source/aimk.site gridscheduler-trunk/source/aimk.site
+--- GE2011.11/source/aimk.site	2011-11-14 12:01:16.000000000 -0700
++++ gridscheduler-trunk/source/aimk.site	2012-03-21 09:25:10.595916974 -0600
+@@ -53,8 +53,8 @@
+    case "irix65":
+    case "hp11":
+    case "hp11-64":
+-   case "lx24-ia64":
+-   case "aix51":
++   case "linux-ia64":
++   case "aix":
+       if ( -f /vol2/resources/en_jdk14 ) then
+          source /vol2/resources/en_jdk14 
+       endif   
+@@ -147,7 +147,7 @@
+       # for HP11.00 we don't have dynamic loading of shared libraries
+       # build with berkeleydb
+    case "AIX43":
+-   case "AIX51":
++   case "AIX":
+    case "IRIX65":
+       # for these platforms, reverse resolving of global symbols doesn't
+       # work as expected: Instead of reverse resolving global symbols
+@@ -158,18 +158,68 @@
+ endsw
+ 
+ if ( ! $?JAVA_HOME ) then
+-   set JAVA_BIN = `which \java`
+ 
+-   if ( -e "$JAVA_BIN" ) then
+-      set JAVAV = `$JAVA_BIN -version |& head -1`
+-      set JAVAV = `expr "$JAVAV" : 'java version "1\.\([0-9]\).*"'`
++   set JAVAC_BIN = `which \javac`
++   set JAVA_HOME_LOCATION = ""
+ 
+-      if ( $JAVAV >= 4 ) then
+-         setenv JAVA_HOME `expr //$JAVA_BIN : '//\(.*\)/bin/.*'`
++   set JAVAC_LOCATION = $JAVAC_BIN
++   while ( { test -L "$JAVAC_LOCATION" }  )
++       set JAVAC_LOCATION = `readlink $JAVAC_LOCATION`
++       if ( $status != 0 ) then
++          break
++       endif
++   end
++
++   if ( -e "$JAVAC_LOCATION" ) then
++      set JAVAC_BIN = $JAVAC_LOCATION
++   endif
++
++   if ( -e "$JAVAC_BIN" ) then
++      set JAVAV = `$JAVAC_BIN -version >& /dev/null`
++      if ( $status == 0 ) then
++         set JAVAV = `$JAVAC_BIN -version |& head -1`
++         set JAVAV = `expr "$JAVAV" : 'javac 1\.\([0-9]\).*'`
++
++         if ( $JAVAV >= 4 ) then
++            set JAVA_HOME_LOCATION = `expr //$JAVAC_BIN : '//\(.*\)/bin/.*'`
++
++            if ( ! -d  "$JAVA_HOME_LOCATION" ) then
++               set JAVA_HOME_LOCATION = `expr //$JAVAC_BIN : '//\(.*\)/Commands/.*'`
++            endif
++         endif
++      else
++         set JAVA_HOME_LOCATION = `expr //$JAVAC_BIN : '//\(.*\)/bin/.*'`
++
++         if ( ! -d  "$JAVA_HOME_LOCATION" ) then
++            set JAVA_HOME_LOCATION = `expr //$JAVAC_BIN : '//\(.*\)/Commands/.*'`
++         endif
++      endif
++
++      if ( -d "$JAVA_HOME_LOCATION" ) then
++         setenv JAVA_HOME            $JAVA_HOME_LOCATION
++         setenv JAVA_HOME_SET_BY_SGE TRUE
++      else
++         set JAVAC_LOCATION = `which \javac`
++
++         while ( { test -L "$JAVAC_LOCATION" }  )
++             set JAVAC_LOCATION = `readlink $JAVAC_LOCATION`
++             if ( $status != 0 ) then
++                break
++             endif
++
++             set CHECK_PATH = `expr //$JAVAC_LOCATION : '//\(.*\)/bin/.*'`
++
++             if ( -e "$CHECK_PATH/include/jni.h" ) then
++                setenv JAVA_HOME            $CHECK_PATH
++                setenv JAVA_HOME_SET_BY_SGE TRUE
++                break
++             endif
++         end
+       endif
+    endif
+ endif
+ 
++
+ # set junit jar file
+ # set JUNIT_JAR = '/vol2/tools/SW/java/junit3.8.1/junit.jar'
+ set JUNIT_JAR = '/usr/share/java/junit.jar'
 diff -ruN --exclude .svn GE2011.11/source/clients/common/sge_qstat.c gridscheduler-trunk/source/clients/common/sge_qstat.c
 --- GE2011.11/source/clients/common/sge_qstat.c	2011-11-14 12:00:52.000000000 -0700
 +++ gridscheduler-trunk/source/clients/common/sge_qstat.c	2012-02-08 09:46:02.593094944 -0700
@@ -848,6 +1584,17 @@ diff -ruN --exclude .svn GE2011.11/source/common/basis_types.h gridscheduler-tru
  #     include <stdbool.h>
  #  else
  typedef enum {
+diff -ruN --exclude .svn GE2011.11/source/common/msg_common.h gridscheduler-trunk/source/common/msg_common.h
+--- GE2011.11/source/common/msg_common.h	2011-11-14 12:00:44.000000000 -0700
++++ gridscheduler-trunk/source/common/msg_common.h	2012-03-21 09:25:08.899977341 -0600
+@@ -64,6 +64,7 @@
+ #define MSG_FILE_CANNOT_WRITE_SS                                     _MESSAGE(23030, _("unable to write to file "SFN": "SFN))
+ #define MSG_FILE_CANNOT_FLUSH_SS                                     _MESSAGE(23031, _("unable to flush file "SFN": "SFN))
+ #define MSG_CONF_THEPATHGIVENFORXMUSTSTARTWITHANY_S                  _MESSAGE(23032, _("denied: the path given for "SFQ" must start with a \"/\""))
++#define MSG_FILE_CANNOT_CHOWN                                     _MESSAGE(23033, _("unable to chown file "SFN": "SFN))
+ 
+ /*
+ ** parse_job_cull.c
 diff -ruN --exclude .svn GE2011.11/source/common/parse_qsub.c gridscheduler-trunk/source/common/parse_qsub.c
 --- GE2011.11/source/common/parse_qsub.c	2011-11-14 12:00:44.000000000 -0700
 +++ gridscheduler-trunk/source/common/parse_qsub.c	2012-02-08 09:46:01.467133645 -0700
@@ -1051,6 +1798,915 @@ diff -ruN --exclude .svn GE2011.11/source/daemons/common/procfs.c gridscheduler-
  #include <sys/syscall.h>
  #endif
  
+diff -ruN --exclude .svn GE2011.11/source/daemons/execd/exec_job.c gridscheduler-trunk/source/daemons/execd/exec_job.c
+--- GE2011.11/source/daemons/execd/exec_job.c	2011-11-14 12:00:42.000000000 -0700
++++ gridscheduler-trunk/source/daemons/execd/exec_job.c	2012-03-21 09:25:08.801980829 -0600
+@@ -493,7 +493,7 @@
+                && strcmp(sge_dstring_get_string(&core_binding_strategy_string), "NULL") != 0) {
+             
+             sge_dstring_sprintf(&pseudo_usage, "binding_inuse=%s", 
+-                           binding_get_topology_for_job((sge_dstring_get_string(&core_binding_strategy_string))));
++                           binding_get_topology_for_job(sge_dstring_get_string(&core_binding_strategy_string)));
+ 
+             jr = get_job_report(job_id, ja_task_id, pe_task_id);
+             
+diff -ruN --exclude .svn GE2011.11/source/daemons/qmaster/sge_host_qmaster.c gridscheduler-trunk/source/daemons/qmaster/sge_host_qmaster.c
+--- GE2011.11/source/daemons/qmaster/sge_host_qmaster.c	2011-11-14 12:00:44.000000000 -0700
++++ gridscheduler-trunk/source/daemons/qmaster/sge_host_qmaster.c	2012-03-21 09:25:08.862978658 -0600
+@@ -112,7 +112,8 @@
+    object_base = object_type_get_object_description();
+ 
+    /* initiate timer for all hosts because they start in 'unknown' state */
+-   if (*object_base[SGE_TYPE_EXECHOST].list) {
++   if (*object_base[SGE_TYPE_EXECHOST].list)
++   {
+       lListElem *host               = NULL;
+       lListElem *global_host_elem   = NULL;
+       lListElem *template_host_elem = NULL;
+@@ -123,8 +124,10 @@
+       /* get "template" element pointer */
+       template_host_elem = host_list_locate(*object_base[SGE_TYPE_EXECHOST].list, SGE_TEMPLATE_NAME);
+       
+-      for_each(host, *object_base[SGE_TYPE_EXECHOST].list) {
+-         if ((host != global_host_elem) && (host != template_host_elem)) {
++      for_each(host, *object_base[SGE_TYPE_EXECHOST].list)
++      {
++         if ((host != global_host_elem) && (host != template_host_elem))
++         {
+             reschedule_add_additional_time(load_report_interval(host));
+             reschedule_unknown_trigger(host);
+             reschedule_add_additional_time(0);
+@@ -159,11 +162,11 @@
+ 
+    load_attr_list = lGetList(host, EH_load_list);
+    next_load_attr = lFirst(load_attr_list);
+-   while ((load_attr = next_load_attr)) {
++   while ((load_attr = next_load_attr))
++   {
+       next_load_attr = lNext(load_attr);
+-      if (!lGetBool(load_attr, HL_static)) {
++      if (!lGetBool(load_attr, HL_static))
+          lRemoveElem(load_attr_list, &load_attr);
+-      }
+    }
+ }
+ 
+@@ -190,9 +193,8 @@
+ 
+    DENTER(TOP_LAYER, "sge_add_host_of_type");
+ 
+-   if (hostname == NULL) {
++   if (hostname == NULL)
+       DRETURN(-1);
+-   }
+   
+    object = get_gdi_object(target);
+    
+@@ -200,7 +202,8 @@
+    ep = lCreateElem(object->type);
+    pos = lGetPosInDescr(object->type,object->key_nm);
+    dataType = lGetPosType(object->type , pos);
+-   switch (dataType) {
++   switch (dataType)
++   {
+       case lStringT:
+          lSetString(ep, object->key_nm, hostname);
+          break;
+@@ -210,8 +213,8 @@
+       default:
+          DPRINTF(("sge_add_host_of_type: unexpected datatype\n"));
+    }
+-   ret = sge_gdi_add_mod_generic(ctx, NULL, ep, 1, object, username, 
+-      qualified_hostname, 0, &ppList, monitor);
++
++   ret = sge_gdi_add_mod_generic(ctx, NULL, ep, 1, object, username, qualified_hostname, 0, &ppList, monitor);
+    lFreeElem(&ep);
+    lFreeList(&ppList);
+ 
+@@ -230,13 +233,13 @@
+    lListElem *href = NULL;
+ 
+    DENTER(TOP_LAYER, "host_list_add_missing_href");
+-   for_each(href, href_list) {
++   for_each(href, href_list)
++   {
+       const char *hostname = lGetHost(href, HR_name);
+       lListElem *host = host_list_locate(this_list, hostname);
+ 
+-      if (host == NULL) {
++      if (host == NULL)
+          ret &= (sge_add_host_of_type(ctx, hostname, SGE_EH_LIST, monitor) == 0);
+-      }
+    }
+    DRETURN(ret);
+ }
+@@ -265,44 +268,51 @@
+ 
+    DENTER(TOP_LAYER, "sge_del_host");
+ 
+-   if ( !hep || !ruser || !rhost ) {
++   if ( !hep || !ruser || !rhost )
++   {
+       CRITICAL((SGE_EVENT, MSG_SGETEXT_NULLPTRPASSED_S, SGE_FUNC));
+       answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_ERROR);
+       DEXIT;
+       return STATUS_EUNKNOWN;
+    }
+ 
+-   switch ( target ) {
+-   case SGE_EH_LIST:
++   switch ( target )
++   {
++    case SGE_EH_LIST:
+       host_list = object_type_get_master_list(SGE_TYPE_EXECHOST);
+       nm = EH_name;
+       name = "execution host";
+       break;
+-   case SGE_AH_LIST:
++
++    case SGE_AH_LIST:
+       host_list = object_type_get_master_list(SGE_TYPE_ADMINHOST);
+       nm = AH_name;
+       name = "administrative host";
+       break;
+-   case SGE_SH_LIST:
++
++    case SGE_SH_LIST:
+       host_list = object_type_get_master_list(SGE_TYPE_SUBMITHOST);
+       nm = SH_name;
+       name = "submit host";
+       break;
+-   default:
++
++    default:
+      DEXIT;
+      return STATUS_EUNKNOWN;
+    }
++
+    /* ep is no host element, if ep has no nm */
+-   if ((pos = lGetPosViaElem(hep, nm, SGE_NO_ABORT)) < 0) {
+-      ERROR((SGE_EVENT, MSG_SGETEXT_MISSINGCULLFIELD_SS,
+-            lNm2Str(nm), SGE_FUNC));
++   if ((pos = lGetPosViaElem(hep, nm, SGE_NO_ABORT)) < 0)
++   {
++      ERROR((SGE_EVENT, MSG_SGETEXT_MISSINGCULLFIELD_SS, lNm2Str(nm), SGE_FUNC));
+       answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_ERROR);
+       DEXIT;
+       return STATUS_EUNKNOWN;
+    }
+ 
+    host = lGetPosHost(hep, pos);
+-   if (!host) {
++   if (!host)
++   {
+       ERROR((SGE_EVENT, MSG_SGETEXT_NULLPTRPASSED_S, SGE_FUNC));
+       answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_ERROR);
+       DEXIT;
+@@ -310,7 +320,8 @@
+    }
+ 
+    ret = sge_resolve_hostname(host, unique, EH_name);
+-   if (ret  != CL_RETVAL_OK) {
++   if (ret  != CL_RETVAL_OK)
++   {
+       /* 
+        * Due to CR 6319231, IZ 1760 this is allowed 
+        */
+@@ -318,7 +329,8 @@
+    }
+ 
+    /* check if host is in host list */
+-   if ((ep=host_list_locate(*host_list, unique))==NULL) {
++   if ((ep=host_list_locate(*host_list, unique))==NULL)
++   {
+       /* may be host was not the unique hostname.
+          Get the unique hostname and try to find it again. */
+       if (getuniquehostname(host, unique, 0)!=CL_RETVAL_OK)
+@@ -328,9 +340,11 @@
+          DEXIT;
+          return STATUS_EUNKNOWN;
+       }
++
+       /* again check if host is in host list. This time use the unique
+          hostname */
+-      if ((ep=host_list_locate(*host_list, unique))==NULL) {
++      if ((ep=host_list_locate(*host_list, unique))==NULL)
++      {
+          ERROR((SGE_EVENT, MSG_SGETEXT_DOESNOTEXIST_SS, name, host));
+          answer_list_add(alpp, SGE_EVENT, STATUS_EEXIST, ANSWER_QUALITY_ERROR);
+          DEXIT;
+@@ -342,69 +356,68 @@
+       check if someone tries to delete 
+       the qmaster host from admin host list
+    */
+-   if (target==SGE_AH_LIST && 
+-         !sge_hostcmp(unique, qualified_hostname)) {
+-      ERROR((SGE_EVENT, MSG_SGETEXT_CANTDELADMINQMASTER_S, 
+-          qualified_hostname));
+-      answer_list_add(alpp, SGE_EVENT, STATUS_EEXIST, ANSWER_QUALITY_ERROR);
+-      DEXIT;
+-      return STATUS_EEXIST;
+-   }
+-
+-   if (target == SGE_EH_LIST && 
+-       host_is_referenced(hep, alpp, 
+-                          *(object_type_get_master_list(SGE_TYPE_CQUEUE)),
+-                          master_hGroup_List)) {
+-      answer_list_log(alpp, false, true);                    
+-      DEXIT;
+-      return STATUS_ESEMANTIC;
+-   }
+-
+-   if (target==SGE_EH_LIST && !strcasecmp(unique, "global")) {
+-      ERROR((SGE_EVENT, MSG_OBJ_DELGLOBALHOST));
+-      answer_list_add(alpp, SGE_EVENT, STATUS_ESEMANTIC, ANSWER_QUALITY_ERROR);
+-      DEXIT;
+-      return STATUS_ESEMANTIC;
+-   }
+ 
+    /* remove host file and send event */
+-   switch(target) {
++   switch (target)
++   {
+       case SGE_AH_LIST:
+-         {
+-            lList *answer_list = NULL;
+-            sge_event_spool(ctx, &answer_list, 0, sgeE_ADMINHOST_DEL, 
+-                            0, 0, lGetHost(ep, nm), NULL, NULL,
+-                            NULL, NULL, NULL, true, true);
+-            answer_list_output(&answer_list);
+-         }
+-         break;
++      {
++        lList *answer_list = NULL;
++
++        if (!sge_hostcmp(unique, qualified_hostname))
++        {
++           ERROR((SGE_EVENT, MSG_SGETEXT_CANTDELADMINQMASTER_S, qualified_hostname));
++           answer_list_add(alpp, SGE_EVENT, STATUS_EEXIST, ANSWER_QUALITY_ERROR);
++           DEXIT;
++           return STATUS_EEXIST;
++        }
++
++        sge_event_spool(ctx, &answer_list, 0, sgeE_ADMINHOST_DEL, 0, 0, lGetHost(ep, nm), NULL, NULL, NULL, NULL, NULL, true, true);
++        answer_list_output(&answer_list);
++
++        break;
++      }
++
+       case SGE_EH_LIST:
+-         {
+-            lList *answer_list = NULL;
+-            sge_event_spool(ctx, &answer_list, 0, sgeE_EXECHOST_DEL, 
+-                            0, 0, lGetHost(ep, nm), NULL, NULL,
+-                            NULL, NULL, NULL, true, true);
+-            answer_list_output(&answer_list);
+-         }
+-	 host_update_categories(NULL, ep);
++      {
++        lList *answer_list = NULL;
++
++        if (host_is_referenced(hep, alpp, *(object_type_get_master_list(SGE_TYPE_CQUEUE)), master_hGroup_List))
++        {
++           answer_list_log(alpp, false, true);
++           DEXIT;
++           return STATUS_ESEMANTIC;
++        }
++        else if (!strcasecmp(unique, "global"))
++        {
++           ERROR((SGE_EVENT, MSG_OBJ_DELGLOBALHOST));
++           answer_list_add(alpp, SGE_EVENT, STATUS_ESEMANTIC, ANSWER_QUALITY_ERROR);
++           DEXIT;
++           return STATUS_ESEMANTIC;
++        }
++
++        sge_event_spool(ctx, &answer_list, 0, sgeE_EXECHOST_DEL, 0, 0, lGetHost(ep, nm), NULL, NULL, NULL, NULL, NULL, true, true);
++        answer_list_output(&answer_list);
++        host_update_categories(NULL, ep);
++
++        break;
++      }
+ 
+-         break;
+       case SGE_SH_LIST:
+-         {
+-            lList *answer_list = NULL;
+-            sge_event_spool(ctx, &answer_list, 0, sgeE_SUBMITHOST_DEL, 
+-                            0, 0, lGetHost(ep, nm), NULL, NULL,
+-                            NULL, NULL, NULL, true, true);
+-            answer_list_output(&answer_list);
+-         }
+-         break;
++      {
++        lList *answer_list = NULL;
++
++        sge_event_spool(ctx, &answer_list, 0, sgeE_SUBMITHOST_DEL, 0, 0, lGetHost(ep, nm), NULL, NULL, NULL, NULL, NULL, true, true);
++        answer_list_output(&answer_list);
++
++        break;
++      }
+    }
+ 
+    /* delete found host element */
+    lRemoveElem(*host_list, &ep);
+ 
+-   INFO((SGE_EVENT, MSG_SGETEXT_REMOVEDFROMLIST_SSSS, 
+-         ruser, rhost, unique, name));
++   INFO((SGE_EVENT, MSG_SGETEXT_REMOVEDFROMLIST_SSSS, ruser, rhost, unique, name));
+    answer_list_add(alpp, SGE_EVENT, STATUS_OK, ANSWER_QUALITY_INFO);
+    DEXIT;
+    return STATUS_OK;
+@@ -421,8 +434,8 @@
+ const char *ruser,
+ const char *rhost,
+ gdi_object_t *object,
+-int sub_command, monitoring_t *monitor
+-) {
++int sub_command, monitoring_t *monitor)
++{
+    const char *host;
+    int nm;
+    int pos;
+@@ -582,29 +595,29 @@
+ 
+    pos = lGetPosViaElem(ep, object->key_nm, SGE_NO_ABORT );
+    dataType = lGetPosType(lGetElemDescr(ep),pos);
+-   if (dataType == lHostT ) { 
++   if (dataType == lHostT )
+       key = lGetHost(ep, object->key_nm);
+-   } else {
++   else
+       key = lGetString(ep, object->key_nm);
+-   }
+-     
+-   switch (object->key_nm) {
++ 
++   switch (object->key_nm)
++   {
+       case AH_name:
+          host_type = SGE_TYPE_ADMINHOST;
+          break;
++
+       case EH_name:
+          host_type = SGE_TYPE_EXECHOST;
+          break;
++
+       case SH_name:
+          host_type = SGE_TYPE_SUBMITHOST;
+          break;
+    }
+      
+-   if (!spool_write_object(alpp, spool_get_default_context(), ep, key, host_type, job_spooling)) {
+-      answer_list_add_sprintf(alpp, STATUS_EUNKNOWN, 
+-                              ANSWER_QUALITY_ERROR, 
+-                              MSG_PERSISTENCE_WRITE_FAILED_S,
+-                              key);
++   if (!spool_write_object(alpp, spool_get_default_context(), ep, key, host_type, job_spooling))
++   {
++      answer_list_add_sprintf(alpp, STATUS_EUNKNOWN, ANSWER_QUALITY_ERROR, MSG_PERSISTENCE_WRITE_FAILED_S, key);
+       ret = 1;
+    }
+    answer_list_output(&answer_list);
+@@ -616,7 +629,8 @@
+ {
+    DENTER(TOP_LAYER, "host_success");
+ 
+-   switch(object->key_nm) {
++   switch(object->key_nm)
++   {
+       case EH_name:
+       {
+          const char *host = lGetHost(ep, EH_name);
+@@ -624,34 +638,40 @@
+ 
+          sge_change_queue_version_exechost(ctx, host);
+ 
+-         if (global_host) {
++         if (global_host)
++         {
+             host_list_merge(*object_type_get_master_list(SGE_TYPE_EXECHOST));
+-         } else {
++         }
++         else
++         {
+             const lListElem *global_ep = NULL;
+ 
+-            global_ep = lGetElemHost(*object_type_get_master_list(SGE_TYPE_EXECHOST), EH_name,
+-                                     SGE_GLOBAL_NAME);
++            global_ep = lGetElemHost(*object_type_get_master_list(SGE_TYPE_EXECHOST), EH_name, SGE_GLOBAL_NAME);
+             host_merge(ep, global_ep);
+          }
+ 
+          host_update_categories(ep, old_ep);
+-         sge_add_event( 0, old_ep?sgeE_EXECHOST_MOD:sgeE_EXECHOST_ADD,
+-                       0, 0, host, NULL, NULL, ep);
++         sge_add_event( 0, old_ep?sgeE_EXECHOST_MOD:sgeE_EXECHOST_ADD, 0, 0, host, NULL, NULL, ep);
+          lListElem_clear_changed_info(ep);
++
++         break;
+       }
+-      break;
+ 
+       case AH_name:
+-         sge_add_event( 0, old_ep?sgeE_ADMINHOST_MOD:sgeE_ADMINHOST_ADD, 
+-                       0, 0, lGetHost(ep, AH_name), NULL, NULL, ep);
++      {
++         sge_add_event( 0, old_ep?sgeE_ADMINHOST_MOD:sgeE_ADMINHOST_ADD, 0, 0, lGetHost(ep, AH_name), NULL, NULL, ep);
+          lListElem_clear_changed_info(ep);
+-      break;
++
++         break;
++      }
+ 
+       case SH_name:
+-         sge_add_event( 0, old_ep?sgeE_SUBMITHOST_MOD:sgeE_SUBMITHOST_ADD, 
+-                       0, 0, lGetHost(ep, SH_name), NULL, NULL, ep);
++      {
++         sge_add_event( 0, old_ep?sgeE_SUBMITHOST_MOD:sgeE_SUBMITHOST_ADD, 0, 0, lGetHost(ep, SH_name), NULL, NULL, ep);
+          lListElem_clear_changed_info(ep);
+-      break;
++
++         break;
++      }
+    }
+ 
+    DRETURN(0);
+@@ -659,18 +679,19 @@
+ 
+ /* ------------------------------------------------------------ */
+ 
+-void sge_mark_unheard(lListElem *hep) {
++void sge_mark_unheard(lListElem *hep)
++{
+    const char *host;
+ 
+    DENTER(TOP_LAYER, "sge_mark_unheard");
+ 
+    host = lGetHost(hep, EH_name);
+ 
+-   if (cl_com_remove_known_endpoint_from_name(host, prognames[EXECD], 1) == CL_RETVAL_OK) {
++   if (cl_com_remove_known_endpoint_from_name(host, prognames[EXECD], 1) == CL_RETVAL_OK)
+       DEBUG((SGE_EVENT, "set %s/%s/%d to unheard\n", host, prognames[EXECD], 1));
+-   }
+ 
+-   if (lGetUlong(hep, EH_lt_heard_from) != 0) {
++   if (lGetUlong(hep, EH_lt_heard_from) != 0)
++   {
+       host_trash_nonstatic_load_values(hep);
+       cqueue_list_set_unknown_state(
+             *(object_type_get_master_list(SGE_TYPE_CQUEUE)),
+@@ -705,13 +726,9 @@
+ 
+    DENTER(TOP_LAYER, "sge_update_load_values");
+ 
+-   /* JG: TODO: this time should better come with the report.
+-    *           it is the time when the reported values were valid.
+-    */
+-   now = sge_get_gmt();
+-
+    host_ep = lGetElemHost(*object_type_get_master_list(SGE_TYPE_EXECHOST), EH_name, rhost);
+-   if (host_ep == NULL) {
++   if (host_ep == NULL)
++   {
+       /* report from unknown host arrived, ignore it */
+       DRETURN_VOID;
+    }
+@@ -719,7 +736,8 @@
+    /* 
+     * if rhost is unknown set him to known
+     */
+-   if (lGetUlong(host_ep, EH_lt_heard_from) == 0) {
++   if (lGetUlong(host_ep, EH_lt_heard_from) == 0)
++   {
+       cqueue_list_set_unknown_state(*(object_type_get_master_list(SGE_TYPE_CQUEUE)),
+                                     rhost, true, false);
+ 
+@@ -729,6 +747,11 @@
+       lSetUlong(host_ep, EH_lt_heard_from, sge_get_gmt());
+    }
+ 
++   /* JG: TODO: this time should better come with the report.
++    *           it is the time when the reported values were valid.
++    */
++   now = sge_get_gmt();
++
+    host_ep = NULL;
+    /* loop over all received load values */
+    for_each(ep, lp) {
+@@ -844,7 +867,8 @@
+    /* get "global" element pointer */
+    global_host_elem   = host_list_locate(master_exechost_list, SGE_GLOBAL_NAME);    
+    /* get "template" element pointer */
+-   template_host_elem = host_list_locate(master_exechost_list, SGE_TEMPLATE_NAME); 
++   template_host_elem = host_list_locate(master_exechost_list, SGE_TEMPLATE_NAME);
++
+    /* take each host including the "global" host */
+    for_each(hep, master_exechost_list) {
+       unsigned long last_heard;
+diff -ruN --exclude .svn GE2011.11/source/daemons/qmaster/sge_job_verify.c gridscheduler-trunk/source/daemons/qmaster/sge_job_verify.c
+--- GE2011.11/source/daemons/qmaster/sge_job_verify.c	2011-11-14 12:00:43.000000000 -0700
++++ gridscheduler-trunk/source/daemons/qmaster/sge_job_verify.c	2012-03-21 09:25:08.861978693 -0600
+@@ -83,60 +83,58 @@
+ #include "msg_qmaster.h"
+ #include "msg_daemons_common.h"
+ 
+-int
+-sge_job_verify_adjust(sge_gdi_ctx_class_t *ctx, lListElem *jep, lList **alpp, 
+-                      lList **lpp, char *ruser, char *rhost, uid_t uid, gid_t gid, char *group, 
+-                      sge_gdi_packet_class_t *packet, sge_gdi_task_class_t *task,
+-                      monitoring_t *monitor)
++int sge_job_verify_adjust(sge_gdi_ctx_class_t *ctx, lListElem *jep, lList **alpp, lList **lpp,
++                          char *ruser, char *rhost, uid_t uid, gid_t gid, char *group, 
++                          sge_gdi_packet_class_t *packet, sge_gdi_task_class_t *task,
++                          monitoring_t *monitor)
+ {
+    object_description *object_base = object_type_get_object_description();
+    int ret = STATUS_OK;
+ 
+    DENTER(TOP_LAYER, "sge_job_verify_adjust");
+ 
+-   if (jep == NULL || ruser == NULL || rhost == NULL ) {
++   if (jep == NULL || ruser == NULL || rhost == NULL )
++   {
+       CRITICAL((SGE_EVENT, MSG_SGETEXT_NULLPTRPASSED_S, SGE_FUNC));
+       answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_ERROR);
+       ret = STATUS_EUNKNOWN;
+    }
+ 
+-   /* check min_uid */
+-   if (ret == STATUS_OK) {
+-      if (uid < mconf_get_min_uid()) {
++   if (ret == STATUS_OK)
++   {
++      /* check min_uid */
++      if (uid < mconf_get_min_uid())
++      {
+          ERROR((SGE_EVENT, MSG_JOB_UID2LOW_II, (int)uid, (int)mconf_get_min_uid()));
+          answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_ERROR);
+          ret = STATUS_EUNKNOWN;
+       }
+-   }
+-
+-   /* check min_gid */
+-   if (ret == STATUS_OK) {
+-      if (gid < mconf_get_min_gid()) {
++      /* check min_gid */
++      else if (gid < mconf_get_min_gid())
++      {
+          ERROR((SGE_EVENT, MSG_JOB_GID2LOW_II, (int)gid, (int)mconf_get_min_gid()));
+          answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_ERROR);
+          ret = STATUS_EUNKNOWN;
+       }
+-   }
+-
+-   /* 
+-    * adjust user and group    
+-    *
+-    * we cannot rely on the information we got from the client
+-    * therefore we fill in the data we got from communication
+-    * library.
+-    */
+-   if (ret == STATUS_OK) {
+-      if (!job_set_owner_and_group(jep, uid, gid, ruser, group)) {
++      /*
++       * adjust user and group
++       *
++       * we cannot rely on the information we got from the client
++       * therefore we fill in the data we got from communication
++       * library.
++       */
++      else if (!job_set_owner_and_group(jep, uid, gid, ruser, group))
++      {
+          ret = STATUS_EUNKNOWN;
+       }
+    }
+ 
+ 
+    /* check for qsh without DISPLAY set */
+-   if (ret == STATUS_OK) {
+-      if (JOB_TYPE_IS_QSH(lGetUlong(jep, JB_type))) {
++   if (ret == STATUS_OK)
++   {
++      if (JOB_TYPE_IS_QSH(lGetUlong(jep, JB_type)))
+          ret = job_check_qsh_display(jep, alpp, false);
+-      }   
+    }
+ 
+    /*
+@@ -144,26 +142,27 @@
+     *    JB_ja_structure, JB_ja_n_h_ids, JB_ja_u_h_ids, 
+     *    JB_ja_s_h_ids, JB_ja_o_h_ids, JB_ja_a_h_ids, JB_ja_z_ids
+     */
+-   if (ret == STATUS_OK) {
++   if (ret == STATUS_OK)
++   {
+       job_check_correct_id_sublists(jep, alpp);
+-      if (answer_list_has_error(alpp)) {
++      if (answer_list_has_error(alpp))
+          ret = STATUS_EUNKNOWN;
+-      }
+    }  
+ 
+    /*
+     * resolve host names contained in path names
+     */ 
+-   if (ret == STATUS_OK) {
++   if (ret == STATUS_OK)
++   {
+       int s1, s2, s3, s4;
+       
+       s1 = job_resolve_host_for_path_list(jep, alpp, JB_stdout_path_list);
+       s2 = job_resolve_host_for_path_list(jep, alpp, JB_stdin_path_list);
+-      s3 = job_resolve_host_for_path_list(jep, alpp,JB_shell_list);
++      s3 = job_resolve_host_for_path_list(jep, alpp, JB_shell_list);
+       s4 = job_resolve_host_for_path_list(jep, alpp, JB_stderr_path_list);
+-      if (s1 != STATUS_OK || s2 != STATUS_OK || s3 != STATUS_OK || s4 != STATUS_OK) {
++
++      if (s1 != STATUS_OK || s2 != STATUS_OK || s3 != STATUS_OK || s4 != STATUS_OK)
+          ret = STATUS_EUNKNOWN;
+-      }
+    }
+ 
+    /* take care that non-binary jobs have a script */
+@@ -176,40 +175,45 @@
+       }
+    }
+ 
+-   /* set the jobs submittion time */
+-   if (ret == STATUS_OK) {
++   if (ret == STATUS_OK)
++   {
++      /* set the jobs submittion time */
+       lSetUlong(jep, JB_submission_time, sge_get_gmt());
+-   }
+ 
+-   /* initialize the task template element and other sublists */
+-   if (ret == STATUS_OK) {
++      /* initialize the task template element and other sublists */
+       lSetList(jep, JB_ja_tasks, NULL);
+       lSetList(jep, JB_jid_successor_list, NULL);
+       lSetList(jep, JB_ja_ad_successor_list, NULL);
+-      if (lGetList(jep, JB_ja_template) == NULL) {
++
++      if (lGetList(jep, JB_ja_template) == NULL)
+          lAddSubUlong(jep, JAT_task_number, 0, JB_ja_template, JAT_Type);
+-      }
+-   } 
++   }
+ 
+-   if (ret == STATUS_OK) {
++   if (ret == STATUS_OK)
++   {
+       lListElem *binding_elem = lFirst(lGetList(jep, JB_binding));
+                
+-      if (binding_elem == NULL) {
++      if (binding_elem == NULL)
++      {
+          bool lret = job_init_binding_elem(jep);
+ 
+-         if (lret == false) {
++         if (lret == false)
+             ret = STATUS_EUNKNOWN;
+-         }
+       }
+    }
+ 
+    /* verify or set the account string */
+-   if (ret == STATUS_OK) {
+-      if (!lGetString(jep, JB_account)) {
++   if (ret == STATUS_OK)
++   {
++      if (!lGetString(jep, JB_account))
++      {
+          lSetString(jep, JB_account, DEFAULT_ACCOUNT);
+-      } else {
++      }
++      else
++      {
+          if (verify_str_key(alpp, lGetString(jep, JB_account), MAX_VERIFY_STRING,
+-                            "account string", QSUB_TABLE) != STATUS_OK) { 
++                            "account string", QSUB_TABLE) != STATUS_OK)
++         { 
+             ret = STATUS_EUNKNOWN;
+          }
+       }
+@@ -296,7 +300,7 @@
+         if (suser_check_new_job(jep, mconf_get_max_u_jobs()) != 0)
+         { 
+            INFO((SGE_EVENT, MSG_JOB_ALLOWEDJOBSPERUSER_UU, sge_u32c(mconf_get_max_u_jobs()),
+-                                                         sge_u32c(suser_job_count(jep))));
++                                                           sge_u32c(suser_job_count(jep))));
+            answer_list_add(alpp, SGE_EVENT, STATUS_NOTOK_DOAGAIN, ANSWER_QUALITY_ERROR);
+            DRETURN(STATUS_NOTOK_DOAGAIN);
+         }
+@@ -306,18 +310,18 @@
+    {
+       lList *user_lists = mconf_get_user_lists();
+       lList *xuser_lists = mconf_get_xuser_lists();
++      int has_access = sge_has_access_(ruser, lGetString(jep, JB_group), /* read */
++                                       user_lists, xuser_lists, *object_base[SGE_TYPE_USERSET].list);
+ 
+-      if (!sge_has_access_(ruser, lGetString(jep, JB_group), /* read */
+-                           user_lists, xuser_lists, *object_base[SGE_TYPE_USERSET].list))
++      lFreeList(&xuser_lists);
++      lFreeList(&user_lists);
++
++      if (!has_access)
+       {
+          ERROR((SGE_EVENT, MSG_JOB_NOPERMS_SS, ruser, rhost));
+          answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_ERROR);
+-         lFreeList(&user_lists);
+-         lFreeList(&xuser_lists);
+          DRETURN(STATUS_EUNKNOWN);
+       }
+-      lFreeList(&user_lists);
+-      lFreeList(&xuser_lists);
+    }
+ 
+    /* 
+@@ -330,8 +334,8 @@
+       lList *master_centry_list = *object_base[SGE_TYPE_CENTRY].list;
+ 
+       if (centry_list_fill_request(lGetList(jep, JB_hard_resource_list),
+-                                   alpp, master_centry_list, false, true,
+-                                   false)) {
++                                   alpp, master_centry_list, false, true, false))
++      {
+          DRETURN(STATUS_EUNKNOWN);
+       }
+       if (compress_ressources(alpp, lGetList(jep, JB_hard_resource_list), SGE_OBJ_JOB))
+@@ -340,8 +344,7 @@
+       }
+ 
+       if (centry_list_fill_request(lGetList(jep, JB_soft_resource_list),
+-                                   alpp, master_centry_list, false, true,
+-                                   false))
++                                   alpp, master_centry_list, false, true, false))
+       {
+          DRETURN(STATUS_EUNKNOWN);
+       }
+@@ -388,11 +391,12 @@
+     */
+    {
+       const char *pe_name = NULL;
+-      lList *pe_range = NULL;
+ 
+       pe_name = lGetString(jep, JB_pe);
+-      if (pe_name) {
++      if (pe_name)
++      {
+          const lListElem *pep;
++         lList *pe_range;
+ 
+          pep = pe_list_find_matching(*object_base[SGE_TYPE_PE].list, pe_name);
+          if (!pep) {
+@@ -402,7 +406,8 @@
+          }
+          /* check pe_range */
+          pe_range = lGetList(jep, JB_pe_range);
+-         if (object_verify_pe_range(alpp, pe_name, pe_range, SGE_OBJ_JOB)!=STATUS_OK) {
++         if (object_verify_pe_range(alpp, pe_name, pe_range, SGE_OBJ_JOB)!=STATUS_OK)
++         {
+             DRETURN(STATUS_EUNKNOWN);
+          }
+ 
+@@ -431,38 +436,39 @@
+ 
+    {
+       u_long32 ckpt_attr = lGetUlong(jep, JB_checkpoint_attr);
+-      u_long32 ckpt_inter = lGetUlong(jep, JB_checkpoint_interval);
+       const char *ckpt_name = lGetString(jep, JB_checkpoint_name);
+-      lListElem *ckpt_ep;
+       int ckpt_err = 0;
+ 
+       /* request for non existing ckpt object will be refused */
+-      if ((ckpt_name != NULL)) {
++      if (ckpt_name != NULL)
++      {
++         lListElem *ckpt_ep;
++
+          if (!(ckpt_ep = ckpt_list_locate(*object_base[SGE_TYPE_CKPT].list, ckpt_name)))
+             ckpt_err = 1;
+-         else if (!ckpt_attr) {
++         else if (!ckpt_attr)
++         {
+             ckpt_attr = sge_parse_checkpoint_attr(lGetString(ckpt_ep, CK_when));
+             lSetUlong(jep, JB_checkpoint_attr, ckpt_attr);
+          }
+       }
+ 
+-      if (!ckpt_err) {
+-         if ((ckpt_attr & NO_CHECKPOINT) && (ckpt_attr & ~NO_CHECKPOINT)) {
++      if (ckpt_err == 0)
++      {
++         if ((ckpt_attr & NO_CHECKPOINT) && (ckpt_attr & ~NO_CHECKPOINT))
+             ckpt_err = 2;
+-         }
+-         else if (ckpt_name && (ckpt_attr & NO_CHECKPOINT)) {
++         else if (ckpt_name && (ckpt_attr & NO_CHECKPOINT))
+             ckpt_err = 3;
+-         }
+-         else if ((!ckpt_name && (ckpt_attr & ~NO_CHECKPOINT))) {
++         else if (!ckpt_name && (ckpt_attr & ~NO_CHECKPOINT))
+             ckpt_err = 4;
+-         }
+-         else if (!ckpt_name && ckpt_inter) {
++         else if (!ckpt_name && lGetUlong(jep, JB_checkpoint_interval))
+             ckpt_err = 5;
+-         }
+       }
+ 
+-      if (ckpt_err) {
+-         switch (ckpt_err) {
++      if (ckpt_err)
++      {
++         switch (ckpt_err)
++         {
+          case 1:
+             ERROR((SGE_EVENT, MSG_JOB_CKPTUNKNOWN_S, ckpt_name));
+           break;
+@@ -484,28 +490,32 @@
+    }
+ 
+    /* first check user permissions */
++   if (lGetUlong(jep, JB_verify_suitable_queues) != SKIP_VERIFY)
+    {
+       lListElem *cqueue = NULL;
+       int has_permissions = 0;
+ 
+-      for_each (cqueue, *object_base[SGE_TYPE_CQUEUE].list) {
++      for_each (cqueue, *object_base[SGE_TYPE_CQUEUE].list)
++      {
+          lList *qinstance_list = lGetList(cqueue, CQ_qinstances);
+          lListElem *qinstance = NULL;
+          lList *master_userset_list = *object_base[SGE_TYPE_USERSET].list;
+ 
+-         for_each(qinstance, qinstance_list) {
++         for_each(qinstance, qinstance_list)
++         {
+             if (sge_has_access(ruser, lGetString(jep, JB_group),
+-                  qinstance, master_userset_list)) {
++                  qinstance, master_userset_list))
++            {
+                DPRINTF(("job has access to queue "SFQ"\n", lGetString(qinstance, QU_qname)));
+                has_permissions = 1;
+                break;
+             }
+          }
+-         if (has_permissions == 1) {
++         if (has_permissions == 1)
+             break;
+-         }
+       }
+-      if (has_permissions == 0) {
++      if (has_permissions == 0)
++      {
+          SGE_ADD_MSG_ID(sprintf(SGE_EVENT, MSG_JOB_NOTINANYQ_S, ruser));
+          answer_list_add(alpp, SGE_EVENT, STATUS_ESEMANTIC, ANSWER_QUALITY_ERROR);
+       }
+@@ -518,7 +528,8 @@
+       if (enforce_user && !strcasecmp(enforce_user, "auto")) {
+          int status = sge_add_auto_user(ctx, ruser, alpp, monitor);
+ 
+-         if (status != STATUS_OK) {
++         if (status != STATUS_OK)
++         {
+             FREE(enforce_user);
+             DRETURN(status);
+          }
+@@ -579,16 +590,19 @@
+          DPRINTF(("job -ar "sge_u32"\n", sge_u32c(ar_id)));
+ 
+          ar=ar_list_locate(*object_base[SGE_TYPE_AR].list, ar_id);
+-         if (ar == NULL) {
++         if (ar == NULL)
++         {
+             ERROR((SGE_EVENT, MSG_JOB_NOAREXISTS_U, sge_u32c(ar_id)));
+             answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_ERROR);
+             DRETURN(STATUS_EEXIST);
+          } else if ((lGetUlong(ar, AR_state) == AR_DELETED) ||
+-                    (lGetUlong(ar, AR_state) == AR_EXITED)) {
++                    (lGetUlong(ar, AR_state) == AR_EXITED))
++         {
+             ERROR((SGE_EVENT, MSG_JOB_ARNOLONGERAVAILABE_U, sge_u32c(ar_id)));
+             answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_ERROR);
+             DRETURN(STATUS_EEXIST);
+          }
++
+          /* fill the job and ar values */         
+          ar_start_time = lGetUlong(ar, AR_start_time);
+          ar_end_time = lGetUlong(ar, AR_end_time);
+@@ -612,8 +626,8 @@
+          {
+             DPRINTF(("job -ar "sge_u32", ar_start_time "sge_u32", ar_end_time "sge_u32
+                      ", job_execution_time "sge_u32", job duration "sge_u32" \n",
+-                     sge_u32c(ar_id),sge_u32c( ar_start_time),sge_u32c(ar_end_time),
+-                     sge_u32c(job_execution_time),sge_u32c(job_duration)));
++                     sge_u32c(ar_id), sge_u32c( ar_start_time), sge_u32c(ar_end_time),
++                     sge_u32c(job_execution_time), sge_u32c(job_duration)));
+ 
+             /* fit the timeframe */
+             if (job_duration > (ar_end_time - ar_start_time))
 diff -ruN --exclude .svn GE2011.11/source/daemons/qmaster/sge_qmaster_main.c gridscheduler-trunk/source/daemons/qmaster/sge_qmaster_main.c
 --- GE2011.11/source/daemons/qmaster/sge_qmaster_main.c	2011-11-14 12:00:44.000000000 -0700
 +++ gridscheduler-trunk/source/daemons/qmaster/sge_qmaster_main.c	2012-02-08 09:46:01.264140637 -0700
@@ -1095,8 +2751,25 @@ diff -ruN --exclude .svn GE2011.11/source/daemons/shepherd/builtin_starter.c gri
     my_env[i++] = strcat(path, "/usr/bin");
 diff -ruN --exclude .svn GE2011.11/source/dist/inst_sge gridscheduler-trunk/source/dist/inst_sge
 --- GE2011.11/source/dist/inst_sge	2011-11-14 12:00:55.000000000 -0700
-+++ gridscheduler-trunk/source/dist/inst_sge	2012-02-28 17:08:35.581818634 -0700
-@@ -142,7 +142,8 @@
++++ gridscheduler-trunk/source/dist/inst_sge	2012-03-21 09:25:09.774946197 -0600
+@@ -32,6 +32,8 @@
+ #
+ #  All Rights Reserved.
+ #
++#  Copyright: 2012 by Open Grid Scheduler
++#
+ ##########################################################################
+ #___INFO__MARK_END__
+ #
+@@ -123,7 +125,6 @@
+ 
+ BasicSettings
+ SetUpInfoText
+-PreInstallCheck
+ 
+ 
+ ARGC=$#
+@@ -142,7 +143,8 @@
       if [ ! -f "$2" ]; then
          AUTO="false"
          $INFOTEXT "Error: File $FILE does not exist!" 
@@ -1106,7 +2779,47 @@ diff -ruN --exclude .svn GE2011.11/source/dist/inst_sge gridscheduler-trunk/sour
       fi
       shift
       ARGC=`expr $ARGC - 1`
-@@ -1086,7 +1087,7 @@
+@@ -155,6 +157,7 @@
+       ;;
+    -m)
+      QMASTER="install"
++     PreInstallCheck
+      . ./util/install_modules/inst_qmaster.sh
+      . ./util/install_modules/inst_berkeley.sh
+      . ./util/install_modules/inst_st.sh
+@@ -166,6 +169,7 @@
+      ;; 
+    -x)
+      EXECD="install"
++     PreInstallCheck
+      . ./util/install_modules/inst_execd.sh
+      if [ "$2" = "-upd" ]; then
+          UPDATE="true"
+@@ -186,6 +190,7 @@
+      ;;
+    -sm)
+      SHADOW="install"
++     PreInstallCheck
+      . ./util/install_modules/inst_qmaster.sh
+      . ./util/install_modules/inst_execd.sh
+      #echo Install Shadowhost
+@@ -233,6 +238,7 @@
+      #update from 6.0 or higher to 6.2
+      UPDATE=true
+      QMASTER="install"
++     PreInstallCheck
+      . ./util/install_modules/inst_qmaster.sh
+      . ./util/install_modules/inst_berkeley.sh
+      . ./util/install_modules/inst_st.sh
+@@ -274,6 +280,7 @@
+    -winsvc)
+      #install the windows helper service only
+      WIN_SVC="install"
++     PreInstallCheck
+      . ./util/install_modules/inst_common.sh
+      . ./util/install_modules/inst_execd.sh
+      ;;
+@@ -1086,7 +1093,7 @@
        AddSubmitHostsExecd
        AddSGEStartUpScript $euid execd
        SetupWinSvc execinst     #service install during execd installation -> param: execinst
@@ -1115,7 +2828,7 @@ diff -ruN --exclude .svn GE2011.11/source/dist/inst_sge gridscheduler-trunk/sour
        StartExecd
        AddQueue
        GiveHints
-@@ -1122,7 +1123,7 @@
+@@ -1122,7 +1129,7 @@
        AddLocalConfiguration_With_Qconf
        AddSGEStartUpScript $euid execd
        SetupWinSvc execinst  #service install during execd installation -> param: execinst
@@ -1169,10 +2882,83 @@ diff -ruN --exclude .svn GE2011.11/source/dist/util/arch gridscheduler-trunk/sou
        if [ "`which manpath 2>/dev/null`" != "" ]; then
           DEFAULTMANPATH=`manpath 2>/dev/null`
        else
+diff -ruN --exclude .svn GE2011.11/source/dist/util/bdb_checkpoint.sh gridscheduler-trunk/source/dist/util/bdb_checkpoint.sh
+--- GE2011.11/source/dist/util/bdb_checkpoint.sh	2011-11-14 12:00:55.000000000 -0700
++++ gridscheduler-trunk/source/dist/util/bdb_checkpoint.sh	2012-03-21 09:25:09.751947016 -0600
+@@ -78,8 +78,11 @@
+ # source settings, we need LD_LIBRARY_PATH/LIBPATH/SHLIB_PATH
+ . ${SGE_ROOT}/${SGE_CELL}/common/settings.sh
+ 
++# set PATH
++PATH=${SGE_ROOT}/utilbin/${SGE_ARCH}:$PATH
++
+ # checkpoint transaction log
+-result=`${SGE_ROOT}/utilbin/${SGE_ARCH}/db_checkpoint -1 -h ${BDB_HOME} 2>&1`
++result=`db_checkpoint -1 -h ${BDB_HOME} 2>&1`
+ if [ $? -ne 0 ]; then
+    echo "error checkpointing transaction log:" >&2
+    echo $result >&2
+@@ -87,7 +90,7 @@
+ fi
+ 
+ # retrieve no longer needed transaction logs
+-logs=`${SGE_ROOT}/utilbin/${SGE_ARCH}/db_archive -h ${BDB_HOME} 2>&1`
++logs=`db_archive -h ${BDB_HOME} 2>&1`
+ if [ $? -ne 0 ]; then
+    echo "error retrieving outdated transaction logs:" >&2
+    echo $logs >&2
 diff -ruN --exclude .svn GE2011.11/source/dist/util/install_modules/inst_common.sh gridscheduler-trunk/source/dist/util/install_modules/inst_common.sh
 --- GE2011.11/source/dist/util/install_modules/inst_common.sh	2011-11-14 12:00:55.000000000 -0700
-+++ gridscheduler-trunk/source/dist/util/install_modules/inst_common.sh	2012-02-08 09:46:04.747020658 -0700
-@@ -1983,7 +1983,7 @@
++++ gridscheduler-trunk/source/dist/util/install_modules/inst_common.sh	2012-03-21 09:25:09.686949330 -0600
+@@ -33,6 +33,8 @@
+ #
+ #  All Rights Reserved.
+ #
++#  Copyright: 2012 by Open Grid Scheduler
++#
+ ##########################################################################
+ #___INFO__MARK_END__
+ 
+@@ -369,16 +371,11 @@
+ #
+ CheckBinaries()
+ {
+-
+-   BINFILES="sge_coshepherd \
+-             sge_execd sge_qmaster  \
+-             sge_shadowd \
+-             sge_shepherd qacct qalter qconf qdel qhold \
+-             qhost qlogin qmake qmod qmon qresub qrls qrsh qselect qsh \
++   BINFILES="qacct qalter qconf qdel qhold \
++             qhost qlogin qmake qmod qresub qrls qrsh qselect qsh \
+              qstat qsub qtcsh qping qquota sgepasswd"
+ 
+-   WINBINFILES="sge_coshepherd sge_execd sge_shepherd  \
+-                qacct qalter qconf qdel qhold qhost qlogin \
++   WINBINFILES="qacct qalter qconf qdel qhold qhost qlogin \
+                 qmake qmod qresub qrls qrsh qselect qsh \
+                 qstat qsub qtcsh qping qquota qloadsensor.exe"
+ 
+@@ -400,6 +397,18 @@
+       UTILFILES="$WINUTILFILES"
+    fi
+ 
++   if [ "$EXECD" = "install" ]; then
++      BINFILES="$BINFILES sge_execd sge_shepherd sge_coshepherd"
++   fi
++
++   if [ "$QMASTER" = "install" ]; then
++      BINFILES="$BINFILES sge_qmaster"
++   fi
++
++   if [ "$SHADOW" = "install" ]; then
++      BINFILES="$BINFILES sge_shadowd"
++   fi
++
+    missing=false
+    for f in $BINFILES; do
+       if [ ! -f $SGE_BIN/$f ]; then
+@@ -1983,7 +1992,7 @@
     fi
     
     #MacOS overwrites the files (all services share single file)
@@ -1238,6 +3024,49 @@ diff -ruN --exclude .svn GE2011.11/source/dist/util/install_modules/inst_qmaster
     #TODO: Missing HP, AIX platforms
     esac
     if [ -f $java_home/$suffix ]; then
+diff -ruN --exclude .svn GE2011.11/source/libs/comm/cl_ssl_framework.c gridscheduler-trunk/source/libs/comm/cl_ssl_framework.c
+--- GE2011.11/source/libs/comm/cl_ssl_framework.c	2011-11-14 12:00:45.000000000 -0700
++++ gridscheduler-trunk/source/libs/comm/cl_ssl_framework.c	2012-03-21 09:25:09.424958655 -0600
+@@ -97,10 +97,18 @@
+ #include "sge_os.h"
+ 
+ #if (OPENSSL_VERSION_NUMBER < 0x0090700fL) 
+-#define OPENSSL_CONST
+-#define NID_userId NID_uniqueIdentifier
++ #define OPENSSL_CONST
++ #define NID_userId NID_uniqueIdentifier
+ #else
+-#define OPENSSL_CONST const
++ #define OPENSSL_CONST const
++#endif
++
++/* ugly workaround for extremely ugly usage of OpenSSL API */
++#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
++ #define STACK       _STACK
++ #define SKVAL_RET_T char*
++#else
++ #define SKVAL_RET_T void*
+ #endif
+ 
+ 
+@@ -236,7 +244,7 @@
+ static void*                (*cl_com_ssl_func__SSL_CTX_get_ex_data)                 (SSL_CTX *ssl,int idx);
+ static int                  (*cl_com_ssl_func__SSL_CTX_set_ex_data)                 (SSL_CTX *ssl,int idx,void *data);
+ static int                  (*cl_com_ssl_func__sk_num)                              (const STACK *);
+-static char*                (*cl_com_ssl_func__sk_value)                            (const STACK *, int);
++static SKVAL_RET_T          (*cl_com_ssl_func__sk_value)                            (const STACK *, int);
+ static int                  (*cl_com_ssl_func__X509_STORE_get_by_subject)           (X509_STORE_CTX *vs,int type,X509_NAME *name, X509_OBJECT *ret);
+ static void                 (*cl_com_ssl_func__EVP_PKEY_free)                       (EVP_PKEY *pkey);
+ static void                 (*cl_com_ssl_func__X509_STORE_CTX_set_error)            (X509_STORE_CTX *ctx,int s);
+@@ -1707,7 +1715,7 @@
+       }
+ 
+       func_name = "sk_value";
+-      cl_com_ssl_func__sk_value = (char* (*)(const STACK *, int))dlsym(cl_com_ssl_crypto_handle, func_name);
++      cl_com_ssl_func__sk_value = (SKVAL_RET_T (*)(const STACK *, int))dlsym(cl_com_ssl_crypto_handle, func_name);
+       if (cl_com_ssl_func__sk_value == NULL) {
+          CL_LOG_STR(CL_LOG_ERROR,"dlsym error: can't get function address:", func_name);
+          had_errors++;
 diff -ruN --exclude .svn GE2011.11/source/libs/cull/cull_where.c gridscheduler-trunk/source/libs/cull/cull_where.c
 --- GE2011.11/source/libs/cull/cull_where.c	2011-11-14 12:00:46.000000000 -0700
 +++ gridscheduler-trunk/source/libs/cull/cull_where.c	2012-03-14 15:42:54.703119797 -0600
@@ -1610,24 +3439,119 @@ diff -ruN --exclude .svn GE2011.11/source/libs/sgeobj/sge_conf.c gridscheduler-t
        /* enable/disable GNU malloc library facility for recording of all 
           memory allocation/deallocation 
           requires MALLOC_TRACE in environment (see mtrace(3) under Linux) */
-diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_getloadavg.c gridscheduler-trunk/source/libs/uti/sge_getloadavg.c
---- GE2011.11/source/libs/uti/sge_getloadavg.c	2011-11-14 12:00:47.000000000 -0700
-+++ gridscheduler-trunk/source/libs/uti/sge_getloadavg.c	2012-02-08 09:46:02.068112943 -0700
-@@ -954,7 +954,7 @@
-    return 0;
- }
+diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_edit.c gridscheduler-trunk/source/libs/uti/sge_edit.c
+--- GE2011.11/source/libs/uti/sge_edit.c	2011-11-14 12:00:47.000000000 -0700
++++ gridscheduler-trunk/source/libs/uti/sge_edit.c	2012-03-21 09:25:09.535954703 -0600
+@@ -48,47 +48,63 @@
+ {
+    SGE_STRUCT_STAT before, after;
+    pid_t pid;
+-   int status;
+-   int ws = 0;
+ 
+    DENTER(TOP_LAYER, "sge_edit");;
+ 
+-   if (fname == NULL) {
++   if (fname == NULL)
++   {
+       ERROR((SGE_EVENT, MSG_NULLPOINTER));
+       return -1;
+    }
  
--#elif defined(OGLIBC_LINUX)
-+#elif defined(OGLIBC_LINUX) || defined(CYGWIN)
+-   if (SGE_STAT(fname, &before)) {
++   if (SGE_STAT(fname, &before))
++   {
+       ERROR((SGE_EVENT, MSG_FILE_EDITFILEXDOESNOTEXIST_S, fname));
+       DEXIT;
+       return -1;
+    }
  
- static int get_load_avg(
- double loadv[],
+-   chown(fname, myuid, mygid);
++   if (chown(fname, myuid, mygid) != 0)
++   {
++      ERROR((SGE_EVENT, MSG_FILE_CANNOT_CHOWN, fname));
++      DEXIT;
++      return -1;
++   }
+ 
+    pid = fork();
+-   if (pid) {
+-      while (ws != pid) {
++   if (pid)
++   {
++      int ws = 0;
++
++      while (ws != pid)
++      {
++         int status;
++
+          ws = waitpid(pid, &status, 0);
+-         if (WIFEXITED(status)) {
+-            if (WEXITSTATUS(status) != 0) {
+-               ERROR((SGE_EVENT, MSG_QCONF_EDITOREXITEDWITHERROR_I,
+-                      (int) WEXITSTATUS(status)));
++         if (WIFEXITED(status))
++         {
++            if (WEXITSTATUS(status) != 0)
++            {
++               ERROR((SGE_EVENT, MSG_QCONF_EDITOREXITEDWITHERROR_I, (int) WEXITSTATUS(status)));
+                DEXIT;
+                return -1;
+             }
+-            else {
+-               if (SGE_STAT(fname, &after)) {
++            else
++            {
++               if (SGE_STAT(fname, &after))
++               {
+                   ERROR((SGE_EVENT, MSG_QCONF_EDITFILEXNOLONGEREXISTS_S, fname));
+                   DEXIT;
+                   return -1;
+                }
+                if ((before.st_mtime != after.st_mtime) || 
+-                    (before.st_size != after.st_size)) { 
++                   (before.st_size  != after.st_size))
++               { 
+                   DEXIT;
+                   return 0;
+                }
+-               else {
++               else
++               {
+                   /* file is unchanged; inform caller */
+                   DEXIT;
+                   return 1;
+@@ -96,15 +112,17 @@
+             }
+          }
+ #ifndef WIN32  /* signals b18 */
+-         if (WIFSIGNALED(status)) {
+-            ERROR((SGE_EVENT, MSG_QCONF_EDITORWASTERMINATEDBYSIGX_I,
+-                   (int) WTERMSIG(status)));
++         if (WIFSIGNALED(status))
++         {
++            ERROR((SGE_EVENT, MSG_QCONF_EDITORWASTERMINATEDBYSIGX_I, (int) WTERMSIG(status)));
+             DEXIT;
+             return -1;
+          }
+ #endif
+       }
+-   } else {
++   }
++   else
++   {
+       const char *cp = NULL;
+ 
+       sge_set_def_sig_mask(NULL, NULL);
+diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_getloadavg.c gridscheduler-trunk/source/libs/uti/sge_getloadavg.c
+--- GE2011.11/source/libs/uti/sge_getloadavg.c	2011-11-14 12:00:47.000000000 -0700
++++ gridscheduler-trunk/source/libs/uti/sge_getloadavg.c	2012-03-21 09:25:09.551954133 -0600
 @@ -1175,7 +1175,7 @@
  {
     int   elem = 0;   
  
 -#if defined(ALPHA4) || defined(ALPHA5) || defined(IRIX) || defined(HPUX) || defined(CRAY) || defined(NECSX4) || defined(NECSX5) || defined(OGLIBC_LINUX) || defined(HAS_AIX_PERFLIB)
-+#if defined(ALPHA4) || defined(ALPHA5) || defined(IRIX) || defined(HPUX) || defined(CRAY) || defined(NECSX4) || defined(NECSX5) || defined(HAS_AIX_PERFLIB) || defined(OGLIBC_LINUX) || defined(CYGWIN)
++#if defined(ALPHA4) || defined(ALPHA5) || defined(IRIX) || defined(HPUX) || defined(CRAY) || defined(NECSX4) || defined(NECSX5) || defined(HAS_AIX_PERFLIB) || defined(OGLIBC_LINUX)
     elem = get_load_avg(loadavg, nelem);
  #elif defined(SOLARIS) || defined(FREEBSD) || defined(NETBSD) || defined(DARWIN) || defined(LINUX)
     elem = getloadavg(loadavg, nelem);  /* <== library function */
@@ -1643,6 +3567,75 @@ diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_hostname.c gridscheduler-
        if (getservbyname_r(service, "tcp", se_result, buffer, size, &se) != 0)
           se = NULL;
  #elif defined(SOLARIS)
+diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_htable.c gridscheduler-trunk/source/libs/uti/sge_htable.c
+--- GE2011.11/source/libs/uti/sge_htable.c	2011-11-14 12:00:47.000000000 -0700
++++ gridscheduler-trunk/source/libs/uti/sge_htable.c	2012-03-21 09:25:09.546954312 -0600
+@@ -152,15 +152,15 @@
+    
+ #ifdef SGE_USE_PROFILING
+    clock_t start = 0;
+-#endif   
+    char buffer[1024];
+    dstring buffer_wrapper;
++#endif
+ 
+    DENTER_(BASIS_LAYER, "sge_htable_resize");
+ 
++#ifdef SGE_USE_PROFILING
+    sge_dstring_init(&buffer_wrapper, buffer, sizeof(buffer));
+ 
+-#ifdef SGE_USE_PROFILING
+    if(prof_is_active(SGE_PROF_HT_RESIZE) && log_state_get_log_level() >= LOG_DEBUG) {
+       struct tms t_buf;
+       DEBUG((SGE_EVENT, "hash stats before resizing: %s\n", 
+diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_monitor.c gridscheduler-trunk/source/libs/uti/sge_monitor.c
+--- GE2011.11/source/libs/uti/sge_monitor.c	2011-11-14 12:00:47.000000000 -0700
++++ gridscheduler-trunk/source/libs/uti/sge_monitor.c	2012-03-21 09:25:09.545954348 -0600
+@@ -35,7 +35,7 @@
+ #include <pthread.h>
+ #include <dlfcn.h>
+ 
+-#if defined(LINUX) || defined(AIX43) || defined(AIX51) || defined(IRIX) || defined(SOLARIS) || defined(HP11)
++#if defined(LINUX) || defined(AIX) || defined(IRIX) || defined(SOLARIS) || defined(HP11)
+ #  include <malloc.h>
+ #endif
+ 
+@@ -90,7 +90,7 @@
+ static dstring Info_Line= DSTRING_INIT;
+ 
+ /* mallinfo related data */
+-#if defined(LINUX) || defined(AIX43) || defined(AIX51) || defined(IRIX) || defined(SOLARIS) || defined(HP11)
++#if defined(LINUX) || defined(AIX) || defined(IRIX) || defined(SOLARIS) || defined(HP11)
+ static bool mallinfo_initialized = false;
+ static void *mallinfo_shlib_handle = NULL;
+ static struct mallinfo (*mallinfo_func_pointer)(void) = NULL;
+@@ -166,7 +166,7 @@
+    monitor->work_line = NULL;
+    monitor->thread_name = NULL;
+ 
+-#if defined(LINUX) || defined(AIX43) || defined(AIX51) || defined(IRIX) || defined(SOLARIS) || defined(HP11)
++#if defined(LINUX) || defined(AIX) || defined(IRIX) || defined(SOLARIS) || defined(HP11)
+    sge_mutex_lock("sge_monitor_status", SGE_FUNC, __LINE__, &global_mutex);
+    if (mallinfo_shlib_handle != NULL) {  
+       dlclose(mallinfo_shlib_handle);
+@@ -211,7 +211,7 @@
+    /*
+     * initialize the mallinfo function pointer if it is available
+     */
+-#if defined(LINUX) || defined(AIX43) || defined(AIX51) || defined(IRIX) || defined(SOLARIS) || defined(HP11)
++#if defined(LINUX) || defined(AIX) || defined(IRIX) || defined(SOLARIS) || defined(HP11)
+    sge_mutex_lock("sge_monitor_status", SGE_FUNC, __LINE__, &global_mutex);
+    if (mallinfo_initialized == false) {
+       const char *function_name = "mallinfo";
+@@ -448,7 +448,7 @@
+       sge_dstring_append(&Info_Line, "\n");
+    }
+ 
+-#if defined(LINUX) || defined(AIX43) || defined(AIX51) || defined(IRIX) || defined(SOLARIS) || defined(HP11)
++#if defined(LINUX) || defined(AIX) || defined(IRIX) || defined(SOLARIS) || defined(HP11)
+    if (mallinfo_func_pointer != NULL) {
+       struct mallinfo mallinfo_data = mallinfo_func_pointer();
+ 
 diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_os.c gridscheduler-trunk/source/libs/uti/sge_os.c
 --- GE2011.11/source/libs/uti/sge_os.c	2011-11-14 12:00:47.000000000 -0700
 +++ gridscheduler-trunk/source/libs/uti/sge_os.c	2012-02-08 09:46:02.056113356 -0700
@@ -1673,6 +3666,26 @@ diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_os.c gridscheduler-trunk/
     if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
        /* disassociate contolling tty */
        ioctl(fd, TIOCNOTTY, (char *) NULL);
+diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_pty.c gridscheduler-trunk/source/libs/uti/sge_pty.c
+--- GE2011.11/source/libs/uti/sge_pty.c	2011-11-14 12:00:47.000000000 -0700
++++ gridscheduler-trunk/source/libs/uti/sge_pty.c	2012-03-21 09:25:09.547954276 -0600
+@@ -55,6 +55,7 @@
+ #  include <stropts.h>
+ #  include <termio.h>
+ #elif defined(FREEBSD) || defined(NETBSD)
++#  include <sys/ioctl.h>
+ #  include <termios.h>
+ #else
+ #  include <termio.h>
+@@ -132,7 +133,7 @@
+ {
+    char *ptr;
+    int  fdm;
+-#if defined(AIX43) || defined(AIX51)
++#if defined(AIX)
+    char default_pts_name[] = "/dev/ptc";
+ #else
+    char default_pts_name[] = "/dev/ptmx";
 diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_signal.c gridscheduler-trunk/source/libs/uti/sge_signal.c
 --- GE2011.11/source/libs/uti/sge_signal.c	2011-11-14 12:00:47.000000000 -0700
 +++ gridscheduler-trunk/source/libs/uti/sge_signal.c	2012-02-08 09:46:02.052113498 -0700
@@ -1934,3 +3947,61 @@ diff -ruN --exclude .svn GE2011.11/source/scripts/distinst gridscheduler-trunk/s
                       (cd $DEST_SGE_ROOT/${UTILPREFIX}/$DSTARCH; \
                        ln -s $lib.$OPENSSLSOVERSION.$shlibext $lib.$shlibext)
                    else
+diff -ruN --exclude .svn GE2011.11/source/utilbin/authuser.c gridscheduler-trunk/source/utilbin/authuser.c
+--- GE2011.11/source/utilbin/authuser.c	2011-11-14 12:00:55.000000000 -0700
++++ gridscheduler-trunk/source/utilbin/authuser.c	2012-03-21 09:25:09.849943527 -0600
+@@ -72,13 +72,13 @@
+ #include <security/pam_appl.h>
+ #endif
+ 
+-#if defined(DARWIN) || defined(AIX51) || defined(AIX43) || defined(INTERIX) || defined(FREEBSD) || defined(ALPHA5) || defined(WINDOWS) || defined(NETBSD)
++#if defined(DARWIN) || defined(AIX) || defined(INTERIX) || defined(FREEBSD) || defined(ALPHA5) || defined(WINDOWS) || defined(NETBSD)
+ #define JUTI_NO_SHADOW
+ #else
+ #include <shadow.h>
+ #endif
+ 
+-#if defined(AIX51) || defined(AIX43)
++#if defined(AIX)
+ #include <userpw.h>
+ #endif
+ 
+@@ -595,7 +595,7 @@
+ static auth_result_t get_crypted_password(const char* username, char* buffer, size_t size,
+                                 error_handler_t *error_handler) {
+                      
+-#if defined(AIX43) || defined(AIX51)
++#if defined(AIX)
+ #define BUFSIZE 1024
+    char buf[BUFSIZE];
+    struct userpw *pw = NULL;
+diff -ruN --exclude .svn GE2011.11/source/utilbin/infotext.c gridscheduler-trunk/source/utilbin/infotext.c
+--- GE2011.11/source/utilbin/infotext.c	2011-11-14 12:00:55.000000000 -0700
++++ gridscheduler-trunk/source/utilbin/infotext.c	2012-03-21 09:25:09.847943598 -0600
+@@ -66,7 +66,7 @@
+ static void  sge_infotext_raw(char *format_string);
+ static void  sge_infotext_usage(void);
+ static int   sge_infotext_get_nr_of_substrings(const char* buffer, const char* substring);
+-#if defined(ALPHA) || defined(SOLARISAMD64) || defined(ALPHA5) || defined(ALINUX) || defined(HPUX) || __GNUC__ >= 3 || defined(NETBSD)
++#if defined(ALPHA) || defined(SOLARISAMD64) || defined(ALPHA5) || defined(HPUX) || defined(NETBSD) || __GNUC__ >= 3
+ static char *sge_infotext_string_replace(dstring* buf, const char *arg, const char *what, const char *with, int only_first );
+ #endif
+ static char* sge_infotext_string_input_parsing(dstring* buf,char* string);
+@@ -547,7 +547,7 @@
+ }
+ 
+ 
+-#if defined(ALPHA) || defined(SOLARISAMD64) || defined(ALPHA5) || defined(ALINUX) || defined(HPUX) || defined(IRIX65) || __GNUC__ >= 3 || defined(NETBSD)
++#if defined(ALPHA) || defined(SOLARISAMD64) || defined(ALPHA5) || defined(HPUX) || defined(IRIX65) || defined(NETBSD) || __GNUC__ >= 3
+ static char *sge_infotext_string_replace(dstring* tmp_buf, const char *arg, const char *what, const char *with, int only_first) {
+    int i;
+    char *p1;
+@@ -1052,7 +1052,7 @@
+    DPRINTF(("pass 4\n"));
+    {
+       if (real_args > 0) {
+-#if defined(SOLARISAMD64) || defined(ALPHA) || defined(ALPHA5) || defined(ALINUX) || defined(HPUX) || defined(IRIX65) || __GNUC__ >= 3 || defined(NETBSD)
++#if defined(SOLARISAMD64) || defined(ALPHA) || defined(ALPHA5) || defined(HPUX) || defined(IRIX65) || defined(NETBSD) || __GNUC__ >= 3
+       for(i=0;i<real_args;i++) {
+ /*      printf("argument[%d]: \"%s\"\n",i,argv[first_arg +i]); */
+          sge_dstring_copy_string(&buffer, sge_infotext_string_replace(&tmp_buf, (char*)sge_dstring_get_string(&buffer2),"%s",argv[first_arg +i],1));
diff --git a/gridengine.spec b/gridengine.spec
index 2f88b46..9b1675b 100644
--- a/gridengine.spec
+++ b/gridengine.spec
@@ -6,7 +6,7 @@
 
 Name:    gridengine
 Version: 2011.11
-Release: 1.svn93%{?dist}
+Release: 1.svn115%{?dist}
 Summary: Grid Engine - Distributed Computing Management software
 
 Group:   Applications/System
@@ -23,8 +23,13 @@ Source1: gridengine-ppc.tar.gz
 Source2: conf_defaults
 Source3: sge.csh
 Source4: sge.sh
+%if 0%{?fedora} >= 15
 Source5: sge_execd.service
 Source6: sgemaster.service
+%else
+Source5: sge_execd
+Source6: sgemaster
+%endif
 Source7: bootstrap
 Source8: Licenses
 Source9: gridengine.sysconfig
@@ -35,8 +40,6 @@ Patch0: gridengine-svn.patch
 # Link ssl libraries dynamically so dependencies are pulled in
 # http://gridengine.sunsource.net/issues/show_bug.cgi?id=2845
 Patch1: gridengine-ssl.patch
-# Make inst_common.sh not look for qmon or sge_execd since they might not be installed
-Patch2: gridengine-inst.patch
 # Don't need to make rc files in inst_common.sh
 # Partially http://gridengine.sunsource.net/issues/show_bug.cgi?id=2780
 Patch3: gridengine-rctemplates.patch
@@ -44,23 +47,10 @@ Patch3: gridengine-rctemplates.patch
 Patch4: gridengine-6.2u2_1-sge_ca.patch
 # Fixup jni paths
 Patch5: gridengine-6.2-jni.patch
-# Use system db_ utils
-Patch6: gridengine-6.2-db.patch
-# Support lesstif - http://gridengine.sunsource.net/issues/show_bug.cgi?id=2310
-Patch15: gridengine-6.2beta2-lesstif.patch
 # Don't use rpaths
 Patch22: gridengine-rpath.patch
-# Fix linking with proper libs
-# http://gridengine.sunsource.net/issues/show_bug.cgi?id=2588
-Patch25: gridengine-6.2u2_1-libs.patch
-# Handle ignoring return codes
-Patch26: gridengine-6.2beta2-error.patch
-# Workaround for openssl-1.0 API change
-Patch27: gridengine-6.2u3-openssl.patch
 # Fix issue with hostnames and localhost
 Patch28: gridengine-6.2u5-gethostname.patch
-# Fix qtcsh using -R
-Patch35: gridengine-qtcsh.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 ExcludeArch: ppc64
@@ -138,6 +128,11 @@ Requires(post): systemd-units
 Requires(post): systemd-sysv
 Requires(postun): systemd-units
 Requires(preun): systemd-units
+%else
+Requires(post): /sbin/chkconfig
+Requires(postun): /sbin/service
+Requires(preun): /sbin/chkconfig
+Requires(preun): /sbin/service
 %endif
 Requires(postun): %{name} = %{version}-%{release}
 Requires(preun): %{name} = %{version}-%{release}
@@ -157,6 +152,11 @@ Requires(post): systemd-units
 Requires(post): systemd-sysv
 Requires(postun): systemd-units
 Requires(preun): systemd-units
+%else
+Requires(post): /sbin/chkconfig
+Requires(postun): /sbin/service
+Requires(preun): /sbin/chkconfig
+Requires(preun): /sbin/service
 %endif
 Requires(postun): %{name} = %{version}-%{release}
 Requires(preun): %{name} = %{version}-%{release}
@@ -175,21 +175,11 @@ cp %SOURCE8 %SOURCE11 .
 #Remove unneeded shbangs
 sed -i -e '/^#! *\/bin\/sh/d' source/dist/util/install_modules/*.sh
 %patch0 -p1 -b .svn
-%patch1 -p1 -b .ssl
-%patch2 -p1 -b .inst
 %patch3 -p1 -b .rctemplates
 %patch4 -p1 -b .sge_ca
 %patch5 -p1 -b .jni
-%patch6 -p1 -b .db
-%if !0%{?rhel}
-%patch15 -p1 -b .lesstif
-%endif
 %patch22 -p1 -b .rpath
-%patch25 -p1 -b .libs
-%patch26 -p1 -b .error
-%patch27 -p1 -b .openssl
 %patch28 -p1 -b .gethostname
-%patch35 -p1 -b .qtcsh
 sed -i.arch -e 's,/\$DSTARCH,,g' source/scripts/distinst
 #Don't ship rctemplates
 rm -rf source/dist/util/rctemplates
@@ -246,9 +236,9 @@ export SGE_INPUT_CFLAGS="$RPM_OPT_FLAGS"
 touch aimk
 ./aimk -only-depend
 scripts/zerodepend
-./aimk -sys-hwloc -sys-jemalloc depend
+./aimk -sys-hwloc -sys-jemalloc -sys-libssl depend
 #TODO - Need IzPack for GUI Installer
-./aimk -no-gui-inst -sys-hwloc -sys-jemalloc
+./aimk -no-gui-inst -sys-hwloc -sys-jemalloc -sys-libssl
 ./aimk -man -sunman
 #Not build by default - going to need hadoop
 #ant herd
@@ -263,7 +253,7 @@ gearch=`%{_builddir}/%{buildsubdir}/source/dist/util/arch`
 export SGE_ROOT=$RPM_BUILD_ROOT%{_datadir}/gridengine
 mkdir -p $SGE_ROOT
 cd source
-echo 'y'| scripts/distinst -nobdb -noopenssl -local -allall -noexit ${gearch}
+echo 'y'| scripts/distinst -nobdb -noopenssl -local -allall -noexit -mansrc sge ${gearch}
 
 #Create default install configuration
 cp dist/util/install_modules/inst_template.conf \
@@ -369,6 +359,9 @@ install -p -m644 %SOURCE3 %SOURCE4 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
 %if 0%{?fedora} >= 15
 mkdir -p $RPM_BUILD_ROOT%{_unitdir}
 install -p -m755 %SOURCE5 %SOURCE6 $RPM_BUILD_ROOT%{_unitdir}
+%else
+mkdir -p $RPM_BUILD_ROOT%{_initrddir}
+install -p -m755 %SOURCE5 %SOURCE6 $RPM_BUILD_ROOT%{_initrddir}
 %endif
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
 install -p -m644 %SOURCE9 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/gridengine
@@ -446,23 +439,37 @@ alternatives --remove qsub %{_bindir}/qsub-ge
 
 
 %post execd
+%if 0%{?fedora} >= 15
 if [ $1 -eq 1 ] ; then 
     # Initial installation 
     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 fi
+%else
+/sbin/chkconfig --add sge_execd
+%endif
+
 
 %postun execd
 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
+%if 0%{?fedora} >= 15
     /bin/systemctl try-restart sge_execd.service >/dev/null 2>&1 || :
+%else
+    /sbin/service sge_execd condrestart >/dev/null 2>&1 || :
+%endif
 fi
 
 %preun execd
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
+%if 0%{?fedora} >= 15
     /bin/systemctl --no-reload disable sge_execd.service > /dev/null 2>&1 || :
     /bin/systemctl stop sge_execd.service > /dev/null 2>&1 || :
+%else
+    /sbin/service sge_execd stop
+    /sbin/chkconfig --del sge_execd
+%endif
 fi
 
 %if 0%{?fedora} >= 15
@@ -473,23 +480,36 @@ fi
 %endif
 
 %post qmaster
+%if 0%{?fedora} >= 15
 if [ $1 -eq 1 ] ; then 
     # Initial installation 
     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 fi
+%else
+/sbin/chkconfig --add sgemaster
+%endif
 
 %postun qmaster
 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
+%if 0%{?fedora} >= 15
     /bin/systemctl try-restart sgemaster.service >/dev/null 2>&1 || :
+%else
+    /sbin/service sgemaster condrestart >/dev/null 2>&1 || :
+%endif
 fi
 
 %preun qmaster
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
+%if 0%{?fedora} >= 15
     /bin/systemctl --no-reload disable sgemaster.service > /dev/null 2>&1 || :
     /bin/systemctl stop sgemaster.service > /dev/null 2>&1 || :
+%else
+    /sbin/service sgemaster stop
+    /sbin/chkconfig --del sgemaster
+%endif
 fi
 
 %if 0%{?fedora} >= 15
@@ -576,6 +596,8 @@ fi
 %defattr(-,root,root,-)
 %if 0%{?fedora} >= 15
 %{_unitdir}/sge_execd.service
+%else
+%{_initrddir}/sge_execd
 %endif
 %{_bindir}/sge_execd
 %{_bindir}/sge_*shepherd
@@ -589,6 +611,8 @@ fi
 %defattr(-,root,root,-)
 %if 0%{?fedora} >= 15
 %{_unitdir}/sgemaster.service
+%else
+%{_initrddir}/sgemaster
 %endif
 %{_bindir}/qacct
 %{_bindir}/sge_qmaster
@@ -604,6 +628,13 @@ fi
 
 
 %changelog
+* Wed Mar 21 2012 Orion Poplawski <orion at cora.nwra.com> 2011.11-1.svn115
+- Update to svn 115
+- Add back SysV init script handling for EL builds
+- Drop inst, db, lesstif, libs, error, openssl, qtcsh patches fixed upstream
+- Build with -sys-libssl
+- Use sge_/SGE_ names in man pages
+
 * Wed Mar 14 2012 Orion Poplawski <orion at cora.nwra.com> 2011.11-1.svn93
 - Update to gridscheduler 2011.11 plus svn revision 93
 - Rebase ssl, rctemplates, and rpath patches


More information about the scm-commits mailing list