pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/py-supervisor



Module Name:    pkgsrc
Committed By:   wiz
Date:           Wed Jul 19 12:48:22 UTC 2023

Modified Files:
        pkgsrc/sysutils/py-supervisor: Makefile PLIST distinfo
Added Files:
        pkgsrc/sysutils/py-supervisor/files: supervisord.sh
        pkgsrc/sysutils/py-supervisor/patches:
            patch-supervisor_skel_sample.conf

Log Message:
py-supervisor: improvements for running this

Install example config file in expect location.
Adapt paths in example config for pkgsrc.
Add rc.d script and install it.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/sysutils/py-supervisor/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/sysutils/py-supervisor/PLIST
cvs rdiff -u -r1.13 -r1.14 pkgsrc/sysutils/py-supervisor/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/py-supervisor/files/supervisord.sh
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/sysutils/py-supervisor/patches/patch-supervisor_skel_sample.conf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/py-supervisor/Makefile
diff -u pkgsrc/sysutils/py-supervisor/Makefile:1.15 pkgsrc/sysutils/py-supervisor/Makefile:1.16
--- pkgsrc/sysutils/py-supervisor/Makefile:1.15 Mon Jul  3 13:04:57 2023
+++ pkgsrc/sysutils/py-supervisor/Makefile      Wed Jul 19 12:48:21 2023
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2023/07/03 13:04:57 wiz Exp $
+# $NetBSD: Makefile,v 1.16 2023/07/19 12:48:21 wiz Exp $
 
 DISTNAME=      supervisor-4.2.5
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION=   1
 CATEGORIES=    sysutils python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=s/supervisor/}
 
