diff options
Diffstat (limited to 'sysutils/sge61/files')
-rw-r--r-- | sysutils/sge61/files/aimk.private | 6 | ||||
-rw-r--r-- | sysutils/sge61/files/distinst.private | 4 | ||||
-rw-r--r-- | sysutils/sge61/files/patch-aimk | 42 | ||||
-rw-r--r-- | sysutils/sge61/files/patch-daemons_execd_execd__signal__queue.c | 28 | ||||
-rw-r--r-- | sysutils/sge61/files/patch-dist_inst__sge | 23 | ||||
-rw-r--r-- | sysutils/sge61/files/patch-dist_pvm_src_aimk | 43 | ||||
-rw-r--r-- | sysutils/sge61/files/patch-dist_util_arch__variables | 23 | ||||
-rw-r--r-- | sysutils/sge61/files/patch-dist_util_install__modules_inst__common.sh | 28 | ||||
-rw-r--r-- | sysutils/sge61/files/patch-libs_spool_flatfile_sge__spooling__flatfile__scanner.h | 13 | ||||
-rw-r--r-- | sysutils/sge61/files/patch-scripts_distinst | 110 | ||||
-rw-r--r-- | sysutils/sge61/files/pkg-install.in | 35 | ||||
-rw-r--r-- | sysutils/sge61/files/pkg-message.in | 24 | ||||
-rw-r--r-- | sysutils/sge61/files/pthread-types.diff | 14 | ||||
-rw-r--r-- | sysutils/sge61/files/sge-freebsd-pdc.diff | 366 | ||||
-rw-r--r-- | sysutils/sge61/files/sge.sh.in | 51 |
15 files changed, 0 insertions, 810 deletions
diff --git a/sysutils/sge61/files/aimk.private b/sysutils/sge61/files/aimk.private deleted file mode 100644 index 7257c0d00c4c..000000000000 --- a/sysutils/sge61/files/aimk.private +++ /dev/null @@ -1,6 +0,0 @@ -# $FreeBSD$ -set OPENSSL_HOME = %%OPENSSLBASE%% -set BERKELEYDB_HOME = %%LOCALBASE%% -set BDB_INCLUDE_SUBDIR = db42 -set BDB_LIB_SUFFIX = -4.2 -set X11BASE = %%X11BASE%% diff --git a/sysutils/sge61/files/distinst.private b/sysutils/sge61/files/distinst.private deleted file mode 100644 index 35080f0e83e9..000000000000 --- a/sysutils/sge61/files/distinst.private +++ /dev/null @@ -1,4 +0,0 @@ -# $FreeBSD$ -OPENSSLBASE=%%OPENSSLBASE%% -BERKELEYDBBASE=%%LOCALBASE%% -BDB_LIB_SUFFIX="-4.2" diff --git a/sysutils/sge61/files/patch-aimk b/sysutils/sge61/files/patch-aimk deleted file mode 100644 index 5fad14fbc275..000000000000 --- a/sysutils/sge61/files/patch-aimk +++ /dev/null @@ -1,42 +0,0 @@ - -$FreeBSD$ - ---- aimk.orig -+++ aimk -@@ -210,7 +210,7 @@ - if ( $?SGE_INPUT_CFLAGS ) then - set INP_CFLAGS = "$SGE_INPUT_CFLAGS" - else -- set INP_CFLAGS = "" -+ set INP_CFLAGS = "%%CFLAGS%%" - endif - - # Default build targets for which we have seperate make files -@@ -1003,12 +1003,12 @@ - set OFLAG = "-O" - endif - set ARFLAGS = rcv -- set CC = gcc -- set CXX = g++ -+ set CC = %%CC%% -+ set CXX = %%CXX%% - 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 CFLAGS = "$OFLAG -Wall -DFREEBSD -D$BUILDARCH -DGETHOSTBYNAME_M -DGETHOSTBYADDR_M $DEBUG_FLAG $CFLAGS -I${X11BASE}/include" - set NOERR_CFLAG = "-Wno-error" - set LFLAGS = "$DEBUG_FLAG $LFLAGS -export-dynamic" - set LIBS = "$LIBS -lkvm" -@@ -1017,9 +1017,9 @@ - set SHARED_LFLAGS = "$SHARED_LFLAGS -L. -shared -export-dynamic" - - set XMTDEF = "" -- set XINCD = "$XMTINCD $XINCD -I/usr/X11/include" -+ set XINCD = "$XMTINCD $XINCD -I${X11BASE}/include" - set XCFLAGS = "-Wno-strict-prototypes -Wno-error $XMTDEF $XINCD" -- set XLIBD = "-L/usr/X11R6/lib" -+ set XLIBD = "-L${X11BASE}/lib" - set XLFLAGS = "$XLIBD" - set XLIBS = " -Xlinker -lXm -Xlinker -Bdynamic -lXpm -lXt -lXext -lX11 -lSM -lICE -lXp" - set RM = "rm -f" diff --git a/sysutils/sge61/files/patch-daemons_execd_execd__signal__queue.c b/sysutils/sge61/files/patch-daemons_execd_execd__signal__queue.c deleted file mode 100644 index bfd3558e859e..000000000000 --- a/sysutils/sge61/files/patch-daemons_execd_execd__signal__queue.c +++ /dev/null @@ -1,28 +0,0 @@ - -$FreeBSD$ - ---- daemons/execd/execd_signal_queue.c.orig -+++ daemons/execd/execd_signal_queue.c -@@ -542,11 +542,11 @@ - ** execd.uid==0 && execd.euid==admin_user - ** => kill does neither send SIGCONT-signals nor return an error - */ --#if defined(NECSX4) || defined(NECSX5) || defined(DARWIN) -+#if defined(NECSX4) || defined(NECSX5) || defined(DARWIN) || defined(FREEBSD) - sge_switch2start_user(); - #endif - if (kill(pid, direct_signal?sig:SIGTTIN)) { --#if defined(NECSX4) || defined(NECSX5) || defined(DARWIN) -+#if defined(NECSX4) || defined(NECSX5) || defined(DARWIN) || defined(FREEBSD) - sge_switch2admin_user(); - #endif - if (errno == ESRCH) -@@ -554,7 +554,7 @@ - DEXIT; - return -1; - } --#if defined(NECSX4) || defined(NECSX5) -+#if defined(NECSX4) || defined(NECSX5) || defined(FREEBSD) - sge_switch2admin_user(); - #endif - diff --git a/sysutils/sge61/files/patch-dist_inst__sge b/sysutils/sge61/files/patch-dist_inst__sge deleted file mode 100644 index 9e02407187e2..000000000000 --- a/sysutils/sge61/files/patch-dist_inst__sge +++ /dev/null @@ -1,23 +0,0 @@ - -$FreeBSD$ - ---- dist/inst_sge.orig -+++ dist/inst_sge -@@ -270,7 +270,7 @@ - GetCell - GetQmasterSpoolDir $euid - SetCellDependentVariables -- SetPermissions -+# SetPermissions - SelectHostNameResolving - SetProductMode - MakeDirsMaster -@@ -344,7 +344,7 @@ - GetQmasterSpoolDir $euid - SetCellDependentVariables - WindowsSupport -- SetPermissions -+# SetPermissions - SelectHostNameResolving - SetProductMode - MakeDirsMaster diff --git a/sysutils/sge61/files/patch-dist_pvm_src_aimk b/sysutils/sge61/files/patch-dist_pvm_src_aimk deleted file mode 100644 index c5dc9586d7ba..000000000000 --- a/sysutils/sge61/files/patch-dist_pvm_src_aimk +++ /dev/null @@ -1,43 +0,0 @@ - -$FreeBSD$ - ---- dist/pvm/src/aimk.orig -+++ dist/pvm/src/aimk -@@ -73,6 +73,8 @@ - - setenv ARCH `$SGE_ROOT/util/arch` - -+set ARCH = `$SGE_ROOT/util/arch` -+ - # common compiler and linker settings - # - unsetenv LD_LIBRARY_PATH -@@ -80,9 +82,9 @@ - set MAKE = make - set MAKEFILE = ../Makefile - set SDIR = ".." --set CFLAGS = "-I../ -I$PVM_ROOT/include" -+set CFLAGS = "-I../ -I$PVM_ROOT/include -I%%LOCALBASE%%/include" - set QSYST_PVM_DIR = "$SGE_ROOT/pvm/lib/$ARCH" --set LFLAGS = "-L$PVM_ROOT/lib/$PVM_ARCH -L$QSYST_PVM_DIR -L." -+set LFLAGS = "-L$PVM_ROOT/lib/$PVM_ARCH -L$QSYST_PVM_DIR -L%%LOCALBASE%%/lib -L." - set LIBS = "" - set PVM_ROOT = "$PVM_ROOT" - set PVM_ARCH = "$PVM_ARCH" -@@ -171,6 +173,16 @@ - case lx24-x86: - set CC = gcc - set CFLAGS = "-O -Wall -Werror -Wstrict-prototypes -DLINUX $DEBUG_FLAG $CFLAGS" -+ set LFLAGS = "$DEBUG_FLAG $LFLAGS" -+ set LIBS = "$LIBS" -+ set START_FILE = "/usr/lib/crti.o /usr/lib/crtbegin.o" -+ set CTOR = "/usr/lib/crti.o /usr/lib/crtbegin.o" -+ set DTOR = "/usr/lib/crtend.o /usr/lib/crtn.o" -+ breaksw -+ -+case fbsd-*: -+ set CC = gcc -+ set CFLAGS = "%%CFLAGS%% -Wall -Werror -Wstrict-prototypes $DEBUG_FLAG $CFLAGS" - set LFLAGS = "$DEBUG_FLAG $LFLAGS" - set LIBS = "$LIBS" - set START_FILE = "/usr/lib/crti.o /usr/lib/crtbegin.o" diff --git a/sysutils/sge61/files/patch-dist_util_arch__variables b/sysutils/sge61/files/patch-dist_util_arch__variables deleted file mode 100644 index 7a75f9d6d92d..000000000000 --- a/sysutils/sge61/files/patch-dist_util_arch__variables +++ /dev/null @@ -1,23 +0,0 @@ - -$FreeBSD$ - ---- dist/util/arch_variables.orig -+++ dist/util/arch_variables -@@ -181,14 +181,14 @@ - AWK=/usr/bin/awk - ECHO="/bin/echo" - RC_FILE=freebsd -- RC_PREFIX=/usr/local/etc/rc.d -+ RC_PREFIX=%%LOCALBASE%%/etc/rc.d - RC_SUFFIX=.sh -- XTERM=/usr/X11R6/bin/xterm -+ XTERM=%%X11BASE%%/bin/xterm - MAILER=/usr/bin/mail - QLOGIN_COMMAND=telnet - QLOGIN_DAEMON=/usr/libexec/telnetd - RLOGIN_DAEMON=/usr/libexec/rlogind -- GETTEXT=/usr/local/bin/gettext -+ GETTEXT=%%LOCALBASE%%/bin/gettext - RSH_DAEMON=undef - ROOTGROUP=wheel - LOADSENSOR_COMMAND=undef diff --git a/sysutils/sge61/files/patch-dist_util_install__modules_inst__common.sh b/sysutils/sge61/files/patch-dist_util_install__modules_inst__common.sh deleted file mode 100644 index 4487e583f433..000000000000 --- a/sysutils/sge61/files/patch-dist_util_install__modules_inst__common.sh +++ /dev/null @@ -1,28 +0,0 @@ - -$FreeBSD$ - ---- dist/util/install_modules/inst_common.sh.orig -+++ dist/util/install_modules/inst_common.sh -@@ -1169,8 +1169,9 @@ - Execute cp $SGE_STARTUP_FILE $RC_PREFIX/$STARTUP_FILE_NAME - /usr/sbin/update-rc.d $STARTUP_FILE_NAME defaults 95 03 - elif [ "$RC_FILE" = "freebsd" ]; then -- echo cp $SGE_STARTUP_FILE $RC_PREFIX/sge${RC_SUFFIX} -- Execute cp $SGE_STARTUP_FILE $RC_PREFIX/sge${RC_SUFFIX} -+# XXX: should add the rc.subr script to the main distribution -+# echo cp $SGE_STARTUP_FILE $RC_PREFIX/sge${RC_SUFFIX} -+# Execute cp $SGE_STARTUP_FILE $RC_PREFIX/sge${RC_SUFFIX} - elif [ "$RC_FILE" = "SGE" ]; then - echo mkdir -p "$RC_PREFIX/$RC_DIR" - Execute mkdir -p "$RC_PREFIX/$RC_DIR" -@@ -1902,8 +1903,8 @@ - Execute rm $SGE_STARTUP_FILE $RC_PREFIX/$STARTUP_FILE_NAME - /sbin/insserv -r $RC_PREFIX/$STARTUP_FILE_NAME - elif [ "$RC_FILE" = "freebsd" ]; then -- echo rm $SGE_STARTUP_FILE $RC_PREFIX/sge${RC_SUFFIX} -- Execute rm $SGE_STARTUP_FILE $RC_PREFIX/sge${RC_SUFFIX} -+ #echo rm $SGE_STARTUP_FILE $RC_PREFIX/sge${RC_SUFFIX} -+ #Execute rm $SGE_STARTUP_FILE $RC_PREFIX/sge${RC_SUFFIX} - elif [ "$RC_FILE" = "SGE" ]; then - if [ $hosttype = "master" ]; then - DARWIN_GEN_REPLACE="#GENMASTERRC" diff --git a/sysutils/sge61/files/patch-libs_spool_flatfile_sge__spooling__flatfile__scanner.h b/sysutils/sge61/files/patch-libs_spool_flatfile_sge__spooling__flatfile__scanner.h deleted file mode 100644 index 0cbbab1cdf91..000000000000 --- a/sysutils/sge61/files/patch-libs_spool_flatfile_sge__spooling__flatfile__scanner.h +++ /dev/null @@ -1,13 +0,0 @@ - -$FreeBSD$ - ---- libs/spool/flatfile/sge_spooling_flatfile_scanner.h.orig -+++ libs/spool/flatfile/sge_spooling_flatfile_scanner.h -@@ -32,6 +32,7 @@ - ************************************************************************/ - /*___INFO__MARK_END__*/ - -+#include <sys/types.h> - #include <stdio.h> - - typedef enum { diff --git a/sysutils/sge61/files/patch-scripts_distinst b/sysutils/sge61/files/patch-scripts_distinst deleted file mode 100644 index 27b5dd297f6f..000000000000 --- a/sysutils/sge61/files/patch-scripts_distinst +++ /dev/null @@ -1,110 +0,0 @@ - -$FreeBSD$ - ---- scripts/distinst.orig -+++ scripts/distinst -@@ -35,7 +35,7 @@ - - umask 022 - --TOPFILES="3rd_party bin catman ckpt doc examples include inst_sge \ -+TOPFILES="3rd_party bin ckpt doc examples include inst_sge \ - install_execd install_qmaster lib man mpi pvm qmon util utilbin" - - HASARCHDIR="bin lib examples/jobsbin utilbin" -@@ -735,17 +735,6 @@ - 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 --fi - - echo - -@@ -807,6 +796,9 @@ - instmpi=true - instcommon=true - ;; -+ noqmon) -+ instqmon=false -+ ;; - qmontree) - instqmon=true - instcommon=true -@@ -1014,19 +1006,6 @@ - Execute chmod 755 $DEST_SGE_ROOT/$MYRINETBASE/$f - done - -- HPCBASE=mpi/SunHPCT5 -- Execute mkdir -p $DEST_SGE_ROOT/$HPCBASE -- -- for f in $SUNHPCTIGHT_FILES; do -- Execute cp dist/$HPCBASE/$f $DEST_SGE_ROOT/$HPCBASE -- Execute chmod 644 $DEST_SGE_ROOT/$HPCBASE/$f -- done -- -- for f in $SUNHPCTIGHT_SCRIPTS; do -- Execute cp dist/$HPCBASE/$f $DEST_SGE_ROOT/$HPCBASE -- Execute chmod 755 $DEST_SGE_ROOT/$HPCBASE/$f -- done -- - Cleanup mpi - fi - -@@ -1174,7 +1153,7 @@ - - for prog in $PROG; do - case $prog in -- jobs|ckpt|doc|inst_sge|utiltree|examples|man|mpi|pvm|qmontree|common|distcommon|utilbin|arco) -+ jobs|ckpt|doc|inst_sge|utiltree|examples|man|mpi|noqmon|pvm|qmontree|common|distcommon|utilbin|arco) - : - ;; - qmake) -@@ -1272,6 +1251,8 @@ - InstallProg $BERKELEYDBBASE/$DSTARCH/bin/$prog - elif [ -f $BERKELEYDBBASE/bin/$prog ]; then - InstallProg $BERKELEYDBBASE/bin/$prog -+ elif [ -f $BERKELEYDBBASE/bin/$prog${BDB_LIB_SUFFIX} ]; then -+ InstallProgAs $BERKELEYDBBASE/bin/$prog${BDB_LIB_SUFFIX} $prog - fi - fi - elif [ $prog = spoolinit -o $prog = spooldefaults ]; then -@@ -1386,13 +1367,15 @@ - libname="$OPENSSLBASE/$DSTARCH/lib/$lib.$shlibext" - elif [ $DSTARCH = darwin -o $DSTARCH = darwin-x86 ]; then - libname="$OPENSSLBASE/$DSTARCH/lib/libssl.bundle" -+ elif [ ${DSTARCH%%-*} = fbsd ]; then -+ libname="$OPENSSLBASE/lib/$lib.$shlibext" - else - libname="$OPENSSLBASE/$DSTARCH/lib/$lib.$shlibext.0.9.7" - fi - - if [ -f $libname ]; then - InstallProg $libname -- if [ $DSTARCH = tru64 -o $DSTARCH = darwin -o $DSTARCH = darwin-x86 ]; then -+ if [ $DSTARCH = tru64 -o $DSTARCH = darwin -o $DSTARCH = darwin-x86 -o ${DSTARCH%%-*} = fbsd ]; then - : - else - (cd $DEST_SGE_ROOT/${UTILPREFIX}/$DSTARCH; ln -s $lib.${shlibext}.0.9.7 $lib.$shlibext) -@@ -1407,7 +1390,11 @@ - if [ $DSTARCH != win32-x86 ]; then - if [ $instbdb = true ]; then - for lib in $BERKELEYDB_SHARED_LIBRARIES; do -- libname="$BERKELEYDBBASE/$DSTARCH/lib/$lib.$shlibext" -+ if [ ${DSTARCH%%-*} = fbsd ]; then -+ libname="$BERKELEYDBBASE/lib/$lib.$shlibext" -+ else -+ libname="$BERKELEYDBBASE/$DSTARCH/lib/$lib.$shlibext" -+ fi - if [ -f $libname ]; then - InstallProg $libname - else diff --git a/sysutils/sge61/files/pkg-install.in b/sysutils/sge61/files/pkg-install.in deleted file mode 100644 index 118e3eecd914..000000000000 --- a/sysutils/sge61/files/pkg-install.in +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -u=sgeadmin -g=sgeadmin -ugid=103 -homedir=/nonexistent -shell=/sbin/nologin -comment="Sun Grid Engine Admin" - -case $2 in -POST-INSTALL) - if pw group show "${g}" >/dev/null 2>&1; then - echo "Using existing group \"${g}\"." - else - echo "Creating group \"${g}\", (gid: ${ugid})." - pw groupadd ${g} -g ${ugid} - if [ $? != 0 ]; then - echo "Failed to add group \"${g}\"." - exit 1 - fi - fi - if pw user show "${u}" >/dev/null 2>&1; then - echo "Using existing user \"${u}\"." - else - echo "Creating user \"${u}\", (uid: ${ugid})." - pw useradd ${u} -u ${ugid} -g ${ugid} -h - \ - -d ${homedir} -s ${shell} -c "${comment}" - if [ $? != 0 ]; then - echo "Failed to add user \"${u}\"." - exit 1 - fi - fi - chown ${u}:${g} %%PREFIX%%/%%SGE_BASE%% - ;; -esac diff --git a/sysutils/sge61/files/pkg-message.in b/sysutils/sge61/files/pkg-message.in deleted file mode 100644 index e321f19aefd6..000000000000 --- a/sysutils/sge61/files/pkg-message.in +++ /dev/null @@ -1,24 +0,0 @@ - -After installation, you need to set up SGE. Go to - - %%PREFIX%%/%%SGE_BASE%% - -and run './install_qmaster' to set up the master node of the cluster and -run './install_execd' for the back-end compute nodes. - -Before doing so, you should add sge_qmaster and sge_execd services to -/etc/services or the appropriate network directory service. Any free -port numbers may be used. - - -If you desire extra security, add the -csp flag to your qmaster install. - - -If you wish to run PVM applications with SGE you will need to build a -couple of binaries. Go to - - %%PREFIX%%/%%SGE_BASE%%/pvm/src - -and type './aimk' followed by './install.sh'. See the documentation for -how to set up a pvm environment. - diff --git a/sysutils/sge61/files/pthread-types.diff b/sysutils/sge61/files/pthread-types.diff deleted file mode 100644 index 6f2bbc2b9acc..000000000000 --- a/sysutils/sge61/files/pthread-types.diff +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- libs/uti/sge_profiling.h.orig -+++ libs/uti/sge_profiling.h -@@ -35,7 +35,7 @@ - #include <time.h> - #include <sys/time.h> - #include <sys/times.h> -- -+#include <pthread.h> - - #include "basis_types.h" - diff --git a/sysutils/sge61/files/sge-freebsd-pdc.diff b/sysutils/sge61/files/sge-freebsd-pdc.diff deleted file mode 100644 index 1942cd5634bb..000000000000 --- a/sysutils/sge61/files/sge-freebsd-pdc.diff +++ /dev/null @@ -1,366 +0,0 @@ ---- daemons/common/pdc.c.orig Thu Sep 1 02:09:04 2005 -+++ daemons/common/pdc.c Thu Apr 13 22:05:15 2006 -@@ -118,6 +118,16 @@ - #include "sge_unistd.h" - #endif - -+#if defined(FREEBSD) -+#include <sys/param.h> -+#include <sys/sysctl.h> -+#include <sys/user.h> -+ -+#include <fcntl.h> -+#include <kvm.h> -+#include <limits.h> -+#endif -+ - #if defined(LINUX) || defined(ALPHA) || defined(IRIX) || defined(SOLARIS) || defined(DARWIN) || defined (FREEBSD) || defined(NETBSD) - - #include "sge_os.h" -@@ -188,12 +198,57 @@ - } - #endif - --#if defined(LINUX) || defined(SOLARIS) || defined(ALPHA) -+#if defined(LINUX) || defined(SOLARIS) || defined(ALPHA) || defined(FREEBSD) - - void pdc_kill_addgrpid(gid_t add_grp_id, int sig, - tShepherd_trace shepherd_trace) - { -+#if defined(LINUX) || defined(SOLARIS) || defined(ALPHA) - procfs_kill_addgrpid(add_grp_id, sig, shepherd_trace); -+#elif defined(FREEBSD) -+ kvm_t *kd; -+ int i, nprocs; -+ struct kinfo_proc *procs; -+ char kerrbuf[_POSIX2_LINE_MAX]; -+ -+ kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, kerrbuf); -+ if (kd == NULL) { -+#if DEBUG -+ fprintf(stderr, "kvm_getprocs: error %s\n", kerrbuf); -+#endif -+ return; -+ } -+ -+ procs = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nprocs); -+ if (procs == NULL) { -+#if DEBUG -+ fprintf(stderr, "kvm_getprocs: error %s\n", kvm_geterr(kd)); -+#endif -+ kvm_close(kd); -+ return; -+ } -+ for (; nprocs > 0; nprocs--, procs++) { -+ for (i = 0; i < procs->ki_ngroups; i++) { -+ if (procs->ki_groups[i] == add_grp_id) { -+ char err_str[256]; -+ -+ if (procs->ki_uid != 0 && procs->ki_ruid != 0 && -+ procs->ki_svuid != 0 && -+ procs->ki_rgid != 0 && procs->ki_svgid != 0) { -+ kill(procs->ki_pid, sig); -+ sprintf(err_str, MSG_SGE_KILLINGPIDXY_UI , -+ sge_u32c(procs->ki_pid), add_grp_id); -+ } else { -+ sprintf(err_str, MSG_SGE_DONOTKILLROOTPROCESSXY_UI , -+ sge_u32c(procs->ki_pid), add_grp_id); -+ } -+ if (shepherd_trace) -+ shepherd_trace(err_str); -+ } -+ } -+ } -+ kvm_close(kd); -+#endif - } - #endif - -@@ -1404,6 +1459,95 @@ - ; - pt_close(); - } -+#elif defined(FREEBSD) -+ { -+ kvm_t *kd; -+ int i, nprocs; -+ struct kinfo_proc *procs; -+ char kerrbuf[_POSIX2_LINE_MAX]; -+ job_elem_t *job_elem; -+ double old_time = 0.0; -+ uint64 old_vmem = 0; -+ -+ kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, kerrbuf); -+ if (kd == NULL) { -+#if DEBUG -+ fprintf(stderr, "kvm_getprocs: error %s\n", kerrbuf); -+#endif -+ DEXIT; -+ return -1; -+ } -+ -+ procs = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nprocs); -+ if (procs == NULL) { -+#if DEBUG -+ fprintf(stderr, "kvm_getprocs: error %s\n", kvm_geterr(kd)); -+#endif -+ kvm_close(kd); -+ DEXIT; -+ return -1; -+ } -+ 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->ki_ngroups; i++) { -+ if (job_elem->job.jd_jid == procs->ki_groups[i]) { -+ lnk_link_t *curr2; -+ proc_elem_t *proc_elem; -+ int newprocess; -+ -+ newprocess = 1; -+ 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->ki_pid) { -+ newprocess = 0; -+ break; -+ } -+ } -+ } -+ if (newprocess) { -+ proc_elem = malloc(sizeof(proc_elem_t)); -+ if (proc_elem == NULL) { -+ kvm_close(kd); -+ DEXIT; -+ return 0; -+ } -+ -+ memset(proc_elem, 0, sizeof(proc_elem_t)); -+ proc_elem->proc.pd_length = sizeof(psProc_t); -+ proc_elem->proc.pd_state = 1; /* active */ -+ proc_elem->proc.pd_pstart = procs->ki_start.tv_sec; -+ -+ LNK_ADD(job_elem->procs.prev, &proc_elem->link); -+ job_elem->job.jd_proccount++; -+ } 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; -+ } -+ proc_elem->proc.pd_tstamp = time_stamp; -+ proc_elem->proc.pd_pid = procs->ki_pid; -+ -+ proc_elem->proc.pd_utime = procs->ki_rusage.ru_utime.tv_sec; -+ proc_elem->proc.pd_stime = procs->ki_rusage.ru_stime.tv_sec; -+ -+ proc_elem->proc.pd_uid = procs->ki_uid; -+ proc_elem->proc.pd_gid = procs->ki_rgid; -+ proc_elem->vmem = procs->ki_size; -+ proc_elem->rss = procs->ki_rssize; -+ -+ proc_elem->mem = ((proc_elem->proc.pd_stime + proc_elem->proc.pd_utime) - old_time) * -+ (( old_vmem + proc_elem->vmem)/2); -+ } -+ } -+ } -+ } -+ -+ kvm_close(kd); -+ } - #elif defined(NECSX4) || defined(NECSX5) - { - for (curr=job_list.next; curr != &job_list; curr=curr->next) { -@@ -1951,7 +2095,7 @@ - - } - --#elif defined(ALPHA) || defined(LINUX) || defined(SOLARIS) -+#elif defined(ALPHA) || defined(LINUX) || defined(SOLARIS) || defined(FREEBSD) - { - int proccount; - lnk_link_t *currp, *nextp; ---- daemons/common/pdc.h.orig Mon Feb 9 06:06:49 2004 -+++ daemons/common/pdc.h Thu Apr 13 22:00:01 2006 -@@ -187,7 +187,7 @@ - int sup_groups_in_proc(void); - #endif - --#if defined(ALPHA) || defined(LINUX) || defined(SOLARIS) -+#if defined(ALPHA) || defined(LINUX) || defined(SOLARIS) || defined(FREEBSD) - void pdc_kill_addgrpid(gid_t, int, tShepherd_trace); - #endif - ---- daemons/common/setosjobid.c.orig Tue May 3 02:18:19 2005 -+++ daemons/common/setosjobid.c Thu Apr 13 22:00:01 2006 -@@ -126,7 +126,7 @@ - sprintf(err_str, "setosjobid: uid = "pid_t_fmt", euid = "pid_t_fmt, getuid(), geteuid()); - shepherd_trace(err_str); - --# if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) -+# if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) || defined(FREEBSD) - /* Read SgeId from config-File and create Addgrpid-File */ - { - char *cp; ---- daemons/execd/exec_job.c.orig Wed Nov 23 03:03:59 2005 -+++ daemons/execd/exec_job.c Thu Apr 13 22:06:17 2006 -@@ -106,7 +106,7 @@ - extern char execd_spool_dir[SGE_PATH_MAX]; - - #if COMPILE_DC --#if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) -+#if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) || defined(FREEBSD) - /* local functions */ - static int addgrpid_already_in_use(long); - static long get_next_addgrpid(lList *, long); -@@ -143,7 +143,7 @@ - } - - #if COMPILE_DC --#if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) -+#if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) || defined(FREEBSD) - static long get_next_addgrpid( - lList *rlp, - long last_addgrpid -@@ -245,7 +245,7 @@ - char dce_wrapper_cmd[128]; - - #if COMPILE_DC --#if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) -+#if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) || defined(FREEBSD) - static gid_t last_addgrpid; - #endif - #endif -@@ -778,7 +778,7 @@ - - #ifdef COMPILE_DC - --# if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) -+# if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) || defined(FREEBSD) - - { - lList *rlp = NULL; ---- daemons/execd/execd_ck_to_do.c.orig Wed Nov 2 08:03:13 2005 -+++ daemons/execd/execd_ck_to_do.c Thu Apr 13 22:07:18 2006 -@@ -913,7 +913,7 @@ - FILE *fp; - SGE_STRUCT_STAT sb; - --#if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) -+#if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) || defined(FREEBSD) - gid_t addgrpid; - dstring addgrpid_path = DSTRING_INIT; - #else -@@ -928,7 +928,7 @@ - pe_task_id = lGetString(pe_task, PET_id); - } - --#if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) -+#if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) || defined(FREEBSD) - /** - ** read additional group id and use it as osjobid - **/ ---- daemons/execd/ptf.c.orig Tue Nov 22 07:35:00 2005 -+++ daemons/execd/ptf.c Thu Apr 13 22:08:27 2006 -@@ -44,7 +44,7 @@ - - #if defined(COMPILE_DC) || defined(MODULE_TEST) - --#if defined(IRIX) || defined(ALPHA) || defined(LINUX) || defined(SOLARIS) || defined(NECSX4) || defined(NECSX5) || !defined(MODULE_TEST) -+#if defined(IRIX) || defined(ALPHA) || defined(LINUX) || defined(SOLARIS) || defined(NECSX4) || defined(NECSX5) || !defined(MODULE_TEST) || defined(FREEBSD) - # define USE_DC - #endif - -@@ -82,7 +82,7 @@ - # include <sys/category.h> - #endif - --#if defined(ALPHA) || defined(SOLARIS) || defined(LINUX) -+#if defined(ALPHA) || defined(SOLARIS) || defined(LINUX) || defined(FREEBSD) - # include <sys/resource.h> - #endif - -@@ -217,7 +217,7 @@ - - static void ptf_setpriority_jobid(lListElem *job, lListElem *osjob, long pri); - --#elif defined(ALPHA) || defined(SOLARIS) || defined(LINUX) -+#elif defined(ALPHA) || defined(SOLARIS) || defined(LINUX) || defined(FREEBSD) - - static void ptf_setpriority_addgrpid(lListElem *job, lListElem *osjob, - long pri); -@@ -365,7 +365,7 @@ - lSetDouble(usage, UA_value, 0); - lAppendElem(usage_list, usage); - --#if defined(ALPHA) || defined(LINUX) || defined(SOLARIS) -+#if defined(ALPHA) || defined(LINUX) || defined(SOLARIS) || defined(FREBSD) - usage = lCreateElem(UA_Type); - lSetString(usage, UA_name, USAGE_ATTR_VMEM); - lSetDouble(usage, UA_value, 0); -@@ -494,7 +494,7 @@ - ptf_setpriority_ash(job, osjob, pri); - #elif defined(CRAY) || defined(NECSX4) || defined(NECSX5) - ptf_setpriority_jobid(job, osjob, pri); --#elif defined(ALPHA) || defined(SOLARIS) || defined(LINUX) -+#elif defined(ALPHA) || defined(SOLARIS) || defined(LINUX) || defined(FREEBSD) - ptf_setpriority_addgrpid(job, osjob, pri); - #endif - } -@@ -713,7 +713,7 @@ - DEXIT; - } - --#elif defined(ALPHA) || defined(SOLARIS) || defined(LINUX) -+#elif defined(ALPHA) || defined(SOLARIS) || defined(LINUX) || defined(FREEBSD) - - /****** execd/ptf/ptf_setpriority_addgrpid() ********************************** - * NAME -@@ -724,9 +724,9 @@ - * long *pri) - * - * FUNCTION --* This function is only available for the architecture SOLARIS, ALPHA and --* LINUX. All processes belonging to "job" and "osjob" will get a new i --* priority. -+* This function is only available for the architecture SOLARIS, ALPHA, -+* LINUX, and FREEBSD. All processes belonging to "job" and "osjob" will -+* get a new priority. - * - * This function assumes the the "max" priority is smaller than the "min" - * priority. -@@ -1981,7 +1981,7 @@ - } - } - --#elif defined(ALPHA) || defined(SOLARIS) || defined(LINUX) -+#elif defined(ALPHA) || defined(SOLARIS) || defined(LINUX) || defined(FREEBSD) - if (getuid() == 0) { - if (setpriority(PRIO_PROCESS, getpid(), PTF_MAX_PRIORITY) < 0) { - ERROR((SGE_EVENT, MSG_PRIO_SETPRIOFAILED_S, strerror(errno))); ---- daemons/shepherd/shepherd.c.orig Mon Jan 1 05:44:56 2007 -+++ daemons/shepherd/shepherd.c Mon Feb 5 10:07:37 2007 -@@ -2478,9 +2478,9 @@ - kill(pid, sig); - sge_switch2admin_user(); - --#if defined(SOLARIS) || defined(LINUX) || defined(ALPHA) || defined(IRIX) -+#if defined(SOLARIS) || defined(LINUX) || defined(ALPHA) || defined(IRIX) || defined(FREEBSD) - if (first_kill == 0 || sig != SIGKILL || is_qrsh == false) { --# if defined(SOLARIS) || defined(LINUX) || defined(ALPHA) -+# if defined(SOLARIS) || defined(LINUX) || defined(ALPHA) || defined(FREEBSD) - # ifdef COMPILE_DC - if (atoi(get_conf_val("enable_addgrp_kill")) == 1) { - gid_t add_grp_id; ---- libs/uti/sge_uidgid.c.orig Wed Nov 23 03:04:09 2005 -+++ libs/uti/sge_uidgid.c Thu Apr 13 22:00:01 2006 -@@ -850,7 +850,7 @@ - #endif - #endif /* WIN32 */ - --#if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) -+#if defined(SOLARIS) || defined(ALPHA) || defined(LINUX) || defined(FREEBSD) - /* add Additional group id to current list of groups */ - if (add_grp) { - if (sge_add_group(add_grp, err_str) == -1) { diff --git a/sysutils/sge61/files/sge.sh.in b/sysutils/sge61/files/sge.sh.in deleted file mode 100644 index f7e29e487aa0..000000000000 --- a/sysutils/sge61/files/sge.sh.in +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -# PROVIDE: sge -# REQUIRE: DAEMON -# BEFORE: LOGIN -# KEYWORD: shutdown - -# rc.conf variables: -# -# sge_cell The SGE_CELL for this machine (default=default). -# sge_qmaster_enable Start the qmaster and scheduler (default=NO). -# sge_execd_enable Start the exec daemon (default=NO). - -. %%RC_SUBR%% - -SGE_ROOT=%%PREFIX%%/%%SGE_BASE%% - -name="sge" -start_cmd="sge_start" -stop_cmd="sge_stop" - -sge_start() -{ - if checkyesno sge_qmaster_enable; then - ${sgemaster_script} start - fi - if checkyesno sge_execd_enable; then - ${sgeexecd_script} start - fi -} - -sge_stop() -{ - if checkyesno sge_execd_enable; then - ${sgeexecd_script} stop - fi - if checkyesno sge_qmaster_enable; then - ${sgemaster_script} stop - fi -} - -load_rc_config $name - -sge_qmaster_enable=${sge_qmaster_enable-NO} -sge_execd_enable=${sge_execd_enable-NO} -sge_cell=${sge_cell:-default} -sgemaster_script=${SGE_ROOT}/${sge_cell}/common/sgemaster -sgeexecd_script=${SGE_ROOT}/${sge_cell}/common/sgeexecd - -run_rc_command $* |