[gridengine/f14/master] * Wed Aug 11 2010 - Orion Poplawski <orion at cora.nwra.com> - 6.2u5-4 - Use upstream my_configuration.

Orion Poplawski orion at fedoraproject.org
Wed Aug 11 16:58:13 UTC 2010


commit 64525b0b273073c274cc4bbf1c3d1a583bf3725e
Author: Orion Poplawski <orion at cora.nwra.com>
Date:   Wed Aug 11 10:31:59 2010 -0600

    * Wed Aug 11 2010 - Orion Poplawski <orion at cora.nwra.com> - 6.2u5-4
    - Use upstream my_configuration.conf as template for default one (bug 566294)
    - Set SGE_CELL in sge.sh/sge.csh (bug 620907)

 conf_defaults         |   16 ++++
 gridengine.spec       |   20 ++++-
 my_configuration.conf |  218 -------------------------------------------------
 sge.csh               |    6 +-
 sge.sh                |   10 ++-
 5 files changed, 45 insertions(+), 225 deletions(-)
---
diff --git a/conf_defaults b/conf_defaults
new file mode 100644
index 0000000..20ed98f
--- /dev/null
+++ b/conf_defaults
@@ -0,0 +1,16 @@
+SGE_ROOT="/usr/share/gridengine"
+SGE_QMASTER_PORT=6444
+SGE_EXECD_PORT=6445
+SGE_CLUSTER_NAME="p6444"
+SGE_JVM_LIB_PATH=""
+QMASTER_SPOOL_DIR="/var/spool/gridengine/default/qmaster"
+EXECD_SPOOL_DIR="/var/spool/gridengine"
+GID_RANGE="16000-16100"
+DB_SPOOLING_DIR="/var/spool/gridengine/default/spooldb"
+ADMIN_HOST_LIST=""
+SUBMIT_HOST_LIST=""
+EXEC_HOST_LIST=""
+EXECD_SPOOL_DIR_LOCAL="/var/spool/gridengine"
+SET_FILE_PERMS="false"
+SHADOW_HOST=""
+EXEC_HOST_LIST_RM=""
diff --git a/gridengine.spec b/gridengine.spec
index e273adb..948ddc2 100644
--- a/gridengine.spec
+++ b/gridengine.spec
@@ -6,7 +6,7 @@
 
 Name:    gridengine
 Version: 6.2u5
-Release: 3%{?dist}
+Release: 4%{?dist}
 Summary: Grid Engine - Distributed Computing Management software
 
 Group:   Applications/System
@@ -21,7 +21,7 @@ URL:     http://gridengine.sunsource.net/
 #This is make with maketarball <TAG>
 Source0: ge-V62u5_TAG-src.tar.bz2
 Source1: gridengine-ppc.tar.gz
-Source2: my_configuration.conf
+Source2: conf_defaults
 Source3: sge.csh
 Source4: sge.sh
 Source5: sge_execd
@@ -258,7 +258,17 @@ export SGE_ROOT=$RPM_BUILD_ROOT%{_datadir}/gridengine
 mkdir -p $SGE_ROOT
 cd source
 echo 'y'| scripts/distinst -nobdb -noopenssl -local -allall -noexit ${gearch}
-install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/gridengine
+
+#Create default install configuration
+cp dist/util/install_modules/inst_template.conf \
+   $RPM_BUILD_ROOT%{_datadir}/gridengine/my_configuration.conf
+cat %SOURCE2 | while read line
+do
+  key=${line/=*/}
+  value=${line/*=/}
+  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
 
 # man - do before the alternatives rename below
@@ -551,6 +561,10 @@ fi
 
 
 %changelog
+* Wed Aug 11 2010 - Orion Poplawski <orion at cora.nwra.com> - 6.2u5-4
+- Use upstream my_configuration.conf as template for default one (bug 566294)
+- Set SGE_CELL in sge.sh/sge.csh (bug 620907)
+
 * Mon Jul 12 2010 - Orion Poplawski <orion at cora.nwra.com> - 6.2u5-3
 - Exclude ppc64 - no java 1.6.0
 
diff --git a/sge.csh b/sge.csh
index c7b18e6..d49aa9c 100644
--- a/sge.csh
+++ b/sge.csh
@@ -2,4 +2,8 @@
 if ( $?SGE_ROOT ) then
 	exit
 endif
-setenv SGE_ROOT /usr/share/gridengine
+
+if ( -f /etc/sysconfig/gridengine ) then
+	setenv SGE_ROOT `grep "^SGE_ROOT=" /etc/sysconfig/gridengine | cut -d"=" -f2`
+	setenv SGE_CELL `grep "^SGE_CELL=" /etc/sysconfig/gridengine | cut -d"=" -f2`
+endif
diff --git a/sge.sh b/sge.sh
index 2d58fad..6752de8 100644
--- a/sge.sh
+++ b/sge.sh
@@ -1,3 +1,7 @@
-# Make sure SGE_ROOT is set
-[ -z "$SGE_ROOT" ] && SGE_ROOT="/usr/share/gridengine"
-export SGE_ROOT
+if [ -z "$SGE_ROOT" ] ; then
+	if [ -f /etc/sysconfig/gridengine ] ; then
+		. /etc/sysconfig/gridengine
+		export SGE_ROOT
+		export SGE_CELL
+	fi
+fi


More information about the scm-commits mailing list