Bug 175063 - maintainer update: sysutils/torque
Summary: maintainer update: sysutils/torque
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Guido Falsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-06 16:00 UTC by Jason W. Bacon
Modified: 2013-04-16 19:30 UTC (History)
0 users

See Also:


Attachments
file.diff (14.77 KB, patch)
2013-01-06 16:00 UTC, Jason W. Bacon
no flags Details | Diff
torque.diff (11.57 KB, patch)
2013-03-26 11:29 UTC, Guido Falsi
no flags Details | Diff
torque-diff.txt (19.55 KB, text/plain)
2013-03-26 15:37 UTC, Jason W. Bacon
no flags Details
torque.diff (17.68 KB, patch)
2013-03-26 22:24 UTC, Guido Falsi
no flags Details | Diff
torque.diff (21.89 KB, patch)
2013-04-12 13:29 UTC, Guido Falsi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason W. Bacon freebsd_committer freebsd_triage 2013-01-06 16:00:00 UTC
Minor version update and bug fixes, bring RC scripts up to standards.

Fix: Diff attached.

Patch attached with submission follows:
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2013-03-22 17:13:26 UTC
Responsible Changed
From-To: freebsd-ports-bugs->madpilot

I'll take it.
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2013-03-26 11:29:10 UTC
Hi,

I have made a few changes to your patch. Part of the fix for the rc 
script had already been committed.

I have a question regarding the CONFLICTS: why do you conflict with non 
existent torque 2.x and 4.x port?

Also, since the conflict seems to be caused by common installed file, I 
changed it to just CONFLICTS_INSTALL.

Anyway the problem is that I have been unable to make the port download 
the distfile. Can you investigate a possible solution?

I'm attaching a patch with the modifications I made. This is not final 
since I've still been unable to test the port.

We will also need to ask approval to qterm and qstat maintainers to add 
CONFLICTS lines to their port too.

Thanks.

-- 
Guido Falsi <madpilot@FreeBSD.org>
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2013-03-26 11:31:08 UTC
State Changed
From-To: open->feedback

Ask for maintainer fix.
Comment 4 Jason W. Bacon freebsd_committer freebsd_triage 2013-03-26 15:37:18 UTC
On 03/26/13 06:29, Guido Falsi wrote:
> Hi,
>
> I have made a few changes to your patch. Part of the fix for the rc 
> script had already been committed.
>
> I have a question regarding the CONFLICTS: why do you conflict with 
> non existent torque 2.x and 4.x port?
They do exist, but haven't been committed yet.  My plan was to get 
torque 3 committed, and use the feedback to clean up the other torque 
ports before submitting them.  Less work for the committers that way.

However, support for Torque 3.x is being discontinued.  Torque 2 is 
still the supported, stable branch, and I haven't tested Torque 4, so 
I'm attaching a new diff reverting sysutils/torque to v2.5.12.
>
> Also, since the conflict seems to be caused by common installed file, 
> I changed it to just CONFLICTS_INSTALL.
Great, thanks.
>
> Anyway the problem is that I have been unable to make the port 
> download the distfile. Can you investigate a possible solution?
Their new download system is really funky.  I couldn't get anything but 
a browser to deal with their redirects, but the direct link + '/' + 
distfile works.  I don't trust the link to be stable, but the source is 
redistributable, so I cached a copy on my consulting website and added 
it to MASTER_SITES as a fallback.

Thanks,

     -J

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jason W. Bacon
jwbacon@tds.net
http://personalpages.tds.net/~jwbacon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Comment 5 Guido Falsi freebsd_committer freebsd_triage 2013-03-26 22:24:33 UTC
Hi again.

Thanks for the fast feedback and also for providing an additional mirror.

I'm also CCing the maintainers of the games/qstat port and the 
chinese/qterm ports to get their approval to add CONFLICT_INSTALL lines 
in their ports as per attached patch.

the patch includes the following changes:

- Downgrade to 2.5.12 (recommended stable branch, 3.x is not
   supported anymore)
- Bump PORTEPOCH
- Add conflicts
- Convert NOPORTEXAMPLES to EXAMPLES option
- Update startup scripts
- Trim Makefile headers

(I did not notice a pair of things I did not fix in the previous patch)

First, since the version number will be going backward PORTEPOCH needs 
to be bumped to let port tools understand the port needs to be upgraded.

For the startup scripts, I have modified them a little. I removed 
unneeded quotes around the name. Also it is usually preferred to not use 
variables in defining rcvar, due to speed penalty.

