Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jan 2013 15:50:35 GMT
From:      Jason Bacon <jwbacon@tds.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/175063: maintainer update: sysutils/torque
Message-ID:  <201301061550.r06FoZmo083354@red.freebsd.org>
Resent-Message-ID: <201301061600.r06G00vb019127@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         175063
>Category:       ports
>Synopsis:       maintainer update: sysutils/torque
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 06 16:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Jason Bacon
>Release:        9.0-RELEASE
>Organization:
Acadix Consulting, LLC
>Environment:
FreeBSD sculpin.jbacon.dyndns.org 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Minor version update and bug fixes, bring RC scripts up to standards.
>How-To-Repeat:

>Fix:
Diff attached.

Patch attached with submission follows:

diff -ruN --exclude=CVS /usr/ports/sysutils/torque/Makefile /home/bacon/Prog/Ports/ports/sysutils/torque/Makefile
--- /usr/ports/sysutils/torque/Makefile	2011-07-12 14:49:24.000000000 -0500
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/Makefile	2013-01-06 09:41:48.000000000 -0600
@@ -6,22 +6,25 @@
 #
 
 PORTNAME=	torque
-PORTVERSION=	3.0.2
+PORTVERSION=	3.0.6
 CATEGORIES=	sysutils parallel
-MASTER_SITES=	http://www.clusterresources.com/downloads/torque/
+MASTER_SITES=	http://www.adaptivecomputing.com/resources/downloads/torque/
 
 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.sh pbs_sched.sh pbs_mom.sh
-SUB_FILES=	pkg-message
+USE_RC_SUBR=	pbs_server pbs_sched pbs_mom
+SUB_FILES=	pkg-message torque-config
 USE_PERL5=	yes
 USE_LDCONFIG=	yes
 
+CONFLICTS=	qstat-[0-9]* zh-qterm-[0-9]* torque-2* torque-4*
+
 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 +59,16 @@
 MLINKS=		pbs_sched_cc.8 pbs_sched.8 \
 		pbs_resources_freebsd.7 pbs_resources.7
 
+post-patch:
+	${REINPLACE_CMD} -E 's|ps[ \t]+-ef|ps -ax|g' ${WRKSRC}/torque.setup
+
 post-install:
+	${INSTALL_SCRIPT} ${WRKDIR}/torque-config ${PREFIX}/bin
+.if defined(NOPORTEXAMPLES)
+	${RM} -rf ${EXAMPLESDIR}
+.else
 	${INSTALL_SCRIPT} ${WRKSRC}/torque.setup ${EXAMPLESDIR}
