Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 May 1998 14:24:31 +1000 (EST)
From:      tonym@angis.org.au
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   ports/6699: Generic NQS port (new)
Message-ID:  <199805200424.OAA27558@whale.angis.org.au>

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

>Number:         6699
>Category:       ports
>Synopsis:       Generic NQS port (new)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 19 21:30:00 PDT 1998
>Last-Modified:
>Originator:     Tony Maher
>Organization:
University of Sydney
>Release:        FreeBSD 2.2.6-STABLE i386
>Environment:

	

>Description:

A port of the Generic NQS system.
see http://www.shef.ac.uk/uni/projects/nqs/

There is no problem in adding the distfile to CD ROM distributions.
see http://www.mailbase.ac.uk/lists/nqs-support/1998-05/0001.html

>How-To-Repeat:

>Fix:
	
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	Generic-NQS
#	Generic-NQS/Makefile
#	Generic-NQS/pkg
#	Generic-NQS/pkg/PLIST
#	Generic-NQS/pkg/DESCR
#	Generic-NQS/pkg/COMMENT
#	Generic-NQS/files
#	Generic-NQS/files/i386-unknown-freebsd2.2.6
#	Generic-NQS/files/md5
#	Generic-NQS/files/nqs.sh
#	Generic-NQS/files/Makefile
#	Generic-NQS/patches
#	Generic-NQS/patches/patch-aa
#	Generic-NQS/patches/patch-ab
#	Generic-NQS/patches/patch-ac
#	Generic-NQS/scripts
#	Generic-NQS/scripts/syslog-add.sh
#	Generic-NQS/scripts/create-nqs-rc.sh
#	Generic-NQS/scripts/create-example-batch-queues
#
echo c - Generic-NQS
mkdir -p Generic-NQS > /dev/null 2>&1
echo x - Generic-NQS/Makefile
sed 's/^X//' >Generic-NQS/Makefile << 'END-of-Generic-NQS/Makefile'
X# New ports collection makefile for:	nqs (Generic NQS)
X# Version required:     3.50.4
X# Date created:         01 May 1998
X# Whom:                 tonym
X#
X# $Id$
X#
X
XDISTNAME=       Generic-NQS-3.50.4
XCATEGORIES=	misc
XMASTER_SITES=   ftp://ftp.shef.ac.uk/pub/uni/projects/nqs/v3.5x/
X
XMAINTAINER=	tonym@angis.org.au
X
XIS_INTERACTIVE=	yes
XNO_PACKAGE=	have to build on site due to the descriptors created in\
X		/var/spool/nqs (default location) and the configuration\
X		procedure
X
X#
X# NQS gets configured, built and installed via its own SETUP script
X#
X# can call with --config, --compile or --install (in that order)
X# and provided the previous steps have been done and it then goes thru
X# everything from the called argument
X#
X# In order to fit in with the FreeBSD ports, modified SETUP so it has
X# 3 new targets --fbconfig, --fbcompile, --fbinstall
X# these differ in that they only do the current stage and *not* everything
X# from there on in
X#
X
XHOSTNAME=		`uname -n`
XRELEASE=		`uname -r | cut -d'-' -f 1`
XHARDWARE=		`uname -m`
X
XHAS_CONFIGURE=          yes
XCONFIGURE_SCRIPT=       SETUP
XCONFIGURE_ARGS=		--fbconfig
X
X#
X# In the files directory we have:
X#
X
XDUMMYMAKE=	Makefile
XSTARTUP=	nqs.sh
XTEMPLATE=	i386-unknown-freebsd2.2.6
X
X#
X# We rename TEMPLATE (which is known to work for 2.2.6) to the release number
X#	of this machine. It should should work for minor releases.
X#	I dont know about 3.0 stuff.
X# Maybe this is a mistake. NQS will auto generate a file from a similar
X#	Platorm description file, but you would have to run make twice
X#	in this case.
X#
X
XPLATFORMDIR=	${WRKSRC}/SETUPDir/Platforms
XPLATFORM=	${HARDWARE}-unknown-freebsd${RELEASE}
X
X#
X# NQS configure generates a config file in
X#	Build-Tree/${PLATFORM}/${HOSTNAME}/SETUP/General.h
X# We can use this to extract what was actually configured such as
X#	where the nqsdaemon resides. We just want the NQS_ROOTDIR
X#	out of it for the post-install when we put in system startup file.
X#
X
XCONFIGFILE=	${WRKSRC}/Build-Tree/${PLATFORM}/${HOSTNAME}/SETUP/General.h
XRCDIR=		${PREFIX}/etc/rc.d
XSYSINST=	${SCRIPTDIR}/create-nqs-rc.sh
XSYSLOGFIX=	${SCRIPTDIR}/syslog-add.sh
XCREATEQ=	${SCRIPTDIR}/create-example-batch-queues
X
XMAN1=	nmapmgr.1m nqs.1 nqsconfig.1 nqsgs.1 nqsrn.1\
X	qacct.1 qalter.1 qcat.1 qcmplx.1 qdel.1 qdev.1\
X	qhold.1 qjob.1 qlimit.1 qmgr.1m qmsg.1 qpr.1\
X	qresume.1 qrls.1 qstat.1 qstatc.1 qsub.1
X#
X# Thus ends the definitions
X#
X
X#
X# Ok get a working platform description file in there.
X# We need a dummy top level Makefile as NQS will put its Makefile
X# in Build-Tree/${PLATFORM}/${HOSTNAME}
X# Need to have the SETUP scripts executable.
X#
X
Xpre-configure:
X	@ ${CP} ${FILESDIR}/${TEMPLATE} ${PLATFORMDIR}/${PLATFORM}; \
X	${CP}   ${FILESDIR}/${DUMMYMAKE} ${WRKSRC}; \
X	chmod 555 ${WRKDIR}/${DISTNAME}/Source-Tree/SETUP/all-systems/*
X
X#
X# Install system boot startup file but need to find out exactly where
X#	the nqs stuff was installed as this is set in nqs' own install script
X# Modify syslog.conf to hqndle nqs
X#
X
Xpost-install:
X	@ ${SYSINST} ${CONFIGFILE} ${FILESDIR}/${STARTUP} ${RCDIR}/${STARTUP}; \
X	${SYSLOGFIX} ;\
X	${ECHO} "You may want run ${CREATEQ} to actually make some queues"; \
X	${ECHO} ""
X
X.include <bsd.port.mk>
END-of-Generic-NQS/Makefile
echo c - Generic-NQS/pkg
mkdir -p Generic-NQS/pkg > /dev/null 2>&1
echo x - Generic-NQS/pkg/PLIST
sed 's/^X//' >Generic-NQS/pkg/PLIST << 'END-of-Generic-NQS/pkg/PLIST'
Xetc/rc.d/nqs.sh
Xbin/nmapmgr
Xbin/qacct
Xbin/qalter
Xbin/qcat
Xbin/qdel
Xbin/qdev
Xbin/qhold
Xbin/qlimit
Xbin/qmgr
Xbin/qmsg
Xbin/qpr
Xbin/qresume
Xbin/qrls
Xbin/qstat
Xbin/qsub
Xbin/qsuspend
Xsbin/finish_autoinst
Xsbin/loaddaemon
Xsbin/lpserver
Xsbin/netclient
Xsbin/netdaemon
Xsbin/netserver
Xsbin/nqsdaemon
Xsbin/nqsmkdirs
Xsbin/nqsmktrans
Xsbin/pipeclient
Xsbin/shlexefai
Xsbin/OLDloaddaemon
Xsbin/OLDnetdaemon
Xsbin/OLDnetserver
Xsbin/OLDnqsdaemon
Xsbin/OLDnqsmkdirs
Xsbin/OLDnqsmktrans
Xman/man1/list_nqs_queues.man
Xman/man1/nmapmgr.1m.gz
Xman/man1/nqs.1.gz
Xman/man1/nqsconfig.1.gz
Xman/man1/nqsgs.1.gz
Xman/man1/nqsrn.1.gz
Xman/man1/qacct.1.gz
Xman/man1/qalter.1.gz
Xman/man1/qcat.1.gz
Xman/man1/qcat.man
Xman/man1/qcmplx.1.gz
Xman/man1/qdel.1.gz
Xman/man1/qdev.1.gz
Xman/man1/qhold.1.gz
Xman/man1/qjob.1.gz
Xman/man1/qlimit.1.gz
Xman/man1/qmgr.1m.gz
Xman/man1/qmsg.1.gz
Xman/man1/qpr.1.gz
Xman/man1/qresume.1.gz
Xman/man1/qrls.1.gz
Xman/man1/qstat.1.gz
Xman/man1/qstatc.1.gz
Xman/man1/qsub.1.gz
Xlib/nqs/GNQS.VERSION
Xlib/nqs/General.conf.def
Xlib/nqs/qmgr.hlp
Xlib/nqs/nmap/machines
X@unexec rm -rf %D/lib/nqs
END-of-Generic-NQS/pkg/PLIST
echo x - Generic-NQS/pkg/DESCR
sed 's/^X//' >Generic-NQS/pkg/DESCR << 'END-of-Generic-NQS/pkg/DESCR'
XNQS (or more properly Generic NQS) is a Network Queuing System available
Xfor multiple platforms.
XIt provides for configurable limits on jobs on a per queue basis as well
Xas well as for the total queue system.
XAs its name suggests it allows jobs to be submitted on one machine and
Xtransferred to run on another machine. It can be configured so jobs are
Xautomatically transferred to the least loaded machine in the cluster.
END-of-Generic-NQS/pkg/DESCR
echo x - Generic-NQS/pkg/COMMENT
sed 's/^X//' >Generic-NQS/pkg/COMMENT << 'END-of-Generic-NQS/pkg/COMMENT'
XGeneric Network Queuing System
END-of-Generic-NQS/pkg/COMMENT
echo c - Generic-NQS/files
mkdir -p Generic-NQS/files > /dev/null 2>&1
echo x - Generic-NQS/files/i386-unknown-freebsd2.2.6
sed 's/^X//' >Generic-NQS/files/i386-unknown-freebsd2.2.6 << 'END-of-Generic-NQS/files/i386-unknown-freebsd2.2.6'
X# -*- sh -*-
X#
X# PLATFORM DESCRIPTION FILE
X
XC_COMPILER                      "cc"
XC_COMPILER_FLAGS_OPTIMISE       "-O2"
XC_COMPILER_FLAGS_DEBUG          ""
XC_COMPILER_FLAGS_COMMON         ""
XC_COMPILER_FLAGS_INCLUDE        ""
X
XCONFIG_MACHINE                  "i386-unknown-freebsd2.2.6"
XPREFERED_API                    "BSD"
XPLATFORM_FLAGS "-DBSD4_4 -DHAS_BSD_LIMITS -DHAS_BSD_ZOMBIES -DIS_BSD -DIS_BSD4_4 -DHAS_RLIM_T -DHAS_BSD_PIPE"
X
XLINKER                          "cc -s"
XAR                              "ar cr"
XRANLIB                          "ranlib"
XMKDIR                           "bin/mkdir -p"
END-of-Generic-NQS/files/i386-unknown-freebsd2.2.6
echo x - Generic-NQS/files/md5
sed 's/^X//' >Generic-NQS/files/md5 << 'END-of-Generic-NQS/files/md5'
XMD5 (Generic-NQS-3.50.4.tar.gz) = 2c0bd7a28b976674e71530aa79fa47d1
END-of-Generic-NQS/files/md5
echo x - Generic-NQS/files/nqs.sh
sed 's/^X//' >Generic-NQS/files/nqs.sh << 'END-of-Generic-NQS/files/nqs.sh'
X#!/bin/sh
X
Xif [ -x XXXX/sbin/nqsdaemon ] ; then
X    XXXX/sbin/nqsdaemon > /var/log/nqs.log
X    echo -n ' nqs' 
Xfi
END-of-Generic-NQS/files/nqs.sh
echo x - Generic-NQS/files/Makefile
sed 's/^X//' >Generic-NQS/files/Makefile << 'END-of-Generic-NQS/files/Makefile'
X#
X#
X
XHOSTNAME=	`uname -n`
XRELEASE=	`uname -r | cut -d'-' -f 1`
XHARDWARE=	`uname -m`
XPLATFORM=	${HARDWARE}-unknown-freebsd${RELEASE}
X
Xall:
X	@ cd Build-Tree/${PLATFORM}/${HOSTNAME}; \
X	$(MAKE)
X
Xinstall:
X	@ cd Build-Tree/${PLATFORM}/${HOSTNAME}; \
X	$(MAKE) install
END-of-Generic-NQS/files/Makefile
echo c - Generic-NQS/patches
mkdir -p Generic-NQS/patches > /dev/null 2>&1
echo x - Generic-NQS/patches/patch-aa
sed 's/^X//' >Generic-NQS/patches/patch-aa << 'END-of-Generic-NQS/patches/patch-aa'
X--- Source-Tree/qmgr/all-systems/mgr_main.c.orig	Mon Sep  9 08:24:58 1996
X+++ Source-Tree/qmgr/all-systems/mgr_main.c	Sat May  2 11:09:26 1998
X@@ -502,14 +502,14 @@
X 	 *  On systems with named pipes, we get a pipe to the local
X 	 *  daemon automatically the first time we call inter().
X 	 */
X-#if	IS_POSIX_1 | IS_SYSVr4 | IS_BSD4_4
X-#else
X #if	IS_BSD
X 	if (interconn () < 0) {
X 		fprintf (stderr, "%s(FATAL): Unable to get ", Nqsmgr_prefix);
X 		fprintf (stderr, "a pipe to the local daemon.\n");
X 		exit (16);
X 	}
X+#else
X+#if	IS_POSIX_1 | IS_SYSVr4 | IS_BSD4_4
X #else
X BAD SYSTEM TYPE
X #endif
END-of-Generic-NQS/patches/patch-aa
echo x - Generic-NQS/patches/patch-ab
sed 's/^X//' >Generic-NQS/patches/patch-ab << 'END-of-Generic-NQS/patches/patch-ab'
X--- Source-Tree/nqsdaemon/all-systems/nqs_reqser.c.orig	Wed Sep 11 05:32:26 1996
X+++ Source-Tree/nqsdaemon/all-systems/nqs_reqser.c	Sat May  2 11:09:26 1998
X@@ -1746,7 +1746,7 @@
X     char    *cp;
X     
X     environment_file = fopen("/etc/environment",  "r");
X-    if ( environment_file != (FILE *) 0 ) {
X+    if ( environment_file > (FILE *) 0 ) {
X 	while ( (fgets (env_line, sizeof(env_line), environment_file )
X 		!= (char *) 0) ) {
X 	    if (env_line[0] == '#') continue;
X@@ -1758,8 +1758,8 @@
X 		 return (the_path); 
X 	    }   
X 	}
X+    	fclose ( environment_file );
X     }
X-    fclose ( environment_file );
X     /*
X      * The file was not found, or the path was not in it.
X      */
END-of-Generic-NQS/patches/patch-ab
echo x - Generic-NQS/patches/patch-ac
sed 's/^X//' >Generic-NQS/patches/patch-ac << 'END-of-Generic-NQS/patches/patch-ac'
X--- SETUPDir/Scripts/SETUP.orig	Sat May  2 14:46:05 1998
X+++ SETUPDir/Scripts/SETUP	Sat May  2 14:53:14 1998
X@@ -911,6 +911,21 @@
X       StepFour
X       StepFive
X       ;;
X+    --fbconfig)
X+      LoadMachineDesc
X+      Introduction
X+      StepOne
X+      StepTwo
X+      StepThree
X+      ;;
X+    --fbcompile)
X+      LoadMachineDesc
X+      StepFour
X+      ;;
X+    -fbinstall)
X+      LoadMachineDesc
X+      StepFive
X+      ;;
X     *)
X       LoadMachineDesc
X       Introduction
END-of-Generic-NQS/patches/patch-ac
echo c - Generic-NQS/scripts
mkdir -p Generic-NQS/scripts > /dev/null 2>&1
echo x - Generic-NQS/scripts/syslog-add.sh
sed 's/^X//' >Generic-NQS/scripts/syslog-add.sh << 'END-of-Generic-NQS/scripts/syslog-add.sh'
X#!/bin/sh
X
Xif grep -q nqs /etc/syslog.conf
Xthen :
Xelse
X	echo "local0.*					/var/log/nqs" >> /etc/syslog.conf  
X	echo ""
X	echo "/etc/syslog modified to support nqs"
X	echo ""
Xfi
END-of-Generic-NQS/scripts/syslog-add.sh
echo x - Generic-NQS/scripts/create-nqs-rc.sh
sed 's/^X//' >Generic-NQS/scripts/create-nqs-rc.sh << 'END-of-Generic-NQS/scripts/create-nqs-rc.sh'
X#!/bin/sh
X
Xme=`basename $0`
X
Xif [ $# -lt 3 ]; then
X	echo usage: $me configfile nqs.sh rcdir >&2
X	exit 1
Xfi
X
Xroot=`grep NQS_ROOTDIR $1 | cut -f2 -d\"`
Xsed -e"s#XXXX#$root#" $2 > $3
Xchmod 755 $3
Xecho ""
Xecho "created $3 startup file"
Xecho ""
END-of-Generic-NQS/scripts/create-nqs-rc.sh
echo x - Generic-NQS/scripts/create-example-batch-queues
sed 's/^X//' >Generic-NQS/scripts/create-example-batch-queues << 'END-of-Generic-NQS/scripts/create-example-batch-queues'
X#!/bin/sh
Xqmgr <<eof
X#
Xcreate pipe misc-sched run_limit= 40 destination= batch
Xenable queue misc-sched
Xstart queue misc-sched
X#
Xcreate batch_queue batch    priority = 10 run_limit = 4 user_limit = 2
Xset data_limit = (2gb) batch
Xset per_process permfile_limit = (2gb) batch
Xset STack_limit = ( 8192kb ) batch
X#
Xcreate batch_queue misc     priority = 10 run_limit = 4 user_limit = 1
Xset data_limit = (2gb) batch
Xset per_process permfile_limit = (50mb) misc
Xset STack_limit = ( 8192kb ) misc
X#
Xset default batch_request queue batch
XSEt SHell_strategy FIxed = (/bin/csh)
Xenable queue batch
Xenable queue misc
Xstart queue batch
Xstart queue misc
Xeof
END-of-Generic-NQS/scripts/create-example-batch-queues
exit

>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



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