aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorlwhsu <lwhsu@FreeBSD.org>2010-04-04 01:37:19 +0800
committerlwhsu <lwhsu@FreeBSD.org>2010-04-04 01:37:19 +0800
commita62fde33292742912b015d45d0ad065bd958fc90 (patch)
tree80e708a8c568069def88fa9676d2ea14a8b1b63a /sysutils
parent91939f80183c3485d8ebd567b02edc9609dcac29 (diff)
downloadfreebsd-ports-gnome-a62fde33292742912b015d45d0ad065bd958fc90.tar.gz
freebsd-ports-gnome-a62fde33292742912b015d45d0ad065bd958fc90.tar.zst
freebsd-ports-gnome-a62fde33292742912b015d45d0ad065bd958fc90.zip
- Update to 3.0a8
- Add rc script - Add sample configuration file PR: ports/143799 Submitted by: Hizbulin Ildar <hizel AT vyborg.ru> (maintainer)
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/py-supervisor/Makefile22
-rw-r--r--sysutils/py-supervisor/distinfo6
-rw-r--r--sysutils/py-supervisor/files/patch-src-supervisor-options.py11
-rw-r--r--sysutils/py-supervisor/files/supervisord.conf.sample129
-rw-r--r--sysutils/py-supervisor/files/supervisord.in28
-rw-r--r--sysutils/py-supervisor/pkg-plist26
6 files changed, 203 insertions, 19 deletions
diff --git a/sysutils/py-supervisor/Makefile b/sysutils/py-supervisor/Makefile
index 4b3eda89a9cb..bdf2dab61450 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,25 @@ 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} \
+ PIDDIR=${PIDDIR}
+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 b99c658bbbd2..c4bfe0e8efe3 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 000000000000..46c7f1737f4a
--- /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 000000000000..c1ad119769d0
--- /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 000000000000..9c9390146891
--- /dev/null
+++ b/sysutils/py-supervisor/files/supervisord.in
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: supervisord
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf.local or /etc/rc.conf
+# to enable supervisord:
+#
+# supervisord_enable="YES"
+#
+
+. /etc/rc.subr
+
+name="supervisord"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/bin/${name}"
+command_interpreter="%%PYTHON_CMD%%"
+pidfile="%%PIDDIR%%/${name}.pid"
+
+load_rc_config $name
+
+: ${supervisord_enable="NO"}
+
+run_rc_command "$1"
diff --git a/sysutils/py-supervisor/pkg-plist b/sysutils/py-supervisor/pkg-plist
index 595ec79cf101..60d403f48d4f 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 "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="