I do not understand why you added the 'command_args=""' line. That 
variable should be anyway empty by default. I removed that line, but 
maybe I'm missing something.

I also put back the := in the defaults definitions as this is the 
standard and recommended way to assign default values in sh(1).

Finally a $FreeBSD$ line is expected to be present in rc scripts. I put 
that one back in.

You can use devel/rclint to check rc scripts for correctness.

Please see if you can approve the attached patch.

Thanks in advance, bye.

-- 
Guido Falsi <madpilot@FreeBSD.org>
Comment 6 kaiwang27 2013-03-27 01:51:55 UTC
Hi,

I approve the changes to the chinese/qterm port. Thanks!

/Kai
Comment 7 Jason W. Bacon freebsd_committer freebsd_triage 2013-03-27 16:28:53 UTC
Patch approved, thanks for your work on this!

On 03/26/13 17:24, Guido Falsi wrote:
> Hi again.
>
> Thanks for the fast feedback and also for providing an additional mirror.
>
> I'm also CCing the maintainers of the games/qstat port and the 
> chinese/qterm ports to get their approval to add CONFLICT_INSTALL 
> lines in their ports as per attached patch.
>
> the patch includes the following changes:
>
> - Downgrade to 2.5.12 (recommended stable branch, 3.x is not
>   supported anymore)
> - Bump PORTEPOCH
> - Add conflicts
> - Convert NOPORTEXAMPLES to EXAMPLES option
> - Update startup scripts
> - Trim Makefile headers
>
> (I did not notice a pair of things I did not fix in the previous patch)
>
> First, since the version number will be going backward PORTEPOCH needs 
> to be bumped to let port tools understand the port needs to be upgraded.
>
> For the startup scripts, I have modified them a little. I removed 
> unneeded quotes around the name. Also it is usually preferred to not 
> use variables in defining rcvar, due to speed penalty.
>
> I do not understand why you added the 'command_args=""' line. That 
> variable should be anyway empty by default. I removed that line, but 
> maybe I'm missing something.
>
> I also put back the := in the defaults definitions as this is the 
> standard and recommended way to assign default values in sh(1).
>
> Finally a $FreeBSD$ line is expected to be present in rc scripts. I 
> put that one back in.
>
> You can use devel/rclint to check rc scripts for correctness.
>
> Please see if you can approve the attached patch.
>
> Thanks in advance, bye.
>


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jason W. Bacon
jwbacon@tds.net
http://personalpages.tds.net/~jwbacon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 8 Guido Falsi freebsd_committer freebsd_triage 2013-04-12 13:29:23 UTC
Hi,

Sorry to annoy you again.

I found a small glitch in you submission while performing a few further 
checks.

You hardcoded /usr/local path in configure script, this is 
incorrect(system could have been installed on another LOCALBASE). I 
fixed it. Please approve the attached patch. differences are in 
post-configure target and patchfile to configure.

Thanks!

-- 
Guido Falsi <madpilot@FreeBSD.org>
Comment 9 Jason W. Bacon freebsd_committer freebsd_triage 2013-04-12 15:44:40 UTC
Approved, thanks.

On 04/12/13 07:29, Guido Falsi wrote:
> Hi,
>
> Sorry to annoy you again.
>
> I found a small glitch in you submission while performing a few 
> further checks.
>
> You hardcoded /usr/local path in configure script, this is 
> incorrect(system could have been installed on another LOCALBASE). I 
> fixed it. Please approve the attached patch. differences are in 
> post-configure target and patchfile to configure.
>
> Thanks!
>


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jason W. Bacon
jwbacon@tds.net
http://personalpages.tds.net/~jwbacon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 10 Guido Falsi freebsd_committer freebsd_triage 2013-04-12 21:37:29 UTC
State Changed
From-To: feedback->open

Maintainer has approved.
Comment 11 Guido Falsi freebsd_committer freebsd_triage 2013-04-16 19:24:00 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 12 dfilter service freebsd_committer freebsd_triage 2013-04-16 19:24:02 UTC
Author: madpilot
Date: Tue Apr 16 18:23:45 2013
New Revision: 315876
URL: http://svnweb.freebsd.org/changeset/ports/315876

Log:
  - "Update" to 2.5.12. This is the supported stable branch upstream
  - Bump PORTEPOCH
  - Trim Makefile header
  - Add CONFLICTS_INSTALL [1]
  - Make rc scripts more rclint compliant
  - Update WWW line in pkg-descr
  
  PR:		ports/175063
  Submitted by:	Jason Bacon <jwbacon@tds.net> (maintainer)
  Approved by:	danfe (maintainer of games/qstat, via email) [1]
  Approved by:	Kai Wang <kaiwang27@gmail.com> (maintainer of chinese/qterm) [1]
  Feature safe:	yes

