1. changelog: http://svn.supervisord.org/supervisor/tags/3.0a8/CHANGES.txt 2. adding rc script 3. add post-install conf file Fix: changeset: 6:4c76dc9edccf tag: qtip tag: supervisor3.0a8.patch tag: tip tag: qbase user: hizel-router <hizel@vyborg.ru> date: Thu Feb 11 14:26:42 2010 +0300 summary: upgrade supervisor to 3.0a8
Responsible Changed From-To: freebsd-ports-bugs->freebsd-python freebsd-python@ wants this port PRs (via the GNATS Auto Assign Tool)
sorry, fix patch diff -urN sysutils/py-supervisor.old/Makefile sysutils/py-supervisor/Makefile --- sysutils/py-supervisor.old/Makefile 2010-02-11 15:05:33.000000000 +0300 +++ sysutils/py-supervisor/Makefile 2010-02-11 14:21:58.000000000 +0300 @@ -6,7 +6,7 @@ # PORTNAME= supervisor -PORTVERSION= 3.0a7 +PORTVERSION= 3.0a8 CATEGORIES= sysutils python MASTER_SITES= http://dist.supervisord.org/\ CHEESESHOP @@ -18,8 +18,18 @@ USE_PYTHON= 2.4+ USE_PYDISTUTILS= easy_install +SUB_LIST= PYTHONVER=${PYTHON_VERSION} +USE_RC_SUBR= supervisord + RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}elementtree>=1.2.6:${PORTSDIR}/devel/py-elementtree \ - ${PYTHON_PKGNAMEPREFIX}meld3>=0.6.4:${PORTSDIR}/www/py-meld3 \ - ${PYTHON_PKGNAMEPREFIX}medusa>=0.5.4:${PORTSDIR}/net/py-medusa + ${PYTHON_PKGNAMEPREFIX}meld3>=0.6.4:${PORTSDIR}/www/py-meld3 + +post-install: + [ -d /var/run/supervisor ] || ${MKDIR} /var/run/supervisor + [ -f ${PREFIX}/etc/supervisord.conf ] || \ + ( ${PREFIX}/bin/echo_supervisord_conf > ${PREFIX}/etc/supervisord.conf && \ + ${REINPLACE_CMD} -e 's!/tmp/supervisor.sock!/var/run/supervisor/supervisor.sock!g' \ + -e 's!/tmp/supervisord.log!/var/log/supervisord.log!g' -e 's!/tmp/supervisord.pid!/var/run/supervisor/supervisord.pid!g' \ + -e 's!unix:///tmp/supervisor.sock!unix:///var/run/supervisor/supervisor.sock!g' ${PREFIX}/etc/supervisord.conf ) .include <bsd.port.mk> diff -urN sysutils/py-supervisor.old/distinfo sysutils/py-supervisor/distinfo --- sysutils/py-supervisor.old/distinfo 2010-02-11 15:05:33.000000000 +0300 +++ sysutils/py-supervisor/distinfo 2010-02-11 13:14:58.000000000 +0300 @@ -1,3 +1,3 @@ -MD5 (supervisor-3.0a7.tar.gz) = d2e6c491fcb2606e4fd0afe4ebfd4b13 -SHA256 (supervisor-3.0a7.tar.gz) = 4c4e48f94298e80e21209458d57471c19c40b3e1993f6e780f31826192eaff99 -SIZE (supervisor-3.0a7.tar.gz) = 292408 +MD5 (supervisor-3.0a8.tar.gz) = 7a775455f3a53c2ea375d18dcfe9e522 +SHA256 (supervisor-3.0a8.tar.gz) = ce61afd01780ffba3e40ec244205b6db309da3b84ef27b5c5b179456050e5b8b +SIZE (supervisor-3.0a8.tar.gz) = 287705 diff -urN sysutils/py-supervisor.old/files/patch-aa sysutils/py-supervisor/files/patch-aa --- sysutils/py-supervisor.old/files/patch-aa 1970-01-01 03:00:00.000000000 +0300 +++ sysutils/py-supervisor/files/patch-aa 2010-02-11 14:01:06.000000000 +0300 @@ -0,0 +1,11 @@ +--- src/supervisor/options.py.orig 2010-02-11 13:25:24.000000000 +0300 ++++ src/supervisor/options.py 2010-02-11 13:25:55.000000000 +0300 +@@ -105,7 +105,7 @@ + def default_configfile(self): + """Return the name of the found config file or raise. """ + paths = ['supervisord.conf', 'etc/supervisord.conf', +- '/etc/supervisord.conf'] ++ '/etc/supervisord.conf', '/usr/local/etc/supervisord.conf'] + config = None + for path in paths: + if os.path.exists(path): diff -urN sysutils/py-supervisor.old/files/supervisord.in sysutils/py-supervisor/files/supervisord.in --- sysutils/py-supervisor.old/files/supervisord.in 1970-01-01 03:00:00.000000000 +0300 +++ sysutils/py-supervisor/files/supervisord.in 2010-02-11 13:21:45.000000000 +0300 @@ -0,0 +1,27 @@ +#!/bin/sh +# +# PROVIDE: supervisord +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable trac: +# supervisord_enable="YES" +# + +. "/etc/rc.subr" + +# Set some defaults +supervisord_enable=${supervisord_enable:-"NO"} +supervisord_pid=${supervisord_pid:-"/var/run/supervisor/supervisord.pid"} + +name=supervisord +rcvar=`set_rcvar` + +load_rc_config $name + +pidfile=${supervisord_pid} +command="%%PREFIX%%/bin/supervisord" +command_interpreter="/usr/local/bin/%%PYTHONVER%%" + +run_rc_command "$1" + diff -urN sysutils/py-supervisor.old/pkg-plist sysutils/py-supervisor/pkg-plist --- sysutils/py-supervisor.old/pkg-plist 2010-02-11 15:05:33.000000000 +0300 +++ sysutils/py-supervisor/pkg-plist 2010-02-11 14:24:34.000000000 +0300 @@ -2,14 +2,6 @@ bin/pidproxy bin/supervisorctl bin/supervisord -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._PKG-INFO -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._SOURCES.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._dependency_links.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._entry_points.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._namespace_packages.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._not-zip-safe -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._requires.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._top_level.txt %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/PKG-INFO %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/SOURCES.txt %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/dependency_links.txt @@ -278,6 +270,9 @@ %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_childutils.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_childutils.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_childutils.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_confecho.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_confecho.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_confecho.pyo %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_datatypes.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_datatypes.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_datatypes.pyo @@ -293,9 +288,6 @@ %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_loggers.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_loggers.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_loggers.pyo -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_memmon.py -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_memmon.pyc -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_memmon.pyo %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_options.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_options.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_options.pyo @@ -308,6 +300,9 @@ %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_socket_manager.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_socket_manager.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_socket_manager.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_states.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_states.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_states.pyo %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_supervisorctl.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_supervisorctl.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_supervisorctl.pyo @@ -359,4 +354,5 @@ @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/doc @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%% - +@stopdaemon supervisord +@unexec rm -rf /var/run/supervisor
hm, i approve my work :)
sorry :( fixing rc script fixing pkg-plist: add @exec mkdir /var/run adding to RUN_DEPEND cElementTree because the daemon to issue a warning but it works >WARN cElementTree not installed, using slower XML parser for XML-RPC diff --git a/sysutils/py-supervisor/Makefile b/sysutils/py-supervisor/Makefile index d3fe85c..19990f7 100644 --- a/sysutils/py-supervisor/Makefile +++ b/sysutils/py-supervisor/Makefile @@ -6,7 +6,7 @@ # PORTNAME= supervisor -PORTVERSION= 3.0a7 +PORTVERSION= 3.0a8 CATEGORIES= sysutils python MASTER_SITES= http://dist.supervisord.org/\ CHEESESHOP @@ -18,8 +18,19 @@ COMMENT= System to monitor and control a number of processes on UNIX-like OS USE_PYTHON= 2.4+ USE_PYDISTUTILS= easy_install +SUB_LIST= PYTHONVER=${PYTHON_VERSION} +USE_RC_SUBR= supervisord + RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}elementtree>=1.2.6:${PORTSDIR}/devel/py-elementtree \ ${PYTHON_PKGNAMEPREFIX}meld3>=0.6.4:${PORTSDIR}/www/py-meld3 \ - ${PYTHON_PKGNAMEPREFIX}medusa>=0.5.4:${PORTSDIR}/net/py-medusa + ${PYTHON_PKGNAMEPREFIX}cElementTree>=1.0.5:${PORTSDIR}/devel/py-celementtree + +post-install: + [ -d /var/run/supervisor ] || ${MKDIR} /var/run/supervisor + [ -f ${PREFIX}/etc/supervisord.conf ] || \ + ( ${PREFIX}/bin/echo_supervisord_conf > ${PREFIX}/etc/supervisord.conf && \ + ${REINPLACE_CMD} -e 's!/tmp/supervisor.sock!/var/run/supervisor/supervisor.sock!g' \ + -e 's!/tmp/supervisord.log!/var/log/supervisord.log!g' -e 's!/tmp/supervisord.pid!/var/run/supervisor/supervisord.pid!g' \ + -e 's!unix:///tmp/supervisor.sock!unix:///var/run/supervisor/supervisor.sock!g' ${PREFIX}/etc/supervisord.conf ) .include <bsd.port.mk> diff --git a/sysutils/py-supervisor/distinfo b/sysutils/py-supervisor/distinfo index b99c658..c4bfe0e 100644 --- a/sysutils/py-supervisor/distinfo +++ b/sysutils/py-supervisor/distinfo @@ -1,3 +1,3 @@ -MD5 (supervisor-3.0a7.tar.gz) = d2e6c491fcb2606e4fd0afe4ebfd4b13 -SHA256 (supervisor-3.0a7.tar.gz) = 4c4e48f94298e80e21209458d57471c19c40b3e1993f6e780f31826192eaff99 -SIZE (supervisor-3.0a7.tar.gz) = 292408 +MD5 (supervisor-3.0a8.tar.gz) = 7a775455f3a53c2ea375d18dcfe9e522 +SHA256 (supervisor-3.0a8.tar.gz) = ce61afd01780ffba3e40ec244205b6db309da3b84ef27b5c5b179456050e5b8b +SIZE (supervisor-3.0a8.tar.gz) = 287705 diff --git a/sysutils/py-supervisor/files/patch-aa b/sysutils/py-supervisor/files/patch-aa new file mode 100644 index 0000000..94fc597 --- /dev/null +++ b/sysutils/py-supervisor/files/patch-aa @@ -0,0 +1,11 @@ +--- src/supervisor/options.py.orig 2010-02-11 13:25:24.000000000 +0300 ++++ src/supervisor/options.py 2010-02-11 13:25:55.000000000 +0300 +@@ -105,7 +105,7 @@ + def default_configfile(self): + """Return the name of the found config file or raise. """ + paths = ['supervisord.conf', 'etc/supervisord.conf', +- '/etc/supervisord.conf'] ++ '/etc/supervisord.conf', '/usr/local/etc/supervisord.conf'] + config = None + for path in paths: + if os.path.exists(path): diff --git a/sysutils/py-supervisor/files/supervisord.in b/sysutils/py-supervisor/files/supervisord.in new file mode 100644 index 0000000..97408a6 --- /dev/null +++ b/sysutils/py-supervisor/files/supervisord.in @@ -0,0 +1,27 @@ +#!/bin/sh +# +# PROVIDE: supervisord +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable trac: +# supervisord_enable="YES" +# + +. %%RC_SUBR%% + +# Set some defaults +supervisord_enable=${supervisord_enable:-"NO"} +supervisord_pid=${supervisord_pid:-"/var/run/supervisor/supervisord.pid"} + +name=supervisord +rcvar=`set_rcvar` + +load_rc_config $name + +pidfile=${supervisord_pid} +command="%%PREFIX%%/bin/supervisord" +command_interpreter="/usr/local/bin/%%PYTHONVER%%" + +run_rc_command "$1" + diff --git a/sysutils/py-supervisor/pkg-plist b/sysutils/py-supervisor/pkg-plist index 595ec79..5eeedda 100644 --- a/sysutils/py-supervisor/pkg-plist +++ b/sysutils/py-supervisor/pkg-plist @@ -2,14 +2,6 @@ bin/echo_supervisord_conf bin/pidproxy bin/supervisorctl bin/supervisord -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._PKG-INFO -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._SOURCES.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._dependency_links.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._entry_points.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._namespace_packages.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._not-zip-safe -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._requires.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._top_level.txt %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/PKG-INFO %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/SOURCES.txt %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/dependency_links.txt @@ -278,6 +270,9 @@ bin/supervisord %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_childutils.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_childutils.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_childutils.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_confecho.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_confecho.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_confecho.pyo %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_datatypes.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_datatypes.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_datatypes.pyo @@ -293,9 +288,6 @@ bin/supervisord %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_loggers.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_loggers.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_loggers.pyo -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_memmon.py -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_memmon.pyc -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_memmon.pyo %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_options.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_options.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_options.pyo @@ -308,6 +300,9 @@ bin/supervisord %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_socket_manager.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_socket_manager.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_socket_manager.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_states.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_states.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_states.pyo %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_supervisorctl.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_supervisorctl.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_supervisorctl.pyo @@ -359,4 +354,6 @@ bin/supervisord @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/doc @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%% - +@stopdaemon supervisord +@exec mkdir -p /var/run/supervisor +@unexec rm -rf /var/run/supervisor
Hi, next step: 1. remove call echo_supervisord_conf and add supervisord.conf.sample in files/ 2. fix pkg-plist diff --git a/sysutils/py-supervisor/Makefile b/sysutils/py-supervisor/Makefile index d3fe85c..b64aea0 100644 --- a/sysutils/py-supervisor/Makefile +++ b/sysutils/py-supervisor/Makefile @@ -6,7 +6,7 @@ # PORTNAME= supervisor -PORTVERSION= 3.0a7 +PORTVERSION= 3.0a8 CATEGORIES= sysutils python MASTER_SITES= http://dist.supervisord.org/\ CHEESESHOP @@ -15,11 +15,24 @@ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= hizel@vyborg.ru COMMENT= System to monitor and control a number of processes on UNIX-like OS +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}elementtree>=1.2.6:${PORTSDIR}/devel/py-elementtree \ + ${PYTHON_PKGNAMEPREFIX}meld3>=0.6.4:${PORTSDIR}/www/py-meld3 \ + ${PYTHON_PKGNAMEPREFIX}cElementTree>=1.0.5:${PORTSDIR}/devel/py-celementtree + USE_PYTHON= 2.4+ USE_PYDISTUTILS= easy_install +PIDDIR?= /var/run/supervisor -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}elementtree>=1.2.6:${PORTSDIR}/devel/py-elementtree \ - ${PYTHON_PKGNAMEPREFIX}meld3>=0.6.4:${PORTSDIR}/www/py-meld3 \ - ${PYTHON_PKGNAMEPREFIX}medusa>=0.5.4:${PORTSDIR}/net/py-medusa +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} +PLIST_SUB= PIDDIR=${PIDDIR} +USE_RC_SUBR= supervisord + +post-patch: + ${REINPLACE_CMD} -e 's!%%PREFIX%%!${PREFIX}!' ${WRKSRC}/src/supervisor/options.py + +post-install: + [ -d ${PIDDIR} ] || ${MKDIR} ${PIDDIR} + ${INSTALL_DATA} ${FILESDIR}/supervisord.conf.sample ${PREFIX}/etc + [ -f ${PREFIX}/etc/supervisord.conf ] || ${CP} -p ${PREFIX}/etc/supervisord.conf.sample ${PREFIX}/etc/supervisord.conf .include <bsd.port.mk> diff --git a/sysutils/py-supervisor/distinfo b/sysutils/py-supervisor/distinfo index b99c658..c4bfe0e 100644 --- a/sysutils/py-supervisor/distinfo +++ b/sysutils/py-supervisor/distinfo @@ -1,3 +1,3 @@ -MD5 (supervisor-3.0a7.tar.gz) = d2e6c491fcb2606e4fd0afe4ebfd4b13 -SHA256 (supervisor-3.0a7.tar.gz) = 4c4e48f94298e80e21209458d57471c19c40b3e1993f6e780f31826192eaff99 -SIZE (supervisor-3.0a7.tar.gz) = 292408 +MD5 (supervisor-3.0a8.tar.gz) = 7a775455f3a53c2ea375d18dcfe9e522 +SHA256 (supervisor-3.0a8.tar.gz) = ce61afd01780ffba3e40ec244205b6db309da3b84ef27b5c5b179456050e5b8b +SIZE (supervisor-3.0a8.tar.gz) = 287705 diff --git a/sysutils/py-supervisor/files/patch-src-supervisor-options.py b/sysutils/py-supervisor/files/patch-src-supervisor-options.py new file mode 100644 index 0000000..46c7f17 --- /dev/null +++ b/sysutils/py-supervisor/files/patch-src-supervisor-options.py @@ -0,0 +1,11 @@ +--- src/supervisor/options.py.orig 2010-02-11 13:25:24.000000000 +0300 ++++ src/supervisor/options.py 2010-02-11 13:25:55.000000000 +0300 +@@ -105,7 +105,7 @@ + def default_configfile(self): + """Return the name of the found config file or raise. """ + paths = ['supervisord.conf', 'etc/supervisord.conf', +- '/etc/supervisord.conf'] ++ '/etc/supervisord.conf', '%%PREFIX%%/etc/supervisord.conf'] + config = None + for path in paths: + if os.path.exists(path): diff --git a/sysutils/py-supervisor/files/supervisord.conf.sample b/sysutils/py-supervisor/files/supervisord.conf.sample new file mode 100644 index 0000000..c1ad119 --- /dev/null +++ b/sysutils/py-supervisor/files/supervisord.conf.sample @@ -0,0 +1,129 @@ +; Sample supervisor config file. + +[unix_http_server] +file=/var/run/supervisor/supervisor.sock ; (the path to the socket file) +;chmod=0700 ; sockef file mode (default 0700) +;chown=nobody:nogroup ; socket file uid:gid owner +;username=user ; (default is no username (open server)) +;password=123 ; (default is no password (open server)) + +;[inet_http_server] ; inet (TCP) server disabled by default +;port=127.0.0.1:9001 ; (ip_address:port specifier, *:port for all iface) +;username=user ; (default is no username (open server)) +;password=123 ; (default is no password (open server)) + +[supervisord] +logfile=/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log) +logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) +logfile_backups=10 ; (num of main logfile rotation backups;default 10) +loglevel=info ; (log level;default info; others: debug,warn,trace) +pidfile=/var/run/supervisor/supervisord.pid ; (supervisord pidfile;default supervisord.pid) +nodaemon=false ; (start in foreground if true;default false) +minfds=1024 ; (min. avail startup file descriptors;default 1024) +minprocs=200 ; (min. avail process descriptors;default 200) +;umask=022 ; (process file creation umask;default 022) +;user=chrism ; (default is current user, required if root) +;identifier=supervisor ; (supervisord identifier, default is 'supervisor') +;directory=/tmp ; (default is not to cd during start) +;nocleanup=true ; (don't clean up tempfiles at start;default false) +;childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP) +;environment=KEY=value ; (key value pairs to add to environment) +;strip_ansi=false ; (strip ansi escape codes in logs; def. false) + +; the below section must remain in the config file for RPC +; (supervisorctl/web interface) to work, additional interfaces may be +; added by defining them in separate rpcinterface: sections +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl=unix:///var/run/supervisor/supervisor.sock ; use a unix:// URL for a unix socket +;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket +;username=chris ; should be same as http_username if set +;password=123 ; should be same as http_password if set +;prompt=mysupervisor ; cmd line prompt (default "supervisor") +;history_file=~/.sc_history ; use readline history if available + +; The below sample program section shows all possible program subsection values, +; create one or more 'real' program: sections to be able to control them under +; supervisor. + +;[program:theprogramname] +;command=/bin/cat ; the program (relative uses PATH, can take args) +;process_name=%(program_name)s ; process_name expr (default %(program_name)s) +;numprocs=1 ; number of processes copies to start (def 1) +;directory=/tmp ; directory to cwd to before exec (def no cwd) +;umask=022 ; umask for process (default None) +;priority=999 ; the relative start priority (default 999) +;autostart=true ; start at supervisord start (default: true) +;autorestart=true ; retstart at unexpected quit (default: true) +;startsecs=10 ; number of secs prog must stay running (def. 1) +;startretries=3 ; max # of serial start failures (default 3) +;exitcodes=0,2 ; 'expected' exit codes for process (default 0,2) +;stopsignal=QUIT ; signal used to kill process (default TERM) +;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10) +;user=chrism ; setuid to this UNIX account to run the program +;redirect_stderr=true ; redirect proc stderr to stdout (default false) +;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO +;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) +;stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) +;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0) +;stdout_events_enabled=false ; emit events on stdout writes (default false) +;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO +;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) +;stderr_logfile_backups=10 ; # of stderr logfile backups (default 10) +;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0) +;stderr_events_enabled=false ; emit events on stderr writes (default false) +;environment=A=1,B=2 ; process environment additions (def no adds) +;serverurl=AUTO ; override serverurl computation (childutils) + +; The below sample eventlistener section shows all possible +; eventlistener subsection values, create one or more 'real' +; eventlistener: sections to be able to handle event notifications +; sent by supervisor. + +;[eventlistener:theeventlistenername] +;command=/bin/eventlistener ; the program (relative uses PATH, can take args) +;process_name=%(program_name)s ; process_name expr (default %(program_name)s) +;numprocs=1 ; number of processes copies to start (def 1) +;events=EVENT ; event notif. types to subscribe to (req'd) +;buffer_size=10 ; event buffer queue size (default 10) +;directory=/tmp ; directory to cwd to before exec (def no cwd) +;umask=022 ; umask for process (default None) +;priority=-1 ; the relative start priority (default -1) +;autostart=true ; start at supervisord start (default: true) +;autorestart=unexpected ; restart at unexpected quit (default: unexpected) +;startsecs=10 ; number of secs prog must stay running (def. 1) +;startretries=3 ; max # of serial start failures (default 3) +;exitcodes=0,2 ; 'expected' exit codes for process (default 0,2) +;stopsignal=QUIT ; signal used to kill process (default TERM) +;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10) +;user=chrism ; setuid to this UNIX account to run the program +;redirect_stderr=true ; redirect proc stderr to stdout (default false) +;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO +;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) +;stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) +;stdout_events_enabled=false ; emit events on stdout writes (default false) +;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO +;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) +;stderr_logfile_backups ; # of stderr logfile backups (default 10) +;stderr_events_enabled=false ; emit events on stderr writes (default false) +;environment=A=1,B=2 ; process environment additions +;serverurl=AUTO ; override serverurl computation (childutils) + +; The below sample group section shows all possible group values, +; create one or more 'real' group: sections to create "heterogeneous" +; process groups. + +;[group:thegroupname] +;programs=progname1,progname2 ; each refers to 'x' in [program:x] definitions +;priority=999 ; the relative start priority (default 999) + +; The [include] section can just contain the "files" setting. This +; setting can list multiple files (separated by whitespace or +; newlines). It can also contain wildcards. The filenames are +; interpreted as relative to this file. Included files *cannot* +; include files themselves. + +;[include] +;files = relative/directory/*.ini diff --git a/sysutils/py-supervisor/files/supervisord.in b/sysutils/py-supervisor/files/supervisord.in new file mode 100644 index 0000000..2e21e2f --- /dev/null +++ b/sysutils/py-supervisor/files/supervisord.in @@ -0,0 +1,25 @@ +#!/bin/sh +# +# PROVIDE: supervisord +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable trac: +# supervisord_enable="YES" +# + +. %%RC_SUBR%% + +name=supervisord +rcvar=`set_rcvar` + +load_rc_config $name + +: ${supervisord_enable="NO"} +: ${supervisord_pid="/var/run/supervisor/supervisord.pid"} + +pidfile=${supervisord_pid} +command="%%PREFIX%%/bin/supervisord" +command_interpreter="%%PYTHON_CMD%%" + +run_rc_command "$1" diff --git a/sysutils/py-supervisor/pkg-plist b/sysutils/py-supervisor/pkg-plist index 595ec79..60d403f 100644 --- a/sysutils/py-supervisor/pkg-plist +++ b/sysutils/py-supervisor/pkg-plist @@ -2,14 +2,8 @@ bin/echo_supervisord_conf bin/pidproxy bin/supervisorctl bin/supervisord -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._PKG-INFO -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._SOURCES.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._dependency_links.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._entry_points.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._namespace_packages.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._not-zip-safe -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._requires.txt -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/._top_level.txt +@unexec if cmp -s %D/etc/supervisord.conf.sample %D/etc/supervisord.conf; then rm -f %D/etc/supervisord.conf; fi +etc/supervisord.conf.sample %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/PKG-INFO %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/SOURCES.txt %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/dependency_links.txt @@ -278,6 +272,9 @@ bin/supervisord %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_childutils.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_childutils.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_childutils.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_confecho.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_confecho.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_confecho.pyo %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_datatypes.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_datatypes.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_datatypes.pyo @@ -293,9 +290,6 @@ bin/supervisord %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_loggers.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_loggers.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_loggers.pyo -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_memmon.py -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_memmon.pyc -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_memmon.pyo %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_options.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_options.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_options.pyo @@ -308,6 +302,9 @@ bin/supervisord %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_socket_manager.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_socket_manager.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_socket_manager.pyo +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_states.py +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_states.pyc +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_states.pyo %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_supervisorctl.py %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_supervisorctl.pyc %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/supervisor/tests/test_supervisorctl.pyo @@ -359,4 +356,9 @@ bin/supervisord @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/doc @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO @dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%% - +@stopdaemon supervisord +@exec mkdir -p %%PIDDIR%% +@unexec echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" +@unexec echo "If you are permanently removing py-supervisor, you should also:" | /usr/bin/fmt +@unexec echo "'rm -rf %%PIDDIR%%'" | /usr/bin/fmt +@unexec echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
lwhsu 2010-04-03 17:37:19 UTC FreeBSD ports repository Modified files: sysutils/py-supervisor Makefile distinfo pkg-plist Added files: sysutils/py-supervisor/files patch-src-supervisor-options.py supervisord.conf.sample supervisord.in Log: - Update to 3.0a8 - Add rc script - Add sample configuration file PR: ports/143799 Submitted by: Hizbulin Ildar <hizel AT vyborg.ru> (maintainer) Revision Changes Path 1.2 +18 -4 ports/sysutils/py-supervisor/Makefile 1.2 +3 -3 ports/sysutils/py-supervisor/distinfo 1.1 +11 -0 ports/sysutils/py-supervisor/files/patch-src-supervisor-options.py (new) 1.1 +129 -0 ports/sysutils/py-supervisor/files/supervisord.conf.sample (new) 1.1 +28 -0 ports/sysutils/py-supervisor/files/supervisord.in (new) 1.2 +14 -12 ports/sysutils/py-supervisor/pkg-plist _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed, with minor changes. Thanks!