summaryrefslogtreecommitdiff
path: root/net/generic-nqs
diff options
context:
space:
mode:
authorChris Piazza <cpiazza@FreeBSD.org>1999-06-28 07:07:31 +0000
committerChris Piazza <cpiazza@FreeBSD.org>1999-06-28 07:07:31 +0000
commitcad6c0c117fe4b1c6ae18dda6a02174a31dc4295 (patch)
treef8a77505ed450af8911e77789464145b2a168e9d /net/generic-nqs
parentMove generic-nqs to the net category. (diff)
Generic-NQS, a freely available Network Queuing System that provides
configurable limits on jobs on a per queue basis as well as for the total queue system. It is based on the de facto NQS standards and is interoperable with commercial NQS products. PR: 6699 Submitted by: Tony Maher <tonym@angis.org.au>
Notes
Notes: svn path=/head/; revision=19862
Diffstat (limited to 'net/generic-nqs')
-rw-r--r--net/generic-nqs/Makefile106
-rw-r--r--net/generic-nqs/distinfo1
-rw-r--r--net/generic-nqs/files/Makefile15
-rw-r--r--net/generic-nqs/files/i386-unknown-freebsd2.2.618
-rw-r--r--net/generic-nqs/files/nqs.sh6
-rw-r--r--net/generic-nqs/files/patch-aa19
-rw-r--r--net/generic-nqs/files/patch-ab21
-rw-r--r--net/generic-nqs/files/patch-ac24
-rw-r--r--net/generic-nqs/pkg-comment1
-rw-r--r--net/generic-nqs/pkg-descr7
-rw-r--r--net/generic-nqs/pkg-plist33
-rw-r--r--net/generic-nqs/scripts/create-example-batch-queues24
-rw-r--r--net/generic-nqs/scripts/create-nqs-rc.sh15
-rw-r--r--net/generic-nqs/scripts/syslog-add.sh10
14 files changed, 300 insertions, 0 deletions
diff --git a/net/generic-nqs/Makefile b/net/generic-nqs/Makefile
new file mode 100644
index 000000000000..5117a197d073
--- /dev/null
+++ b/net/generic-nqs/Makefile
@@ -0,0 +1,106 @@
+# New ports collection makefile for: nqs (Generic NQS)
+# Version required: 3.50.4
+# Date created: 01 May 1998
+# Whom: tonym
+#
+# $Id$
+#
+
+DISTNAME= Generic-NQS-3.50.4
+CATEGORIES= net
+MASTER_SITES= ftp://ftp.shef.ac.uk/pub/uni/projects/nqs/v3.5x/
+
+MAINTAINER= tonym@angis.org.au
+
+IS_INTERACTIVE= yes
+NO_PACKAGE= have to build on site due to the descriptors created in\
+ /var/spool/nqs (default location) and the configuration\
+ procedure
+
+#
+# NQS gets configured, built and installed via its own SETUP script
+#
+# can call with --config, --compile or --install (in that order)
+# and provided the previous steps have been done and it then goes thru
+# everything from the called argument
+#
+# In order to fit in with the FreeBSD ports, modified SETUP so it has
+# 3 new targets --fbconfig, --fbcompile, --fbinstall
+# these differ in that they only do the current stage and *not* everything
+# from there on in
+#
+
+HOSTNAME= `uname -n`
+RELEASE= `uname -r | cut -d'-' -f 1`
+HARDWARE= `uname -m`
+
+HAS_CONFIGURE= yes
+CONFIGURE_SCRIPT= SETUP
+CONFIGURE_ARGS= --fbconfig
+
+#
+# In the files directory we have:
+#
+
+DUMMYMAKE= Makefile
+STARTUP= nqs.sh
+TEMPLATE= i386-unknown-freebsd2.2.6
+
+# We rename TEMPLATE (which is known to work for 2.2.6 up to and including
+# 4.0-CURRENT as of Jan 26) to the release number of this machine.
+# Maybe this is a mistake. NQS will auto generate a file from a similar
+# Platorm description file, but you would have to run make twice
+# in this case.
+#
+
+PLATFORMDIR= ${WRKSRC}/SETUPDir/Platforms
+PLATFORM= ${HARDWARE}-unknown-freebsd${RELEASE}
+
+#
+# NQS configure generates a config file in
+# Build-Tree/${PLATFORM}/${HOSTNAME}/SETUP/General.h
+# We can use this to extract what was actually configured such as
+# where the nqsdaemon resides. We just want the NQS_ROOTDIR
+# out of it for the post-install when we put in system startup file.
+#
+
+CONFIGFILE= ${WRKSRC}/Build-Tree/${PLATFORM}/${HOSTNAME}/SETUP/General.h
+RCDIR= ${PREFIX}/etc/rc.d
+SYSINST= ${SCRIPTDIR}/create-nqs-rc.sh
+SYSLOGFIX= ${SCRIPTDIR}/syslog-add.sh
+CREATEQ= ${SCRIPTDIR}/create-example-batch-queues
+
+MAN1= nqs.1 nqsconfig.1 nqsgs.1 nqsrn.1\
+ qacct.1 qalter.1 qcat.1 qcmplx.1 qdel.1 qdev.1\
+ qhold.1 qjob.1 qlimit.1 qmsg.1 qpr.1\
+ qresume.1 qrls.1 qstat.1 qstatc.1 qsub.1 qsuspend.1
+
+#
+# Thus ends the definitions
+#
+
+#
+# Ok get a working platform description file in there.
+# We need a dummy top level Makefile as NQS will put its Makefile
+# in Build-Tree/${PLATFORM}/${HOSTNAME}
+# Need to have the SETUP scripts executable.
+#
+
+pre-configure:
+ @ ${CP} ${FILESDIR}/${TEMPLATE} ${PLATFORMDIR}/${PLATFORM}; \
+ ${CP} ${FILESDIR}/${DUMMYMAKE} ${WRKSRC}; \
+ chmod 555 ${WRKDIR}/${DISTNAME}/Source-Tree/SETUP/all-systems/*
+
+#
+# Install system boot startup file but need to find out exactly where
+# the nqs stuff was installed as this is set in nqs' own install script
+# Modify syslog.conf to hqndle nqs
+#
+
+post-install:
+ @ ${SH} ${SYSINST} ${CONFIGFILE} ${FILESDIR}/${STARTUP} ${RCDIR}/${STARTUP}; \
+ ${SH} ${SYSLOGFIX} ;\
+ ${ECHO} "You may want run ${CREATEQ} to actually make some queues"; \
+ ${ECHO} ""
+
+.include <bsd.port.mk>
diff --git a/net/generic-nqs/distinfo b/net/generic-nqs/distinfo
new file mode 100644
index 000000000000..412070440053
--- /dev/null
+++ b/net/generic-nqs/distinfo
@@ -0,0 +1 @@
+MD5 (Generic-NQS-3.50.4.tar.gz) = 2c0bd7a28b976674e71530aa79fa47d1
diff --git a/net/generic-nqs/files/Makefile b/net/generic-nqs/files/Makefile
new file mode 100644
index 000000000000..4141ae41d968
--- /dev/null
+++ b/net/generic-nqs/files/Makefile
@@ -0,0 +1,15 @@
+#
+#
+
+HOSTNAME= `uname -n`
+RELEASE= `uname -r | cut -d'-' -f 1`
+HARDWARE= `uname -m`
+PLATFORM= ${HARDWARE}-unknown-freebsd${RELEASE}
+
+all:
+ @ cd Build-Tree/${PLATFORM}/${HOSTNAME}; \
+ $(MAKE)
+
+install:
+ @ cd Build-Tree/${PLATFORM}/${HOSTNAME}; \
+ $(MAKE) install
diff --git a/net/generic-nqs/files/i386-unknown-freebsd2.2.6 b/net/generic-nqs/files/i386-unknown-freebsd2.2.6
new file mode 100644
index 000000000000..508756bfd079
--- /dev/null
+++ b/net/generic-nqs/files/i386-unknown-freebsd2.2.6
@@ -0,0 +1,18 @@
+# -*- sh -*-
+#
+# PLATFORM DESCRIPTION FILE
+
+C_COMPILER "cc"
+C_COMPILER_FLAGS_OPTIMISE "${CFLAGS}"
+C_COMPILER_FLAGS_DEBUG ""
+C_COMPILER_FLAGS_COMMON ""
+C_COMPILER_FLAGS_INCLUDE ""
+
+CONFIG_MACHINE "i386-unknown-freebsd2.2.6"
+PREFERED_API "BSD"
+PLATFORM_FLAGS "-DBSD4_4 -DHAS_BSD_LIMITS -DHAS_BSD_ZOMBIES -DIS_BSD -DIS_BSD4_4 -DHAS_RLIM_T -DHAS_BSD_PIPE"
+
+LINKER "cc -s"
+AR "ar cr"
+RANLIB "ranlib"
+MKDIR "bin/mkdir -p"
diff --git a/net/generic-nqs/files/nqs.sh b/net/generic-nqs/files/nqs.sh
new file mode 100644
index 000000000000..594a56771dbe
--- /dev/null
+++ b/net/generic-nqs/files/nqs.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ -x XXXX/sbin/nqsdaemon ] ; then
+ XXXX/sbin/nqsdaemon > /var/log/nqs.log
+ echo -n ' nqs'
+fi
diff --git a/net/generic-nqs/files/patch-aa b/net/generic-nqs/files/patch-aa
new file mode 100644
index 000000000000..a2ce072c8d24
--- /dev/null
+++ b/net/generic-nqs/files/patch-aa
@@ -0,0 +1,19 @@
+--- Source-Tree/qmgr/all-systems/mgr_main.c.orig Mon Sep 9 08:24:58 1996
++++ Source-Tree/qmgr/all-systems/mgr_main.c Sat May 2 11:09:26 1998
+@@ -502,14 +502,14 @@
+ * On systems with named pipes, we get a pipe to the local
+ * daemon automatically the first time we call inter().
+ */
+-#if IS_POSIX_1 | IS_SYSVr4 | IS_BSD4_4
+-#else
+ #if IS_BSD
+ if (interconn () < 0) {
+ fprintf (stderr, "%s(FATAL): Unable to get ", Nqsmgr_prefix);
+ fprintf (stderr, "a pipe to the local daemon.\n");
+ exit (16);
+ }
++#else
++#if IS_POSIX_1 | IS_SYSVr4 | IS_BSD4_4
+ #else
+ BAD SYSTEM TYPE
+ #endif
diff --git a/net/generic-nqs/files/patch-ab b/net/generic-nqs/files/patch-ab
new file mode 100644
index 000000000000..4b20f2d6afda
--- /dev/null
+++ b/net/generic-nqs/files/patch-ab
@@ -0,0 +1,21 @@
+--- Source-Tree/nqsdaemon/all-systems/nqs_reqser.c.orig Wed Sep 11 05:32:26 1996
++++ Source-Tree/nqsdaemon/all-systems/nqs_reqser.c Sat May 2 11:09:26 1998
+@@ -1746,7 +1746,7 @@
+ char *cp;
+
+ environment_file = fopen("/etc/environment", "r");
+- if ( environment_file != (FILE *) 0 ) {
++ if ( environment_file > (FILE *) 0 ) {
+ while ( (fgets (env_line, sizeof(env_line), environment_file )
+ != (char *) 0) ) {
+ if (env_line[0] == '#') continue;
+@@ -1758,8 +1758,8 @@
+ return (the_path);
+ }
+ }
++ fclose ( environment_file );
+ }
+- fclose ( environment_file );
+ /*
+ * The file was not found, or the path was not in it.
+ */
diff --git a/net/generic-nqs/files/patch-ac b/net/generic-nqs/files/patch-ac
new file mode 100644
index 000000000000..40756fa3bbad
--- /dev/null
+++ b/net/generic-nqs/files/patch-ac
@@ -0,0 +1,24 @@
+--- SETUPDir/Scripts/SETUP.orig Sat May 2 14:46:05 1998
++++ SETUPDir/Scripts/SETUP Sat May 2 14:53:14 1998
+@@ -911,6 +911,21 @@
+ StepFour
+ StepFive
+ ;;
++ --fbconfig)
++ LoadMachineDesc
++ Introduction
++ StepOne
++ StepTwo
++ StepThree
++ ;;
++ --fbcompile)
++ LoadMachineDesc
++ StepFour
++ ;;
++ -fbinstall)
++ LoadMachineDesc
++ StepFive
++ ;;
+ *)
+ LoadMachineDesc
+ Introduction
diff --git a/net/generic-nqs/pkg-comment b/net/generic-nqs/pkg-comment
new file mode 100644
index 000000000000..b1588b7bd016
--- /dev/null
+++ b/net/generic-nqs/pkg-comment
@@ -0,0 +1 @@
+Generic Network Queuing System
diff --git a/net/generic-nqs/pkg-descr b/net/generic-nqs/pkg-descr
new file mode 100644
index 000000000000..af390e9d1127
--- /dev/null
+++ b/net/generic-nqs/pkg-descr
@@ -0,0 +1,7 @@
+NQS (or more properly Generic NQS) is a Network Queuing System available
+for multiple platforms.
+It provides for configurable limits on jobs on a per queue basis
+as well as for the total queue system.
+As it's name suggests it allows jobs to be submitted on one machine and
+transferred to run on another machine. It can be configured so jobs are
+automatically transferred to the least loaded machine in the cluster.
diff --git a/net/generic-nqs/pkg-plist b/net/generic-nqs/pkg-plist
new file mode 100644
index 000000000000..e1dc96660125
--- /dev/null
+++ b/net/generic-nqs/pkg-plist
@@ -0,0 +1,33 @@
+etc/rc.d/nqs.sh
+bin/nmapmgr
+bin/qacct
+bin/qalter
+bin/qcat
+bin/qdel
+bin/qdev
+bin/qhold
+bin/qlimit
+bin/qmgr
+bin/qmsg
+bin/qpr
+bin/qresume
+bin/qrls
+bin/qstat
+bin/qsub
+bin/qsuspend
+sbin/finish_autoinst
+sbin/loaddaemon
+sbin/lpserver
+sbin/netclient
+sbin/netdaemon
+sbin/netserver
+sbin/nqsdaemon
+sbin/nqsmkdirs
+sbin/nqsmktrans
+sbin/pipeclient
+sbin/shlexefai
+lib/nqs/GNQS.VERSION
+lib/nqs/General.conf.def
+lib/nqs/qmgr.hlp
+lib/nqs/nmap/machines
+@unexec rm -rf %D/lib/nqs
diff --git a/net/generic-nqs/scripts/create-example-batch-queues b/net/generic-nqs/scripts/create-example-batch-queues
new file mode 100644
index 000000000000..f4c5ebcf2675
--- /dev/null
+++ b/net/generic-nqs/scripts/create-example-batch-queues
@@ -0,0 +1,24 @@
+#!/bin/sh
+qmgr <<eof
+#
+create pipe misc-sched run_limit= 40 destination= batch
+enable queue misc-sched
+start queue misc-sched
+#
+create batch_queue batch priority = 10 run_limit = 4 user_limit = 2
+set data_limit = (2gb) batch
+set per_process permfile_limit = (2gb) batch
+set STack_limit = ( 8192kb ) batch
+#
+create batch_queue misc priority = 10 run_limit = 4 user_limit = 1
+set data_limit = (2gb) batch
+set per_process permfile_limit = (50mb) misc
+set STack_limit = ( 8192kb ) misc
+#
+set default batch_request queue batch
+SEt SHell_strategy FIxed = (/bin/csh)
+enable queue batch
+enable queue misc
+start queue batch
+start queue misc
+eof
diff --git a/net/generic-nqs/scripts/create-nqs-rc.sh b/net/generic-nqs/scripts/create-nqs-rc.sh
new file mode 100644
index 000000000000..6087fae4b88f
--- /dev/null
+++ b/net/generic-nqs/scripts/create-nqs-rc.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+me=`basename $0`
+
+if [ $# -lt 3 ]; then
+ echo usage: $me configfile nqs.sh rcdir >&2
+ exit 1
+fi
+
+root=`grep NQS_ROOTDIR $1 | cut -f2 -d\"`
+sed -e"s#XXXX#$root#" $2 > $3
+chmod 755 $3
+echo ""
+echo "created $3 startup file"
+echo ""
diff --git a/net/generic-nqs/scripts/syslog-add.sh b/net/generic-nqs/scripts/syslog-add.sh
new file mode 100644
index 000000000000..d3e810b5685c
--- /dev/null
+++ b/net/generic-nqs/scripts/syslog-add.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if grep -q nqs /etc/syslog.conf
+then :
+else
+ echo "local0.* /var/log/nqs" >> /etc/syslog.conf
+ echo ""
+ echo "/etc/syslog modified to support nqs"
+ echo ""
+fi