diff options
-rw-r--r-- | sys-cluster/torque/Manifest | 1 | ||||
-rw-r--r-- | sys-cluster/torque/files/pbs_mom-init.d | 57 | ||||
-rw-r--r-- | sys-cluster/torque/files/pbs_mom-init.d-munge | 48 | ||||
-rw-r--r-- | sys-cluster/torque/files/pbs_sched-init.d | 48 | ||||
-rw-r--r-- | sys-cluster/torque/files/pbs_server-init.d | 67 | ||||
-rw-r--r-- | sys-cluster/torque/files/pbs_server-init.d-munge | 61 | ||||
-rw-r--r-- | sys-cluster/torque/files/tcl8.6.patch | 87 | ||||
-rw-r--r-- | sys-cluster/torque/files/torque-3.0.5-cpusets.patch | 176 | ||||
-rw-r--r-- | sys-cluster/torque/files/torque-3.0.6-tcl8.6.patch | 66 | ||||
-rw-r--r-- | sys-cluster/torque/files/torque-conf.d | 14 | ||||
-rw-r--r-- | sys-cluster/torque/files/torque-conf.d-munge | 18 | ||||
-rw-r--r-- | sys-cluster/torque/files/torque-env.d | 7 | ||||
-rw-r--r-- | sys-cluster/torque/metadata.xml | 15 | ||||
-rw-r--r-- | sys-cluster/torque/torque-3.0.6-r1.ebuild | 260 |
14 files changed, 0 insertions, 925 deletions
diff --git a/sys-cluster/torque/Manifest b/sys-cluster/torque/Manifest deleted file mode 100644 index 0957727..0000000 --- a/sys-cluster/torque/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST torque-3.0.6.tar.gz 5888678 SHA256 f76736d780fc0f8ac73c54d586b4d15704e37cf191649b748b07f660186642b3 SHA512 6776302d797c718169daeb07efa31f77779d546ac6cf33edea98cd56ce800ab2547b55a8384a627f14d61abb7144b464a10a40936943b62bc4cc70823eec599f WHIRLPOOL 4950176f24e99e29d75d9808d5e223d90a2d0f1a36f7fc303506ef99e8012eb6c070a3674bbf3641c4e1dc3bbb87bb3670aa3a0ee1c957658c3f3d4c88fbb864 diff --git a/sys-cluster/torque/files/pbs_mom-init.d b/sys-cluster/torque/files/pbs_mom-init.d deleted file mode 100644 index 13970fe..0000000 --- a/sys-cluster/torque/files/pbs_mom-init.d +++ /dev/null @@ -1,57 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the Torque 2.5+ License - -. /etc/conf.d/torque -PBS_SERVER_HOME="$(. /etc/env.d/25torque; echo ${PBS_SERVER_HOME})" - -depend() { - need net - after pbs_server - after pbs_sched - after logger -} - -checkconfig() { - for i in "server_name" "mom_priv/config"; do - if [ ! -e ${PBS_SERVER_HOME}/${i} ]; then - eerror "Missing config file ${PBS_SERVER_HOME}/${i}" - return 1 - fi - done -} - -start() { - checkconfig || return 1 - - # check for a stale lock file, otherwise pbs_mom may fail to - # start, see unicluster # 75 bug - local utime unchtime - if [ -f ${PBS_SERVER_HOME}/torque/mom_priv/mom.lock ]; then - utime=$( gawk -F "[ .]" '{ print $1 }' /proc/uptime) - unchtime=$(( $(date +%s) - $(stat -c %Y ${PBS_SERVER_HOME}/mom_priv/mom.lock) )) - [ "$utime" -lt "$unchtime" ] && rm ${PBS_SERVER_HOME}/mom_priv/mom.lock - fi - - ebegin "Starting Torque pbs_mom" - local extra_args="" - if [ -n "${PBS_MOM_LOG}" ]; then - extra_args="-L ${PBS_MOM_LOG}" - fi - start-stop-daemon --start -p ${PBS_SERVER_HOME}/mom_priv/mom.lock \ - --exec /usr/sbin/pbs_mom -- -d ${PBS_SERVER_HOME} ${extra_args} - eend ${?} -} - -stop() { - ebegin "Stopping Torque pbs_mom" - /usr/sbin/momctl -s || start-stop-daemon --stop -p ${PBS_SERVER_HOME}/mom_priv/mom.lock - eend ${?} -} - -restart() { - svc_stop - sleep 3 - svc_start -} -# vim:ts=4 diff --git a/sys-cluster/torque/files/pbs_mom-init.d-munge b/sys-cluster/torque/files/pbs_mom-init.d-munge deleted file mode 100644 index 60e974a..0000000 --- a/sys-cluster/torque/files/pbs_mom-init.d-munge +++ /dev/null @@ -1,48 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the Torque 2.5+ License - -. /etc/conf.d/torque -PBS_SERVER_HOME="$(. /etc/env.d/25torque; echo ${PBS_SERVER_HOME})" - -depend() { - local _need="net" - after pbs_server pbs_sched logger - [ ${PBS_USE_MUNGE} -ne 0 ] && _need="${_need} munged" - need ${_need} -} - -checkconfig() { - for i in "server_name" "mom_priv/config"; do - if [ ! -e ${PBS_SERVER_HOME}/${i} ]; then - eerror "Missing config file ${PBS_SERVER_HOME}/${i}" - return 1 - fi - done -} - -start() { - checkconfig || return 1 - - ebegin "Starting Torque pbs_mom" - local extra_args="" - if [ -n "${PBS_MOM_LOG}" ]; then - extra_args="-L ${PBS_MOM_LOG}" - fi - start-stop-daemon --start -p ${PBS_SERVER_HOME}/mom_priv/mom.lock \ - --exec /usr/sbin/pbs_mom -- -d ${PBS_SERVER_HOME} ${extra_args} - eend ${?} -} - -stop() { - ebegin "Stopping Torque pbs_mom" - /usr/sbin/momctl -s || start-stop-daemon --stop -p ${PBS_SERVER_HOME}/mom_priv/mom.lock - eend ${?} -} - -restart() { - svc_stop - sleep 3 - svc_start -} -# vim:ts=4 diff --git a/sys-cluster/torque/files/pbs_sched-init.d b/sys-cluster/torque/files/pbs_sched-init.d deleted file mode 100644 index 2eefb55..0000000 --- a/sys-cluster/torque/files/pbs_sched-init.d +++ /dev/null @@ -1,48 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the Torque 2.5+ License - -. /etc/conf.d/torque -PBS_SERVER_HOME="$(. /etc/env.d/25torque; echo ${PBS_SERVER_HOME})" - -depend() { - need net - after pbs_server - before pbs_mom - after logger -} - -checkconfig() { - for i in "server_name"; do - if [ ! -e ${PBS_SERVER_HOME}/${i} ]; then - eerror "Missing config file ${PBS_SERVER_HOME}/${i}" - return 1 - fi - done - - if [ -z "$(grep 'queue_type' ${PBS_SERVER_HOME}/server_priv/queues/*)" ]; then - eerror "No queues have been defined yet." - return 1 - fi -} - -start() { - checkconfig || return 1 - - ebegin "Starting Torque pbs_sched" - local extra_args="" - if [ -n "${PBS_SCHED_LOG}" ]; then - extra_args="-L ${PBS_SCHED_LOG}" - fi - - start-stop-daemon --start -p ${PBS_SERVER_HOME}/sched_priv/sched.lock \ - --exec /usr/sbin/pbs_sched -- -d ${PBS_SERVER_HOME} ${extra_args} - eend ${?} -} - -stop() { - ebegin "Stopping Torque pbs_sched" - start-stop-daemon --stop -p ${PBS_SERVER_HOME}/sched_priv/sched.lock - eend ${?} -} -# vim:ts=4 diff --git a/sys-cluster/torque/files/pbs_server-init.d b/sys-cluster/torque/files/pbs_server-init.d deleted file mode 100644 index bc0cdef..0000000 --- a/sys-cluster/torque/files/pbs_server-init.d +++ /dev/null @@ -1,67 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the Torque 2.5+ License - -. /etc/conf.d/torque -PBS_SERVER_HOME="$(. /etc/env.d/25torque; echo ${PBS_SERVER_HOME})" - -depend() { - need net - before pbs_sched - before pbs_mom - after logger -} - -checkconfig() { - for i in "server_name" "server_priv/nodes"; do - if [ ! -e "${PBS_SERVER_HOME}/${i}" ]; then - eerror "Missing config file ${PBS_SERVER_HOME}/${i}" - return 1 - fi - done - - if [ ! -e "${PBS_SERVER_HOME}/server_priv/serverdb" ]; then - eerror "Torque has not been fully configured to run." - eerror "Missing ${PBS_SERVER_HOME}/server_priv/serverdb" - return 1 - fi - - if [ -z "$(grep 'queue_type' ${PBS_SERVER_HOME}/server_priv/queues/*)" ]; then - eerror "No queues have been defined yet." - return 1 - fi -} - -start() { - checkconfig || return 1 - - ebegin "Starting Torque pbs_server" - local extra_args="" - if [ -n "${PBS_SERVER_LOG}" ]; then - extra_args="-L ${PBS_SERVER_LOG}" - fi - - start-stop-daemon --start -p ${PBS_SERVER_HOME}/server_priv/server.lock \ - --exec /usr/sbin/pbs_server -- -d ${PBS_SERVER_HOME} ${extra_args} - eend ${?} -} - -stop() { - ebegin "Stopping Torque pbs_server" - stop_type="${PBS_SERVER_STOP}" - if [ -z "${stop_type}" ]; then - ewarn "PBS_SERVER_STOP is not defined, defaulting to quick" - stop_type=quick - fi - - # workaround bogus 141 code - /usr/bin/qterm -t ${stop_type} - ret=$? - [ ${ret} -eq 141 ] && ret=0 - [ ${ret} -gt 0 ] && { - start-stop-daemon --stop -p ${PBS_SERVER_HOME}/server_priv/server.lock - ret=$? - } - eend ${ret} -} -# vim:ts=4 diff --git a/sys-cluster/torque/files/pbs_server-init.d-munge b/sys-cluster/torque/files/pbs_server-init.d-munge deleted file mode 100644 index 25f7b7d..0000000 --- a/sys-cluster/torque/files/pbs_server-init.d-munge +++ /dev/null @@ -1,61 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the Torque 2.5+ License - -. /etc/conf.d/torque -PBS_SERVER_HOME="$(. /etc/env.d/25torque; echo ${PBS_SERVER_HOME})" - -depend() { - local _need="net" - before pbs_sched pbs_mom - after logger - [ ${PBS_USE_MUNGE} -ne 0 ] && _need="${_need} munged" - need ${_need} -} - -checkconfig() { - for i in "server_name" "server_priv/nodes"; do - if [ ! -e "${PBS_SERVER_HOME}/${i}" ]; then - eerror "Missing config file ${PBS_SERVER_HOME}/${i}" - return 1 - fi - done - - if [ ! -e "${PBS_SERVER_HOME}/server_priv/serverdb" ]; then - eerror "Torque has not been fully configured to run." - eerror "Missing ${PBS_SERVER_HOME}/server_priv/serverdb" - return 1 - fi - - if [ -z "$(grep 'queue_type' ${PBS_SERVER_HOME}/server_priv/queues/*)" ]; then - eerror "No queues have been defined yet." - return 1 - fi -} - -start() { - checkconfig || return 1 - - ebegin "Starting Torque pbs_server" - local extra_args="" - if [ -n "${PBS_SERVER_LOG}" ]; then - extra_args="-L ${PBS_SERVER_LOG}" - fi - - start-stop-daemon --start -p ${PBS_SERVER_HOME}/server_priv/server.lock \ - --exec /usr/sbin/pbs_server -- -d ${PBS_SERVER_HOME} ${extra_args} - eend ${?} -} - -stop() { - ebegin "Stopping Torque pbs_server" - stop_type="${PBS_SERVER_STOP}" - if [ -z "${stop_type}" ]; then - ewarn "PBS_SERVER_STOP is not defined, defaulting to quick" - stop_type=quick - fi - - /usr/bin/qterm -t ${stop_type} || start-stop-daemon --stop -p ${PBS_SERVER_HOME}/server_priv/server.lock - eend ${?} -} -# vim:ts=4 diff --git a/sys-cluster/torque/files/tcl8.6.patch b/sys-cluster/torque/files/tcl8.6.patch deleted file mode 100644 index 0361dbf..0000000 --- a/sys-cluster/torque/files/tcl8.6.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 061f15e06d6cf85e951cd321360067de5f0b2ce0 Mon Sep 17 00:00:00 2001 -From: Justin Bronder <jsbronder@gmail.com> -Date: Thu, 7 Mar 2013 22:33:04 -0500 -Subject: [PATCH] support tcl-8.6 - ---- - src/cmds/qstat.c | 13 +++++++++---- - src/scheduler.tcl/pbs_tclWrap.c | 6 +++--- - 2 files changed, 12 insertions(+), 7 deletions(-) - -diff --git a/src/cmds/qstat.c b/src/cmds/qstat.c -index 5f85de7..7f289ba 100644 ---- a/src/cmds/qstat.c -+++ b/src/cmds/qstat.c -@@ -88,6 +88,11 @@ - #if TCL_QSTAT - #include <sys/stat.h> - #include <tcl.h> -+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6 -+#define Tcl_GetStringResult(x) x->result -+#define Tcl_GetErrorLine(x) x->errorLine -+#define Tcl_SetResult(x, y, z) x->result = y -+#endif - #if TCLX - #include <tclExtend.h> - #endif -@@ -1856,7 +1861,7 @@ tcl_init(void) - if (Tcl_Init(interp) == TCL_ERROR) - { - fprintf(stderr, "Tcl_Init error: %s", -- interp->result); -+ Tcl_GetStringResult(interp)); - } - - #if TCLX -@@ -1869,7 +1874,7 @@ tcl_init(void) - { - #endif - fprintf(stderr, "Tclx_Init error: %s", -- interp->result); -+ Tcl_GetStringResult(interp)); - } - - #endif /* TCLX */ -@@ -1980,10 +1985,10 @@ void tcl_run( - trace = (char *)Tcl_GetVar(interp, "errorInfo", 0); - - if (trace == NULL) -- trace = interp->result; -+ trace = Tcl_GetStringResult(interp); - - fprintf(stderr, "%s: TCL error @ line %d: %s\n", -- script, interp->errorLine, trace); -+ script, Tcl_GetErrorLine(interp), trace); - } - - Tcl_DeleteInterp(interp); -diff --git a/src/scheduler.tcl/pbs_tclWrap.c b/src/scheduler.tcl/pbs_tclWrap.c -index e859ae5..194c24b 100644 ---- a/src/scheduler.tcl/pbs_tclWrap.c -+++ b/src/scheduler.tcl/pbs_tclWrap.c -@@ -924,7 +924,7 @@ char *argv[]; - - if (argc != 2) - { -- sprintf(interp->result, -+ sprintf(Tcl_GetStringResult(interp), - "%s: wrong # args: job_id", argv[0]); - return TCL_ERROR; - } -@@ -936,11 +936,11 @@ char *argv[]; - return TCL_OK; - } - -- interp->result = "0"; -+ Tcl_SetResult(interp, "0", TCL_STATIC); - - if (pbs_rerunjob(connector, argv[1], extend)) - { -- interp->result = "-1"; -+ Tcl_SetResult(interp, "-1", TCL_STATIC); - msg = pbs_geterrmsg(connector); - sprintf(log_buffer, "%s (%d)", msg ? msg : fail, pbs_errno); - log_err(-1, argv[0], log_buffer); --- -1.7.12.4 - diff --git a/sys-cluster/torque/files/torque-3.0.5-cpusets.patch b/sys-cluster/torque/files/torque-3.0.5-cpusets.patch deleted file mode 100644 index 03ef6f4..0000000 --- a/sys-cluster/torque/files/torque-3.0.5-cpusets.patch +++ /dev/null @@ -1,176 +0,0 @@ ---- torque-3.0.4/src/resmom/linux/cpuset.c.orig 2011-07-13 02:07:28.000000000 +0400 -+++ torque-3.0.4/src/resmom/linux/cpuset.c 2012-05-01 06:10:46.793651949 +0400 -@@ -37,6 +37,13 @@ - extern int num_numa_nodes; - #endif /* NUMA_SUPPORT */ - -+#include <linux/version.h> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0) -+#define CPUSET_PREFIX "cpuset." -+#else -+#define CPUSET_PREFIX "" -+#endif -+ - extern long system_ncpus; - - /* FIXME: TODO: TTORQUECPUSET_PATH, enabling cpuset support, and correct error -@@ -442,7 +449,7 @@ - - /* make sure cpusets are available */ - -- sprintf(path, "%s/cpus", TROOTCPUSET_PATH); -+ sprintf(path, "%s/%scpus", TROOTCPUSET_PATH, CPUSET_PREFIX); - - if (lstat(path, &statbuf) != 0) - { -@@ -480,8 +487,8 @@ - - /* load cpus in root set */ - -- sprintf(path, "%s/cpus", -- TROOTCPUSET_PATH); -+ sprintf(path, "%s/%scpus", -+ TROOTCPUSET_PATH, CPUSET_PREFIX); - - fp = fopen(path, "r"); - -@@ -519,8 +526,8 @@ - - /* NOTE: load 'boot' set */ - -- sprintf(path, "%s/boot/cpus", -- TROOTCPUSET_PATH); -+ sprintf(path, "%s/boot/%scpus", -+ TROOTCPUSET_PATH, CPUSET_PREFIX); - - fp = fopen(path, "r"); - -@@ -554,8 +561,8 @@ - - /* create new TORQUE cpus set */ - -- sprintf(path, "%s/cpus", -- TTORQUECPUSET_PATH); -+ sprintf(path, "%s/%scpus", -+ TTORQUECPUSET_PATH, CPUSET_PREFIX); - - fp = fopen(path, "w"); - -@@ -588,8 +595,8 @@ - - /* add all mems to torqueset */ - -- sprintf(path, "%s/mems", -- TROOTCPUSET_PATH); -+ sprintf(path, "%s/%smems", -+ TROOTCPUSET_PATH, CPUSET_PREFIX); - - fp = fopen(path, "r"); - -@@ -622,8 +629,8 @@ - - /* NOTE: load 'boot' set */ - -- sprintf(path, "%s/boot/mems", -- TROOTCPUSET_PATH); -+ sprintf(path, "%s/boot/%smems", -+ TROOTCPUSET_PATH, CPUSET_PREFIX); - - fp = fopen(path, "r"); - -@@ -657,8 +664,8 @@ - - /* create new TORQUE mems set */ - -- sprintf(path, "%s/mems", -- TTORQUECPUSET_PATH); -+ sprintf(path, "%s/%smems", -+ TTORQUECPUSET_PATH, CPUSET_PREFIX); - - fp = fopen(path, "w"); - -@@ -1015,7 +1022,7 @@ - /* don't "else return(FAILURE);" because the directory doesn't necessarily exist */ - - /* create the directory and copy the relevant memory data */ -- snprintf(tmppath,sizeof(tmppath),"%s/mems",TTORQUECPUSET_PATH); -+ snprintf(tmppath,sizeof(tmppath),"%s/%smems",TTORQUECPUSET_PATH, CPUSET_PREFIX); - if (access(TTORQUECPUSET_PATH, F_OK) == 0) - { - -@@ -1040,7 +1047,7 @@ - } - - fclose(fd); -- snprintf(tmppath,sizeof(tmppath),"%s/mems",path); -+ snprintf(tmppath,sizeof(tmppath),"%s/%smems",path, CPUSET_PREFIX); - fd = fopen(tmppath, "w"); - if (fd) - { -@@ -1088,6 +1095,7 @@ - vnodent *np; - int j; - int rc = SUCCESS; -+ int tmppath_len; - - char *id = "create_vnodesets"; - char cpusbuf[MAXPATHLEN+1]; -@@ -1105,7 +1113,8 @@ - mkdir(tmppath, 0755); - chmod(tmppath, 00755); - sprintf(tasksbuf, "%d", np->vn_index); -- strcat(tmppath, "/cpus"); -+ tmppath_len=strlen(tmppath); -+ snprintf(tmppath+tmppath_len, sizeof(tmppath)-tmppath_len, "/%scpus", CPUSET_PREFIX); - sprintf(log_buffer, "TASKSET: %s cpus %s\n", tmppath, tasksbuf); - log_event(PBSEVENT_SYSTEM, - PBS_EVENTCLASS_SERVER, -@@ -1129,7 +1138,7 @@ - memset(tasksbuf, '\0', sizeof(tasksbuf)); - - /* add all mems to torqueset - membuf has info stored */ -- sprintf(tmppath, "%s/%d/%s",path,np->vn_node,"/mems"); -+ sprintf(tmppath, "%s/%d/%smems",path,np->vn_node,CPUSET_PREFIX); - fd = fopen(tmppath, "w"); - - if (fd) -@@ -1200,7 +1209,7 @@ - get_cpu_string(pjob,cpusbuf); - #endif /* end NUMA_SUPPORT */ - -- snprintf(tmppath,sizeof(tmppath),"%s/cpus",path); -+ snprintf(tmppath,sizeof(tmppath),"%s/%scpus",path, CPUSET_PREFIX); - - sprintf(log_buffer, "CPUSET: %s job %s path %s\n", cpusbuf, - pjob->ji_qs.ji_jobid, tmppath); -@@ -1231,7 +1240,7 @@ - - fclose(fd); - #ifdef NUMA_SUPPORT -- snprintf(tmppath,sizeof(tmppath),"%s/mems",path); -+ snprintf(tmppath,sizeof(tmppath),"%s/%smems",path, CPUSET_PREFIX); - fd = fopen(tmppath, "w"); - if (fd) - { -@@ -1705,7 +1714,7 @@ - - if (LOGLEVEL >= 6) - { -- sprintf(log_buffer, "cpuset %s/memory_pressure=%d", path, rc); -+ sprintf(log_buffer, "cpuset %s/%smemory_pressure=%d", path, CPUSET_PREFIX, rc); - log_record(PBSEVENT_DEBUG, 0, id, log_buffer); - } - -@@ -1714,9 +1723,10 @@ - /* Construct the name of the cpuset's memory_pressure file */ - - if (cpusetname[0] == '/') -- snprintf(path, sizeof(path), "%s/memory_pressure", cpusetname); -+ snprintf(path, sizeof(path), "%s/%smemory_pressure", cpusetname, CPUSET_PREFIX); - else -- snprintf(path, sizeof(path), "%s/%s/memory_pressure", TTORQUECPUSET_PATH, cpusetname); -+ snprintf(path, sizeof(path), "%s/%s/%smemory_pressure", TTORQUECPUSET_PATH, -+ cpusetname, CPUSET_PREFIX); - - /* Open, read, close */ - diff --git a/sys-cluster/torque/files/torque-3.0.6-tcl8.6.patch b/sys-cluster/torque/files/torque-3.0.6-tcl8.6.patch deleted file mode 100644 index c8ce719..0000000 --- a/sys-cluster/torque/files/torque-3.0.6-tcl8.6.patch +++ /dev/null @@ -1,66 +0,0 @@ - src/cmds/qstat.c | 8 ++++---- - src/scheduler.tcl/pbs_tclWrap.c | 6 +++--- - 2 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/src/cmds/qstat.c b/src/cmds/qstat.c -index 5f85de7..a782151 100644 ---- a/src/cmds/qstat.c -+++ b/src/cmds/qstat.c -@@ -1856,7 +1856,7 @@ tcl_init(void) - if (Tcl_Init(interp) == TCL_ERROR) - { - fprintf(stderr, "Tcl_Init error: %s", -- interp->result); -+ Tcl_GetStringResult(interp)); - } - - #if TCLX -@@ -1869,7 +1869,7 @@ tcl_init(void) - { - #endif - fprintf(stderr, "Tclx_Init error: %s", -- interp->result); -+ Tcl_GetStringResult(interp)); - } - - #endif /* TCLX */ -@@ -1980,10 +1980,10 @@ void tcl_run( - trace = (char *)Tcl_GetVar(interp, "errorInfo", 0); - - if (trace == NULL) -- trace = interp->result; -+ trace = Tcl_GetStringResult(interp); - - fprintf(stderr, "%s: TCL error @ line %d: %s\n", -- script, interp->errorLine, trace); -+ script, Tcl_GetErrorLine(interp), trace); - } - - Tcl_DeleteInterp(interp); -diff --git a/src/scheduler.tcl/pbs_tclWrap.c b/src/scheduler.tcl/pbs_tclWrap.c -index e859ae5..194c24b 100644 ---- a/src/scheduler.tcl/pbs_tclWrap.c -+++ b/src/scheduler.tcl/pbs_tclWrap.c -@@ -924,7 +924,7 @@ char *argv[]; - - if (argc != 2) - { -- sprintf(interp->result, -+ sprintf(Tcl_GetStringResult(interp), - "%s: wrong # args: job_id", argv[0]); - return TCL_ERROR; - } -@@ -936,11 +936,11 @@ char *argv[]; - return TCL_OK; - } - -- interp->result = "0"; -+ Tcl_SetResult(interp, "0", TCL_STATIC); - - if (pbs_rerunjob(connector, argv[1], extend)) - { -- interp->result = "-1"; -+ Tcl_SetResult(interp, "-1", TCL_STATIC); - msg = pbs_geterrmsg(connector); - sprintf(log_buffer, "%s (%d)", msg ? msg : fail, pbs_errno); - log_err(-1, argv[0], log_buffer); diff --git a/sys-cluster/torque/files/torque-conf.d b/sys-cluster/torque/files/torque-conf.d deleted file mode 100644 index a6e6b08..0000000 --- a/sys-cluster/torque/files/torque-conf.d +++ /dev/null @@ -1,14 +0,0 @@ -# The default logging takes place in $PBS_SERVER_HOME/<mom/server/sched>_priv. -# If you'd like to change that, use the following per service. -PBS_SERVER_LOG=/var/log/pbs_server.log -PBS_MOM_LOG=/var/log/pbs_mom.log -PBS_SCHED_LOG=/var/log/pbs_sched.log - - -# There are a number of ways to stop the pbs server. For more details, man qterm -# At the time of writing, checkpoint is probably not working. -# immediate: All jobs are killed. -# delay: Checkpoint, rerun or wait for jobs to finish before stopping -# quick: Remember running jobs, and let them run without interaction with pbs_server. -# This is the default action -PBS_SERVER_STOP=quick diff --git a/sys-cluster/torque/files/torque-conf.d-munge b/sys-cluster/torque/files/torque-conf.d-munge deleted file mode 100644 index a8456d5..0000000 --- a/sys-cluster/torque/files/torque-conf.d-munge +++ /dev/null @@ -1,18 +0,0 @@ -# The default logging takes place in $PBS_SERVER_HOME/<mom/server/sched>_priv. -# If you'd like to change that, use the following per service. -PBS_SERVER_LOG=/var/log/pbs_server.log -PBS_MOM_LOG=/var/log/pbs_mom.log -PBS_SCHED_LOG=/var/log/pbs_sched.log - - -# There are a number of ways to stop the pbs server. For more details, man qterm -# At the time of writing, checkpoint is probably not working. -# immediate: All jobs are killed. -# delay: Checkpoint, rerun or wait for jobs to finish before stopping -# quick: Remember running jobs, and let them run without interaction with pbs_server. -# This is the default action -PBS_SERVER_STOP=quick - -# Use munge auth by default. This causes all pbs service to require -# the munge service. Set to non-zero to enable. -PBS_USE_MUNGE=0 diff --git a/sys-cluster/torque/files/torque-env.d b/sys-cluster/torque/files/torque-env.d deleted file mode 100644 index 40a08c0..0000000 --- a/sys-cluster/torque/files/torque-env.d +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the Torque 2.5+ License - -# Configuration files that are included in the initial Torque install -PBS_SERVER_HOME="/var/spool/torque" -CONFIG_PROTECT="/var/spool/torque" - diff --git a/sys-cluster/torque/metadata.xml b/sys-cluster/torque/metadata.xml deleted file mode 100644 index 85172da..0000000 --- a/sys-cluster/torque/metadata.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="person"> - <email>bircoph@gentoo.org</email> - <name>Andrew Savchenko</name> -</maintainer> - <use> - <flag name="cpusets">Enable pbs_mom to utilize linux cpusets if available</flag> - <flag name="drmaa">Enable the Distributed Resource Management Application API</flag> - <flag name="munge">Enable authentication via munge</flag> - <flag name="nvidia">Enable management of Nvidia GPUs</flag> - <flag name="server">Enable compilation of pbs_server and pbs_sched</flag> - </use> -</pkgmetadata> diff --git a/sys-cluster/torque/torque-3.0.6-r1.ebuild b/sys-cluster/torque/torque-3.0.6-r1.ebuild deleted file mode 100644 index 814bc15..0000000 --- a/sys-cluster/torque/torque-3.0.6-r1.ebuild +++ /dev/null @@ -1,260 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -AUTOTOOLS_AUTORECONF=yes - -inherit autotools-utils flag-o-matic linux-info - -DESCRIPTION="Resource manager and queuing system based on OpenPBS" -HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/torque" -SRC_URI="http://www.adaptivecomputing.com/index.php?wpfb_dl=190 -> ${P}.tar.gz" - -SLOT="0" -LICENSE="torque-2.5" -KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" -IUSE="cpusets +crypt doc drmaa kernel_linux munge nvidia server static-libs +syslog threads tk" - -# ed is used by makedepend-sh -DEPEND_COMMON=" - sys-libs/ncurses:* - sys-libs/readline:0= - munge? ( sys-auth/munge ) - nvidia? ( >=x11-drivers/nvidia-drivers-275 ) - tk? ( dev-lang/tk:0= ) - syslog? ( virtual/logger ) - !games-util/qstat" - -DEPEND="${DEPEND_COMMON} - sys-apps/ed - !sys-cluster/slurm" - -RDEPEND="${DEPEND_COMMON} - crypt? ( net-misc/openssh ) - !crypt? ( net-misc/netkit-rsh )" - -DOCS=( Release_Notes ) - -PATCHES=( "${FILESDIR}"/${P}-tcl8.6.patch - "${FILESDIR}"/${PN}-3.0.5-cpusets.patch ) - -AUTOTOOLS_IN_SOURCE_BUILD=1 - -pkg_setup() { - PBS_SERVER_HOME="${PBS_SERVER_HOME:-/var/spool/torque}" - - # Find a Torque server to use. Check environment, then - # current setup (if any), and fall back on current hostname. - if [ -z "${PBS_SERVER_NAME}" ]; then - if [ -f "${ROOT}${PBS_SERVER_HOME}/server_name" ]; then - PBS_SERVER_NAME="$(<${ROOT}${PBS_SERVER_HOME}/server_name)" - else - PBS_SERVER_NAME=$(hostname -f) - fi - fi - - USE_CPUSETS="--disable-cpuset" - if use cpusets; then - if ! use kernel_linux; then - einfo - elog " Torque currently only has support for cpusets in linux." - elog "Assuming you didn't really want this USE flag." - einfo - else - linux-info_pkg_setup - einfo - elog " Torque support for cpusets is still in development, you may" - elog "wish to disable it for production use." - einfo - if ! linux_config_exists || ! linux_chkconfig_present CPUSETS; then - einfo - elog " Torque support for cpusets will require that you recompile" - elog "your kernel with CONFIG_CPUSETS enabled." - einfo - fi - USE_CPUSETS="--enable-cpuset" - fi - fi -} - -src_prepare() { - # Unused and causes breakage when switching from glibc to tirpc. - # https://github.com/adaptivecomputing/torque/pull/148 - sed -i '/rpc\/rpc\.h/d' src/lib/Libnet/net_client.c || die - - # as-needed fix, libutils.a needs librt. - sed -i 's,^\(LDADD = .*\)$(MOMLIBS) $(PBS_LIBS),\1$(PBS_LIBS) $(MOMLIBS),' \ - src/resmom/Makefile.am || die - autotools-utils_src_prepare -} - -src_configure() { - local myeconfargs=( --with-rcp=mom_rcp ) - - use crypt && myeconfargs+=( --with-rcp=scp ) - - myeconfargs+=( - $(use_enable tk gui) - $(use_enable tk tcl-qstat) - $(use_enable syslog) - $(use_enable server) - $(use_enable drmaa) - $(use_enable threads high-availability) - $(use_enable munge munge-auth) - $(use_enable nvidia nvidia-gpus) - --with-server-home=${PBS_SERVER_HOME} - --with-environ=/etc/pbs_environment - --with-default-server=${PBS_SERVER_NAME} - --disable-gcc-warnings - --with-tcp-retry-limit=2 - ${USE_CPUSETS} - ) - autotools-utils_src_configure -} - -# WARNING -# OpenPBS is extremely stubborn about directory permissions. Sometimes it will -# just fall over with the error message, but in some spots it will just ignore -# you and fail strangely. Likewise it also barfs on our .keep files! -pbs_createspool() { - local root="$1" - local s="$(dirname "${PBS_SERVER_HOME}")" - local h="${PBS_SERVER_HOME}" - local sp="${h}/server_priv" - einfo "Building spool directory under ${D}${h}" - local a d m - local dir_spec=" - 0755:${h}/aux 0700:${h}/checkpoint - 0755:${h}/mom_logs 0751:${h}/mom_priv 0751:${h}/mom_priv/jobs - 1777:${h}/spool 1777:${h}/undelivered" - - if use server; then - dir_spec="${dir_spec} 0755:${h}/sched_logs - 0755:${h}/sched_priv/accounting 0755:${h}/server_logs - 0750:${h}/server_priv 0755:${h}/server_priv/accounting - 0750:${h}/server_priv/acl_groups 0750:${h}/server_priv/acl_hosts - 0750:${h}/server_priv/acl_svr 0750:${h}/server_priv/acl_users - 0750:${h}/server_priv/jobs 0750:${h}/server_priv/queues" - fi - - for a in ${dir_spec}; do - d="${a/*:}" - m="${a/:*}" - if [[ ! -d "${root}${d}" ]]; then - install -d -m${m} "${root}${d}" || die - else - chmod ${m} "${root}${d}" || die - fi - # (#149226) If we're running in src_*, then keepdir - if [[ "${root}" = "${D}" ]]; then - keepdir ${d} - fi - done -} - -src_install() { - # Make directories first - pbs_createspool "${D}" - - autotools-utils_src_install - - use doc && dodoc doc/admin_guide.ps doc/*.pdf - - # The build script isn't alternative install location friendly, - # So we have to fix some hard-coded paths in tclIndex for xpbs* to work - for file in `find "${D}" -iname tclIndex`; do - sed -e "s/${D//\// }/ /" "${file}" > "${file}.new" - mv "${file}.new" "${file}" || die - done - - if use server; then - newinitd "${FILESDIR}"/pbs_server-init.d-munge pbs_server - newinitd "${FILESDIR}"/pbs_sched-init.d pbs_sched - fi - newinitd "${FILESDIR}"/pbs_mom-init.d-munge pbs_mom - newconfd "${FILESDIR}"/torque-conf.d-munge torque - newenvd "${FILESDIR}"/torque-env.d 25torque -} - -pkg_preinst() { - if [[ -f "${ROOT}etc/pbs_environment" ]]; then - cp "${ROOT}etc/pbs_environment" "${D}"/etc/pbs_environment || die - fi - - echo "${PBS_SERVER_NAME}" > "${D}${PBS_SERVER_HOME}/server_name" || die - - # Fix up the env.d file to use our set server home. - sed -i \ - "s:/var/spool/torque:${PBS_SERVER_HOME}:g" "${D}"/etc/env.d/25torque \ - || die - - if use munge; then - sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${D}"etc/conf.d/torque || die - fi -} - -pkg_postinst() { - pbs_createspool "${ROOT}" - elog " If this is the first time torque has been installed, then you are not" - elog "ready to start the server. Please refer to the documentation located at:" - elog "http://www.clusterresources.com/wiki/doku.php?id=torque:torque_wiki" - echo - elog " For a basic setup, you may use emerge --config ${PN}" - if use server; then - elog " The format for the serverdb is now xml only. If you do not want" - elog "this, reverting to 2.4.x is your only option. The upgrade will" - elog "happen automatically when pbs_server is restarted" - fi - elog " The on-wire protocol version has been bumped from 1 to 2." - elog "Versions of Torque before 3.0.0 are no longer able to communicate." -} - -# root will be setup as the primary operator/manager, the local machine -# will be added as a node and we'll create a simple queue, batch. -pkg_config() { - local h="$(echo "${ROOT}/${PBS_SERVER_HOME}" | sed 's:///*:/:g')" - local rc=0 - - ebegin "Configuring Torque" - einfo "Using ${h} as the pbs homedir" - einfo "Using ${PBS_SERVER_NAME} as the pbs_server" - - # Check for previous configuration and bail if found. - if [ -e "${h}/server_priv/acl_svr/operators" ] \ - || [ -e "${h}/server_priv/nodes" ] \ - || [ -e "${h}/mom_priv/config" ]; then - ewarn "Previous Torque configuration detected. Press Enter to" - ewarn "continue or Control-C to abort now" - read - fi - - # pbs_mom configuration. - echo "\$pbsserver ${PBS_SERVER_NAME}" > "${h}/mom_priv/config" || die - echo "\$logevent 255" >> "${h}/mom_priv/config" || die - - if use server; then - local qmgr="${ROOT}/usr/bin/qmgr -c" - # pbs_server bails on repeated backslashes. - if ! "${ROOT}"/usr/sbin/pbs_server -f -d "${h}" -t create; then - eerror "Failed to start pbs_server" - rc=1 - else - ${qmgr} "set server operators = root@$(hostname -f)" ${PBS_SERVER_NAME} \ - && ${qmgr} "create queue batch" ${PBS_SERVER_NAME} \ - && ${qmgr} "set queue batch queue_type = Execution" ${PBS_SERVER_NAME} \ - && ${qmgr} "set queue batch started = True" ${PBS_SERVER_NAME} \ - && ${qmgr} "set queue batch enabled = True" ${PBS_SERVER_NAME} \ - && ${qmgr} "set server default_queue = batch" ${PBS_SERVER_NAME} \ - && ${qmgr} "set server resources_default.nodes = 1" ${PBS_SERVER_NAME} \ - && ${qmgr} "set server scheduling = True" ${PBS_SERVER_NAME} \ - || die - - "${ROOT}"/usr/bin/qterm -t quick ${PBS_SERVER_NAME} || rc=1 - - # Add the local machine as a node. - echo "$(hostname -f) np=1" > "${h}/server_priv/nodes" || die - fi - fi - eend ${rc} -} |