aboutsummaryrefslogtreecommitdiff
path: root/sysutils/py-supervisor
diff options
context:
space:
mode:
authorWen Heping <wen@FreeBSD.org>2018-09-22 08:26:51 +0000
committerWen Heping <wen@FreeBSD.org>2018-09-22 08:26:51 +0000
commitaf59b92a0cf64f6e717e5c039e3c40cd00db1a25 (patch)
tree3c9b30a96083b38fe3b0b89b94ccf9c8b8a6ee71 /sysutils/py-supervisor
parent2b1760f9a17a7aca7bc44935c9d7292e06ace7ac (diff)
downloadports-af59b92a0cf64f6e717e5c039e3c40cd00db1a25.tar.gz
ports-af59b92a0cf64f6e717e5c039e3c40cd00db1a25.zip
Notes
Diffstat (limited to 'sysutils/py-supervisor')
-rw-r--r--sysutils/py-supervisor/Makefile19
-rw-r--r--sysutils/py-supervisor/distinfo6
-rw-r--r--sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py85
-rw-r--r--sysutils/py-supervisor/files/patch-supervisor-tests-test_supervisorctl.py40
-rw-r--r--sysutils/py-supervisor/files/patch-supervisor_options.py4
-rw-r--r--sysutils/py-supervisor/files/patch-supervisor_tests_test__options.py18
-rw-r--r--sysutils/py-supervisor/pkg-plist6
7 files changed, 35 insertions, 143 deletions
diff --git a/sysutils/py-supervisor/Makefile b/sysutils/py-supervisor/Makefile
index 78e1b2d864f8..5832143a6c27 100644
--- a/sysutils/py-supervisor/Makefile
+++ b/sysutils/py-supervisor/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= supervisor
-PORTVERSION= 3.3.3
+PORTVERSION= 3.3.4
PORTEPOCH= 1
CATEGORIES= sysutils python
MASTER_SITES= CHEESESHOP
@@ -14,30 +14,35 @@ COMMENT= System for controlling process state under UNIX
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}meld3>=0.6.5:www/py-meld3@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mock>=0.5.0:devel/py-mock@${PY_FLAVOR}
-PORTDOCS= *.txt *.rst
-
-NO_ARCH= yes
-
USES= python:2.7 shebangfix
USE_PYTHON= distutils autoplist
PIDDIR?= /var/run/supervisor
+NO_ARCH= yes
+PLIST_FILES= '@sample etc/supervisord.conf.sample'
+PLIST_DIRS= ${PIDDIR}
+
SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \
PIDDIR=${PIDDIR}
PLIST_SUB= PIDDIR=${PIDDIR}
USE_RC_SUBR= supervisord
SHEBANG_FILES= supervisor/scripts/*.py supervisor/tests/fixtures/*.py
-python_OLD_CMD= "/usr/bin/env python"
python_OLD_CMD+= "<<PYTHON>>"
+PORTDOCS= *.txt *.rst
+
OPTIONS_DEFINE= DOCS
post-patch:
- @${REINPLACE_CMD} -e 's!%%PREFIX%%!${PREFIX}!' ${WRKSRC}/supervisor/options.py
+ @${REINPLACE_CMD} -e 's!%%PREFIX%%!${PREFIX}!' ${WRKSRC}/supervisor/options.py \
+ ${WRKSRC}/supervisor/tests/test_options.py
post-install:
${INSTALL_DATA} ${FILESDIR}/supervisord.conf.sample ${STAGEDIR}${PREFIX}/etc
+ ${INSTALL} -d ${STAGEDIR}${PIDDIR}
+
+post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/
diff --git a/sysutils/py-supervisor/distinfo b/sysutils/py-supervisor/distinfo
index 1876484a102c..ad5501158cb6 100644
--- a/sysutils/py-supervisor/distinfo
+++ b/sysutils/py-supervisor/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1505483926
-SHA256 (supervisor-3.3.3.tar.gz) = 96287ebfabf9a6923f74123b056c4da39c617fef367980f007cac02fba6527ad
-SIZE (supervisor-3.3.3.tar.gz) = 418354
+TIMESTAMP = 1534438600
+SHA256 (supervisor-3.3.4.tar.gz) = 212201a3fd1d35c150ef0c35bf0676fd1a6c195fb60bf0f2147fe7dbd317e672
+SIZE (supervisor-3.3.4.tar.gz) = 419794
diff --git a/sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py b/sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py
deleted file mode 100644
index 884acec794a0..000000000000
--- a/sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py
+++ /dev/null
@@ -1,85 +0,0 @@
---- supervisor/tests/test_options.py.orig 2016-05-14 21:19:49.000000000 +0300
-+++ supervisor/tests/test_options.py 2016-06-08 17:05:08.114929000 +0300
-@@ -157,15 +157,15 @@ class OptionTests(unittest.TestCase):
- short=False,
- )
-
-- def test_searchpaths(self):
-- options = self._makeOptions()
-- self.assertEqual(len(options.searchpaths), 6)
-- self.assertEqual(options.searchpaths[-4:], [
-- 'supervisord.conf',
-- 'etc/supervisord.conf',
-- '/etc/supervisord.conf',
-- '/etc/supervisor/supervisord.conf',
-- ])
-+# def test_searchpaths(self):
-+# options = self._makeOptions()
-+# self.assertEqual(len(options.searchpaths), 6)
-+# self.assertEqual(options.searchpaths[-4:], [
-+# 'supervisord.conf',
-+# 'etc/supervisord.conf',
-+# '/etc/supervisord.conf',
-+# '/etc/supervisor/supervisord.conf',
-+# ])
-
- def test_options_and_args_order(self):
- # Only config file exists
-@@ -352,17 +352,17 @@ class ClientOptionsTests(unittest.TestCa
- except ValueError, exc:
- self.assertTrue("could not find config file" in exc.args[0])
-
-- def test_read_config_unreadable(self):
-- instance = self._makeOne()
-- def dummy_open(fn, mode):
-- raise IOError(errno.EACCES, 'Permission denied: %s' % fn)
-- instance.open = dummy_open
--
-- try:
-- instance.read_config(__file__)
-- self.fail("expected exception")
-- except ValueError, exc:
-- self.assertTrue("could not read config file" in exc.args[0])
-+# def test_read_config_unreadable(self):
-+# instance = self._makeOne()
-+# def dummy_open(fn, mode):
-+# raise IOError(errno.EACCES, 'Permission denied: %s' % fn)
-+# instance.open = dummy_open
-+
-+# try:
-+# instance.read_config(__file__)
-+# self.fail("expected exception")
-+# except ValueError, exc:
-+# self.assertTrue("could not read config file" in exc.args[0])
-
- def test_read_config_no_supervisord_section_raises_valueerror(self):
- instance = self._makeOne()
-@@ -803,17 +803,17 @@ class ServerOptionsTests(unittest.TestCa
- except ValueError, exc:
- self.assertTrue("could not find config file" in exc.args[0])
-
-- def test_read_config_unreadable(self):
-- instance = self._makeOne()
-- def dummy_open(fn, mode):
-- raise IOError(errno.EACCES, 'Permission denied: %s' % fn)
-- instance.open = dummy_open
--
-- try:
-- instance.read_config(__file__)
-- self.fail("nothing raised")
-- except ValueError, exc:
-- self.assertTrue("could not read config file" in exc.args[0])
-+# def test_read_config_unreadable(self):
-+# instance = self._makeOne()
-+# def dummy_open(fn, mode):
-+# raise IOError(errno.EACCES, 'Permission denied: %s' % fn)
-+# instance.open = dummy_open
-+
-+# try:
-+# instance.read_config(__file__)
-+# self.fail("nothing raised")
-+# except ValueError, exc:
-+# self.assertTrue("could not read config file" in exc.args[0])
-
- def test_read_config_malformed_config_file_raises_valueerror(self):
- instance = self._makeOne()
diff --git a/sysutils/py-supervisor/files/patch-supervisor-tests-test_supervisorctl.py b/sysutils/py-supervisor/files/patch-supervisor-tests-test_supervisorctl.py
deleted file mode 100644
index b97b75cd8a7a..000000000000
--- a/sysutils/py-supervisor/files/patch-supervisor-tests-test_supervisorctl.py
+++ /dev/null
@@ -1,40 +0,0 @@
---- supervisor/tests/test_supervisorctl.py.orig 2016-06-08 17:08:09.404989000 +0300
-+++ supervisor/tests/test_supervisorctl.py 2016-06-08 17:08:32.361939000 +0300
-@@ -1562,23 +1562,23 @@ class TestDefaultControllerPlugin(unitte
- val = plugin.ctl.stdout.getvalue()
- self.assertTrue(val.startswith('Error: bad argument wrong'), val)
-
-- def _dont_test_maintail_dashf(self):
-+# def _dont_test_maintail_dashf(self):
- # https://github.com/Supervisor/supervisor/issues/285
- # TODO: Refactor so we can test more of maintail -f than just a
- # connect error, and fix this test so it passes on FreeBSD.
-- plugin = self._makeOne()
-- plugin.listener = DummyListener()
-- result = plugin.do_maintail('-f')
-- self.assertEqual(result, None)
-- errors = plugin.listener.errors
-- self.assertEqual(len(errors), 1)
-- error = errors[0]
-- self.assertEqual(plugin.listener.closed,
-- 'http://localhost:65532/mainlogtail')
-- self.assertEqual(error[0],
-- 'http://localhost:65532/mainlogtail')
-- for msg in ('Cannot connect', 'socket.error'):
-- self.assertTrue(msg in error[1])
-+# plugin = self._makeOne()
-+# plugin.listener = DummyListener()
-+# result = plugin.do_maintail('-f')
-+# self.assertEqual(result, None)
-+# errors = plugin.listener.errors
-+# self.assertEqual(len(errors), 1)
-+# error = errors[0]
-+# self.assertEqual(plugin.listener.closed,
-+# 'http://localhost:65532/mainlogtail')
-+# self.assertEqual(error[0],
-+# 'http://localhost:65532/mainlogtail')
-+# for msg in ('Cannot connect', 'socket.error'):
-+# self.assertTrue(msg in error[1])
-
- def test_maintail_bad_modifier(self):
- plugin = self._makeOne()
diff --git a/sysutils/py-supervisor/files/patch-supervisor_options.py b/sysutils/py-supervisor/files/patch-supervisor_options.py
index 3e20c2d10381..4b4cb859e68b 100644
--- a/sysutils/py-supervisor/files/patch-supervisor_options.py
+++ b/sysutils/py-supervisor/files/patch-supervisor_options.py
@@ -1,5 +1,5 @@
---- supervisor/options.py.orig 2016-06-08 17:09:41.213297000 +0300
-+++ supervisor/options.py 2016-06-08 17:10:18.970354000 +0300
+--- supervisor/options.py.orig 2018-02-15 21:18:33 UTC
++++ supervisor/options.py
@@ -96,13 +96,7 @@ class Options:
self.add("configfile", None, "c:", "configuration=")
diff --git a/sysutils/py-supervisor/files/patch-supervisor_tests_test__options.py b/sysutils/py-supervisor/files/patch-supervisor_tests_test__options.py
new file mode 100644
index 000000000000..baee4d2e92c4
--- /dev/null
+++ b/sysutils/py-supervisor/files/patch-supervisor_tests_test__options.py
@@ -0,0 +1,18 @@
+--- supervisor/tests/test_options.py.orig 2018-02-15 21:31:47 UTC
++++ supervisor/tests/test_options.py
+@@ -160,12 +160,9 @@ class OptionTests(unittest.TestCase):
+
+ def test_searchpaths(self):
+ options = self._makeOptions()
+- self.assertEqual(len(options.searchpaths), 6)
+- self.assertEqual(options.searchpaths[-4:], [
+- 'supervisord.conf',
+- 'etc/supervisord.conf',
+- '/etc/supervisord.conf',
+- '/etc/supervisor/supervisord.conf',
++ self.assertEqual(len(options.searchpaths), 1)
++ self.assertEqual(options.searchpaths[-1:], [
++ '%%PREFIX%%/etc/supervisord.conf',
+ ])
+
+ def test_options_and_args_order(self):
diff --git a/sysutils/py-supervisor/pkg-plist b/sysutils/py-supervisor/pkg-plist
deleted file mode 100644
index 3b5eb63d8ff9..000000000000
--- a/sysutils/py-supervisor/pkg-plist
+++ /dev/null
@@ -1,6 +0,0 @@
-@sample etc/supervisord.conf.sample
-@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 "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="