aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFukang Chen <loader@FreeBSD.org>2017-11-08 07:58:51 +0000
committerFukang Chen <loader@FreeBSD.org>2017-11-08 07:58:51 +0000
commit9838e7ff64319c88766d7287ab0371b769dbe07f (patch)
treec9a6723d8de0c123aec2c3b75f6add2b2376dd1f
parent77675b2f8b754b48f6c58e2bb62b99c2013e2edd (diff)
downloadports-9838e7ff64319c88766d7287ab0371b769dbe07f.tar.gz
ports-9838e7ff64319c88766d7287ab0371b769dbe07f.zip
Notes
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/py-superlance/Makefile33
-rw-r--r--sysutils/py-superlance/distinfo3
-rw-r--r--sysutils/py-superlance/files/patch-superlance_httpok.py24
-rw-r--r--sysutils/py-superlance/files/patch-superlance_memmon.py15
-rw-r--r--sysutils/py-superlance/pkg-descr4
6 files changed, 80 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index ce4e8e56fa49..0d806a531a53 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -919,6 +919,7 @@
SUBDIR += py-scriptine
SUBDIR += py-shutilwhich
SUBDIR += py-stdiff
+ SUBDIR += py-superlance
SUBDIR += py-supervisor
SUBDIR += py-tmuxp
SUBDIR += py-uptime
diff --git a/sysutils/py-superlance/Makefile b/sysutils/py-superlance/Makefile
new file mode 100644
index 000000000000..d38fec79bfa1
--- /dev/null
+++ b/sysutils/py-superlance/Makefile
@@ -0,0 +1,33 @@
+# Created by: Fukang Chen <loader@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= superlance
+PORTVERSION= 1.0.0
+CATEGORIES= sysutils python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= loader@FreeBSD.org
+COMMENT= Superlance plugins for supervisord
+
+LICENSE= BSD4CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}supervisor>0:sysutils/py-supervisor
+
+NO_ARCH= yes
+
+# Actually 2.6-2.7,3.2-3.5
+USES= python:2.7
+USE_PYTHON= autoplist distutils
+
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_REL} < 3300
+TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock
+.endif
+
+do-test:
+ @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
+
+.include <bsd.port.post.mk>
diff --git a/sysutils/py-superlance/distinfo b/sysutils/py-superlance/distinfo
new file mode 100644
index 000000000000..8b75fa6ba92b
--- /dev/null
+++ b/sysutils/py-superlance/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1508254575
+SHA256 (superlance-1.0.0.tar.gz) = f697c71341e9a686f3a0ff3f04a82448523eac0a6121484933729ba65a973a63
+SIZE (superlance-1.0.0.tar.gz) = 36909
diff --git a/sysutils/py-superlance/files/patch-superlance_httpok.py b/sysutils/py-superlance/files/patch-superlance_httpok.py
new file mode 100644
index 000000000000..e5390ea7fd09
--- /dev/null
+++ b/sysutils/py-superlance/files/patch-superlance_httpok.py
@@ -0,0 +1,24 @@
+GDB installs gcore(1) shell script on Linux:
+
+gcore(1):
+ -o filename
+ write core file to filename instead of core.pid
+
+gcore(1) is disabled in the devel/gdb port, and FreeBSD's
+gcore(1) provides a different command line option
+
+gcore(1):
+ -c Write the core file to the specified file instead of
+ "core.<pid>".
+
+--- superlance/httpok.py.orig 2017-10-25 04:36:10 UTC
++++ superlance/httpok.py
+@@ -351,7 +351,7 @@ def main(argv=sys.argv):
+ programs = []
+ any = False
+ sendmail = '/usr/sbin/sendmail -t -i'
+- gcore = '/usr/bin/gcore -o'
++ gcore = '/usr/bin/gcore -c'
+ coredir = None
+ eager = True
+ email = None
diff --git a/sysutils/py-superlance/files/patch-superlance_memmon.py b/sysutils/py-superlance/files/patch-superlance_memmon.py
new file mode 100644
index 000000000000..c834892b5a52
--- /dev/null
+++ b/sysutils/py-superlance/files/patch-superlance_memmon.py
@@ -0,0 +1,15 @@
+FreeBSD's ps(1) only supports adding an equals sign to the last
+keyword, the original command returns a list of pid with non-empty
+header on FreeBSD.
+
+--- superlance/memmon.py.orig 2017-10-25 04:36:57 UTC
++++ superlance/memmon.py
+@@ -114,7 +114,7 @@ class Memmon:
+ self.stdout = sys.stdout
+ self.stderr = sys.stderr
+ self.pscommand = 'ps -orss= -p %s'
+- self.pstreecommand = 'ps ax -o "pid= ppid= rss="'
++ self.pstreecommand = 'ps ax -o pid= -o ppid= -o rss='
+ self.mailed = False # for unit tests
+
+ def runforever(self, test=False):
diff --git a/sysutils/py-superlance/pkg-descr b/sysutils/py-superlance/pkg-descr
new file mode 100644
index 000000000000..9571f89c01b1
--- /dev/null
+++ b/sysutils/py-superlance/pkg-descr
@@ -0,0 +1,4 @@
+Superlance is a package of plugin utilities for monitoring and controlling
+processes that run under supervisor.
+
+WWW: https://github.com/Supervisor/superlance