Added:
  head/sysutils/torque/files/patch-buildutils-pbs_mkdirs.in   (contents, props changed)
  head/sysutils/torque/files/patch-src-scheduler.cc-samples-fifo-Makefile.in   (contents, props changed)
  head/sysutils/torque/files/patch-src-server-req_getcred.c   (contents, props changed)
  head/sysutils/torque/files/torque-config.in   (contents, props changed)
Deleted:
  head/sysutils/torque/files/patch-fifo-Makefile.in
  head/sysutils/torque/files/patch-pbs_mkdirs.in
  head/sysutils/torque/files/patch-src-resmom-freebsd5-mom_mach.c
  head/sysutils/torque/files/patch-src-resmom-freebsd5-mom_start.c
  head/sysutils/torque/files/patch-src-server-node_manager.c
  head/sysutils/torque/files/patch-src-server-pbsd_main.c
Modified:
  head/chinese/qterm/Makefile
  head/games/qstat/Makefile   (contents, props changed)
  head/sysutils/torque/Makefile   (contents, props changed)
  head/sysutils/torque/distinfo   (contents, props changed)
  head/sysutils/torque/files/patch-configure   (contents, props changed)
  head/sysutils/torque/files/pbs_mom.in   (contents, props changed)
  head/sysutils/torque/files/pbs_sched.in   (contents, props changed)
  head/sysutils/torque/files/pbs_server.in   (contents, props changed)
  head/sysutils/torque/files/pkg-message.in   (contents, props changed)
  head/sysutils/torque/pkg-descr   (contents, props changed)
  head/sysutils/torque/pkg-plist   (contents, props changed)

Modified: head/chinese/qterm/Makefile
==============================================================================
--- head/chinese/qterm/Makefile	Tue Apr 16 18:12:45 2013	(r315875)
+++ head/chinese/qterm/Makefile	Tue Apr 16 18:23:45 2013	(r315876)
@@ -19,6 +19,8 @@ USE_XORG=	x11 ice
 MAKE_JOBS_SAFE=	yes
 INSTALLS_ICONS=	yes
 
+CONFLICTS_INSTALL=	torque-[0-9]*
+
 OPTIONS_DEFINE=	DBUS OPENSSL PHONON QTSCRIPT KDE
 OPTIONS_DEFAULT=	DBUS OPENSSL PHONON QTSCRIPT
 

Modified: head/games/qstat/Makefile
==============================================================================
--- head/games/qstat/Makefile	Tue Apr 16 18:12:45 2013	(r315875)
+++ head/games/qstat/Makefile	Tue Apr 16 18:23:45 2013	(r315876)
@@ -11,6 +11,8 @@ COMMENT=	Command-line program to query g
 
 GNU_CONFIGURE=	yes
 
+CONFLICTS_INSTALL=	torque-[0-9]*
+
 OPTIONS_DEFINE=	DOCS
 
 .include <bsd.port.options.mk>

Modified: head/sysutils/torque/Makefile
==============================================================================
--- head/sysutils/torque/Makefile	Tue Apr 16 18:12:45 2013	(r315875)
+++ head/sysutils/torque/Makefile	Tue Apr 16 18:23:45 2013	(r315876)
@@ -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_ba
 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>

Modified: head/sysutils/torque/distinfo
==============================================================================
--- head/sysutils/torque/distinfo	Tue Apr 16 18:12:45 2013	(r315875)
+++ head/sysutils/torque/distinfo	Tue Apr 16 18:23:45 2013	(r315876)
@@ -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