+.endif
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/sysutils/torque/distinfo /home/bacon/Prog/Ports/ports/sysutils/torque/distinfo
--- /usr/ports/sysutils/torque/distinfo	2011-07-12 14:49:24.000000000 -0500
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/distinfo	2012-07-24 21:15:45.000000000 -0500
@@ -1,2 +1,2 @@
-SHA256 (torque-3.0.2.tar.gz) = a82c6a269a78ace25a7b60bfe1204db34855ddc56c1af29ca73f165999cb24a1
-SIZE (torque-3.0.2.tar.gz) = 5864771
+SHA256 (torque-3.0.6.tar.gz) = f76736d780fc0f8ac73c54d586b4d15704e37cf191649b748b07f660186642b3
+SIZE (torque-3.0.6.tar.gz) = 5888678
diff -ruN --exclude=CVS /usr/ports/sysutils/torque/files/patch-configure /home/bacon/Prog/Ports/ports/sysutils/torque/files/patch-configure
--- /usr/ports/sysutils/torque/files/patch-configure	2008-03-26 02:30:07.000000000 -0500
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/files/patch-configure	1969-12-31 18:00:00.000000000 -0600
@@ -1,22 +0,0 @@
---- configure.orig	2008-03-10 17:19:28.000000000 +0100
-+++ configure	2008-03-18 08:11:50.000000000 +0100
-@@ -20765,8 +20765,8 @@
-     else
-       echo "$as_me:$LINENO: result: yes" >&5
- echo "${ECHO_T}yes" >&6
--      echo "$as_me:$LINENO: checking CFLAGS for gcc -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror" >&5
--echo $ECHO_N "checking CFLAGS for gcc -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror... $ECHO_C" >&6
-+      echo "$as_me:$LINENO: checking CFLAGS for gcc -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic" >&5
-+echo $ECHO_N "checking CFLAGS for gcc -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic... $ECHO_C" >&6
- 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 @@
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
- 
-  ac_save_CFLAGS="$CFLAGS"
--for ac_arg in "-pedantic -Werror % -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror"     "-pedantic % -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror %% no, obsolete"     #
-+for ac_arg in "-pedantic % -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic"     "-pedantic % -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic %% no, obsolete"     #
- do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
-    cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
diff -ruN --exclude=CVS /usr/ports/sysutils/torque/files/patch-src-server-req_getcred.c /home/bacon/Prog/Ports/ports/sysutils/torque/files/patch-src-server-req_getcred.c
--- /usr/ports/sysutils/torque/files/patch-src-server-req_getcred.c	1969-12-31 18:00:00.000000000 -0600
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/files/patch-src-server-req_getcred.c	2012-07-15 13:22:34.000000000 -0500
@@ -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 -ruN --exclude=CVS /usr/ports/sysutils/torque/files/pbs_mom.in /home/bacon/Prog/Ports/ports/sysutils/torque/files/pbs_mom.in
--- /usr/ports/sysutils/torque/files/pbs_mom.in	1969-12-31 18:00:00.000000000 -0600
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/files/pbs_mom.in	2012-07-15 11:33:51.000000000 -0500
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# PROVIDE: pbs_mom
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# pbs_mom_enable (bool):   Set to NO by default.
+#               Set it to YES to enable pbs_mom.
+#
+
+. /etc/rc.subr
+
+name="pbs_mom"
+rcvar=${name}_enable
+
+pidfile=/var/spool/torque/mom_priv/mom.lock
+command=%%PREFIX%%/sbin/${name}
+
+load_rc_config $name
+
+: ${pbs_mom_enable="NO"}
+
+command_args=""
+
+run_rc_command "$1"
diff -ruN --exclude=CVS /usr/ports/sysutils/torque/files/pbs_mom.sh.in /home/bacon/Prog/Ports/ports/sysutils/torque/files/pbs_mom.sh.in
--- /usr/ports/sysutils/torque/files/pbs_mom.sh.in	2011-05-14 21:49:15.000000000 -0500
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/files/pbs_mom.sh.in	1969-12-31 18:00:00.000000000 -0600
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD: ports/sysutils/torque/files/pbs_mom.sh.in,v 1.3 2011/05/15 02:49:15 dougb Exp $
-#
-# PROVIDE: pbs_mom
-# REQUIRE: 
-#
-# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
-# to enable this service:
-#
-# pbs_mom_enable (bool):   Set to NO by default.
-#               Set it to YES to enable pbs_mom.
-#
-
-. /etc/rc.subr
-
-name="pbs_mom"
-rcvar=${name}_enable
-
-pidfile=/var/spool/torque/mom_priv/mom.lock
-command=%%PREFIX%%/sbin/${name}
-
-load_rc_config $name
-
-: ${pbs_mom_enable="NO"}
-
-run_rc_command "$1"
diff -ruN --exclude=CVS /usr/ports/sysutils/torque/files/pbs_sched.in /home/bacon/Prog/Ports/ports/sysutils/torque/files/pbs_sched.in
--- /usr/ports/sysutils/torque/files/pbs_sched.in	1969-12-31 18:00:00.000000000 -0600
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/files/pbs_sched.in	2012-07-15 11:33:46.000000000 -0500
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# 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:
+#
+# pbs_sched_enable (bool):   Set to NO by default.
+#               Set it to YES to enable pbs_sched.
+#
+
+. /etc/rc.subr
+
+name="pbs_sched"
+rcvar=${name}_enable
+
+pidfile=/var/spool/torque/sched_priv/sched.lock
+command=%%PREFIX%%/sbin/${name}
+
+load_rc_config $name
+
+: ${pbs_sched_enable="NO"}
+
+command_args=""
+
+run_rc_command "$1"
diff -ruN --exclude=CVS /usr/ports/sysutils/torque/files/pbs_sched.sh.in /home/bacon/Prog/Ports/ports/sysutils/torque/files/pbs_sched.sh.in
--- /usr/ports/sysutils/torque/files/pbs_sched.sh.in	2011-05-14 21:49:15.000000000 -0500
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/files/pbs_sched.sh.in	1969-12-31 18:00:00.000000000 -0600
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD: ports/sysutils/torque/files/pbs_sched.sh.in,v 1.3 2011/05/15 02:49:15 dougb Exp $
-#
-# PROVIDE: pbs_sched
-# REQUIRE: pbs_server
-#
-# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
-# to enable this service:
-#
-# pbs_sched_enable (bool):   Set to NO by default.
-#               Set it to YES to enable pbs_sched.
-#
-
-. /etc/rc.subr
-
-name="pbs_sched"
-rcvar=${name}_enable
-
-pidfile=/var/spool/torque/sched_priv/sched.lock
-command=%%PREFIX%%/sbin/${name}
-
-load_rc_config $name
-
-: ${pbs_sched_enable="NO"}
-
-run_rc_command "$1"
diff -ruN --exclude=CVS /usr/ports/sysutils/torque/files/pbs_server.in /home/bacon/Prog/Ports/ports/sysutils/torque/files/pbs_server.in
--- /usr/ports/sysutils/torque/files/pbs_server.in	1969-12-31 18:00:00.000000000 -0600
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/files/pbs_server.in	2012-07-15 11:33:44.000000000 -0500
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# PROVIDE: pbs_server
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# pbs_server_enable (bool):   Set to NO by default.
+#               Set it to YES to enable pbs_server.
+#
+
+. /etc/rc.subr
+
+name="pbs_server"
+rcvar=${name}_enable
+
+pidfile=/var/spool/torque/server_priv/server.lock
+command=%%PREFIX%%/sbin/${name}
+
+load_rc_config $name
+
+: ${pbs_server_enable="NO"}
+
+command_args=""
+
+run_rc_command "$1"
diff -ruN --exclude=CVS /usr/ports/sysutils/torque/files/pbs_server.sh.in /home/bacon/Prog/Ports/ports/sysutils/torque/files/pbs_server.sh.in
--- /usr/ports/sysutils/torque/files/pbs_server.sh.in	2011-05-14 21:49:15.000000000 -0500
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/files/pbs_server.sh.in	1969-12-31 18:00:00.000000000 -0600
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD: ports/sysutils/torque/files/pbs_server.sh.in,v 1.3 2011/05/15 02:49:15 dougb Exp $
-#
-# PROVIDE: pbs_server
-# REQUIRE: 
-#
-# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
-# to enable this service:
-#
-# pbs_server_enable (bool):   Set to NO by default.
-#               Set it to YES to enable pbs_server.
-#
-
-. /etc/rc.subr
-
-name="pbs_server"
-rcvar=${name}_enable
-
-pidfile=/var/spool/torque/server_priv/server.lock
-command=%%PREFIX%%/sbin/${name}
-
-load_rc_config $name
-
-: ${pbs_server_enable="NO"}
-
-run_rc_command "$1"
diff -ruN --exclude=CVS /usr/ports/sysutils/torque/files/pkg-message.in /home/bacon/Prog/Ports/ports/sysutils/torque/files/pkg-message.in
--- /usr/ports/sysutils/torque/files/pkg-message.in	2011-07-12 14:49:24.000000000 -0500
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/files/pkg-message.in	2012-07-24 10:52:02.000000000 -0500
@@ -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 -ruN --exclude=CVS /usr/ports/sysutils/torque/files/torque-config.in /home/bacon/Prog/Ports/ports/sysutils/torque/files/torque-config.in
--- /usr/ports/sysutils/torque/files/torque-config.in	1969-12-31 18:00:00.000000000 -0600
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/files/torque-config.in	2012-07-24 11:09:22.000000000 -0500
@@ -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 -ruN --exclude=CVS /usr/ports/sysutils/torque/pkg-plist /home/bacon/Prog/Ports/ports/sysutils/torque/pkg-plist
--- /usr/ports/sysutils/torque/pkg-plist	2011-07-12 14:49:24.000000000 -0500
+++ /home/bacon/Prog/Ports/ports/sysutils/torque/pkg-plist	2012-07-24 11:11:14.000000000 -0500
@@ -31,6 +31,7 @@
 bin/qstop
 bin/qsub
 bin/qterm
+bin/torque-config
 bin/tracejob
 include/pbs_error.h
 include/pbs_error_db.h


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301061550.r06FoZmo083354>