. Add a port of SQueuer, a queueing proxy for Seti@Home:

SQueuer is a queueing proxy for Seti@Home with the following features:

* Keeps a configurable sized queue of work units so that
  the client will always be able to get a new work unit
  immediately upon finishing one.

* Queues results for uploading should the main Seti@Home
  site be overloaded or down. Results are never lost and the
  client is never delayed waiting to upload a result.

* Can handle multiple users running the Seti@Home client
  on multiple machines all connecting to SQueuer.

* Platform independent. SQueuer has been tested and found
  to work on different versions of Unix, MacOS and Windows.
  All it requires is a Perl 5 interpreter.
This commit is contained in:
Greg Lewis 2003-08-13 17:35:21 +00:00
parent 156f5a4999
commit 64740c8f28
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=86898
10 changed files with 189 additions and 0 deletions

View file

@ -44,6 +44,7 @@
SUBDIR += sattrack
SUBDIR += setiathome
SUBDIR += spacechart
SUBDIR += squeuer
SUBDIR += sscalc
SUBDIR += starplot
SUBDIR += stars

50
astro/squeuer/Makefile Normal file
View file

@ -0,0 +1,50 @@
# New ports collection makefile for: squeuer
# Date created: 6 August 2003
# Whom: glewis@FreeBSD.org
#
# $FreeBSD$
#
PORTNAME= squeuer
PORTVERSION= 2.0.1
CATEGORIES= astro net
MASTER_SITES= http://www.eyesbeyond.com/squeuer/
MAINTAINER= glewis@FreeBSD.org
COMMENT= A queueing proxy for Seti@Home
NO_BUILD= yes
USE_REINPLACE= yes
USE_PERL5_RUN= yes
# These must be writeable by the user "squeuer"
SPOOLDIR?= /var/spool/squeuer
LOGDIR?= /var/spool/squeuer
PIDDIR?= /var/spool/squeuer
do-configure:
for i in ${WRKSRC}/etc/squeuer.conf.unix ${WRKSRC}/etc/rc.d/S71squeuer.sh; do \
${REINPLACE_CMD} -e "s:%%PREFIX%%:${PREFIX}:g" \
-e "s:%%SPOOLDIR%%:${SPOOLDIR}:g" \
-e "s:%%LOGDIR%%:${LOGDIR}:g" \
-e "s:%%PIDDIR%%:${PIDDIR}:g" $$i; \
done
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/bin/squeuer.pl ${PREFIX}/sbin/squeuer
${INSTALL_DATA} ${WRKSRC}/etc/squeuer.conf.unix ${PREFIX}/etc/squeuer.conf.sample
${INSTALL_SCRIPT} ${WRKSRC}/etc/rc.d/S71squeuer.sh ${PREFIX}/etc/rc.d/squeuer.sh.sample
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/README ${WRKSRC}/doc/TODO ${DOCSDIR}
.endif
post-install:
${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} PRE-INSTALL
if [ ! -e ${SPOOLDIR} ]; then \
${MKDIR} ${SPOOLDIR}; \
${CHOWN} squeuer:squeuer ${SPOOLDIR}; \
fi
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

1
astro/squeuer/distinfo Normal file
View file

@ -0,0 +1 @@
MD5 (squeuer-2.0.1.tar.gz) = a26dcc0778d63b7a8b02222f19eba010

View file

@ -0,0 +1,24 @@
$FreeBSD$
--- etc/rc.d/S71squeuer.sh.orig Thu Oct 31 20:38:18 2002
+++ etc/rc.d/S71squeuer.sh Thu Aug 7 12:25:20 2003
@@ -3,14 +3,16 @@
# Squeuer
#
-squeuer=/usr/local/bin/squeuer.pl
-pid_file=/var/run/squeuer.pid
+squeuer=%%PREFIX%%/sbin/squeuer
+squeuer_conf=%%PREFIX%%/etc/squeuer.conf
+pid_file=%%PIDDIR%%/squeuer.pid
+squeuer_user=squeuer
SYSV3=1; export SYSV3
case $1 in
start) echo -n ' squeuer'
- su squeuer -c $squeuer > $pid_file &
+ su $squeuer_user -c "$squeuer -f $squeuer_conf" > $pid_file &
;;
stop) if [ -f $pid_file ]; then

View file

@ -0,0 +1,22 @@
$FreeBSD$
--- etc/squeuer.conf.unix.orig Thu Aug 7 09:32:52 2003
+++ etc/squeuer.conf.unix Thu Aug 7 11:26:29 2003
@@ -12,7 +12,7 @@
# Location of the work unit spooling directory
# This must be writable by the SQueuer process
#
-spool_path = /var/spool/squeuer
+spool_path = %%SPOOLDIR%%
#
# Do we write the pid out
@@ -52,7 +52,7 @@
# warning - security problems or invalid data found
# alert - user must do something or squeuer won't work
#
-log_method = /var/spool/squeuer/squeuer.log
+log_method = %%LOGDIR%%/squeuer.log
log_level = info,notice,warning,alert
#

View file

@ -0,0 +1,15 @@
#!/bin/sh
# $FreeBSD$
#
if [ "$2" != "POST-DEINSTALL" ]; then
exit 0
fi
USER=squeuer
if pw usershow "${USER}" 2>/dev/null 1>&2; then
echo "To delete SQueuer user permanently, use 'pw userdel ${USER}'"
fi
exit 0

18
astro/squeuer/pkg-descr Normal file
View file

@ -0,0 +1,18 @@
SQueuer is a queueing proxy for Seti@Home with the following features:
* Keeps a configurable sized queue of work units so that
the client will always be able to get a new work unit
immediately upon finishing one.
* Queues results for uploading should the main Seti@Home
site be overloaded or down. Results are never lost and the
client is never delayed waiting to upload a result.
* Can handle multiple users running the Seti@Home client
on multiple machines all connecting to SQueuer.
* Platform independent. SQueuer has been tested and found
to work on different versions of Unix, MacOS and Windows.
All it requires is a Perl 5 interpreter.
WWW: http://www.eyesbeyond.com/squeuer/

34
astro/squeuer/pkg-install Normal file
View file

@ -0,0 +1,34 @@
#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/astro/squeuer/Attic/pkg-install,v 1.1 2003-08-13 17:35:21 glewis Exp $
#
if [ "$2" != "PRE-INSTALL" ]; then
exit 0
fi
USER=squeuer
GROUP=${USER}
UID=96
GID=${UID}
if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
if pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-s "/bin/sh" -d "/nonexistent" \
-c "SQueuer Owner"; \
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
exit 0

19
astro/squeuer/pkg-message Normal file
View file

@ -0,0 +1,19 @@
=============================================================
To use SQueuer with the setiathome port, the file
/usr/local/etc/rc.setiathome.conf
must be modified (specifically the seti_proxy_server setting)
and setiathome restarted.
As an example, if you're running SQueuer on the same host as
the client then a line such as
seti_proxy_server=localhost:17771
would be appropriate. If SQueuer is running on a different
host or SQueuer is configured to run on a different port
then please modify either localhost or 17771 as appropriate.
=============================================================

5
astro/squeuer/pkg-plist Normal file
View file

@ -0,0 +1,5 @@
sbin/squeuer
etc/squeuer.conf.sample
etc/rc.d/squeuer.sh.sample
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/TODO