Added: head/sysutils/torque/files/patch-buildutils-pbs_mkdirs.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/torque/files/patch-buildutils-pbs_mkdirs.in	Tue Apr 16 18:23:45 2013	(r315876)
@@ -0,0 +1,19 @@
+--- buildutils/dpbs_mkdirs.in.orig	Tue Jun 20 02:22:46 2006
++++ buildutils/pbs_mkdirs.in	Thu Sep 14 15:06:48 2006
+@@ -105,6 +105,7 @@
+ #
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
++DESTDIR=@prefix@
+ CHK_TREE=${DESTDIR}@bindir@/chk_tree
+ 
+ PBS_DEFAULT_SERVER=@PBS_DEFAULT_SERVER@
+@@ -112,7 +113,7 @@
+ # PBS_SERVER_HOME is defined without DESTDIR so that DEFAULT_FILE and EVIRON
+ # can be based on SERVER_HOME.  SERVER_HOME is defined a second time to pick
+ # up DESTDIR
+-test -n "$PBS_SERVER_HOME" || PBS_SERVER_HOME=@PBS_SERVER_HOME@
++test -n "$PBS_SERVER_HOME" || PBS_SERVER_HOME=/share/examples/torque/var/spool/torque/
+ test -n "$PBS_DEFAULT_FILE" || PBS_DEFAULT_FILE=${DESTDIR}@PBS_DEFAULT_FILE@
+ test -n "$PBS_ENVIRON" || PBS_ENVIRON=${DESTDIR}@PBS_ENVIRON@
+ 

Modified: head/sysutils/torque/files/patch-configure
==============================================================================
--- head/sysutils/torque/files/patch-configure	Tue Apr 16 18:12:45 2013	(r315875)
+++ head/sysutils/torque/files/patch-configure	Tue Apr 16 18:23:45 2013	(r315876)
@@ -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"

Added: head/sysutils/torque/files/patch-src-scheduler.cc-samples-fifo-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/torque/files/patch-src-scheduler.cc-samples-fifo-Makefile.in	Tue Apr 16 18:23:45 2013	(r315876)
@@ -0,0 +1,11 @@
+--- src.orig/scheduler.cc/samples/fifo/Makefile.in	Wed Jul 19 22:47:42 2006
++++ src/scheduler.cc/samples/fifo/Makefile.in	Wed Jul 19 22:59:44 2006
+@@ -132,7 +132,7 @@
+ XPBSMON_DIR = $(libdir)/xpbsmon
+ 
+ # Support files used by the scheduler
+-schedprivdir = $(PBS_SERVER_HOME)/sched_priv
++schedprivdir = ${prefix}/share/examples/torque/var/spool/torque/sched_priv
+ schedpriv_DATA = sched_config resource_group holidays dedicated_time
+ 
+ EXTRA_DIST = $(schedpriv_DATA)

Added: head/sysutils/torque/files/patch-src-server-req_getcred.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/torque/files/patch-src-server-req_getcred.c	Tue Apr 16 18:23:45 2013	(r315876)
@@ -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"

Modified: head/sysutils/torque/files/pbs_mom.in
==============================================================================
--- head/sysutils/torque/files/pbs_mom.in	Tue Apr 16 18:12:45 2013	(r315875)
+++ head/sysutils/torque/files/pbs_mom.in	Tue Apr 16 18:23:45 2013	(r315876)
@@ -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"

Modified: head/sysutils/torque/files/pbs_sched.in
==============================================================================
--- head/sysutils/torque/files/pbs_sched.in	Tue Apr 16 18:12:45 2013	(r315875)
+++ head/sysutils/torque/files/pbs_sched.in	Tue Apr 16 18:23:45 2013	(r315876)
@@ -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"

Modified: head/sysutils/torque/files/pbs_server.in
==============================================================================
--- head/sysutils/torque/files/pbs_server.in	Tue Apr 16 18:12:45 2013	(r315875)
+++ head/sysutils/torque/files/pbs_server.in	Tue Apr 16 18:23:45 2013	(r315876)
@@ -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"

Modified: head/sysutils/torque/files/pkg-message.in
==============================================================================
--- head/sysutils/torque/files/pkg-message.in	Tue Apr 16 18:12:45 2013	(r315875)
+++ head/sysutils/torque/files/pkg-message.in	Tue Apr 16 18:23:45 2013	(r315876)
@@ -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/
 
 ******************************************************************************

Added: head/sysutils/torque/files/torque-config.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/torque/files/torque-config.in	Tue Apr 16 18:23:45 2013	(r315876)
@@ -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
+

Modified: head/sysutils/torque/pkg-descr
==============================================================================
--- head/sysutils/torque/pkg-descr	Tue Apr 16 18:12:45 2013	(r315875)
+++ head/sysutils/torque/pkg-descr	Tue Apr 16 18:23:45 2013	(r315876)
@@ -6,4 +6,4 @@ fault tolerance, and feature extensions 
 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/

Modified: head/sysutils/torque/pkg-plist
==============================================================================
--- head/sysutils/torque/pkg-plist	Tue Apr 16 18:12:45 2013	(r315875)
+++ head/sysutils/torque/pkg-plist	Tue Apr 16 18:23:45 2013	(r315876)
@@ -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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"