@@ -15,6 +16,7 @@ DEPENDS+=     ${PYPKGPREFIX}-setuptools-[0-9
 PYTHON_VERSIONS_INCOMPATIBLE=  27
 
 REPLACE_PYTHON+=       supervisor/scripts/*.py
+PYTHON_SELF_CONFLICT=  yes
 
 USE_PKG_RESOURCES=     yes
 
@@ -25,11 +27,26 @@ SUBST_FILES.python+=        supervisor/tests/fi
 SUBST_FILES.python+=   supervisor/tests/fixtures/spew.py
 SUBST_SED.python+=     -e "s,<<PYTHON>>,${PYTHONBIN},"
 
+SUBST_CLASSES+=                varbase
+SUBST_STAGE.varbase=   pre-build
+SUBST_MESSAGE.varbase= Fixing /var path.
+SUBST_VARS.varbase+=   VARBASE
+SUBST_FILES.varbase+=  supervisor/skel/sample.conf
+
+FILES_SUBST+=          PYVERSSUFFIX=${PYVERSSUFFIX}
+
+EGDIR=                 share/examples/supervisor
+RCD_SCRIPTS=           supervisord
+INSTALLATION_DIRS+=    ${EGDIR} share/examples/rc.d
+CONF_FILES+=           ${EGDIR}/supervisord.conf ${PKG_SYSCONFDIR}/supervisord.conf
+
 post-install:
 .for bin in echo_supervisord_conf pidproxy supervisorctl supervisord
        cd ${DESTDIR}${PREFIX}/bin && \
        ${MV} ${bin} ${bin}-${PYVERSSUFFIX} || ${TRUE}
 .endfor
+       ${INSTALL_DATA} ${WRKSRC}/supervisor/skel/sample.conf \
+               ${DESTDIR}${PREFIX}/share/examples/supervisor/supervisord.conf
 
 .include "../../lang/python/application.mk"
 .include "../../lang/python/egg.mk"

Index: pkgsrc/sysutils/py-supervisor/PLIST
diff -u pkgsrc/sysutils/py-supervisor/PLIST:1.5 pkgsrc/sysutils/py-supervisor/PLIST:1.6
--- pkgsrc/sysutils/py-supervisor/PLIST:1.5     Fri Dec 31 13:28:23 2021
+++ pkgsrc/sysutils/py-supervisor/PLIST Wed Jul 19 12:48:21 2023
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2021/12/31 13:28:23 adam Exp $
+@comment $NetBSD: PLIST,v 1.6 2023/07/19 12:48:21 wiz Exp $
 bin/echo_supervisord_conf-${PYVERSSUFFIX}
 bin/pidproxy-${PYVERSSUFFIX}
 bin/supervisorctl-${PYVERSSUFFIX}
@@ -251,3 +251,5 @@ ${PYSITELIB}/supervisor/web.pyo
 ${PYSITELIB}/supervisor/xmlrpc.py
 ${PYSITELIB}/supervisor/xmlrpc.pyc
 ${PYSITELIB}/supervisor/xmlrpc.pyo
+share/examples/rc.d/supervisord
+share/examples/supervisor/supervisord.conf

Index: pkgsrc/sysutils/py-supervisor/distinfo
diff -u pkgsrc/sysutils/py-supervisor/distinfo:1.13 pkgsrc/sysutils/py-supervisor/distinfo:1.14
--- pkgsrc/sysutils/py-supervisor/distinfo:1.13 Thu Dec 29 12:35:41 2022
+++ pkgsrc/sysutils/py-supervisor/distinfo      Wed Jul 19 12:48:21 2023
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.13 2022/12/29 12:35:41 adam Exp $
+$NetBSD: distinfo,v 1.14 2023/07/19 12:48:21 wiz Exp $
 
 BLAKE2s (supervisor-4.2.5.tar.gz) = 6cf1b0af6affab2adbb1c45e64b9368e77facf65e8db461926629a560b7a33f3
 SHA512 (supervisor-4.2.5.tar.gz) = ea80c8c91356646deccf20735e065fd9b341f3be6d56838d333989297a912b0a59142338925b2eb08690e038f0617814e03447673701a19093aa483432ce6d41
 Size (supervisor-4.2.5.tar.gz) = 466073 bytes
+SHA1 (patch-supervisor_skel_sample.conf) = c117955f4e2f0bcde3bf0adcad20de07c3031e9b

Added files:

Index: pkgsrc/sysutils/py-supervisor/files/supervisord.sh
diff -u /dev/null pkgsrc/sysutils/py-supervisor/files/supervisord.sh:1.1
--- /dev/null   Wed Jul 19 12:48:22 2023
+++ pkgsrc/sysutils/py-supervisor/files/supervisord.sh  Wed Jul 19 12:48:22 2023
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $NetBSD: supervisord.sh,v 1.1 2023/07/19 12:48:22 wiz Exp $
+#
+# PROVIDE: supervisord
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+name="supervisord"
+rcvar=${name}
+command="@PREFIX@/bin/supervisord-@PYVERSSUFFIX@"
+command_interpreter="@PREFIX@/bin/python@PYVERSSUFFIX@"
+required_files="@PREFIX@/etc/supervisord.conf"
+pidfile="/var/run/supervisord.pid"
+supervisord_flags="-c @PREFIX@/etc/supervisord.conf"
+
+load_rc_config $name
+run_rc_command "$1"

Index: pkgsrc/sysutils/py-supervisor/patches/patch-supervisor_skel_sample.conf
diff -u /dev/null pkgsrc/sysutils/py-supervisor/patches/patch-supervisor_skel_sample.conf:1.1
--- /dev/null   Wed Jul 19 12:48:22 2023
+++ pkgsrc/sysutils/py-supervisor/patches/patch-supervisor_skel_sample.conf     Wed Jul 19 12:48:22 2023
@@ -0,0 +1,38 @@
+$NetBSD: patch-supervisor_skel_sample.conf,v 1.1 2023/07/19 12:48:22 wiz Exp $
+
+Adapt paths for pkgsrc.
+
+--- supervisor/skel/sample.conf.orig   2022-11-25 17:42:03.000000000 +0000
++++ supervisor/skel/sample.conf
+@@ -20,7 +20,7 @@
+ ;  is deleted, supervisorctl will be unable to connect to supervisord.
+ 
+ [unix_http_server]
+-file=/tmp/supervisor.sock   ; the path to the socket file
++file=@VARBASE@/run/supervisor.sock   ; the path to the socket file
+ ;chmod=0700                 ; socket file mode (default 0700)
+ ;chown=nobody:nogroup       ; socket file uid:gid owner
+ ;username=user              ; default is no username (open server)
+@@ -42,11 +42,11 @@ file=/tmp/supervisor.sock   ; the path t
+ ;password=123               ; default is no password (open server)
+ 
+ [supervisord]
+-logfile=/tmp/supervisord.log ; main log file; default $CWD/supervisord.log
++logfile=@VARBASE@/log/supervisord.log ; main log file; default $CWD/supervisord.log
+ logfile_maxbytes=50MB        ; max main logfile bytes b4 rotation; default 50MB
+ logfile_backups=10           ; # of main logfile backups; 0 means none, default 10
+ loglevel=info                ; log level; default info; others: debug,warn,trace
+-pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid
++pidfile=@VARBASE@/run/supervisord.pid ; supervisord pidfile; default supervisord.pid
+ nodaemon=false               ; start in foreground if true; default false
+ silent=false                 ; no logs to stdout if true; default false
+ minfds=1024                  ; min. avail startup file descriptors; default 1024
+@@ -72,7 +72,7 @@ supervisor.rpcinterface_factory = superv
+ ; or inet_http_server section.
+ 
+ [supervisorctl]
+-serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL  for a unix socket
++serverurl=unix://@VARBASE@/run/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 in [*_http_server] if set
+ ;password=123                ; should be same as in [*_http_server] if set



Home | Main Index | Thread Index | Old Index