Date: Mon, 31 Mar 2008 22:49:12 GMT From: Frank Fenor <frank@fenor.de> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/122316: New port: www/toofpy Message-ID: <200803312249.m2VMnCxC040236@www.freebsd.org> Resent-Message-ID: <200803312250.m2VMo19b046452@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 122316 >Category: ports >Synopsis: New port: www/toofpy >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Mar 31 22:50:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Frank Fenor >Release: FreeBSD 7.0-PRERELEASE >Organization: >Environment: FreeBSD konzentrisch.de 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #5: Tue Feb 5 00:33:58 CET 2008 >Description: This is a small daemon written in python that provides an easy way to return the results of python scripts via SOAP, XMLRPC and REST. >How-To-Repeat: >Fix: Patch attached with submission follows: # 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: # # /usr/ports/www/toofpy # /usr/ports/www/toofpy/pkg-install # /usr/ports/www/toofpy/pkg-descr # /usr/ports/www/toofpy/distinfo # /usr/ports/www/toofpy/Makefile # /usr/ports/www/toofpy/pkg-plist # /usr/ports/www/toofpy/files # /usr/ports/www/toofpy/files/toolserver.in # /usr/ports/www/toofpy/files/nodjango.patch # echo c - /usr/ports/www/toofpy mkdir -p /usr/ports/www/toofpy > /dev/null 2>&1 echo x - /usr/ports/www/toofpy/pkg-install sed 's/^X//' >/usr/ports/www/toofpy/pkg-install << 'END-of-/usr/ports/www/toofpy/pkg-install' X#!/bin/sh X XPATH=/bin:/usr/sbin X Xcase $2 in XPOST-INSTALL) X USER=toolserver X GROUP=${USER} X UID=434 X GID=${UID} X X if pw group show "${GROUP}" 2>/dev/null; then X echo "You already have a group \"${GROUP}\", so I will use it." X else X if pw groupadd ${GROUP} -g ${GID}; then X echo "Added group \"${GROUP}\"." X else X echo "Adding group \"${GROUP}\" failed..." X exit 1 X fi X fi X X if pw user show "${USER}" 2>/dev/null; then X echo "You already have a user \"${USER}\", so I will use it." X else X if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - -m \ X -d /home/toolserver -s /bin/csh -c "Toolserver Framework" X then X echo "Added user \"${USER}\"." X else X echo "Adding user \"${USER}\" failed..." X exit 1 X fi X fi X ;; Xesac END-of-/usr/ports/www/toofpy/pkg-install echo x - /usr/ports/www/toofpy/pkg-descr sed 's/^X//' >/usr/ports/www/toofpy/pkg-descr << 'END-of-/usr/ports/www/toofpy/pkg-descr' XFrom the website: X X The Toolserver Framework for Python is a framework for simple building of X webservices. This is not Twisted - that one is much larger and much richer X in features. If you need a full fledged webservice or internet protocol X platform, you better go with Twisted. But if you need a lean and mean X webservice machine, the Toolserver Framework for Python might be the right X tool for the job. X XAuthor: Georg Bauer <gb@murphy.bofh.ms> XWWW: http://pyds.muensterland.org/wiki/toolserver.html END-of-/usr/ports/www/toofpy/pkg-descr echo x - /usr/ports/www/toofpy/distinfo sed 's/^X//' >/usr/ports/www/toofpy/distinfo << 'END-of-/usr/ports/www/toofpy/distinfo' XMD5 (toolserver-snapshot.tar.gz) = d821c8446e2dafe51c3c3d516f4ec55b XSHA256 (toolserver-snapshot.tar.gz) = be5281453d20153982c78096ede5450d34c97170cbc7a0aa18fb789ee0ab816c XSIZE (toolserver-snapshot.tar.gz) = 95622 END-of-/usr/ports/www/toofpy/distinfo echo x - /usr/ports/www/toofpy/Makefile sed 's/^X//' >/usr/ports/www/toofpy/Makefile << 'END-of-/usr/ports/www/toofpy/Makefile' X# New ports collection makefile for: TooFPy X# Date created: 31 March 2008 X# Whom: Frank Fenor <frank@fenor.de> X# X# $FreeBSD$ X# X XPORTNAME= TooFPy XPORTVERSION= 0.3.7 XCATEGORIES= www python XMASTER_SITES= http://simon.bofh.ms/~gb/ XPKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} XDISTFILES= toolserver-snapshot.tar.gz XWRKSRC= work/Toolserver-${PORTVERSION} XUSE_RC_SUBR= toolserver XLATEST_LINK= ${PORTNAME} XPYDISTUTILS_PKGNAME=Toolserver XEXTRA_PATCHES= ${PATCHDIR}/nodjango.patch X XMAINTAINER= frank@fenor.de XCOMMENT= Toolserver Framework for Python X XUSE_PYTHON= yes XUSE_PYDISTUTILS=yes X XRUN_DEPENDS= ${PYTHON_SITELIBDIR}/medusa:${PORTSDIR}/net/py-medusa \ X ${PYTHON_SITELIBDIR}/fpconst.py:${PORTSDIR}/math/py-fpconst \ X ${PYTHON_SITELIBDIR}/SOAPpy:${PORTSDIR}/net/py-soappy X X.include <bsd.port.pre.mk> X XOPTIONS= WITH_PYCRYPTO "Use pycrypto (for RSA authentication)" off X X.if ${PYTHON_REL} < 250 XOPTIONS+= WITH_WSGIREF "WSGI compliant applications" off X.endif X X.if defined(WITH_PYCRYPTO) XRUN_DEPENDS+= ${PYTHON_SITELIBDIR}/Crypto:${PORTSDIR}/security/py-pycrypto X.endif X X.if ${PYTHON_REL} < 250 && defined(WITH_WSGIREF) XRUN_DEPENDS+= ${PYTHON_SITELIBDIR}/wsgiref:${PORTSDIR}/www/py-wsgiref X.endif X Xpost-install: X @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL X X.include <bsd.port.post.mk> END-of-/usr/ports/www/toofpy/Makefile echo x - /usr/ports/www/toofpy/pkg-plist sed 's/^X//' >/usr/ports/www/toofpy/pkg-plist << 'END-of-/usr/ports/www/toofpy/pkg-plist' Xbin/tsctl Xlib/python2.5/site-packages/Toolserver/AsyncCall.py Xlib/python2.5/site-packages/Toolserver/AsyncCall.pyc Xlib/python2.5/site-packages/Toolserver/AsyncCall.pyo Xlib/python2.5/site-packages/Toolserver/Authentication.py Xlib/python2.5/site-packages/Toolserver/Authentication.pyc Xlib/python2.5/site-packages/Toolserver/Authentication.pyo Xlib/python2.5/site-packages/Toolserver/CRAMUtils.py Xlib/python2.5/site-packages/Toolserver/CRAMUtils.pyc Xlib/python2.5/site-packages/Toolserver/CRAMUtils.pyo Xlib/python2.5/site-packages/Toolserver/Client.py Xlib/python2.5/site-packages/Toolserver/Client.pyc Xlib/python2.5/site-packages/Toolserver/Client.pyo Xlib/python2.5/site-packages/Toolserver/ClientMachinery.py Xlib/python2.5/site-packages/Toolserver/ClientMachinery.pyc Xlib/python2.5/site-packages/Toolserver/ClientMachinery.pyo Xlib/python2.5/site-packages/Toolserver/ClientRegistry.py Xlib/python2.5/site-packages/Toolserver/ClientRegistry.pyc Xlib/python2.5/site-packages/Toolserver/ClientRegistry.pyo Xlib/python2.5/site-packages/Toolserver/Config.py Xlib/python2.5/site-packages/Toolserver/Config.pyc Xlib/python2.5/site-packages/Toolserver/Config.pyo Xlib/python2.5/site-packages/Toolserver/Context.py Xlib/python2.5/site-packages/Toolserver/Context.pyc Xlib/python2.5/site-packages/Toolserver/Context.pyo Xlib/python2.5/site-packages/Toolserver/Daemonize.py Xlib/python2.5/site-packages/Toolserver/Daemonize.pyc Xlib/python2.5/site-packages/Toolserver/Daemonize.pyo Xlib/python2.5/site-packages/Toolserver/DefaultConfig.py Xlib/python2.5/site-packages/Toolserver/DefaultConfig.pyc Xlib/python2.5/site-packages/Toolserver/DefaultConfig.pyo Xlib/python2.5/site-packages/Toolserver/Factory.py Xlib/python2.5/site-packages/Toolserver/Factory.pyc Xlib/python2.5/site-packages/Toolserver/Factory.pyo Xlib/python2.5/site-packages/Toolserver/HTTPHandler.py Xlib/python2.5/site-packages/Toolserver/HTTPHandler.pyc Xlib/python2.5/site-packages/Toolserver/HTTPHandler.pyo Xlib/python2.5/site-packages/Toolserver/LRUCache.py Xlib/python2.5/site-packages/Toolserver/LRUCache.pyc Xlib/python2.5/site-packages/Toolserver/LRUCache.pyo Xlib/python2.5/site-packages/Toolserver/Linda.py Xlib/python2.5/site-packages/Toolserver/Linda.pyc Xlib/python2.5/site-packages/Toolserver/Linda.pyo Xlib/python2.5/site-packages/Toolserver/Monitor.py Xlib/python2.5/site-packages/Toolserver/Monitor.pyc Xlib/python2.5/site-packages/Toolserver/Monitor.pyo Xlib/python2.5/site-packages/Toolserver/MonitorWin32.py Xlib/python2.5/site-packages/Toolserver/MonitorWin32.pyc Xlib/python2.5/site-packages/Toolserver/MonitorWin32.pyo Xlib/python2.5/site-packages/Toolserver/PickleRPCClient.py Xlib/python2.5/site-packages/Toolserver/PickleRPCClient.pyc Xlib/python2.5/site-packages/Toolserver/PickleRPCClient.pyo Xlib/python2.5/site-packages/Toolserver/ProcessQueue.py Xlib/python2.5/site-packages/Toolserver/ProcessQueue.pyc Xlib/python2.5/site-packages/Toolserver/ProcessQueue.pyo Xlib/python2.5/site-packages/Toolserver/RESTCall.py Xlib/python2.5/site-packages/Toolserver/RESTCall.pyc Xlib/python2.5/site-packages/Toolserver/RESTCall.pyo Xlib/python2.5/site-packages/Toolserver/RESTHandler.py Xlib/python2.5/site-packages/Toolserver/RESTHandler.pyc Xlib/python2.5/site-packages/Toolserver/RESTHandler.pyo Xlib/python2.5/site-packages/Toolserver/RPCHandler.py Xlib/python2.5/site-packages/Toolserver/RPCHandler.pyc Xlib/python2.5/site-packages/Toolserver/RPCHandler.pyo Xlib/python2.5/site-packages/Toolserver/ReactorChain.py Xlib/python2.5/site-packages/Toolserver/ReactorChain.pyc Xlib/python2.5/site-packages/Toolserver/ReactorChain.pyo Xlib/python2.5/site-packages/Toolserver/RewriteHandler.py Xlib/python2.5/site-packages/Toolserver/RewriteHandler.pyc Xlib/python2.5/site-packages/Toolserver/RewriteHandler.pyo Xlib/python2.5/site-packages/Toolserver/SOAPClient.py Xlib/python2.5/site-packages/Toolserver/SOAPClient.pyc Xlib/python2.5/site-packages/Toolserver/SOAPClient.pyo Xlib/python2.5/site-packages/Toolserver/SOAPHandler.py Xlib/python2.5/site-packages/Toolserver/SOAPHandler.pyc Xlib/python2.5/site-packages/Toolserver/SOAPHandler.pyo Xlib/python2.5/site-packages/Toolserver/Server.py Xlib/python2.5/site-packages/Toolserver/Server.pyc Xlib/python2.5/site-packages/Toolserver/Server.pyo Xlib/python2.5/site-packages/Toolserver/SyncCall.py Xlib/python2.5/site-packages/Toolserver/SyncCall.pyc Xlib/python2.5/site-packages/Toolserver/SyncCall.pyo Xlib/python2.5/site-packages/Toolserver/TagRenderer.py Xlib/python2.5/site-packages/Toolserver/TagRenderer.pyc Xlib/python2.5/site-packages/Toolserver/TagRenderer.pyo Xlib/python2.5/site-packages/Toolserver/Tool.py Xlib/python2.5/site-packages/Toolserver/Tool.pyc Xlib/python2.5/site-packages/Toolserver/Tool.pyo Xlib/python2.5/site-packages/Toolserver/Utils.py Xlib/python2.5/site-packages/Toolserver/Utils.pyc Xlib/python2.5/site-packages/Toolserver/Utils.pyo Xlib/python2.5/site-packages/Toolserver/Worker.py Xlib/python2.5/site-packages/Toolserver/Worker.pyc Xlib/python2.5/site-packages/Toolserver/Worker.pyo Xlib/python2.5/site-packages/Toolserver/XMLRPCClient.py Xlib/python2.5/site-packages/Toolserver/XMLRPCClient.pyc Xlib/python2.5/site-packages/Toolserver/XMLRPCClient.pyo Xlib/python2.5/site-packages/Toolserver/XMLRPCHandler.py Xlib/python2.5/site-packages/Toolserver/XMLRPCHandler.pyc Xlib/python2.5/site-packages/Toolserver/XMLRPCHandler.pyo Xlib/python2.5/site-packages/Toolserver/__init__.py Xlib/python2.5/site-packages/Toolserver/__init__.pyc Xlib/python2.5/site-packages/Toolserver/__init__.pyo Xlib/python2.5/site-packages/Toolserver/autoreload.py Xlib/python2.5/site-packages/Toolserver/autoreload.pyc Xlib/python2.5/site-packages/Toolserver/autoreload.pyo Xlib/python2.5/site-packages/Toolserver/select_trigger.py Xlib/python2.5/site-packages/Toolserver/select_trigger.pyc Xlib/python2.5/site-packages/Toolserver/select_trigger.pyo Xlib/python2.5/site-packages/Toolserver/timeoutsocket.py Xlib/python2.5/site-packages/Toolserver/timeoutsocket.pyc Xlib/python2.5/site-packages/Toolserver/timeoutsocket.pyo Xshare/toolserver/INSTALL-FROM-SOURCE Xshare/toolserver/LICENSE Xshare/toolserver/README Xshare/toolserver/TODO Xshare/toolserver/UPDATE-FROM-SOURCE Xshare/toolserver/samples/GreetingTool.py Xshare/toolserver/samples/MailCheck.py Xshare/toolserver/samples/PYXMLRPCHandler.py Xshare/toolserver/samples/ServerManager.py Xshare/toolserver/samples/WSGIHelloWorld.py Xshare/toolserver/samples/WikiTool.py Xshare/toolserver/tools/APITool.py X@unexec rm -f %D/share/toolserver/tools/APITool.pyc Xshare/toolserver/tools/PickleRPCHandler.py X@unexec rm -f %D/share/toolserver/tools/PickleRPCHandler.pyc Xshare/toolserver/tools/SystemTool.py X@unexec rm -f %D/share/toolserver/tools/SystemTool.pyc Xshare/toolserver/tools/WSDLTool.py X@unexec rm -f %D/share/toolserver/tools/WSDLTool.pyc Xshare/toolserver/tools/WSGITool.py X@unexec rm -f %D/share/toolserver/tools/WSGITool.pyc X@dirrm share/toolserver/tools X@dirrm share/toolserver/samples X@dirrm share/toolserver X@dirrm lib/python2.5/site-packages/Toolserver END-of-/usr/ports/www/toofpy/pkg-plist echo c - /usr/ports/www/toofpy/files mkdir -p /usr/ports/www/toofpy/files > /dev/null 2>&1 echo x - /usr/ports/www/toofpy/files/toolserver.in sed 's/^X//' >/usr/ports/www/toofpy/files/toolserver.in << 'END-of-/usr/ports/www/toofpy/files/toolserver.in' X#!/bin/sh X# $FreeBSD: ports/www/TooFPy/files/toolserver.in,v 1.1 2007/10/01 04:00:08 ache Exp $ X X# PROVIDE: toolserver X# REQUIRE: LOGIN cleanvar X# KEYWORD: shutdown X X# Define these toolserver_* variables in one of these files: X# /etc/rc.conf X# /etc/rc.conf.local X# /etc/rc.conf.d/toolserver X# X# DO NOT CHANGE THESE DEFAULT VALUES HERE X# Xtoolserver_enable=${toolserver_enable-"NO"} Xtoolserver_pidfile=${toolserver_pidfile-"/usr/home/toolserver/.Toolserver/var/toolserver.pid"} X X. %%RC_SUBR%% X Xname="toolserver" Xtoolserver_user=toolserver Xrcvar=`set_rcvar` Xcommand="%%PREFIX%%/bin/tsctl" X Xload_rc_config $name X Xpidfile="${toolserver_pidfile}" X Xextra_commands="init keygen" X Xstart_cmd="toolserver_command start" Xstop_cmd="toolserver_stop_command" Xinit_cmd="toolserver_command init" Xkeygen_cmd="toolserver_command keygen" Xstart_precmd="toolserver_start_check" Xstop_precmd="toolserver_stop_check" X Xtoolserver_command() X{ X su -f -l ${toolserver_user} -c "exec ${command} ${command_args} ${rc_arg}" X} X XPYTHON_CMD=$(head -n1 `which tsctl`|tr "#! " " " | awk '{ print $1 }') X Xtoolserver_start_check() X{ X if [ "0$(check_pidfile ${pidfile} ${command} ${PYTHON_CMD})" -gt 1 ]; then X echo "${name} is already running." X exit 1 X fi X} X Xtoolserver_stop_check() X{ X if [ ! "0$(check_pidfile ${pidfile} ${command} ${PYTHON_CMD})" -gt 1 ]; then X echo "${name} is not running." X exit 1 X fi X} X Xtoolserver_stop_command() X{ X tspid=$(check_pidfile ${pidfile} ${command} ${PYTHON_CMD}) X toolserver_command stop X wait_for_pids $tspid X} X Xrun_rc_command "$1" END-of-/usr/ports/www/toofpy/files/toolserver.in echo x - /usr/ports/www/toofpy/files/nodjango.patch sed 's/^X//' >/usr/ports/www/toofpy/files/nodjango.patch << 'END-of-/usr/ports/www/toofpy/files/nodjango.patch' X--- tools/WSGITool.py.vanilla 2008-02-17 23:30:03.000000000 +0100 X+++ tools/WSGITool.py 2008-02-17 23:31:16.000000000 +0100 X@@ -49,14 +49,17 @@ X haswsgi = 0 X class BaseHandler: pass X X-if config.django: X- try: X- from django.core import management X- from django.core.handlers.wsgi import WSGIHandler X- hasdjango = 1 X- except ImportError: X- hasdjango = 0 X-else: hasdjango = 0 X+try: X+ if config.django: X+ try: X+ from django.core import management X+ from django.core.handlers.wsgi import WSGIHandler X+ hasdjango = 1 X+ except ImportError: X+ hasdjango = 0 X+ else: hasdjango = 0 X+except: X+ hasdjango = 0 X X try: X True END-of-/usr/ports/www/toofpy/files/nodjango.patch exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803312249.m2VMnCxC040236>