aboutsummaryrefslogtreecommitdiff
path: root/sysutils/torque
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2013-04-16 18:23:45 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2013-04-16 18:23:45 +0000
commitac8c103656306da7a3f56833cc22191c99564405 (patch)
tree86e0032a27bd15781d177280fa35e889874c761d /sysutils/torque
parentad8c40120e2fab801c2edff1181b3f166efe8b15 (diff)
Notes
Diffstat (limited to 'sysutils/torque')
-rw-r--r--sysutils/torque/Makefile30
-rw-r--r--sysutils/torque/distinfo4
-rw-r--r--sysutils/torque/files/patch-buildutils-pbs_mkdirs.in (renamed from sysutils/torque/files/patch-pbs_mkdirs.in)0
-rw-r--r--sysutils/torque/files/patch-configure21
-rw-r--r--sysutils/torque/files/patch-src-resmom-freebsd5-mom_mach.c11
-rw-r--r--sysutils/torque/files/patch-src-resmom-freebsd5-mom_start.c10
-rw-r--r--sysutils/torque/files/patch-src-scheduler.cc-samples-fifo-Makefile.in (renamed from sysutils/torque/files/patch-fifo-Makefile.in)0
-rw-r--r--sysutils/torque/files/patch-src-server-node_manager.c10
-rw-r--r--sysutils/torque/files/patch-src-server-pbsd_main.c10
-rw-r--r--sysutils/torque/files/patch-src-server-req_getcred.c10
-rw-r--r--sysutils/torque/files/pbs_mom.in8
-rw-r--r--sysutils/torque/files/pbs_sched.in6
-rw-r--r--sysutils/torque/files/pbs_server.in8
-rw-r--r--sysutils/torque/files/pkg-message.in63
-rw-r--r--sysutils/torque/files/torque-config.in63
-rw-r--r--sysutils/torque/pkg-descr2
-rw-r--r--sysutils/torque/pkg-plist1
17 files changed, 134 insertions, 123 deletions
diff --git a/sysutils/torque/Makefile b/sysutils/torque/Makefile
index 514491b07274..100dcb004c2b 100644
--- a/sysutils/torque/Makefile
+++ b/sysutils/torque/Makefile
@@ -1,27 +1,28 @@
-# New ports collection makefile for: torque
-# Date created: 20 Jul 2006
-# Whom: trasz
-#
+# Created by: trasz
# $FreeBSD$
-#
PORTNAME= torque
-PORTVERSION= 3.0.2
+PORTVERSION= 2.5.12
+PORTEPOCH= 1
CATEGORIES= sysutils parallel
-MASTER_SITES= http://www.clusterresources.com/downloads/torque/
+MASTER_SITES= http://www.adaptivecomputing.com/index.php?wpfb_dl=77/ \
+ http://acadix.biz/Ports/distfiles/
MAINTAINER= jwbacon@tds.net
COMMENT= Open source distributed computing resource manager based on PBS
USE_AUTOTOOLS= libtool
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --with-rcp=scp
+CONFIGURE_ARGS= --enable-syslog \
+ --disable-spool
USE_GMAKE= yes
USE_RC_SUBR= pbs_server pbs_sched pbs_mom
-SUB_FILES= pkg-message
+SUB_FILES= pkg-message torque-config
USE_PERL5= yes
USE_LDCONFIG= yes
+CONFLICTS_INSTALL= qstat-[0-9]* zh-qterm-[0-9]*
+
MAN1= qalter.1 qdel.1 qhold.1 qmove.1 qmsg.1 qorder.1 qrerun.1 \
qrls.1 qselect.1 qsig.1 qstat.1 qsub.1 pbs.1 pbsdsh.1 \
nqs2pbs.1 basl2c.1 xpbs.1 xpbsmon.1 qmgr.1 qchkpt.1 \
@@ -56,8 +57,19 @@ MAN8= pbs_mom.8 pbsnodes.8 pbs_sched_basl.8 pbs_sched_cc.8 \
MLINKS= pbs_sched_cc.8 pbs_sched.8 \
pbs_resources_freebsd.7 pbs_resources.7
+.include <bsd.port.options.mk>
+
+post-patch:
+ @${REINPLACE_CMD} -E 's|ps[ \t]+-ef|ps -ax|g' ${WRKSRC}/torque.setup
+ @${REINPLACE_CMD} -E 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/configure
+
post-install:
+ ${INSTALL_SCRIPT} ${WRKDIR}/torque-config ${PREFIX}/bin
+.if ${PORT_OPTIONS:MEXAMPLES}
${INSTALL_SCRIPT} ${WRKSRC}/torque.setup ${EXAMPLESDIR}
+.else
+ ${RM} -rf ${EXAMPLESDIR}
+.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/sysutils/torque/distinfo b/sysutils/torque/distinfo
index 841b8a8ed20d..f43ed26d1c80 100644
--- a/sysutils/torque/distinfo
+++ b/sysutils/torque/distinfo
@@ -1,2 +1,2 @@
-SHA256 (torque-3.0.2.tar.gz) = a82c6a269a78ace25a7b60bfe1204db34855ddc56c1af29ca73f165999cb24a1
-SIZE (torque-3.0.2.tar.gz) = 5864771
+SHA256 (torque-2.5.12.tar.gz) = 436b4d84464e3be0538a4dc0a657b5ae113da6b429d449261e95e13a2a96316b
+SIZE (torque-2.5.12.tar.gz) = 5862988
diff --git a/sysutils/torque/files/patch-pbs_mkdirs.in b/sysutils/torque/files/patch-buildutils-pbs_mkdirs.in
index 732193534b50..732193534b50 100644
--- a/sysutils/torque/files/patch-pbs_mkdirs.in
+++ b/sysutils/torque/files/patch-buildutils-pbs_mkdirs.in
diff --git a/sysutils/torque/files/patch-configure b/sysutils/torque/files/patch-configure
index 1d1e50de5646..324c2c9977c1 100644
--- a/sysutils/torque/files/patch-configure
+++ b/sysutils/torque/files/patch-configure
@@ -1,6 +1,19 @@
---- configure.orig 2008-03-10 17:19:28.000000000 +0100
-+++ configure 2008-03-18 08:11:50.000000000 +0100
-@@ -20765,8 +20765,8 @@
+--- configure.orig 2012-04-13 23:06:17.000000000 +0200
++++ configure 2013-04-12 13:23:42.785303064 +0200
+@@ -19730,10 +19730,10 @@
+
+
+ # This can be used to rebuild libtool when needed
+-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
++LIBTOOL_DEPS=" %%LOCALBASE%%/share/libtool/config/ltmain.sh"
+
+ # Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
++LIBTOOL='$(SHELL) %%LOCALBASE%%/bin/libtool'
+
+ # Prevent multiple expansion
+
+@@ -20294,8 +20294,8 @@
else
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
@@ -11,7 +24,7 @@
if test "${ac_cv_cflags_gcc_option__W__Wall__Wno_unused_parameter__Wno_long_long__pedantic__Werror+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
-@@ -20780,7 +20780,7 @@
+@@ -20309,7 +20309,7 @@
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_save_CFLAGS="$CFLAGS"
diff --git a/sysutils/torque/files/patch-src-resmom-freebsd5-mom_mach.c b/sysutils/torque/files/patch-src-resmom-freebsd5-mom_mach.c
deleted file mode 100644
index d43da3d3f30a..000000000000
--- a/sysutils/torque/files/patch-src-resmom-freebsd5-mom_mach.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/resmom/freebsd5/mom_mach.c.orig 2011-06-24 13:50:59.000000000 -0500
-+++ src/resmom/freebsd5/mom_mach.c 2011-06-24 13:51:19.000000000 -0500
-@@ -166,7 +166,7 @@
- extern int ignmem;
-
- extern int LOGLEVEL;
--extern void checkret(char **, int);
-+// extern void checkret(char **, int);
-
-
- /*
diff --git a/sysutils/torque/files/patch-src-resmom-freebsd5-mom_start.c b/sysutils/torque/files/patch-src-resmom-freebsd5-mom_start.c
deleted file mode 100644
index 419d7a4040ed..000000000000
--- a/sysutils/torque/files/patch-src-resmom-freebsd5-mom_start.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/resmom/freebsd5/mom_start.c.orig 2011-06-24 13:40:31.000000000 -0500
-+++ src/resmom/freebsd5/mom_start.c 2011-06-24 13:41:15.000000000 -0500
-@@ -214,6 +214,7 @@
- task *ptask = 0;
- int statloc;
- unsigned int momport = 0;
-+ extern unsigned int pbs_rm_port;
-
- if (LOGLEVEL >= 7)
- {
diff --git a/sysutils/torque/files/patch-fifo-Makefile.in b/sysutils/torque/files/patch-src-scheduler.cc-samples-fifo-Makefile.in
index 3a196cb805f9..3a196cb805f9 100644
--- a/sysutils/torque/files/patch-fifo-Makefile.in
+++ b/sysutils/torque/files/patch-src-scheduler.cc-samples-fifo-Makefile.in
diff --git a/sysutils/torque/files/patch-src-server-node_manager.c b/sysutils/torque/files/patch-src-server-node_manager.c
deleted file mode 100644
index faac6bdf4c24..000000000000
--- a/sysutils/torque/files/patch-src-server-node_manager.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/server/node_manager.c.orig 2011-06-24 13:21:21.000000000 -0500
-+++ src/server/node_manager.c 2011-06-24 13:21:47.000000000 -0500
-@@ -88,6 +88,7 @@
- #include <fcntl.h>
- #include <netdb.h>
- #include <sys/types.h>
-+#include <sys/socket.h>
- #include <netinet/in.h>
- #include <stdarg.h>
- #include <assert.h>
diff --git a/sysutils/torque/files/patch-src-server-pbsd_main.c b/sysutils/torque/files/patch-src-server-pbsd_main.c
deleted file mode 100644
index f4d9aa898e27..000000000000
--- a/sysutils/torque/files/patch-src-server-pbsd_main.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/server/pbsd_main.c.orig 2011-06-24 13:24:45.000000000 -0500
-+++ src/server/pbsd_main.c 2011-06-24 13:25:15.000000000 -0500
-@@ -94,6 +94,7 @@
- #include <sys/lock.h>
- #endif /* PLOCK_DAEMONS */
- #include <netinet/in.h>
-+#include <sys/socket.h>
- #include "pbs_ifl.h"
- #include <assert.h>
- #include <ctype.h>
diff --git a/sysutils/torque/files/patch-src-server-req_getcred.c b/sysutils/torque/files/patch-src-server-req_getcred.c
new file mode 100644
index 000000000000..f9c9072b5cf1
--- /dev/null
+++ b/sysutils/torque/files/patch-src-server-req_getcred.c
@@ -0,0 +1,10 @@
+--- src/server/req_getcred.c.orig 2012-07-15 11:42:07.000000000 -0500
++++ src/server/req_getcred.c 2012-07-15 11:48:39.000000000 -0500
+@@ -97,6 +97,7 @@
+ #include <ctype.h>
+ #include <netdb.h>
+ #include <signal.h>
++#include <netinet/in.h>
+ #include "libpbs.h"
+ #include "log.h"
+ #include "server_limits.h"
diff --git a/sysutils/torque/files/pbs_mom.in b/sysutils/torque/files/pbs_mom.in
index 07359e11a08e..78e57040a484 100644
--- a/sysutils/torque/files/pbs_mom.in
+++ b/sysutils/torque/files/pbs_mom.in
@@ -3,7 +3,9 @@
# $FreeBSD$
#
# PROVIDE: pbs_mom
-# REQUIRE:
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
@@ -14,7 +16,7 @@
. /etc/rc.subr
-name="pbs_mom"
+name=pbs_mom
rcvar=pbs_mom_enable
pidfile=/var/spool/torque/mom_priv/mom.lock
@@ -22,6 +24,6 @@ command=%%PREFIX%%/sbin/${name}
load_rc_config $name
-: ${pbs_mom_enable="NO"}
+: ${pbs_mom_enable:="NO"}
run_rc_command "$1"
diff --git a/sysutils/torque/files/pbs_sched.in b/sysutils/torque/files/pbs_sched.in
index 86df72fbd322..3748823c6571 100644
--- a/sysutils/torque/files/pbs_sched.in
+++ b/sysutils/torque/files/pbs_sched.in
@@ -4,6 +4,8 @@
#
# PROVIDE: pbs_sched
# REQUIRE: pbs_server
+# BEFORE: LOGIN
+# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
@@ -14,7 +16,7 @@
. /etc/rc.subr
-name="pbs_sched"
+name=pbs_sched
rcvar=pbs_sched_enable
pidfile=/var/spool/torque/sched_priv/sched.lock
@@ -22,6 +24,6 @@ command=%%PREFIX%%/sbin/${name}
load_rc_config $name
-: ${pbs_sched_enable="NO"}
+: ${pbs_sched_enable:="NO"}
run_rc_command "$1"
diff --git a/sysutils/torque/files/pbs_server.in b/sysutils/torque/files/pbs_server.in
index 1a639251689e..cff3a07d30a3 100644
--- a/sysutils/torque/files/pbs_server.in
+++ b/sysutils/torque/files/pbs_server.in
@@ -3,7 +3,9 @@
# $FreeBSD$
#
# PROVIDE: pbs_server
-# REQUIRE:
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
@@ -14,7 +16,7 @@
. /etc/rc.subr
-name="pbs_server"
+name=pbs_server
rcvar=pbs_server_enable
pidfile=/var/spool/torque/server_priv/server.lock
@@ -22,6 +24,6 @@ command=%%PREFIX%%/sbin/${name}
load_rc_config $name
-: ${pbs_server_enable="NO"}
+: ${pbs_server_enable:="NO"}
run_rc_command "$1"
diff --git a/sysutils/torque/files/pkg-message.in b/sysutils/torque/files/pkg-message.in
index abefcbd82985..adf720cc30e1 100644
--- a/sysutils/torque/files/pkg-message.in
+++ b/sysutils/torque/files/pkg-message.in
@@ -1,69 +1,16 @@
******************************************************************************
-You can find an example configuration in
+On the server, run:
- %%PREFIX%%/share/examples/torque/var/spool/torque
-
-On all machines, both server and compute nodes:
-
- 1. Run
-
- cp -Rp %%PREFIX%%/share/examples/torque/var/spool/torque \
- /var/spool
-
- 2. Put the hostname of the server into
-
- /var/spool/torque/server_name
-
-******************************************************************************
-On compute nodes:
-
- 1. Put '$pbsserver ip.address.of.server' into
-
- /var/spool/torque/mom_priv/config
-
- 2. Add the following line to /etc/rc.conf:
-
- pbs_mom_enable="YES"
-
- This may include the server if you allow it to be used
- as a compute node as well.
-
-******************************************************************************
-On the server:
-
- 1. Put hostnames of compute nodes, one per line, into
-
- /var/spool/torque/server_priv/nodes
-
- Additional options can be specified for each entry. Consult
- the torque documentation for details.
-
- 2. Add the following lines to /etc/rc.conf:
-
- pbs_server_enable="YES"
- pbs_sched_enable="YES"
-
- 3. To configure queues, execute
-
- %%PREFIX%%/share/examples/torque/torque.setup <admin>
-
- The recommended <admin> user is root.
+ torque-config head
******************************************************************************
-After installation is complete on the server and compute nodes:
-
- 1. Start node services on all compute nodes with:
-
- %%PREFIX%%/etc/rc.d/pbs_mom restart
-
- 2. Start scheduler services on the server with:
+On compute nodes, run:
- %%PREFIX%%/etc/rc.d/pbs_server restart
- %%PREFIX%%/etc/rc.d/pbs_sched restart
+ torque-config compute
******************************************************************************
For further information, see
- http://www.clusterresources.com/torquedocs21/
+ http://www.adaptivecomputing.com/products/open-source/torque/
******************************************************************************
diff --git a/sysutils/torque/files/torque-config.in b/sysutils/torque/files/torque-config.in
new file mode 100644
index 000000000000..40efbc7a5051
--- /dev/null
+++ b/sysutils/torque/files/torque-config.in
@@ -0,0 +1,63 @@
+#!/bin/sh -e
+
+usage()
+{
+ printf "Usage: $0 head|compute\n"
+ exit 1
+}
+
+if [ $# != 1 ]; then
+ usage
+fi
+node_type=$1
+
+if [ $node_type != 'head' ] && [ $node_type != 'compute' ]; then
+ usage
+fi
+
+spool_root=/var/spool
+
+if [ -e $spool_root/torque ]; then
+ printf "$spool_root/torque already exists. Aborting...\n"
+ exit 1
+fi
+
+cp -Rp %%PREFIX%%/share/examples/torque/var/spool/torque $spool_root
+for dir in checkpoint spool undelivered; do
+ chmod 1777 $spool_root/torque/$dir
+done
+
+cat << EOM
+===========================================================================
+Enter the hostname of the torque server. This should be resolved by
+/etc/hosts on all nodes. A short hostname is preferred.
+===========================================================================
+EOM
+read server_hostname
+echo $server_hostname > $spool_root/torque/server_name
+
+case $node_type in
+'head')
+ vi $spool_root/torque/server_priv/nodes
+ if ! fgrep -q 'pbs_server_enable="YES"' /etc/rc.conf; then
+ printf 'pbs_server_enable="YES"\n' >> /etc/rc.conf
+ fi
+ if ! fgrep -q 'pbs_sched_enable="YES"' /etc/rc.conf; then
+ printf 'pbs_sched_enable="YES"\n' >> /etc/rc.conf
+ fi
+ %%PREFIX%%/share/examples/torque/torque.setup root
+ %%PREFIX%%/etc/rc.d/pbs_server restart
+ %%PREFIX%%/etc/rc.d/pbs_sched restart
+ ;;
+'compute')
+ printf "Torque server IP address? "
+ read server_ip
+ printf '$pbsserver %s /var/spool/torque/mom_priv/config' $server_ip \
+ > $spool_root/torque/mom_priv/config
+ if ! fgrep -q 'pbs_mom_enable="YES"' /etc/rc.conf; then
+ printf 'pbs_mom_enable="YES"\n' >> /etc/rc.conf
+ fi
+ %%PREFIX%%/etc/rc.d/pbs_mom restart
+ ;;
+esac
+
diff --git a/sysutils/torque/pkg-descr b/sysutils/torque/pkg-descr
index 57d945433616..b11968c86bae 100644
--- a/sysutils/torque/pkg-descr
+++ b/sysutils/torque/pkg-descr
@@ -6,4 +6,4 @@ fault tolerance, and feature extensions contributed by NCSA, OSC,
USC , the U.S. Dept of Energy, Sandia, PNNL, U of Buffalo, TeraGrid,
and many other leading edge HPC organizations.
-WWW: http://www.clusterresources.com/pages/products/torque-resource-manager.php
+WWW: http://www.adaptivecomputing.com/products/open-source/torque/
diff --git a/sysutils/torque/pkg-plist b/sysutils/torque/pkg-plist
index ecb5680c5912..b6246b826441 100644
--- a/sysutils/torque/pkg-plist
+++ b/sysutils/torque/pkg-plist
@@ -31,6 +31,7 @@ bin/qstat
bin/qstop
bin/qsub
bin/qterm
+bin/torque-config
bin/tracejob
include/pbs_error.h
include/pbs_error_db.h