[gridengine] - Update to gridscheduler 2011.11 plus svn revision 93 - Rebase ssl, rctemplates, and rpath patches
Orion Poplawski
orion at fedoraproject.org
Wed Mar 21 17:11:17 UTC 2012
commit 342431f783cfc21cdd842895312b5c59425a06fc
Author: Orion Poplawski <orion at cora.nwra.com>
Date: Wed Mar 14 16:15:55 2012 -0600
- Update to gridscheduler 2011.11 plus svn revision 93
- Rebase ssl, rctemplates, and rpath patches
- Drop Werror, quotes, ant, auto, jemalloc, paths, and add-missing
patches fixed upstream
- Add qtcsh patch to avoid using -R when linking
- Add BR on hwloc-devel
- Make systemd conditional on Fedora >= 15
- Use -sys-hwloc and -sys-jemalloc aimk flags
.gitignore | 1 +
gridengine-6.2u2_1-Werror.patch | 11 -
gridengine-6.2u4-ant.patch | 20 -
gridengine-6.2u4-auto.patch | 10 -
gridengine-add-missing.patch | 11 -
gridengine-jemalloc.patch | 52 -
gridengine-linux3.patch | 58 -
gridengine-paths.patch | 24 -
gridengine-qtcsh.patch | 12 +
gridengine-quotes.patch | 1598 ----------------
...templates.patch => gridengine-rctemplates.patch | 79 +-
...e-6.2u2_1-rpath.patch => gridengine-rpath.patch | 10 +-
...ngine-6.2beta-ssl.patch => gridengine-ssl.patch | 9 +-
gridengine-svn.patch | 1936 ++++++++++++++++++++
gridengine.spec | 92 +-
sources | 2 +-
16 files changed, 2048 insertions(+), 1877 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2ac0cd5..b246baf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
ge-V62u5_TAG-src.tar.bz2
gridengine-ppc.tar.gz
/SGE6.2u5p2.tar.gz
+/GE2011.11.tar.gz
diff --git a/gridengine-qtcsh.patch b/gridengine-qtcsh.patch
new file mode 100644
index 0000000..383dacf
--- /dev/null
+++ b/gridengine-qtcsh.patch
@@ -0,0 +1,12 @@
+diff -up GE2011.11/source/3rdparty/qtcsh/configure.qtcsh GE2011.11/source/3rdparty/qtcsh/configure
+--- GE2011.11/source/3rdparty/qtcsh/configure.qtcsh 2011-11-14 12:00:57.000000000 -0700
++++ GE2011.11/source/3rdparty/qtcsh/configure 2012-02-08 10:20:17.378569514 -0700
+@@ -2691,7 +2691,7 @@ else
+ 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 --git a/gridengine-6.2u5-rctemplates.patch b/gridengine-rctemplates.patch
similarity index 83%
rename from gridengine-6.2u5-rctemplates.patch
rename to gridengine-rctemplates.patch
index 312433c..666f8ad 100644
--- a/gridengine-6.2u5-rctemplates.patch
+++ b/gridengine-rctemplates.patch
@@ -1,7 +1,7 @@
-diff -up gridengine/source/dist/inst_sge.rctemplates gridengine/source/dist/inst_sge
---- gridengine/source/dist/inst_sge.rctemplates 2009-12-07 10:11:51.000000000 -0700
-+++ gridengine/source/dist/inst_sge 2010-08-25 11:56:12.828867053 -0600
-@@ -695,8 +696,7 @@ if [ "$UPDATE" = true ]; then
+diff -up GE2011.11/source/dist/inst_sge.rctemplates GE2011.11/source/dist/inst_sge
+--- GE2011.11/source/dist/inst_sge.rctemplates 2012-03-01 15:05:53.266344314 -0700
++++ GE2011.11/source/dist/inst_sge 2012-03-01 15:06:40.235653327 -0700
+@@ -696,8 +696,7 @@ if [ "$UPDATE" = true ]; then
AddJMXFiles
fi
RestoreSequenceNumberFiles $QMDIR #Restore jobseqnum and arseqnum
@@ -11,7 +11,7 @@ diff -up gridengine/source/dist/inst_sge.rctemplates gridengine/source/dist/inst
CreateSettingsFile
InitCA
SetupRcScriptNames master #New qmaster RC script/SMF
-@@ -860,7 +860,6 @@ if [ "$BERKELEY" = "install" ]; then
+@@ -861,7 +860,6 @@ if [ "$BERKELEY" = "install" ]; then
Makedir $COMMONDIR
ProcessSGEClusterName "bdb"
SetSpoolingOptions
@@ -19,7 +19,7 @@ diff -up gridengine/source/dist/inst_sge.rctemplates gridengine/source/dist/inst
PrepareRPCServerStart
GiveBerkelyHints
else
-@@ -912,11 +911,9 @@ if [ "$QMASTER" = "install" -a "$UPDATE"
+@@ -913,11 +911,9 @@ if [ "$QMASTER" = "install" -a "$UPDATE"
AddDefaultUsersets
AddCommonFiles
AddJMXFiles
@@ -32,23 +32,23 @@ diff -up gridengine/source/dist/inst_sge.rctemplates gridengine/source/dist/inst
StartQmaster
AddWindowsAdmin
AddHosts
-@@ -1084,7 +1081,6 @@ if [ "$EXECD" = "install" -a "$UPDATE" !
+@@ -1085,7 +1081,6 @@ if [ "$EXECD" = "install" -a "$UPDATE" !
GetLocalExecdSpoolDir
AddLocalConfiguration_With_Qconf
AddSubmitHostsExecd
- AddSGEStartUpScript $euid execd
SetupWinSvc execinst #service install during execd installation -> param: execinst
- CopyIBMLoadSensor
+ # CopyIBMLoadSensor
StartExecd
-@@ -1120,7 +1116,6 @@ if [ "$EXECD" = "install" -a "$UPDATE" !
+@@ -1121,7 +1116,6 @@ if [ "$EXECD" = "install" -a "$UPDATE" !
CheckHostNameResolving install
GetLocalExecdSpoolDir
AddLocalConfiguration_With_Qconf
- AddSGEStartUpScript $euid execd
SetupWinSvc execinst #service install during execd installation -> param: execinst
- CopyIBMLoadSensor
+ # CopyIBMLoadSensor
StartExecd
-@@ -1437,7 +1432,6 @@ if [ $SHADOW = "install" ]; then
+@@ -1438,7 +1432,6 @@ if [ $SHADOW = "install" ]; then
if [ $SHADOW_HOST = `$SGE_UTILBIN/gethostname -aname` ]; then
. $SGE_ROOT/$SGE_CELL/common/settings.sh
SGE_ARCH=`$SGE_ROOT/util/arch`
@@ -56,7 +56,7 @@ diff -up gridengine/source/dist/inst_sge.rctemplates gridengine/source/dist/inst
$INFOTEXT "Starting sge_shadowd on host %s\n" $SHADOW_HOST
$INFOTEXT -log "Starting sge_shadowd on host %s\n" $SHADOW_HOST
if [ "$SGE_ENABLE_SMF" = "true" ]; then
-@@ -1683,20 +1677,7 @@ if [ $MAKE_RC = "true" ]; then
+@@ -1684,20 +1677,7 @@ if [ $MAKE_RC = "true" ]; then
COMMONDIR=$SGE_CELL/common
@@ -78,9 +78,9 @@ diff -up gridengine/source/dist/inst_sge.rctemplates gridengine/source/dist/inst
fi
exit 0
-diff -up gridengine/source/dist/util/create_settings.sh.rctemplates gridengine/source/dist/util/create_settings.sh
---- gridengine/source/dist/util/create_settings.sh.rctemplates 2008-02-08 04:57:29.000000000 -0700
-+++ gridengine/source/dist/util/create_settings.sh 2010-08-25 11:56:12.662804900 -0600
+diff -up GE2011.11/source/dist/util/create_settings.sh.rctemplates GE2011.11/source/dist/util/create_settings.sh
+--- GE2011.11/source/dist/util/create_settings.sh.rctemplates 2011-11-14 12:00:55.000000000 -0700
++++ GE2011.11/source/dist/util/create_settings.sh 2012-03-01 15:05:53.348341362 -0700
@@ -67,8 +67,6 @@ SP_SH=$1/settings.sh
echo "setenv SGE_ROOT $SGE_ROOT" > $SP_CSH
echo "" >> $SP_CSH
@@ -162,10 +162,10 @@ diff -up gridengine/source/dist/util/create_settings.sh.rctemplates gridengine/s
-echo "unset ARCH DEFAULTMANPATH MANTYPE" >> $SP_SH
+echo "unset ARCH" >> $SP_SH
-diff -up gridengine/source/dist/util/install_modules/inst_common.sh.rctemplates gridengine/source/dist/util/install_modules/inst_common.sh
---- gridengine/source/dist/util/install_modules/inst_common.sh.rctemplates 2010-08-25 11:56:12.639807647 -0600
-+++ gridengine/source/dist/util/install_modules/inst_common.sh 2010-08-25 11:56:42.315866389 -0600
-@@ -570,19 +570,16 @@ ErrUsage()
+diff -up GE2011.11/source/dist/util/install_modules/inst_common.sh.rctemplates GE2011.11/source/dist/util/install_modules/inst_common.sh
+--- GE2011.11/source/dist/util/install_modules/inst_common.sh.rctemplates 2012-03-01 15:05:53.316342514 -0700
++++ GE2011.11/source/dist/util/install_modules/inst_common.sh 2012-03-01 15:05:53.352341218 -0700
+@@ -567,19 +567,16 @@ ErrUsage()
#
GetConfigFromFile()
{
@@ -194,7 +194,7 @@ diff -up gridengine/source/dist/util/install_modules/inst_common.sh.rctemplates
#-nosmf takes precedence over the value in the autoinstall template
if [ "$SGE_ENABLE_SMF_LAST" = false ]; then
SGE_ENABLE_SMF=false
-@@ -2367,14 +2364,6 @@ CreateSGEStartUpScripts()
+@@ -2364,20 +2361,28 @@ CreateSGEStartUpScripts()
rm -f $TMP_SGE_STARTUP_FILE ${TMP_SGE_STARTUP_FILE}.0 ${TMP_SGE_STARTUP_FILE}.1
@@ -209,10 +209,10 @@ diff -up gridengine/source/dist/util/install_modules/inst_common.sh.rctemplates
$INFOTEXT "Creating >%s< script" $STARTUP_FILE_NAME
fi
-@@ -2382,6 +2371,22 @@ CreateSGEStartUpScripts()
+ }
- #-------------------------------------------------------------------------
++#-------------------------------------------------------------------------
+# SetupDefaultUsers: Add the default manager and operator
+#
+SetupDefaultUsers() {
@@ -228,13 +228,12 @@ diff -up gridengine/source/dist/util/install_modules/inst_common.sh.rctemplates
+}
+
+
-+#-------------------------------------------------------------------------
+ #-------------------------------------------------------------------------
# AddSGEStartUpScript: Add startup script to rc files if root installs
#
- AddSGEStartUpScript()
-diff -up gridengine/source/dist/util/install_modules/inst_execd.sh.rctemplates gridengine/source/dist/util/install_modules/inst_execd.sh
---- gridengine/source/dist/util/install_modules/inst_execd.sh.rctemplates 2010-08-25 11:56:12.546804323 -0600
-+++ gridengine/source/dist/util/install_modules/inst_execd.sh 2010-08-25 11:56:12.677807416 -0600
+diff -up GE2011.11/source/dist/util/install_modules/inst_execd.sh.rctemplates GE2011.11/source/dist/util/install_modules/inst_execd.sh
+--- GE2011.11/source/dist/util/install_modules/inst_execd.sh.rctemplates 2012-03-01 15:05:53.195346870 -0700
++++ GE2011.11/source/dist/util/install_modules/inst_execd.sh 2012-03-01 15:05:53.354341146 -0700
@@ -457,7 +457,7 @@ StartExecd()
exit 1
fi
@@ -244,9 +243,9 @@ diff -up gridengine/source/dist/util/install_modules/inst_execd.sh.rctemplates g
fi
$INFOTEXT -wait -auto $AUTO -n "\nHit <RETURN> to continue >> "
$CLEAR
-diff -up gridengine/source/dist/util/install_modules/inst_qmaster.sh.rctemplates gridengine/source/dist/util/install_modules/inst_qmaster.sh
---- gridengine/source/dist/util/install_modules/inst_qmaster.sh.rctemplates 2010-08-25 11:56:12.587804590 -0600
-+++ gridengine/source/dist/util/install_modules/inst_qmaster.sh 2010-08-25 11:56:12.683807289 -0600
+diff -up GE2011.11/source/dist/util/install_modules/inst_qmaster.sh.rctemplates GE2011.11/source/dist/util/install_modules/inst_qmaster.sh
+--- GE2011.11/source/dist/util/install_modules/inst_qmaster.sh.rctemplates 2012-03-01 15:05:53.274344026 -0700
++++ GE2011.11/source/dist/util/install_modules/inst_qmaster.sh 2012-03-01 15:05:53.361340894 -0700
@@ -208,8 +208,8 @@ GetQmasterSpoolDir()
"the qmaster daemon on other hosts (see the corresponding section in the\n" \
"Grid Engine Installation and Administration Manual for details) the account\n" \
@@ -258,7 +257,7 @@ diff -up gridengine/source/dist/util/install_modules/inst_qmaster.sh.rctemplates
done=true
#If directory is not empty need now require a new one
if [ -d "$QMDIR" ]; then
-@@ -733,6 +733,9 @@ AddBootstrap()
+@@ -747,6 +747,9 @@ AddBootstrap()
ExecuteAsAdmin chmod 666 $COMMONDIR/bootstrap
PrintBootstrap >> $COMMONDIR/bootstrap
ExecuteAsAdmin chmod 444 $COMMONDIR/bootstrap
@@ -268,7 +267,7 @@ diff -up gridengine/source/dist/util/install_modules/inst_qmaster.sh.rctemplates
}
#-------------------------------------------------------------------------
-@@ -949,7 +952,7 @@ GetConfiguration()
+@@ -963,7 +966,7 @@ GetConfiguration()
fi
if [ -z "$1" ]; then
@@ -277,7 +276,7 @@ diff -up gridengine/source/dist/util/install_modules/inst_qmaster.sh.rctemplates
else
default_value="$1"
fi
-@@ -1192,6 +1195,7 @@ InitSysKs()
+@@ -1206,6 +1209,7 @@ InitSysKs()
touch /tmp/pwfile.$$
chmod 600 /tmp/pwfile.$$
echo "$SGE_JMX_SSL_KEYSTORE_PW" > /tmp/pwfile.$$
@@ -285,7 +284,7 @@ diff -up gridengine/source/dist/util/install_modules/inst_qmaster.sh.rctemplates
OUTPUT=`$SGE_CA_CMD -sysks -ksout $SGE_JMX_SSL_KEYSTORE -kspwf /tmp/pwfile.$$ 2>&1`
if [ $? != 0 ]; then
$INFOTEXT "Error: Cannot create keystore $SGE_JMX_SSL_KEYSTORE\n$OUTPUT"
-@@ -1263,7 +1267,7 @@ StartQmaster()
+@@ -1277,7 +1281,7 @@ StartQmaster()
exit 1
fi
else
@@ -294,10 +293,10 @@ diff -up gridengine/source/dist/util/install_modules/inst_qmaster.sh.rctemplates
if [ $? -ne 0 ]; then
$INFOTEXT "sge_qmaster start problem"
$INFOTEXT -log "sge_qmaster start problem"
-diff -up gridengine/source/scripts/distinst.rctemplates gridengine/source/scripts/distinst
---- gridengine/source/scripts/distinst.rctemplates 2009-11-12 15:51:14.000000000 -0700
-+++ gridengine/source/scripts/distinst 2010-08-25 11:56:12.914806641 -0600
-@@ -832,15 +832,9 @@ if [ $instcommon = true ]; then
+diff -up GE2011.11/source/scripts/distinst.rctemplates GE2011.11/source/scripts/distinst
+--- GE2011.11/source/scripts/distinst.rctemplates 2012-03-01 15:05:53.295343270 -0700
++++ GE2011.11/source/scripts/distinst 2012-03-01 15:05:53.362340858 -0700
+@@ -839,15 +839,9 @@ if [ $instcommon = true ]; then
Execute cp libs/jgdi/util/logging.properties.template $DEST_SGE_ROOT/util
if [ $enforce_shlibpath = true ]; then
Execute grep -v "#ENFORCE_SHLIBPATH#" dist/util/create_settings.sh > $DEST_SGE_ROOT/util/create_settings.sh
@@ -313,7 +312,7 @@ diff -up gridengine/source/scripts/distinst.rctemplates gridengine/source/script
Execute sed -e "s/#ENFORCE_SHLIBPATH#//" dist/util/install_modules/inst_common.sh > $DEST_SGE_ROOT/util/install_modules/inst_common.sh
fi
-@@ -869,7 +863,6 @@ if [ $instcommon = true ]; then
+@@ -876,7 +870,6 @@ if [ $instcommon = true ]; then
Execute chmod 755 $DEST_SGE_ROOT/util/install_modules \
$DEST_SGE_ROOT/util/upgrade_modules \
@@ -321,7 +320,7 @@ diff -up gridengine/source/scripts/distinst.rctemplates gridengine/source/script
$DEST_SGE_ROOT/util/resources \
$DEST_SGE_ROOT/util/sgeCA \
$DEST_SGE_ROOT/util/resources/calendars \
-@@ -894,7 +887,6 @@ if [ $instcommon = true ]; then
+@@ -901,7 +894,6 @@ if [ $instcommon = true ]; then
$DEST_SGE_ROOT/util/resources/starter_methods/*
Execute chmod 644 $DEST_SGE_ROOT/util/install_modules/* \
diff --git a/gridengine-6.2u2_1-rpath.patch b/gridengine-rpath.patch
similarity index 50%
rename from gridengine-6.2u2_1-rpath.patch
rename to gridengine-rpath.patch
index 13e677e..7d43f1d 100644
--- a/gridengine-6.2u2_1-rpath.patch
+++ b/gridengine-rpath.patch
@@ -1,6 +1,8 @@
---- gridengine/source/aimk.rpath 2009-03-19 16:30:16.000000000 -0600
-+++ gridengine/source/aimk 2009-03-20 08:11:37.000000000 -0600
-@@ -1454,10 +1454,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
set JAVA_ARCH = "linux"
@@ -11,5 +13,5 @@
+ set LFLAGS = "$LFLAGS"
+ set SHARED_LFLAGS = "$SHARED_LFLAGS"
- if ( $COMPILE_ARCH == "ULINUX86_24" || $COMPILE_ARCH == "ULINUXAMD64_24" ) then
+ if ( $COMPILE_ARCH == "ULINUX86" || $COMPILE_ARCH == "ULINUXX64" ) then
echo "Ignore jemalloc for unsupported architectures!"
diff --git a/gridengine-6.2beta-ssl.patch b/gridengine-ssl.patch
similarity index 53%
rename from gridengine-6.2beta-ssl.patch
rename to gridengine-ssl.patch
index 6e3e2fc..d09471f 100644
--- a/gridengine-6.2beta-ssl.patch
+++ b/gridengine-ssl.patch
@@ -1,6 +1,7 @@
---- gridengine/source/aimk.ssl 2008-05-22 15:16:17.000000000 -0600
-+++ gridengine/source/aimk 2008-05-22 15:18:06.000000000 -0600
-@@ -337,7 +337,7 @@
+diff -up GE2011.11/source/aimk.ssl GE2011.11/source/aimk
+--- GE2011.11/source/aimk.ssl 2012-02-08 09:59:54.000000000 -0700
++++ GE2011.11/source/aimk 2012-02-08 10:00:30.822872355 -0700
+@@ -367,7 +367,7 @@ set INTERACTTARGETS = "qmake qtcsh"
set SEC = 1
set SECFLAGS = "-DSECURE -I$OPENSSL_HOME/include"
set SECLIB = ""
@@ -8,4 +9,4 @@
+set SECLIBS_STATIC = "-lssl -lcrypto"
set KLFLAGS = "-L$OPENSSL_HOME/lib"
- set CORELIB = ""
+ # AIX
diff --git a/gridengine-svn.patch b/gridengine-svn.patch
new file mode 100644
index 0000000..f87d832
--- /dev/null
+++ b/gridengine-svn.patch
@@ -0,0 +1,1936 @@
+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 @@
+ ################################################################################
+ 1 2 3 4 5 6 7
+ 01234567890123456789012345678901234567890123456789012345678901234567890123456789
++RH-2012-03-12-0: Enhancem. aimk cleanup
++
++RH-2012-02-15-0: Enhancem.: - cleanup inst_sge
++ - added -sys-jemalloc
++
++RH-2012-01-21-1: Bugfix: lx -> linux in arch
++
++RH-2012-01-21-0: Enhancem. 64-bit OSX port + OSX cleanup
++
++RH-2011-11-21-1: Enhancem. add -y option to auto-accept prompts
++ From: Justin Riley (with some minor changes by RH)
++
++RH-2011-11-21-0: Enhancem. set JAVA_LIB_ARCH to i386 if -32 flag was passed
++ From: Justin Riley
++
++RH-2011-11-19-0: Bugfix: Exported bash functions causes erroneous
++ "environment" file
++ Issue: 2173
++
++RH-2011-11-16-1: Enhancem. Cygwin port - Part 1
++
++-------------------------------------------------------------------------------
++
++RH-2011-11-16-0: SVN: Grid Engine 2011.11
+
+ RH-2011-11-14-1: Enhancem. manpage update
+
+@@ -97,7 +121,7 @@
+
+ -------------------------------------------------------------------------------
+
+-RH-2011-04-01-0: CVS: OGS 6.2u5p2
++RH-2011-04-01-0: SVN: OGS 6.2u5p2
+
+ RC-2011-03-27-0: Cleanup: more cleanups
+
+@@ -132,7 +156,7 @@
+
+ -------------------------------------------------------------------------------
+
+-RH-2011-02-25-0: CVS: created trunk, tags, branches (OGS 6.2u5p1)
++RH-2011-02-25-0: SVN: created trunk, tags, branches (OGS 6.2u5p1)
+
+ SD-2010-09-15-0: Bugfix: slotwise preemption fails to unsuspend one job
+ per host
+@@ -146,4 +170,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/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 @@
+ set REMOTE = 1
+ set QMAKE = 1
+ set QMAKELIB = ""
++set QTCSH = 1
+ set PLPA = 0
+ set HWLOC = 1
+ set HWLOC_CFLAGS = "-O2"
+-set QTCSH = 1
+-set MAKEMTMALLOCLIB = 1
++set MAKEHWLOC = 1
+ set MAKEJEMALLOCLIB = 0
++set LINKJEMALLOCLIB = 0
++set LINKMTMALLOCLIB = 1
+ set MAKESTRPTIME = 0
+ set MAKESNPRINTF = 0
+ set MAKEFNMATCH = 0
+@@ -285,7 +289,7 @@
+ set CC = cc
+ set CXX = CC
+ set CFLAGS = "-D$TARGET_BITS $INP_CFLAGS"
+-set CORE_INCLUDE = "-I../common -I../libs -I../libs/uti -I../libs/juti -I../libs/gdi -I../libs/japi -I../libs/sgeobj -I../libs/cull -I../libs/rmon -I../libs/comm -I../libs/comm/lists -I../libs/sched -I../libs/evc -I../libs/evm -I../libs/mir -I../libs/lck -I../daemons/common -I../daemons/qmaster -I../daemons/execd -I../daemons/schedd -I../clients/common -I."
++set CORE_INCLUDE = "-I../common -I../libs -I../libs/uti -I../libs/juti -I../libs/gdi -I../libs/japi -I../libs/sgeobj -I../libs/cull -I../libs/rmon -I../libs/comm -I../libs/comm/lists -I../libs/sched -I../libs/evc -I../libs/evm -I../libs/mir -I../libs/lck -I../daemons/common -I../daemons/qmaster -I../daemons/execd -I../clients/common -I."
+ set DEBUG_FLAG = ""
+ set INSURE_FLAG = ""
+ set JEMALLOC_CFLAGS = ""
+@@ -429,6 +433,7 @@
+ switch ($BUILDARCH)
+ case LINUXX64:
+ set MAKEJEMALLOCLIB = 1
++ set LINKJEMALLOCLIB = 1
+ set WITH_GETTEXT = 1
+ breaksw
+ case LINUX*:
+@@ -508,6 +513,7 @@
+ set QMAKE = 0
+ set PLPA = 0
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+ set QMON = 0
+ set QTCSH = 0
+ set REMOTE = 0
+@@ -631,7 +637,7 @@
+ set BUILDMAN = 1
+ set KVMAN = 1
+ breaksw
+- case "-mo"
++ case "-mo"
+ echo "BUILDARCH=$BUILDARCH"
+ if ( $BUILDARCH == sol-sparc || $BUILDARCH == sol-sparc64 ) then
+ scripts/msgmerge.csh
+@@ -646,16 +652,16 @@
+ case "-no-dump":
+ set DUMP = 0
+ breaksw
+- case "-no-java"
++ case "-no-java"
+ set JAVA = 0
+ breaksw
+- case "-no-gui-inst"
++ case "-no-gui-inst"
+ set JAVA_GUI_INST = 0
+ breaksw
+- case "-no-jni"
++ case "-no-jni"
+ set JNI = 0
+ breaksw
+- case "-no-intl"
++ case "-no-intl"
+ set WITH_GETTEXT = 0
+ breaksw
+ case "-no-mk":
+@@ -692,20 +698,24 @@
+ breaksw
+ case "-no-jemalloc":
+ set MAKEJEMALLOCLIB = 0
++ set LINKJEMALLOCLIB = 0
+ breaksw
+ case "-plpa":
+ set PLPA = 1
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+ breaksw
+ case "-solaris-pset":
+ set SOLARISPSET = 1
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+ breaksw
+ case "-no-hwloc":
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+ breaksw
+ case "-no-mtmalloc":
+- set MAKEMTMALLOCLIB = 0
++ set LINKMTMALLOCLIB = 0
+ breaksw
+ case "-only-core":
+ set CORE = 1
+@@ -714,6 +724,7 @@
+ set QMAKE = 0
+ set PLPA = 0
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+ set QMON = 0
+ set QTCSH = 0
+ set REMOTE = 0
+@@ -728,20 +739,22 @@
+ set QMAKE = 0
+ set PLPA = 0
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+ set QMON = 0
+ set QTCSH = 0
+ set REMOTE = 0
+ set SGE_DEPEND = 1
+ set MAKEWINGRIDAPP = 0
+ set MAKEWINGRIDLIB = 0
+- set MAKEJEMALLOCLIB = 0
++ set MAKEJEMALLOCLIB = 0
++ set LINKJEMALLOCLIB = 0
+ set ONLY_PARAM_SPEC = 1
+ breaksw
+- case "-only-java"
++ case "-only-java"
+ set JAVA = 2
+ set ONLY_PARAM_SPEC = 1
+ breaksw
+- case "-only-gui-inst"
++ case "-only-gui-inst"
+ set JAVA_GUI_INST = 2
+ set ONLY_PARAM_SPEC = 1
+ breaksw
+@@ -754,7 +767,8 @@
+ set QMON = 0
+ set QTCSH = 0
+ set REMOTE = 0
+- set MAKEJEMALLOCLIB = 1
++ set MAKEJEMALLOCLIB = 1
++ set LINKJEMALLOCLIB = 1
+ set MAKEWINGRIDAPP = 0
+ set MAKEWINGRIDLIB = 0
+ set ONLY_PARAM_SPEC = 1
+@@ -766,6 +780,7 @@
+ set QMAKE = 1
+ set PLPA = 0
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+ set QMON = 0
+ set QTCSH = 0
+ set REMOTE = 0
+@@ -776,6 +791,7 @@
+ case "-only-plpa":
+ set PLPA = 1
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+ set CORE = 0
+ set JAVA = 0
+ set JAVA_GUI_INST = 0
+@@ -794,6 +810,7 @@
+ set QMAKE = 0
+ set PLPA = 0
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+ set QMON = 1
+ set QTCSH = 0
+ set REMOTE = 0
+@@ -808,6 +825,7 @@
+ set QMAKE = 0
+ set PLPA = 0
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+
+ set QMON = 0
+ set QTCSH = 1
+@@ -823,6 +841,7 @@
+ set QMAKE = 0
+ set PLPA = 0
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+ set QMON = 0
+ set QTCSH = 0
+ set REMOTE = 0
+@@ -837,6 +856,7 @@
+ set QMAKE = 0
+ set PLPA = 0
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+ set QMON = 0
+ set QTCSH = 0
+ set REMOTE = 1
+@@ -855,7 +875,7 @@
+ set PERLGUI = "perlgui_all"
+ set PERLGUI_CLEAN = "perlgui_clean"
+ breaksw
+- case "-po"
++ case "-po"
+ if ( $buildarch == linux-x86 ) then
+ scripts/msgmerge.csh merge
+ echo ""
+@@ -867,7 +887,7 @@
+ endif
+ exit 0
+ breaksw
+- case "-pot"
++ case "-pot"
+ if ( $buildarch != linux-x86 ) then
+ echo "Must be done on linux-86 architecture"
+ exit 1
+@@ -943,6 +963,12 @@
+ case "-sunman":
+ set SGE_PRODUCT_MODE=sge
+ breaksw
++ case "-sys-jemalloc":
++ setenv SGE_SYSJEMALLOC "SGE_SYSJEMALLOC"
++ breaksw
++ case "-sys-hwloc":
++ setenv SGE_SYSHWLOC "SGE_SYSHWLOC"
++ breaksw
+ case "-umap"
+ set WITH_USERMAPPING = 1
+ breaksw
+@@ -957,6 +983,7 @@
+ breaksw
+ case "-with-jemalloc"
+ set MAKEJEMALLOCLIB = 1
++ set LINKJEMALLOCLIB = 1
+ breaksw
+ default:
+ unset found
+@@ -974,6 +1001,16 @@
+ set MAKEOPT = "-verbose $MAKEOPT"
+ endif
+
++if ( $?SGE_SYSJEMALLOC ) then
++ set MAKEJEMALLOCLIB = 0
++ set LINKJEMALLOCLIB = 1
++endif
++
++if ( $?SGE_SYSHWLOC ) then
++ set MAKEHWLOC = 0
++endif
++
++
+ set CFLAGS = "$CFLAGS -DSPOOLING_$SPOOLING_METHOD $SECFLAGS"
+
+ #---------------------------------------------------------------------------
+@@ -1040,7 +1077,7 @@
+
+ switch ($BUILDARCH)
+ case AIX43:
+-case AIX51:
++case AIX:
+ set MAKEWINGRIDLIB = 0
+ set MAKEWINGRIDAPP = 0
+ set COMPILE_DC = 1
+@@ -1054,11 +1091,13 @@
+ if ( $DEBUGGED == 1 ) then
+ set DEBUG_FLAG = "$DEBUG_FLAG -qinitauto=01 -qro -qroconst"
+ endif
++
+ if ( $OPTIMIZATION == 1 ) then
+ set OFLAG = "-O3 -qstrict -qmaxmem=8192"
+ else
+ set OFLAG = "-qmaxmem=8192"
+ endif
++
+ 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 @@
+
+ if ("$PERFSTAT" == 1) then
+ set CFLAGS = "$CFLAGS -DHAS_AIX_PERFLIB"
++ set LFLAGS = "$LFLAGS -lperfstat"
+ endif
+
+ if ("$WERR" == 1) then
+@@ -1138,11 +1178,13 @@
+ breaksw
+
+ case DARWIN_X86:
++case DARWIN_X64:
+ case DARWIN_PPC:
+ set MAKEWINGRIDLIB = 0
+ set MAKEWINGRIDAPP = 0
+ set COMPILE_DC = 1
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+
+ if ( $OPTIMIZATION == 1 ) then
+ set OFLAG = "-O3"
+@@ -1167,33 +1209,34 @@
+ set DEBUG_FLAG = "$DEBUG_FLAG -fprofile-arcs -ftest-coverage"
+ endif
+
++ if ($BUILDARCH == "DARWIN_X86") then
++ set X86_ARCH = "-arch i386"
++ else if ($BUILDARCH == "DARWIN_X64") then
++ set X86_ARCH = "-arch x86_64"
++ else
++ set X86_ARCH = ""
++ endif
++
+ set REL = `/usr/bin/uname -r`
+ switch ($REL)
+ case "6.*":
+ set CFLAGS = "$OFLAG -no-cpp-precomp -flat_namespace -Wall -Wstrict-prototypes -DFD_SETSIZE=8192 -DDARWIN -DDARWIN6 -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS"
+ breaksw
++
+ case "7.*":
+- set CFLAGS = "$OFLAG -no-cpp-precomp -flat_namespace -Wall -Wstrict-prototypes -DFD_SETSIZE=8192 -DDARWIN -DDARWIN7 -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS"
+- breaksw
+ case "8.*":
+- set CFLAGS = "$OFLAG -no-cpp-precomp -flat_namespace -Wall -Wstrict-prototypes -DFD_SETSIZE=8192 -DDARWIN -DDARWIN8 -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS"
+- breaksw
+- case "9.*":
+- set CFLAGS = "$OFLAG -no-cpp-precomp -flat_namespace -Wall -Wstrict-prototypes -DFD_SETSIZE=8192 -DDARWIN -DDARWIN9 -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS"
+- breaksw
+- case "10.*":
+- set CFLAGS = "$OFLAG -no-cpp-precomp -flat_namespace -arch i386 -Wall -Wno-format -Wstrict-prototypes -DFD_SETSIZE=8192 -DDARWIN -DDARWIN10 -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS"
+- set SHARED_LFLAGS = "$SHARED_LFLAGS -arch i386"
+- set LFLAGS = "$LFLAGS -arch i386"
++ set CFLAGS = "$OFLAG -no-cpp-precomp -flat_namespace -Wall -Wstrict-prototypes -DFD_SETSIZE=8192 -DDARWIN -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS"
+ breaksw
++
+ default:
+- echo DARWIN release \"$REL\" not supported!
+- exit 1
++ set CFLAGS = "$OFLAG -no-cpp-precomp -flat_namespace -Wall -Wno-format -Wstrict-prototypes -DFD_SETSIZE=8192 -DDARWIN -DDARWIN9 -D$BUILDARCH -DGETHOSTBYNAME -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS $X86_ARCH"
++ set SHARED_LFLAGS = "$SHARED_LFLAGS $X86_ARCH"
++ set LFLAGS = "$LFLAGS $X86_ARCH"
+ breaksw
+ endsw
+
+ if ("$WERR" == 1) then
+- set CFLAGS = "$CFLAGS -Werror"
++ set CFLAGS = "$CFLAGS -Werror -Wextra"
+ endif
+
+ if ("$STACKPROTECT" == 1) then
+@@ -1229,19 +1272,7 @@
+ set CFLAGS = "$CFLAGS -Wno-error"
+ endif
+
+- switch ($REL)
+- case "6.*":
+- case "7.*":
+- case "8.*":
+- case "9.*":
+- case "10.*":
+- set XLFLAGS = "$XLIBD"
+- breaksw
+- default:
+- echo DARWIN release \"$REL\" not supported!
+- exit 1
+- breaksw
+- endsw
++ set XLFLAGS = "$XLIBD"
+
+ set NOERR_CFLAG = "-Wno-error"
+ set NOERR_PROTO = "-Wno-strict-prototypes"
+@@ -1268,9 +1299,9 @@
+ set CC = gcc
+ set CXX = g++
+ set DLLIB = ""
+- set DEPEND_FLAGS = "$CFLAGS $XMTINCD"
+ set PTHRDSFLAGS = "-D_REENTRANT -D__USE_REENTRANT"
+ set CFLAGS = "$OFLAG -Wall -DFREEBSD -D$BUILDARCH -DGETHOSTBYNAME_M -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS -I/usr/X11R6/include"
++ set DEPEND_FLAGS = "$CFLAGS $XMTINCD"
+ set NOERR_CFLAG = "-Wno-error"
+ set LFLAGS = "$DEBUG_FLAG $LFLAGS -export-dynamic"
+ set LIBS = "$LIBS -lkvm"
+@@ -1299,9 +1330,9 @@
+ set CC = gcc
+ set CXX = g++
+ set DLLIB = ""
+- set DEPEND_FLAGS = "$CFLAGS $XMTINCD"
+ set PTHRDSFLAGS = "-D_REENTRANT -D__USE_REENTRANT"
+ set CFLAGS = "$OFLAG -Wall -DNETBSD -D$BUILDARCH -DGETHOSTBYNAME_M -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS -I/usr/X11R6/include"
++ set DEPEND_FLAGS = "$CFLAGS $XMTINCD"
+ set NOERR_CFLAG = "-Wno-error"
+ set LFLAGS = "$DEBUG_FLAG $LFLAGS -export-dynamic"
+ set LIBS = "$LIBS -lkvm"
+@@ -1456,19 +1487,7 @@
+ breaksw
+
+ case ALINUX:
+-case LINUXARM:
+-case LINUXARM64:
+-case LINUXIA64:
+-case LINUXMIPS:
+-case LINUXMIPS64:
+-case LINUXPPC:
+-case LINUXPPC64:
+-case LINUXS390:
+-case LINUXS390X:
+-case LINUXSPARC:
+-case LINUXSPARC64:
+-case LINUX86:
+-case LINUXX64:
++case LINUX*:
+ set MAKEWINGRIDLIB = 0
+ set MAKEWINGRIDAPP = 0
+ set AUTHLIBS = "-lcrypt -lpam"
+@@ -1532,12 +1551,12 @@
+ 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"
+ endif
+
+ if ("$STACKPROTECT" == 1) then
+@@ -1547,9 +1566,11 @@
+ if ("$ADOC" == 1) then
+ set CFLAGS = "$CFLAGS -Wno-error"
+ endif
++
+ if ( $TARGET_BITS == TARGET_32BIT ) then
+ set CFLAGS = "$CFLAGS -D_FILE_OFFSET_BITS=64"
+ endif
++
+ set LFLAGS = "$DEBUG_FLAG $LFLAGS"
+
+ set SHAREDLD = $CC
+@@ -1618,16 +1639,110 @@
+ if ( $COMPILE_ARCH == "ULINUX86" || $COMPILE_ARCH == "ULINUXX64" ) then
+ echo "Ignore jemalloc for unsupported architectures!"
+ set MAKEJEMALLOCLIB = 0
++ set LINKJEMALLOCLIB = 0
+ endif
+
+ if ( $MAKEJEMALLOCLIB == 1 ) then
+- set LIBRARY_LIBS = "$LIBS"
+ set JEMALLOC_CFLAGS = "-Wno-error -DMOZ_MEMORY_LINUX"
++ endif
++
++ if ( $LINKJEMALLOCLIB == 1) then
++ set LIBRARY_LIBS = "$LIBS"
+ set LIBS = "-ljemalloc $LIBS"
+ endif
+
+ breaksw
+-
++
++case CYGWIN_X86:
++ set MAKEWINGRIDLIB = 0
++ set MAKEWINGRIDAPP = 0
++ set AUTHLIBS = "-lcrypt -lpam"
++
++ set COMPILE_DC = 1
++
++ if ($OPTIMIZATION == 1 ) then
++ set OFLAG = "-O2"
++ else
++ set OFLAG = ""
++ endif
++
++ set CC = gcc
++ set CXX = g++
++
++ if ($DEBUGGED == 1) then
++ set DEBUG_FLAG = "-g $INSURE_FLAG -DSGE_LOCK_DEBUG"
++ endif
++
++ if ($GPROFFED == 1) then
++ set DEBUG_FLAG = "$DEBUG_FLAG -pg"
++ endif
++
++ if ($COVED == 1) then
++ set DEBUG_FLAG = "$DEBUG_FLAG -fprofile-arcs -ftest-coverage"
++ endif
++
++ 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"
++
++ if ("$WERR" == 1) then
++ set CFLAGS = "$CFLAGS -Werror -Wextra"
++ endif
++
++ if ("$STACKPROTECT" == 1) then
++ set CFLAGS = "$CFLAGS -fstack-protector-all"
++ endif
++
++ if ("$ADOC" == 1) then
++ set CFLAGS = "$CFLAGS -Wno-error"
++ endif
++
++ if ( $TARGET_BITS == TARGET_32BIT ) then
++ set CFLAGS = "$CFLAGS -D_FILE_OFFSET_BITS=64"
++ endif
++
++ set LFLAGS = "$DEBUG_FLAG $LFLAGS"
++
++ set SHAREDLD = $CC
++ set SHARED_LFLAGS = "$SHARED_LFLAGS -L. -shared"
++
++ set SONAME_LFLAG_DRMAA10 = "-Wl,-soname,libdrmaa.so.1.0"
++ set SONAME_LFLAG_DRMAA95 = "-Wl,-soname,libdrmaa.so.0.95"
++
++ set SHAREDEXT = ".dll"
++
++ if ( $SHAREDLIBS == 1 || $SPOOLING_METHOD == dynamic ) then
++ set LFLAGS = "$LFLAGS -rdynamic"
++ endif
++
++ set NOERR_CFLAG = "-Wno-error"
++ set NOERR_PROTO = "-Wno-strict-prototypes"
++
++ set XMTDEF = ""
++
++ if ($TARGET_BITS == TARGET_32BIT ) then
++ set XLIBD = "-L/usr/X11R6/lib"
++ else
++ set XLIBD = "-L/usr/X11R6/lib64"
++ endif
++
++ set XLFLAGS = "$XLIBD"
++
++ set DEPEND_FLAGS = "$CFLAGS $XMTINCD"
++
++ 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 JAVA_ARCH = "linux"
++
++ # due to -rpath relative_path the LD_LIBRARY_PATH not needed anymore
++ set RUNPATH = -Wl,-rpath,'\$$ORIGIN'/../../lib/$buildarch
++ set LFLAGS = "$LFLAGS $RUNPATH"
++ set SHARED_LFLAGS = "$SHARED_LFLAGS $RUNPATH"
++
++ breaksw
++
+ case WIN32_X86:
+ setenv LD_LIBRARY_PATH /usr/lib/x86:/usr/local/lib
+ set CC = gcc
+@@ -1644,6 +1759,7 @@
+ set WITH_USERMAPPING = 0 # Compile without usermapping feature
+ set COMPILE_DC = 1
+ set HWLOC = 0
++ set MAKEHWLOC = 0
+ set AUTHLIBS = ""
+ set JUTI_ALL = ""
+ set JUTI_DEPEND = ""
+@@ -1682,7 +1798,7 @@
+ #set LFLAGS = "-Wl,-EL,-b=pe-i1386 $LFLAGS"
+
+ if ("$WERR" == 1) then
+- set CFLAGS = "$CFLAGS -Werror"
++ set CFLAGS = "$CFLAGS -Werror -Wextra"
+ endif
+ else
+ set CC = cc
+@@ -1937,13 +2053,12 @@
+ endif
+ set CFLAGS = "-Xc -v $OFLAG $MEMFLAG -ftrap=division $CFLAGS $DEBUG_FLAG"
+ else if ( $CC == gcc) then
+- #set CFLAGS = "-Wall -Werror -Wstrict-prototypes $CFLAGS"
+ 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"
+ endif
+
+ if ( $BUILDARCH == SOLARIS64 ) then
+@@ -2023,11 +2138,15 @@
+
+ set LFLAGS = "$LFLAGS $DEBUG_FLAG"
+ set LIBRARY_LIBS = "$LIBS"
++
+ if ( $MAKEJEMALLOCLIB == 1 ) then
+ set JEMALLOC_CFLAGS = "-DMOZ_MEMORY_SOLARIS -xc99"
++ endif
++
++ if ( $LINKJEMALLOCLIB == 1 ) then
+ set LIBS = "-ljemalloc $LIBS"
+ else
+- if ( $MAKEMTMALLOCLIB == 1 ) then
++ if ( $LINKMTMALLOCLIB == 1 ) then
+ set LIBS = "-lmtmalloc $LIBS"
+ endif
+ endif
+@@ -2114,7 +2233,11 @@
+ breaksw
+ case linux-x64:
+ case sol-amd64:
+- set JAVA_LIB_ARCH = amd64
++ if ($FORCE_32BIT == 1) then
++ set JAVA_LIB_ARCH = i386
++ else
++ set JAVA_LIB_ARCH = amd64
++ endif
+ breaksw
+ case linux-ia64:
+ set JAVA_LIB_ARCH = ia64
+@@ -2159,9 +2282,9 @@
+ #
+ # special treatment
+ #
+- if ( $buildarch == aix51 ) then
++ if ( $buildarch == aix ) then
+ set JAVA_LFLAGS="-L$JAVA_HOME/jre/bin/classic"
+- else if ( $buildarch == darwin-x86 || $buildarch == darwin-ppc ) then
++ else if ( $buildarch == darwin-x86 || $buildarch == darwin-x64 || $buildarch == darwin-ppc ) then
+ 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 @@
+
+ set MAKEOPT = "$MAKEOPT $PARALLEL"
+
+-# set gcc version dependent defines, suppress gcc 3.3.x warnings
+-#
+-if ($CC == gcc) then
+- expr `gcc -dumpversion` : 3.3 > /dev/null
+- if ($status == 0) then
+- set CFLAGS = "$CFLAGS"
+- endif
+- expr `gcc -dumpversion` : 2.96 > /dev/null
+- if ($status == 0) then
+- set CFLAGS = "-DUSING_GCC_2_96 $CFLAGS"
+- endif
+-endif
+-
+ # pass -DCOMPILE_DC define to compile where PTF and PDC are ported
+ #
+ if ( $COMPILE_DC == 1 ) then
+@@ -2246,13 +2356,17 @@
+
+ if ( $HWLOC == 1 ) then
+ set CFLAGS = "$CFLAGS -DTHREADBINDING -DHWLOC"
+- set CORE_INCLUDE = "$CORE_INCLUDE -I$SOURCE/3rdparty/hwloc/$HWLOC_DIRECTORY/include/ -I$SOURCE/3rdparty/hwloc/$HWLOC_DIRECTORY/$COMPILE_ARCH/include"
+- # set LFLAGS = "$LFLAGS -L$SOURCE/3rdparty/hwloc/$HWLOC_DIRECTORY/$COMPILE_ARCH/src/.libs/"
+- # set LIBS = "$LIBS -lhwloc"
+- set LIBS = "-L$SOURCE/3rdparty/hwloc/$HWLOC_DIRECTORY/$COMPILE_ARCH/src/.libs/ -lhwloc $LIBS"
++
++ if ( $MAKEHWLOC == 1 ) then
++ set CORE_INCLUDE = "$CORE_INCLUDE -I$SOURCE/3rdparty/hwloc/$HWLOC_DIRECTORY/include/ -I$SOURCE/3rdparty/hwloc/$HWLOC_DIRECTORY/$COMPILE_ARCH/include"
++ set LIBS = "-L$SOURCE/3rdparty/hwloc/$HWLOC_DIRECTORY/$COMPILE_ARCH/src/.libs/ -lhwloc $LIBS"
++ else
++ set LIBS = "-lhwloc $LIBS"
++ endif
+ endif
+
+
++
+ # create shared lib from LGPL code - use $SHAREDEXT for shared lib extension
+ #
+ set GSHARED_CFLAGS = "$SHARED_CFLAGS"
+@@ -2444,7 +2558,8 @@
+
+ if ( "$HWLOC" == 1 ) then
+ echo "No dependencies for 3rd_party hwloc ... skipping"
+- set HWLOC = 0
++ set HWLOC = 0
++ set MAKEHWLOC = 0
+ endif
+
+ if ( "$QMAKE" == 1 ) then
+@@ -2581,7 +2696,7 @@
+ cd $SOURCE
+ endif
+
+-if ( "$HWLOC" == 1 ) then
++if ( "$MAKEHWLOC" == 1 ) then
+ echo _________3_r_d_p_a_r_t_y__H_W_L_O_C_______
+
+ set maj_ver = `echo $HWLOC_VERSION| cut -f 1 -d .`
+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
+@@ -723,18 +723,19 @@
+ /*
+ ** tag only jobs which satisfy the user list
+ */
+- if (lGetNumberOfElem(qstat_env->user_list)) {
++ if (lGetNumberOfElem(qstat_env->user_list))
++ {
+ DPRINTF(("------- selecting jobs -----------\n"));
+
+ /* ok, now we untag the jobs if the user_list was specified */
+ for_each(up, qstat_env->user_list)
+- for_each (jep, qstat_env->job_list) {
+- if (up && lGetString(up, ST_name) &&
+- !fnmatch(lGetString(up, ST_name),
+- lGetString(jep, JB_owner), 0)) {
+- for_each (jatep, lGetList(jep, JB_ja_tasks)) {
+- lSetUlong(jatep, JAT_suitable,
+- lGetUlong(jatep, JAT_suitable)|TAG_SHOW_IT|TAG_SELECT_IT);
++ for_each (jep, qstat_env->job_list)
++ {
++ if (up && lGetString(up, ST_name) && !fnmatch(lGetString(up, ST_name), lGetString(jep, JB_owner), FNM_NOESCAPE))
++ {
++ for_each (jatep, lGetList(jep, JB_ja_tasks))
++ {
++ lSetUlong(jatep, JAT_suitable, lGetUlong(jatep, JAT_suitable)|TAG_SHOW_IT|TAG_SELECT_IT);
+ }
+ }
+ }
+@@ -839,19 +840,19 @@
+ DENTER(TOP_LAYER, "qstat_env_filter_queues");
+
+ ret = filter_queues(NULL,
+- qstat_env->queue_list,
+- qstat_env->centry_list,
+- qstat_env->hgrp_list,
+- qstat_env->exechost_list,
+- qstat_env->acl_list,
+- qstat_env->project_list,
+- qstat_env->pe_list,
+- qstat_env->resource_list,
+- qstat_env->queueref_list,
+- qstat_env->peref_list,
+- qstat_env->queue_user_list,
+- qstat_env->queue_state,
+- alpp);
++ qstat_env->queue_list,
++ qstat_env->centry_list,
++ qstat_env->hgrp_list,
++ qstat_env->exechost_list,
++ qstat_env->acl_list,
++ qstat_env->project_list,
++ qstat_env->pe_list,
++ qstat_env->resource_list,
++ qstat_env->queueref_list,
++ qstat_env->peref_list,
++ qstat_env->queue_user_list,
++ qstat_env->queue_state,
++ alpp);
+ DRETURN(ret);
+ }
+
+diff -ruN --exclude .svn GE2011.11/source/clients/qdel/qdel.c gridscheduler-trunk/source/clients/qdel/qdel.c
+--- GE2011.11/source/clients/qdel/qdel.c 2011-11-14 12:00:52.000000000 -0700
++++ gridscheduler-trunk/source/clients/qdel/qdel.c 2012-02-28 17:08:35.474822444 -0700
+@@ -51,7 +51,7 @@
+ #include "msg_clients_common.h"
+ #include "msg_qdel.h"
+ #include "sgeobj/msg_sgeobjlib.h"
+-#include "sgeobj//sge_range.h"
++#include "sgeobj/sge_range.h"
+ #include "sge_options.h"
+ #include "sge_profiling.h"
+
+diff -ruN --exclude .svn GE2011.11/source/clients/qmod/qmod.c gridscheduler-trunk/source/clients/qmod/qmod.c
+--- GE2011.11/source/clients/qmod/qmod.c 2011-11-14 12:00:52.000000000 -0700
++++ gridscheduler-trunk/source/clients/qmod/qmod.c 2012-02-28 17:08:35.534820307 -0700
+@@ -53,7 +53,7 @@
+
+ #include "sgeobj/sge_str.h"
+ #include "sgeobj/msg_sgeobjlib.h"
+-#include "sgeobj//sge_range.h"
++#include "sgeobj/sge_range.h"
+ #include "sge_options.h"
+ #include "sge_profiling.h"
+ #include "gdi/sge_gdi.h"
+diff -ruN --exclude .svn GE2011.11/source/common/basis_types.h gridscheduler-trunk/source/common/basis_types.h
+--- GE2011.11/source/common/basis_types.h 2011-11-14 12:00:44.000000000 -0700
++++ gridscheduler-trunk/source/common/basis_types.h 2012-02-08 09:46:01.468133610 -0700
+@@ -60,7 +60,7 @@
+ #endif
+
+ #if !defined(__cplusplus)
+-# if defined(DARWIN9) || defined(DARWIN10)
++# if defined(DARWIN9)
+ # include <stdbool.h>
+ # else
+ typedef enum {
+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
+@@ -2064,20 +2064,24 @@
+ {
+ DENTER(TOP_LAYER, "var_list_parse_from_environment");
+
+- if (!lpp || !envp) {
++ if (!lpp || !envp)
++ {
+ DEXIT;
+ return 1;
+ }
+
+- if (!*lpp) {
++ if (!*lpp)
++ {
+ *lpp = lCreateList("env list", VA_Type);
+- if (!*lpp) {
++ if (!*lpp)
++ {
+ DEXIT;
+- return 3;
++ return 1;
+ }
+ }
+
+- for (; *envp; envp++) {
++ for (; *envp; envp++)
++ {
+ char *env_name;
+ char *env_description;
+ char *env_entry;
+@@ -2094,7 +2098,7 @@
+ SGE_ASSERT((env_name));
+ lSetString(ep, VA_variable, env_name);
+
+- env_description = sge_strtok_r((char *) 0, "\n", &context);
++ env_description = sge_strtok_r(NULL, "\0", &context);
+ if (env_description)
+ lSetString(ep, VA_value, env_description);
+ FREE(env_entry);
+diff -ruN --exclude .svn GE2011.11/source/daemons/common/pdc.c gridscheduler-trunk/source/daemons/common/pdc.c
+--- GE2011.11/source/daemons/common/pdc.c 2011-11-14 12:00:42.000000000 -0700
++++ gridscheduler-trunk/source/daemons/common/pdc.c 2012-02-08 09:46:00.747158446 -0700
+@@ -1703,15 +1703,20 @@
+ int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL, 0 };
+ size_t bufSize = 0;
+
+- if (sysctl(mib, 4, NULL, &bufSize, NULL, 0) < 0) {
++ if (sysctl(mib, 4, NULL, &bufSize, NULL, 0) < 0)
++ {
+ DPRINTF(("sysctl() failed(1)\n"));
+ DRETURN(-1);
+ }
+- if ((procs = (struct kinfo_proc *)malloc(bufSize)) == NULL) {
++
++ if ((procs = malloc(bufSize)) == NULL)
++ {
+ DPRINTF(("malloc() failed\n"));
+ DRETURN(-1);
+ }
+- if (sysctl(mib, 4, procs, &bufSize, NULL, 0) < 0) {
++
++ if (sysctl(mib, 4, procs, &bufSize, NULL, 0) < 0)
++ {
+ DPRINTF(("sysctl() failed(2)\n"));
+ FREE(procs);
+ DRETURN(-1);
+@@ -1719,29 +1724,38 @@
+ procs_begin = procs;
+ nprocs = bufSize/sizeof(struct kinfo_proc);
+
+- for (; nprocs >= 0; nprocs--, procs++) {
+- for (curr=job_list.next; curr != &job_list; curr=curr->next) {
++ for (; nprocs >= 0; nprocs--, procs++)
++ {
++ for (curr=job_list.next; curr != &job_list; curr=curr->next)
++ {
+ job_elem = LNK_DATA(curr, job_elem_t, link);
+
+- for (i = 0; i < procs->kp_eproc.e_ucred.cr_ngroups; i++) {
+- if (job_elem->job.jd_jid == procs->kp_eproc.e_ucred.cr_groups[i]) {
++ for (i = 0; i < procs->kp_eproc.e_ucred.cr_ngroups; i++)
++ {
++ if (job_elem->job.jd_jid == procs->kp_eproc.e_ucred.cr_groups[i])
++ {
+ lnk_link_t *curr2;
+ proc_elem_t *proc_elem;
+ int newprocess = 1;
+
+- if (job_elem->job.jd_proccount != 0) {
+- for (curr2=job_elem->procs.next; curr2 != &job_elem->procs; curr2=curr2->next) {
++ if (job_elem->job.jd_proccount != 0)
++ {
++ for (curr2=job_elem->procs.next; curr2 != &job_elem->procs; curr2=curr2->next)
++ {
+ proc_elem = LNK_DATA(curr2, proc_elem_t, link);
+
+- if (proc_elem->proc.pd_pid == procs->kp_proc.p_pid) {
++ if (proc_elem->proc.pd_pid == procs->kp_proc.p_pid)
++ {
+ newprocess = 0;
+ break;
+ }
+ }
+ }
+- if (newprocess) {
++ if (newprocess)
++ {
+ proc_elem = malloc(sizeof(proc_elem_t));
+- if (proc_elem == NULL) {
++ if (proc_elem == NULL)
++ {
+ FREE(procs_begin);
+ DRETURN(0);
+ }
+@@ -1753,7 +1767,9 @@
+
+ LNK_ADD(job_elem->procs.prev, &proc_elem->link);
+ job_elem->job.jd_proccount++;
+- } else {
++ }
++ else
++ {
+ /* save previous usage data - needed to build delta usage */
+ old_time = proc_elem->proc.pd_utime + proc_elem->proc.pd_stime;
+ old_vmem = proc_elem->vmem;
+@@ -1768,36 +1784,51 @@
+ mach_port_t task;
+ unsigned int info_count = TASK_BASIC_INFO_COUNT;
+
+- if (task_for_pid(mach_task_self(), proc_elem->proc.pd_pid, &task) != KERN_SUCCESS) {
++ if (task_for_pid(mach_task_self(), proc_elem->proc.pd_pid, &task) != KERN_SUCCESS)
++ {
+ DPRINTF(("task_for_pid() error"));
+- } else {
+- if (task_info(task, TASK_BASIC_INFO, (task_info_t)&t_info, &info_count) != KERN_SUCCESS) {
++ }
++ else
++ {
++ if (task_info(task, TASK_BASIC_INFO, (task_info_t)&t_info, &info_count) != KERN_SUCCESS)
++ {
+ DPRINTF(("task_info() error"));
+- } else {
+- proc_elem->vmem = t_info.virtual_size/1024;
++ }
++ else
++ {
++ proc_elem->vmem = t_info.virtual_size;
++ proc_elem->rss = t_info.resident_size;
++
+ DPRINTF(("vmem: %d\n", proc_elem->vmem));
+- proc_elem->rss = t_info.resident_size/1024;
+- DPRINTF(("rss: %d\n", proc_elem->rss));
++ DPRINTF(("rss: %d\n", proc_elem->rss));
+ }
+
+ info_count = TASK_THREAD_TIMES_INFO_COUNT;
+- if (task_info(task, TASK_THREAD_TIMES_INFO, (task_info_t)&t_times_info, &info_count) != KERN_SUCCESS) {
++ if (task_info(task, TASK_THREAD_TIMES_INFO, (task_info_t)&t_times_info, &info_count) != KERN_SUCCESS)
++ {
+ DPRINTF(("task_info() error\n"));
+- } else {
++ }
++ else
++ {
+ proc_elem->proc.pd_utime = t_times_info.user_time.seconds;
+- DPRINTF(("user_time: %d\n", proc_elem->proc.pd_utime));
+ proc_elem->proc.pd_stime = t_times_info.system_time.seconds;
++
++ DPRINTF(("user_time: %d\n", proc_elem->proc.pd_utime));
+ DPRINTF(("system_time: %d\n", proc_elem->proc.pd_stime));
+ }
+ }
++ mach_port_deallocate(mach_task_self(), task);
+ }
+
+ proc_elem->proc.pd_uid = procs->kp_eproc.e_ucred.cr_uid;
+- DPRINTF(("uid: %d\n", proc_elem->proc.pd_uid));
+ proc_elem->proc.pd_gid = procs->kp_eproc.e_pcred.p_rgid;
++
++ DPRINTF(("uid: %d\n", proc_elem->proc.pd_uid));
+ DPRINTF(("gid: %d\n", proc_elem->proc.pd_gid));
++
+ proc_elem->mem = ((proc_elem->proc.pd_stime + proc_elem->proc.pd_utime) - old_time) *
+ ((old_vmem + proc_elem->vmem)/2);
++
+ DPRINTF(("mem %d\n", proc_elem->mem));
+ }
+ }
+diff -ruN --exclude .svn GE2011.11/source/daemons/common/procfs.c gridscheduler-trunk/source/daemons/common/procfs.c
+--- GE2011.11/source/daemons/common/procfs.c 2011-11-14 12:00:42.000000000 -0700
++++ gridscheduler-trunk/source/daemons/common/procfs.c 2012-02-08 09:46:00.755158170 -0700
+@@ -43,7 +43,7 @@
+ #include <sys/types.h>
+ #include <sys/signal.h>
+
+-#if !defined(CRAY) && !defined(NECSX4) && !defined(NECSX5) && !defined(AIX)
++#if !defined(CRAY) && !defined(NECSX4) && !defined(NECSX5) && !defined(AIX) && !defined(CYGWIN)
+ #include <sys/syscall.h>
+ #endif
+
+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
+@@ -78,7 +78,7 @@
+ # include "sge_smf.h"
+ #endif
+
+-#if !defined(INTERIX)
++#if !defined(INTERIX) && !defined(CYGWIN)
+ static void init_sig_action_and_mask(void);
+ #endif
+ static int set_file_descriptor_limit(void);
+@@ -311,7 +311,7 @@
+ */
+ has_daemonized = sge_daemonize_qmaster();
+ file_descriptor_settings_result = set_file_descriptor_limit();
+-#if !defined(INTERIX)
++#if !defined(INTERIX) && !defined(CYGWIN)
+ init_sig_action_and_mask();
+ #endif
+
+@@ -447,7 +447,7 @@
+ return 0;
+ } /* main() */
+
+-#if !defined(INTERIX)
++#if !defined(INTERIX) && !defined(CYGWIN)
+
+ /****** qmaster/sge_qmaster_main/init_sig_action_and_mask() *******************
+ * NAME
+diff -ruN --exclude .svn GE2011.11/source/daemons/shepherd/builtin_starter.c gridscheduler-trunk/source/daemons/shepherd/builtin_starter.c
+--- GE2011.11/source/daemons/shepherd/builtin_starter.c 2011-11-14 12:00:42.000000000 -0700
++++ gridscheduler-trunk/source/daemons/shepherd/builtin_starter.c 2012-02-08 09:46:00.569164577 -0700
+@@ -2075,7 +2075,7 @@
+ my_env[i++] = strncat(hertz, getenv("HZ"), 10);
+
+
+-#if defined(LINUX) || defined(DARWIN_PPC) || defined(DARWIN_X86)
++#if defined(LINUX) || defined(DARWIN)
+ my_env[i++] = strcat(path, "/bin:/usr/bin");
+ #else
+ 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 @@
+ if [ ! -f "$2" ]; then
+ AUTO="false"
+ $INFOTEXT "Error: File $FILE does not exist!"
+- ErrUsage
++ ErrUsage
++ exit 2
+ fi
+ shift
+ ARGC=`expr $ARGC - 1`
+@@ -1086,7 +1087,7 @@
+ AddSubmitHostsExecd
+ AddSGEStartUpScript $euid execd
+ SetupWinSvc execinst #service install during execd installation -> param: execinst
+- CopyIBMLoadSensor
++ # CopyIBMLoadSensor
+ StartExecd
+ AddQueue
+ GiveHints
+@@ -1122,7 +1123,7 @@
+ AddLocalConfiguration_With_Qconf
+ AddSGEStartUpScript $euid execd
+ SetupWinSvc execinst #service install during execd installation -> param: execinst
+- CopyIBMLoadSensor
++ # CopyIBMLoadSensor
+ StartExecd
+ AddQueue
+ GiveHints
+diff -ruN --exclude .svn GE2011.11/source/dist/util/arch gridscheduler-trunk/source/dist/util/arch
+--- GE2011.11/source/dist/util/arch 2011-11-14 12:00:55.000000000 -0700
++++ gridscheduler-trunk/source/dist/util/arch 2012-02-08 09:46:04.971012943 -0700
+@@ -100,10 +100,31 @@
+ ARCH=craysmp
+ fi
+ ;;
++CYGWIN*)
++ ARCH=cygwin-x86
++ ;;
+ Darwin)
+ case $osmachine in
+ i386)
+- darwin_machine=x86
++ case $osrelease in
++ 8.*)
++ darwin_machine=x86
++ ;;
++ 9.*|10.*)
++ cpuarch=`sysctl -n hw.cpu64bit_capable 2> /dev/null`
++ if [ "$cpuarch" = "0" ]; then
++ darwin_machine=x86
++ else
++ darwin_machine=x64
++ fi
++ ;;
++ *)
++ darwin_machine=x64
++ ;;
++ esac
++ ;;
++ x86_64)
++ darwin_machine=x64
+ ;;
+ Power*)
+ darwin_machine=ppc
+@@ -353,7 +374,7 @@
+ DEFAULTMANPATH=/usr/share/catman:/usr/share/man:/usr/catman:/usr/man
+ MANTYPE=catman
+ ;;
+- lx*)
++ linux*)
+ if [ "`which manpath 2>/dev/null`" != "" ]; then
+ DEFAULTMANPATH=`manpath 2>/dev/null`
+ else
+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 @@
+ fi
+
+ #MacOS overwrites the files (all services share single file)
+- if [ "$ARCH" = darwin -o "$ARCH" = darwin-ppc -o "$ARCH" = darwin-x86 ]; then
++ if [ "$ARCH" = darwin -o "$ARCH" = darwin-ppc -o "$ARCH" = darwin-x86 -o "$ARCH" = darwin-x64 ]; then
+ return
+ fi
+
+diff -ruN --exclude .svn GE2011.11/source/dist/util/install_modules/inst_qmaster.sh gridscheduler-trunk/source/dist/util/install_modules/inst_qmaster.sh
+--- GE2011.11/source/dist/util/install_modules/inst_qmaster.sh 2011-11-14 12:00:55.000000000 -0700
++++ gridscheduler-trunk/source/dist/util/install_modules/inst_qmaster.sh 2012-02-08 09:46:04.743020797 -0700
+@@ -1978,25 +1978,25 @@
+ GetDefaultJavaForPlatform()
+ {
+ case $SGE_ARCH in
+- sol-sparc64)
++ sol-sparc64)
+ java_homes="/usr/java
+ /usr/jdk/latest"
+ ;;
+- sol-amd64)
++ sol-amd64)
+ java_homes="/usr/java
+ /usr/jdk/latest"
+ ;;
+- sol-x86)
++ sol-x86)
+ java_homes="/usr/java
+ /usr/jdk/latest"
+ ;;
+- linux-x64)
++ linux-x64)
+ java_homes="/usr/java
+ /usr/jdk/latest
+ /usr/java/latest
+ /etc/alternatives/jre"
+ ;;
+- linux-x86)
++ linux-x86)
+ java_homes="/usr/java
+ /usr/jdk/latest
+ /usr/java/latest
+@@ -2006,7 +2006,11 @@
+ java_homes="/Library/Java/Home
+ /System/Library/Frameworks/JavaVM.framework/Home"
+ ;;
+- darwin-x86)
++ darwin-x86)
++ java_homes="/Library/Java/Home
++/System/Library/Frameworks/JavaVM.framework/Home"
++ ;;
++ darwin-x64)
+ java_homes="/Library/Java/Home
+ /System/Library/Frameworks/JavaVM.framework/Home"
+ ;;
+@@ -2126,6 +2130,9 @@
+ darwin-x86)
+ suffix=../Libraries/libjvm.dylib
+ ;;
++ darwin-x64)
++ suffix=../Libraries/libjvm.dylib
++ ;;
+ #TODO: Missing HP, AIX platforms
+ esac
+ if [ -f $java_home/$suffix ]; then
+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
+@@ -731,7 +731,7 @@
+ case CHAR:
+ if (mt_get_type(cp->operand.cmp.mt) != lCharT)
+ incompatibleType(MSG_CULL_WHERE_SHOULDBECHART);
+-#if USING_GCC_2_96 || __GNUC__ >= 3 || __INSIGHT__
++#if __GNUC__ >= 3 || __INSIGHT__
+ cp->operand.cmp.val.c = va_arg(*app, int);
+ #else
+ cp->operand.cmp.val.c = va_arg(*app, lChar);
+@@ -741,7 +741,7 @@
+ case BOOL:
+ if (mt_get_type(cp->operand.cmp.mt) != lBoolT)
+ incompatibleType(MSG_CULL_WHERE_SHOULDBEBOOL);
+-#if USING_GCC_2_96 || __GNUC__ >= 3 || __INSIGHT__
++#if __GNUC__ >= 3 || __INSIGHT__
+ cp->operand.cmp.val.b = va_arg(*app, int);
+ #else
+ cp->operand.cmp.val.b = va_arg(*app, lBool);
+@@ -1162,17 +1162,20 @@
+
+ DENTER(CULL_LAYER, "lCompare");
+
+- if (!ep) {
++ if (!ep)
++ {
+ LERROR(LEELEMNULL);
+ DRETURN(0);
+ }
+
+ /* no conditions ok */
+- if (!cp) {
++ if (!cp)
++ {
+ DRETURN(1);
+ }
+
+- switch (cp->op) {
++ switch (cp->op)
++ {
+ case EQUAL:
+ case NOT_EQUAL:
+ case LOWER_EQUAL:
+@@ -1181,17 +1184,21 @@
+ case GREATER:
+ case SUBSCOPE:
+
+- switch (mt_get_type(cp->operand.cmp.mt)) {
++ switch (mt_get_type(cp->operand.cmp.mt))
++ {
+ case lIntT:
+ result = intcmp(lGetPosInt(ep, cp->operand.cmp.pos), cp->operand.cmp.val.i);
+ break;
++
+ case lStringT:
+- if (!(str1 = lGetPosString(ep, cp->operand.cmp.pos))) {
++ if (!(str1 = lGetPosString(ep, cp->operand.cmp.pos)))
++ {
+ LERROR(LENULLSTRING);
+ DPRINTF(("lGetPosString in lCompare\n"));
+ DRETURN(0);
+ }
+- if (!(str2 = cp->operand.cmp.val.str)) {
++ if (!(str2 = cp->operand.cmp.val.str))
++ {
+ DPRINTF(("cp->operand.cmp.val.str in lCompare\n"));
+ LERROR(LENULLSTRING);
+ DRETURN(0);
+@@ -1199,13 +1206,16 @@
+ result = strcmp(str1, str2);
+ DPRINTF(("strcmp(%s, %s)(lStringT) = %d\n", str1, str2, result));
+ break;
++
+ case lHostT:
+- if (!(str1 = lGetPosHost(ep, cp->operand.cmp.pos))) {
++ if (!(str1 = lGetPosHost(ep, cp->operand.cmp.pos)))
++ {
+ LERROR(LENULLSTRING);
+ DPRINTF(("lGetPosHost in lCompare\n"));
+ DRETURN(0);
+ }
+- if (!(str2 = cp->operand.cmp.val.host)) {
++ if (!(str2 = cp->operand.cmp.val.host))
++ {
+ DPRINTF(("cp->operand.cmp.val.host in lCompare\n"));
+ LERROR(LENULLSTRING);
+ DRETURN(0);
+@@ -1215,61 +1225,68 @@
+ break;
+
+ case lUlongT:
+- result = ulongcmp(lGetPosUlong(ep, cp->operand.cmp.pos),
+- cp->operand.cmp.val.ul);
++ result = ulongcmp(lGetPosUlong(ep, cp->operand.cmp.pos), cp->operand.cmp.val.ul);
+ break;
++
+ case lListT:
+- result = (lFindFirst(lGetPosList(ep, cp->operand.cmp.pos),
+- cp->operand.cmp.val.cp) != NULL);
++ result = (lFindFirst(lGetPosList(ep, cp->operand.cmp.pos), cp->operand.cmp.val.cp) != NULL);
+ DRETURN(result);
++
+ case lFloatT:
+- result = floatcmp(lGetPosFloat(ep, cp->operand.cmp.pos),
+- cp->operand.cmp.val.fl);
++ result = floatcmp(lGetPosFloat(ep, cp->operand.cmp.pos), cp->operand.cmp.val.fl);
+ break;
++
+ case lDoubleT:
+- result = doublecmp(lGetPosDouble(ep, cp->operand.cmp.pos),
+- cp->operand.cmp.val.db);
++ result = doublecmp(lGetPosDouble(ep, cp->operand.cmp.pos), cp->operand.cmp.val.db);
+ break;
++
+ case lLongT:
+- result = longcmp(lGetPosLong(ep, cp->operand.cmp.pos),
+- cp->operand.cmp.val.l);
++ result = longcmp(lGetPosLong(ep, cp->operand.cmp.pos), cp->operand.cmp.val.l);
+ break;
++
+ case lCharT:
+- result = charcmp(lGetPosChar(ep, cp->operand.cmp.pos),
+- cp->operand.cmp.val.c);
++ result = charcmp(lGetPosChar(ep, cp->operand.cmp.pos), cp->operand.cmp.val.c);
+ break;
++
+ case lBoolT:
+- result = boolcmp(lGetPosBool(ep, cp->operand.cmp.pos),
+- cp->operand.cmp.val.b);
++ result = boolcmp(lGetPosBool(ep, cp->operand.cmp.pos), cp->operand.cmp.val.b);
+ break;
++
+ case lRefT:
+- result = refcmp(lGetPosRef(ep, cp->operand.cmp.pos),
+- cp->operand.cmp.val.ref);
++ result = refcmp(lGetPosRef(ep, cp->operand.cmp.pos), cp->operand.cmp.val.ref);
+ break;
++
+ default:
+ unknownType("lCompare");
+ DRETURN(0);
+ }
+
+- switch (cp->op) {
++ switch (cp->op)
++ {
+ case EQUAL:
+ result = (result == 0);
+ break;
++
+ case NOT_EQUAL:
+ result = (result != 0);
+ break;
++
+ case LOWER_EQUAL:
+ result = (result == -1 || result == 0);
+ break;
++
+ case LOWER:
+ result = (result == -1);
+ break;
++
+ case GREATER_EQUAL:
+ result = (result == 1 || result == 0);
+ break;
++
+ case GREATER:
+ result = (result == 1);
+ break;
++
+ default:
+ LERROR(LEOPUNKNOWN);
+ DRETURN(0);
+@@ -1278,79 +1295,97 @@
+
+ case STRCASECMP:
+ case HOSTNAMECMP:
+- if ((mt_get_type(cp->operand.cmp.mt) != lStringT) && (mt_get_type(cp->operand.cmp.mt) != lHostT)) {
++ if ((mt_get_type(cp->operand.cmp.mt) != lStringT) && (mt_get_type(cp->operand.cmp.mt) != lHostT))
++ {
+ unknownType("lCompare");
+ DRETURN(0);
+ }
+
+- if (mt_get_type(cp->operand.cmp.mt) == lStringT) {
++ if (mt_get_type(cp->operand.cmp.mt) == lStringT)
++ {
+ str1 = lGetPosString(ep, cp->operand.cmp.pos);
+- } else {
++ }
++ else
++ {
+ str1 = lGetPosHost(ep, cp->operand.cmp.pos);
+ }
+- if (str1 == NULL) {
++ if (str1 == NULL)
++ {
+ LERROR(LENULLSTRING);
+ DPRINTF(("lGetPosString in lCompare\n"));
+ DRETURN(0);
+ }
+
+- if (!(str2 = cp->operand.cmp.val.str)) {
++ if (!(str2 = cp->operand.cmp.val.str))
++ {
+ DPRINTF(("cp->operand.cmp.val.str in lCompare\n"));
+ LERROR(LENULLSTRING);
+ DRETURN(0);
+ }
+
+- if (cp->op == STRCASECMP ) {
++ if (cp->op == STRCASECMP )
++ {
+ result = SGE_STRCASECMP(str1, str2);
+- } else {
++ }
++ else
++ {
+ result = sge_hostcmp(str1, str2);
+ }
+ result = (result == 0);
+ break;
+
+ case PATTERNCMP:
+- if ((mt_get_type(cp->operand.cmp.mt) != lStringT) && (mt_get_type(cp->operand.cmp.mt) != lHostT)) {
++ if ((mt_get_type(cp->operand.cmp.mt) != lStringT) && (mt_get_type(cp->operand.cmp.mt) != lHostT))
++ {
+ unknownType("lCompare");
+ DRETURN(0);
+ }
+
+- if (mt_get_type(cp->operand.cmp.mt) == lStringT) {
+- if (!(str1 = lGetPosString(ep, cp->operand.cmp.pos))) {
++ if (mt_get_type(cp->operand.cmp.mt) == lStringT)
++ {
++ if (!(str1 = lGetPosString(ep, cp->operand.cmp.pos)))
++ {
+ str1 = "";
+ }
+
+- if (!(str2 = cp->operand.cmp.val.str)) {
++ if (!(str2 = cp->operand.cmp.val.str))
++ {
+ DPRINTF(("cp->operand.cmp.val.str in lCompare\n"));
+ LERROR(LENULLSTRING);
+ DRETURN(0);
+ }
+- } else {
+- if (!(str1 = lGetPosHost(ep, cp->operand.cmp.pos))) {
++ }
++ else
++ {
++ if (!(str1 = lGetPosHost(ep, cp->operand.cmp.pos)))
++ {
+ str1 = "";
+ }
+
+- if (!(str2 = cp->operand.cmp.val.host)) {
++ if (!(str2 = cp->operand.cmp.val.host))
++ {
+ DPRINTF(("cp->operand.cmp.val.host in lCompare\n"));
+ LERROR(LENULLSTRING);
+ DRETURN(0);
+ }
+ }
+
+- result = !fnmatch(str2, str1, 0);
++ result = !fnmatch(str2, str1, FNM_NOESCAPE);
+ break;
+
+
+ case BITMASK:
+- if (mt_get_type(cp->operand.cmp.mt) != lUlongT) {
++ if (mt_get_type(cp->operand.cmp.mt) != lUlongT)
++ {
+ unknownType("lCompare");
+ DRETURN(0);
+ }
+- result = bitmaskcmp(lGetPosUlong(ep, cp->operand.cmp.pos),
+- cp->operand.cmp.val.ul);
++ result = bitmaskcmp(lGetPosUlong(ep, cp->operand.cmp.pos), cp->operand.cmp.val.ul);
+ break;
+
+ case AND:
+- if (!lCompare(ep, cp->operand.log.first)) {
++ if (!lCompare(ep, cp->operand.log.first))
++ {
+ result = 0;
+ break;
+ }
+diff -ruN --exclude .svn GE2011.11/source/libs/cull/pack.c gridscheduler-trunk/source/libs/cull/pack.c
+--- GE2011.11/source/libs/cull/pack.c 2011-11-14 12:00:46.000000000 -0700
++++ gridscheduler-trunk/source/libs/cull/pack.c 2012-02-08 09:46:01.908118454 -0700
+@@ -37,7 +37,13 @@
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <netinet/in.h>
+-#include <rpc/rpc.h>
++
++#if defined(CYGWIN)
++# include <rpc/xdr.h>
++#else
++# include <rpc/rpc.h>
++#endif
++
+ #include <rpc/types.h>
+
+ #if defined(INTERIX)
+diff -ruN --exclude .svn GE2011.11/source/libs/japi/drmaa.c gridscheduler-trunk/source/libs/japi/drmaa.c
+--- GE2011.11/source/libs/japi/drmaa.c 2011-11-14 12:00:44.000000000 -0700
++++ gridscheduler-trunk/source/libs/japi/drmaa.c 2012-02-08 09:46:01.518131887 -0700
+@@ -121,7 +121,7 @@
+ *******************************************************************************/
+
+ /* Defined in rshd.c */
+-#if defined(DARWIN9) || defined(DARWIN10)
++#if defined(DARWIN9)
+ # include <crt_externs.h>
+ # define environ (*_NSGetEnviron())
+ #else
+diff -ruN --exclude .svn GE2011.11/source/libs/sgeobj/sge_conf.c gridscheduler-trunk/source/libs/sgeobj/sge_conf.c
+--- GE2011.11/source/libs/sgeobj/sge_conf.c 2011-11-14 12:00:49.000000000 -0700
++++ gridscheduler-trunk/source/libs/sgeobj/sge_conf.c 2012-02-08 09:46:02.325104092 -0700
+@@ -35,8 +35,9 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+
+-#ifdef LINUX
++#ifdef __GNU_LIBRARY__
+ #include <mcheck.h>
++#define HAVE_MCHECK
+ #endif
+
+ #include "rmon/sgermon.h"
+@@ -163,7 +164,7 @@
+ static bool enable_reschedule_kill = false;
+ static bool enable_reschedule_slave = false;
+
+-#ifdef LINUX
++#ifdef HAVE_MCHECK
+ static bool enable_mtrace = false;
+ #endif
+
+@@ -645,7 +646,7 @@
+ char* execd_params = mconf_get_execd_params();
+ char* reporting_params = mconf_get_reporting_params();
+ u_long32 load_report_time = mconf_get_load_report_time();
+-#ifdef LINUX
++#ifdef HAVE_MCHECK
+ bool mtrace_before = enable_mtrace;
+ #endif
+
+@@ -725,7 +726,7 @@
+ if (parse_bool_param(s, "ENABLE_FORCED_QDEL_IF_UNKNOWN", &enable_forced_qdel_if_unknown)) {
+ continue;
+ }
+-#ifdef LINUX
++#ifdef HAVE_MCHECK
+ if (parse_bool_param(s, "ENABLE_MTRACE", &enable_mtrace)) {
+ continue;
+ }
+@@ -800,7 +801,7 @@
+ sge_free_saved_vars(conf_context);
+ conf_context = NULL;
+
+-#ifdef LINUX
++#ifdef HAVE_MCHECK
+ /* 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;
+ }
+
+-#elif defined(OGLIBC_LINUX)
++#elif defined(OGLIBC_LINUX) || defined(CYGWIN)
+
+ static int get_load_avg(
+ double loadv[],
+@@ -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)
+ elem = get_load_avg(loadavg, nelem);
+ #elif defined(SOLARIS) || defined(FREEBSD) || defined(NETBSD) || defined(DARWIN) || defined(LINUX)
+ elem = getloadavg(loadavg, nelem); /* <== library function */
+diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_hostname.c gridscheduler-trunk/source/libs/uti/sge_hostname.c
+--- GE2011.11/source/libs/uti/sge_hostname.c 2011-11-14 12:00:47.000000000 -0700
++++ gridscheduler-trunk/source/libs/uti/sge_hostname.c 2012-02-08 09:46:02.068112943 -0700
+@@ -97,7 +97,7 @@
+ * safe. This will require that you update aimk to include the correct defines
+ * for each architecture.
+ ******************************************************************************/
+-#if defined(LINUX)
++#if defined(LINUX_NATIVE)
+ 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_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
+@@ -436,7 +436,7 @@
+ /* child */
+ SETPGRP;
+
+-#if !(defined(__hpux) || defined(CRAY) || defined(WIN32) || defined(SINIX) || defined(INTERIX))
++#if !(defined(__hpux) || defined(CRAY) || defined(WIN32) || defined(SINIX) || defined(INTERIX) || defined(CYGWIN))
+ if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
+ /* disassociate contolling tty */
+ ioctl(fd, TIOCNOTTY, (char *) NULL);
+@@ -579,7 +579,7 @@
+ int sge_daemonize(int *keep_open, unsigned long nr_of_fds, sge_gdi_ctx_class_t *ctx)
+ {
+
+-#if !(defined(__hpux) || defined(CRAY) || defined(WIN32) || defined(SINIX) || defined(INTERIX))
++#if !(defined(__hpux) || defined(CRAY) || defined(WIN32) || defined(SINIX) || defined(INTERIX) || defined(CYGWIN))
+ int fd;
+ #endif
+
+@@ -613,7 +613,7 @@
+
+ SETPGRP;
+
+-#if !(defined(__hpux) || defined(CRAY) || defined(WIN32) || defined(SINIX) || defined(INTERIX))
++#if !(defined(__hpux) || defined(CRAY) || defined(WIN32) || defined(SINIX) || defined(INTERIX) || defined(CYGWIN))
+ 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_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
+@@ -41,7 +41,7 @@
+
+ #include "msg_utilib.h"
+
+-#ifdef WIN32
++#if defined(WIN32) || defined(CYGWIN)
+ # define SIGIOT 6
+ # define SIGURG 16
+ # define SIGIO 23
+diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_uidgid.c gridscheduler-trunk/source/libs/uti/sge_uidgid.c
+--- GE2011.11/source/libs/uti/sge_uidgid.c 2011-11-14 12:00:47.000000000 -0700
++++ gridscheduler-trunk/source/libs/uti/sge_uidgid.c 2012-02-08 09:46:02.070112874 -0700
+@@ -1174,17 +1174,21 @@
+ gid_t *list;
+ int groups;
+
+- if(err_str != NULL) {
++ if (err_str != NULL)
++ {
+ err_str[0] = 0;
+ }
+
+- if (add_grp_id == 0) {
++ if (add_grp_id == 0)
++ {
+ return 0;
+ }
+
+ max_groups = sge_sysconf(SGE_SYSCONF_NGROUPS_MAX);
+- if (max_groups <= 0) {
+- if(err_str != NULL) {
++ if (max_groups <= 0)
++ {
++ if(err_str != NULL)
++ {
+ sprintf(err_str, MSG_SYSTEM_ADDGROUPIDFORSGEFAILED_UUS, sge_u32c(getuid()),
+ sge_u32c(geteuid()), MSG_SYSTEM_INVALID_NGROUPS_MAX);
+ }
+@@ -1200,46 +1204,67 @@
+ #else
+ list = (gid_t*) malloc(max_groups*sizeof(gid_t));
+ #endif
+- if (list == NULL) {
+- if(err_str != NULL) {
++ if (list == NULL)
++ {
++ if (err_str != NULL)
++ {
+ int error = errno;
+- sprintf(err_str, MSG_SYSTEM_ADDGROUPIDFORSGEFAILED_UUS, sge_u32c(getuid()),
+- sge_u32c(geteuid()), strerror(error));
++ sprintf(err_str, MSG_SYSTEM_ADDGROUPIDFORSGEFAILED_UUS, sge_u32c(getuid()), sge_u32c(geteuid()), strerror(error));
+ }
+ return -1;
+ }
+
+ groups = getgroups(max_groups, list);
+- if (groups == -1) {
+- if(err_str != NULL) {
++ if (groups == -1)
++ {
++ if (err_str != NULL)
++ {
+ int error = errno;
+- sprintf(err_str, MSG_SYSTEM_ADDGROUPIDFORSGEFAILED_UUS, sge_u32c(getuid()),
+- sge_u32c(geteuid()), strerror(error));
++ sprintf(err_str, MSG_SYSTEM_ADDGROUPIDFORSGEFAILED_UUS, sge_u32c(getuid()), sge_u32c(geteuid()), strerror(error));
+ }
+ free(list);
+ return -1;
+ }
+ #if !defined(INTERIX)
+- if (groups < max_groups) {
++ if (groups < max_groups)
++ {
+ list[groups] = add_grp_id;
+ groups++;
+ groups = setgroups(groups, list);
+- if (groups == -1) {
+- if(err_str != NULL) {
++ if (groups == -1)
++ {
++ if (err_str != NULL)
++ {
+ int error = errno;
+- sprintf(err_str, MSG_SYSTEM_ADDGROUPIDFORSGEFAILED_UUS, sge_u32c(getuid()),
+- sge_u32c(geteuid()), strerror(error));
++ sprintf(err_str, MSG_SYSTEM_ADDGROUPIDFORSGEFAILED_UUS, sge_u32c(getuid()), sge_u32c(geteuid()), strerror(error));
+ }
+ free(list);
+ return -1;
+ }
+- } else {
+- if(err_str != NULL) {
+- sprintf(err_str, MSG_SYSTEM_ADDGROUPIDFORSGEFAILED_UUS, sge_u32c(getuid()),
+- sge_u32c(geteuid()), MSG_SYSTEM_USER_HAS_TOO_MANY_GIDS);
++ }
++ else
++ {
++#if defined(DARWIN)
++ list[max_groups-1] = add_grp_id;
++
++ if (setgroups(max_groups, list) == -1)
++ {
++ if (err_str != NULL)
++ {
++ int error = errno;
++ sprintf(err_str, MSG_SYSTEM_ADDGROUPIDFORSGEFAILED_UUS, sge_u32c(getuid()), sge_u32c(geteuid()), strerror(error));
++ }
++ free(list);
++ return -1;
++ }
++#else
++ if (err_str != NULL)
++ {
++ sprintf(err_str, MSG_SYSTEM_ADDGROUPIDFORSGEFAILED_UUS, sge_u32c(getuid()), sge_u32c(geteuid()), MSG_SYSTEM_USER_HAS_TOO_MANY_GIDS);
+ }
+ free(list);
+ return -1;
++#endif
+ }
+ #endif
+ free(list);
+diff -ruN --exclude .svn GE2011.11/source/libs/uti/sge_unistd.h gridscheduler-trunk/source/libs/uti/sge_unistd.h
+--- GE2011.11/source/libs/uti/sge_unistd.h 2011-11-14 12:00:47.000000000 -0700
++++ gridscheduler-trunk/source/libs/uti/sge_unistd.h 2012-02-08 09:46:02.051113532 -0700
+@@ -44,7 +44,7 @@
+ # include "../wingrid/wingrid.h"
+ #endif
+
+-#if defined(SOLARIS) || defined(LINUX) || defined(IRIX)
++#if defined(SOLARIS) || defined(LINUX_NATIVE) || defined(IRIX)
+ # define SGE_OPEN2(filename, oflag) open64(filename, oflag)
+ # define SGE_OPEN3(filename, oflag, mode) open64(filename, oflag, mode)
+ #else
+@@ -89,7 +89,7 @@
+ # define SGE_OFF_T off_t
+ #endif
+
+-#if defined(IRIX) || defined(SOLARIS) || defined(LINUX)
++#if defined(SOLARIS) || defined(LINUX_NATIVE) || defined(IRIX)
+ # define SGE_READDIR(directory) readdir64(directory)
+ # define SGE_READDIR_R(directory, entry, result) readdir64_r(directory, entry, result)
+ # define SGE_TELLDIR(directory) telldir64(directory)
+@@ -103,7 +103,7 @@
+ # define SGE_STRUCT_DIRENT struct dirent
+ #endif
+
+-#if defined(_UNICOS) || defined(SOLARIS) || defined(__hpux) || defined(LINUX) || defined(AIX) || defined(SINIX) || defined(NECSX4) || defined(NECSX5) || defined(DARWIN9) || defined(DARWIN10)
++#if defined(_UNICOS) || defined(SOLARIS) || defined(__hpux) || defined(LINUX) || defined(AIX) || defined(SINIX) || defined(NECSX4) || defined(NECSX5) || defined(DARWIN9)
+ # define SETPGRP setpgrp()
+ #elif defined(__sgi)
+ # define SETPGRP BSDsetpgrp(getpid(),getpid())
+diff -ruN --exclude .svn GE2011.11/source/scripts/compilearch gridscheduler-trunk/source/scripts/compilearch
+--- GE2011.11/source/scripts/compilearch 2011-11-14 12:00:44.000000000 -0700
++++ gridscheduler-trunk/source/scripts/compilearch 2012-02-08 09:46:01.436134714 -0700
+@@ -117,10 +117,18 @@
+ BUILDARCH=UNICOS_TS_IEEE
+ TARGET_BITS=TARGET_32BIT
+ ;;
++ cygwin-x86)
++ BUILDARCH=CYGWIN_X86
++ TARGET_BITS=TARGET_32BIT
++ ;;
+ darwin-x86)
+ BUILDARCH=DARWIN_X86
+ TARGET_BITS=TARGET_32BIT
+ ;;
++ darwin-x64)
++ BUILDARCH=DARWIN_X64
++ TARGET_BITS=TARGET_64BIT
++ ;;
+ darwin-ppc)
+ BUILDARCH=DARWIN_PPC
+ TARGET_BITS=TARGET_32BIT
+diff -ruN --exclude .svn GE2011.11/source/scripts/distinst gridscheduler-trunk/source/scripts/distinst
+--- GE2011.11/source/scripts/distinst 2011-11-14 12:00:44.000000000 -0700
++++ gridscheduler-trunk/source/scripts/distinst 2012-02-08 09:46:01.434134782 -0700
+@@ -146,6 +146,7 @@
+ echo " -resetprog = set ARCH="" (useful to override distinst.privat)"
+ echo " -tcc = create file .COMMON_CHANGED if common changed"
+ echo " -v = more verbose"
++ echo " -y = automatically accept all prompts"
+ echo " -vdir <dir> = define version directory for distribution"
+ echo "<other progs>:"
+ echo " \"arco\" = ARCo files (dbwriter, reporting)"
+@@ -235,6 +236,7 @@
+ echo "necsx6 NECSX 6.x"
+ echo "darwin-ppc MacOS 10.x PowerPC"
+ echo "darwin-x86 MacOS 10.x x86"
++ echo "darwin-x64 MacOS 10.x x86-64"
+ echo "fbsd-alpha Alpha FreeBSD"
+ echo "fbsd-amd64 AMD64 FreeBSD"
+ echo "fbsd-i386 x86 FreeBSD"
+@@ -430,6 +432,7 @@
+ instarco=false
+ instguiinst=true
+ instsgeinspect=false
++accept_prompts=false
+ enforce_shlibpath=false
+
+ cmdname=`basename $0`
+@@ -564,6 +567,9 @@
+ -v)
+ verbose=true
+ ;;
++ -y)
++ accept_prompts=true
++ ;;
+ -vdir)
+ shift
+ if [ "$1" != "" ]; then
+@@ -682,16 +688,18 @@
+ echo " Installing:" $PROG
+ echo " Architectures:" $ARCH
+ echo "Base directory:" $DEST_SGE_ROOT
+-printf " OK [Y/N][Y]: "
+
+-read ans
+-if [ "$ans" = y -o "$ans" = Y -o "$ans" = "" ]; then
+- :
+-else
+- echo
+- echo Ciao
+- echo
+- exit 1
++if [ $accept_prompts = false ]; then
++ printf " OK [Y/N][Y]: "
++ read ans
++ if [ "$ans" = y -o "$ans" = Y -o "$ans" = "" ]; then
++ :
++ else
++ echo
++ echo Ciao
++ echo
++ exit 1
++ fi
+ fi
+
+ echo
+@@ -1539,7 +1547,7 @@
+
+ if [ $DSTARCH = tru64 ]; then
+ libname="$lib.$shlibext"
+- elif [ $DSTARCH = darwin-ppc -o $DSTARCH = darwin-x86 ]; then
++ elif [ $DSTARCH = darwin-ppc -o $DSTARCH = darwin-x86 -o $DSTARCH = darwin-x64 ]; then
+ libname="$lib.$OPENSSLSOVERSION.$shlibext"
+ else
+ libname="$lib.$shlibext.$OPENSSLSOVERSION"
+@@ -1555,7 +1563,7 @@
+ InstallProg $libname
+ if [ $DSTARCH = tru64 ]; then
+ :
+- elif [ $DSTARCH = darwin-ppc -o $DSTARCH = darwin-x86 ]; then
++ elif [ $DSTARCH = darwin-ppc -o $DSTARCH = darwin-x86 -o $DSTARCH = darwin-x64 ]; then
+ (cd $DEST_SGE_ROOT/${UTILPREFIX}/$DSTARCH; \
+ ln -s $lib.$OPENSSLSOVERSION.$shlibext $lib.$shlibext)
+ else
diff --git a/gridengine.spec b/gridengine.spec
index de8a108..e20959c 100644
--- a/gridengine.spec
+++ b/gridengine.spec
@@ -5,8 +5,8 @@
%define gecos Grid Engine
Name: gridengine
-Version: 6.2u5p2
-Release: 7%{?dist}
+Version: 2011.11
+Release: 1.svn93%{?dist}
Summary: Grid Engine - Distributed Computing Management software
Group: Applications/System
@@ -17,10 +17,8 @@ Group: Applications/System
# under BSD with advertising,
# which is not used or linked by other parts of gridengine.
License: (BSD and LGPLv2+ and MIT and SISSL) and GPLv2+ and BSD with advertising
-URL: http://gridengine.sunsource.net/
-#This is make with maketarball <TAG>
-Source0: http://downloads.sourceforge.net/gridscheduler/SGE%{version}/SGE%{version}.tar.gz
-#Source0: ge-V62u5_TAG-src.tar.bz2
+URL: http://gridscheduler.sourceforge.net/
+Source0: http://downloads.sourceforge.net/gridscheduler/GE%{version}/GE%{version}.tar.gz
Source1: gridengine-ppc.tar.gz
Source2: conf_defaults
Source3: sge.csh
@@ -33,35 +31,25 @@ Source9: gridengine.sysconfig
Source10: http://gridengine.sunsource.net/nonav/issues/showattachment.cgi/165/libcore.c
Source11: README
Source12: maketarball
+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-6.2beta-ssl.patch
+Patch1: gridengine-ssl.patch
# Make inst_common.sh not look for qmon or sge_execd since they might not be installed
Patch2: gridengine-6.2beta-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-6.2u5-rctemplates.patch
+Patch3: gridengine-rctemplates.patch
# Fixup sge_ca to use system openssl and java paths
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
-# aimk sets -Werror, but there are lots of warnings
-# http://gridengine.sunsource.net/issues/show_bug.cgi?id=2112
-Patch7: gridengine-6.2u2_1-Werror.patch
-# Need to patch -Dant.library.dir=/usr/share/ant/lib to ant processes
-# http://gridengine.sunsource.net/issues/show_bug.cgi?id=3171
-Patch8: gridengine-6.2u4-ant.patch
-# Add patch to properly quote m4 macros
-Patch9: gridengine-quotes.patch
# Support lesstif - http://gridengine.sunsource.net/issues/show_bug.cgi?id=2310
Patch15: gridengine-6.2beta2-lesstif.patch
-# Make inst_sge exit with status 1 if usage is incorrect
-# http://gridengine.sunsource.net/issues/show_bug.cgi?id=2586
-Patch19: gridengine-6.2u4-auto.patch
# Don't use rpaths
-Patch22: gridengine-6.2u2_1-rpath.patch
+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
@@ -71,14 +59,8 @@ Patch26: gridengine-6.2beta2-error.patch
Patch27: gridengine-6.2u3-openssl.patch
# Fix issue with hostnames and localhost
Patch28: gridengine-6.2u5-gethostname.patch
-# Don't build bundled jemalloc library
-Patch31: gridengine-jemalloc.patch
-# Fix some '//' in include paths
-Patch32: gridengine-paths.patch
-# Keep arch at lx26-* for linux3 for now
-Patch33: gridengine-linux3.patch
-# Call automake with --add-missing
-Patch34: gridengine-add-missing.patch
+# Fix qtcsh using -R
+Patch35: gridengine-qtcsh.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExcludeArch: ppc64
@@ -94,8 +76,11 @@ BuildRequires: java-devel >= 1.6.0, javacc, ant-junit, ant-nodeps
BuildRequires: elfutils-libelf-devel, net-tools
BuildRequires: fedora-usermgmt-devel
BuildRequires: groff
+BuildRequires: hwloc-devel
BuildRequires: jemalloc-devel
+%if 0%{?fedora} >= 15
BuildRequires: systemd-units
+%endif
Requires: binutils
Requires: ncurses
Requires(posttrans): /usr/sbin/alternatives
@@ -148,11 +133,13 @@ Summary: Gridengine execd program
Group: Development/Libraries
License: BSD and LGPLv2+ and MIT and SISSL
Requires: %{name} = %{version}-%{release}
+%if 0%{?fedora} >= 15
Requires(post): systemd-units
Requires(post): systemd-sysv
Requires(postun): systemd-units
-Requires(postun): %{name} = %{version}-%{release}
Requires(preun): systemd-units
+%endif
+Requires(postun): %{name} = %{version}-%{release}
Requires(preun): %{name} = %{version}-%{release}
%description execd
@@ -165,11 +152,13 @@ Group: Development/Libraries
License: BSD and LGPLv2+ and MIT and SISSL
Requires: %{name} = %{version}-%{release}
Requires: db4-utils
+%if 0%{?fedora} >= 15
Requires(post): systemd-units
Requires(post): systemd-sysv
Requires(postun): systemd-units
-Requires(postun): %{name} = %{version}-%{release}
Requires(preun): systemd-units
+%endif
+Requires(postun): %{name} = %{version}-%{release}
Requires(preun): %{name} = %{version}-%{release}
%description qmaster
@@ -177,35 +166,30 @@ Programs needed to run a grid engine qmaster host
%prep
-%setup -q -n SGE%{version} -a 1
+%setup -q -n GE%{version} -a 1
+#Use system hwloc and jemalloc
+rm -r source/3rdparty/hwloc
+rm -r source/3rdparty/jemalloc
#Copy Licenses and README file into build directory
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
-%patch7 -p1 -b .Werror
-%patch8 -p1 -b .ant
-%patch9 -p1 -b .quotes
%if !0%{?rhel}
%patch15 -p1 -b .lesstif
%endif
-%patch19 -p1 -b .auto
%patch22 -p1 -b .rpath
%patch25 -p1 -b .libs
%patch26 -p1 -b .error
%patch27 -p1 -b .openssl
%patch28 -p1 -b .gethostname
-#Use system jemalloc
-%patch31 -p1 -b .jemalloc
-rm -r source/3rdparty/jemalloc
-%patch32 -p1 -b .paths
-%patch33 -p1 -b .linux3
-%patch34 -p1 -b .add-missing
+%patch35 -p1 -b .qtcsh
sed -i.arch -e 's,/\$DSTARCH,,g' source/scripts/distinst
#Don't ship rctemplates
rm -rf source/dist/util/rctemplates
@@ -262,9 +246,9 @@ export SGE_INPUT_CFLAGS="$RPM_OPT_FLAGS"
touch aimk
./aimk -only-depend
scripts/zerodepend
-./aimk depend
+./aimk -sys-hwloc -sys-jemalloc depend
#TODO - Need IzPack for GUI Installer
-./aimk -no-gui-inst
+./aimk -no-gui-inst -sys-hwloc -sys-jemalloc
./aimk -man
#Not build by default - going to need hadoop
#ant herd
@@ -291,7 +275,7 @@ do
sed -i -e "/^${key}=/s,=.*,=$value," $RPM_BUILD_ROOT%{_datadir}/gridengine/my_configuration.conf
done
-install -p -m755 `scripts/compilearch -c ${gearch}`/qevent $RPM_BUILD_ROOT%{_datadir}/gridengine/bin
+install -p -m755 `scripts/compilearch -b`/qevent $RPM_BUILD_ROOT%{_datadir}/gridengine/bin
# man - do before the alternatives rename below
mkdir -p $RPM_BUILD_ROOT%{_mandir}
@@ -382,8 +366,10 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
install -p -m644 %SOURCE3 %SOURCE4 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
# Startup scripts
+%if 0%{?fedora} >= 15
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
install -p -m755 %SOURCE5 %SOURCE6 $RPM_BUILD_ROOT%{_unitdir}
+%endif
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -p -m644 %SOURCE9 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/gridengine
@@ -479,10 +465,12 @@ if [ $1 -eq 0 ] ; then
/bin/systemctl stop sge_execd.service > /dev/null 2>&1 || :
fi
+%if 0%{?fedora} >= 15
%triggerun -- gridengine-execd < 6.2u5p2-2
/usr/bin/systemd-sysv-convert --save sge_execd >/dev/null 2>&1 || :
/sbin/chkconfig --del sge_execd >/dev/null 2>&1 || :
/bin/systemctl try-restart sge_execd.service >/dev/null 2>&1 || :
+%endif
%post qmaster
if [ $1 -eq 1 ] ; then
@@ -504,10 +492,12 @@ if [ $1 -eq 0 ] ; then
/bin/systemctl stop sgemaster.service > /dev/null 2>&1 || :
fi
+%if 0%{?fedora} >= 15
%triggerun -- gridengine-qmaster < 6.2u5p2-2
/usr/bin/systemd-sysv-convert --save sgemaster >/dev/null 2>&1 || :
/sbin/chkconfig --del sgemaster >/dev/null 2>&1 || :
/bin/systemctl try-restart sgemaster.service >/dev/null 2>&1 || :
+%endif
%files
@@ -584,7 +574,9 @@ fi
%files execd
%defattr(-,root,root,-)
+%if 0%{?fedora} >= 15
%{_unitdir}/sge_execd.service
+%endif
%{_bindir}/sge_execd
%{_bindir}/sge_*shepherd
%{_datadir}/gridengine/install_execd
@@ -595,7 +587,9 @@ fi
%files qmaster
%defattr(-,root,root,-)
+%if 0%{?fedora} >= 15
%{_unitdir}/sgemaster.service
+%endif
%{_bindir}/qacct
%{_bindir}/sge_qmaster
%{_datadir}/gridengine/bin/*/qacct
@@ -610,6 +604,16 @@ fi
%changelog
+* 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
+- Drop Werror, quotes, ant, auto, jemalloc, paths, and add-missing
+ patches fixed upstream
+- Add qtcsh patch to avoid using -R when linking
+- Add BR on hwloc-devel
+- Make systemd conditional on Fedora >= 15
+- Use -sys-hwloc and -sys-jemalloc aimk flags
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 6.2u5p2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/sources b/sources
index 7b5f726..c068b97 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
5ba34d534cdeda9afe74cd367cb51ce0 gridengine-ppc.tar.gz
-be2d0bb3f679ff52fd2352c365b512fe SGE6.2u5p2.tar.gz
+20e5b99f7121f5b32787d022adafe183 GE2011.11.tar.gz
More information about the scm-commits
mailing list