aboutsummaryrefslogtreecommitdiff
path: root/sysutils/py-supervisor
diff options
context:
space:
mode:
authorDmitry Sivachenko <demon@FreeBSD.org>2016-06-24 13:48:31 +0000
committerDmitry Sivachenko <demon@FreeBSD.org>2016-06-24 13:48:31 +0000
commit596e13c6f3d94b4420f8c4ca60271747a31cf2b9 (patch)
tree682c0d4eca8491a9c2923837dc0e1f6668a44f06 /sysutils/py-supervisor
parente20a6011f46b0b08e9938e7a392b322b16703925 (diff)
downloadports-596e13c6f3d94b4420f8c4ca60271747a31cf2b9.tar.gz
ports-596e13c6f3d94b4420f8c4ca60271747a31cf2b9.zip
Notes
Diffstat (limited to 'sysutils/py-supervisor')
-rw-r--r--sysutils/py-supervisor/Makefile3
-rw-r--r--sysutils/py-supervisor/distinfo5
-rw-r--r--sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py120
-rw-r--r--sysutils/py-supervisor/files/patch-supervisor-tests-test_supervisorctl.py19
-rw-r--r--sysutils/py-supervisor/files/patch-supervisor_options.py17
5 files changed, 93 insertions, 71 deletions
diff --git a/sysutils/py-supervisor/Makefile b/sysutils/py-supervisor/Makefile
index 5c504bc33af8..35fe8fe10d25 100644
--- a/sysutils/py-supervisor/Makefile
+++ b/sysutils/py-supervisor/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= supervisor
-PORTVERSION= 3.0
-PORTREVISION= 1
+PORTVERSION= 3.3.0
PORTEPOCH= 1
CATEGORIES= sysutils python
MASTER_SITES= CHEESESHOP
diff --git a/sysutils/py-supervisor/distinfo b/sysutils/py-supervisor/distinfo
index 75db046bc104..baae10d3fb32 100644
--- a/sysutils/py-supervisor/distinfo
+++ b/sysutils/py-supervisor/distinfo
@@ -1,2 +1,3 @@
-SHA256 (supervisor-3.0.tar.gz) = 82aac54c5760b6a4f4c28dda203714e362a68b4a9ba8549fa65955998e3a2212
-SIZE (supervisor-3.0.tar.gz) = 459820
+TIMESTAMP = 1465394448
+SHA256 (supervisor-3.3.0.tar.gz) = 3176fb8a78c60164020e252e4a2b50b039cfec1f410b4562a843b66186188652
+SIZE (supervisor-3.3.0.tar.gz) = 416329
diff --git a/sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py b/sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py
index a2c67adebb95..884acec794a0 100644
--- a/sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py
+++ b/sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py
@@ -1,71 +1,85 @@
---- supervisor/tests/test_options.py.old 2013-08-23 15:04:37.000000000 +0400
-+++ supervisor/tests/test_options.py 2013-08-23 15:07:45.000000000 +0400
-@@ -56,12 +56,12 @@
- short='p:', long='other=', handler=integer)
- return options
+--- 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.assertEquals(len(options.searchpaths), 5)
-- self.assertTrue('supervisord.conf' in options.searchpaths)
-- self.assertTrue('etc/supervisord.conf' in options.searchpaths)
-- self.assertTrue('/etc/supervisord.conf' in options.searchpaths)
+- 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.assertEquals(len(options.searchpaths), 5)
-+# self.assertTrue('supervisord.conf' in options.searchpaths)
-+# self.assertTrue('etc/supervisord.conf' in options.searchpaths)
-+# self.assertTrue('/etc/supervisord.conf' in options.searchpaths)
++# 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
-@@ -209,15 +209,15 @@
- else:
- self.fail("expected exception")
+@@ -352,17 +352,17 @@ class ClientOptionsTests(unittest.TestCa
+ except ValueError, exc:
+ self.assertTrue("could not find config file" in exc.args[0])
-- tempf = tempfile.NamedTemporaryFile()
-- os.chmod(tempf.name, 0) # Removing read perms
+- 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(tempf.name)
-- except ValueError, e:
-- self.assertTrue("could not read config file" in str(e))
-- else:
+- instance.read_config(__file__)
- self.fail("expected exception")
-- tempf.close()
-+# tempf = tempfile.NamedTemporaryFile()
-+# os.chmod(tempf.name, 0) # Removing read perms
+- 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(tempf.name)
-+# except ValueError, e:
-+# self.assertTrue("could not read config file" in str(e))
-+# else:
++# instance.read_config(__file__)
+# self.fail("expected exception")
-+# tempf.close()
++# except ValueError, exc:
++# self.assertTrue("could not read config file" in exc.args[0])
- def test_options_unixsocket_cli(self):
- from StringIO import StringIO
-@@ -616,15 +616,15 @@
- else:
- self.fail("expected exception")
+ 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])
-- tempf = tempfile.NamedTemporaryFile()
-- os.chmod(tempf.name, 0) # Removing read perms
+- 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(tempf.name)
-- except ValueError, e:
-- self.assertTrue("could not read config file" in str(e))
-- else:
-- self.fail("expected exception")
-- tempf.close()
-+# tempf = tempfile.NamedTemporaryFile()
-+# os.chmod(tempf.name, 0) # Removing read perms
+- 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(tempf.name)
-+# except ValueError, e:
-+# self.assertTrue("could not read config file" in str(e))
-+# else:
-+# self.fail("expected exception")
-+# tempf.close()
++# instance.read_config(__file__)
++# self.fail("nothing raised")
++# except ValueError, exc:
++# self.assertTrue("could not read config file" in exc.args[0])
- def test_readFile_failed(self):
- from supervisor.options import readFile
+ 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
index 9477c8141b4b..b97b75cd8a7a 100644
--- a/sysutils/py-supervisor/files/patch-supervisor-tests-test_supervisorctl.py
+++ b/sysutils/py-supervisor/files/patch-supervisor-tests-test_supervisorctl.py
@@ -1,13 +1,18 @@
---- supervisor/tests/test_supervisorctl.py.old 2013-05-27 06:39:09.000000000 +0400
-+++ supervisor/tests/test_supervisorctl.py 2013-08-23 15:06:11.000000000 +0400
-@@ -889,19 +889,19 @@
+--- 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.failUnless(val.startswith('Error: bad argument wrong'), val)
+ self.assertTrue(val.startswith('Error: bad argument wrong'), val)
-- def test_maintail_dashf(self):
+- 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]
@@ -17,10 +22,10 @@
- 'http://localhost:65532/mainlogtail')
- for msg in ('Cannot connect', 'socket.error'):
- self.assertTrue(msg in error[1])
-+# def test_maintail_dashf(self):
+# 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]
@@ -31,5 +36,5 @@
+# for msg in ('Cannot connect', 'socket.error'):
+# self.assertTrue(msg in error[1])
- def test_maintail_nobytes(self):
+ 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 12876cb4548b..3e20c2d10381 100644
--- a/sysutils/py-supervisor/files/patch-supervisor_options.py
+++ b/sysutils/py-supervisor/files/patch-supervisor_options.py
@@ -1,14 +1,17 @@
---- supervisor/options.py.orig 2013-06-20 21:00:12.000000000 +0400
-+++ supervisor/options.py 2013-08-08 14:41:08.000000000 +0400
-@@ -99,10 +99,7 @@
+--- supervisor/options.py.orig 2016-06-08 17:09:41.213297000 +0300
++++ supervisor/options.py 2016-06-08 17:10:18.970354000 +0300
+@@ -96,13 +96,7 @@ class Options:
self.add("configfile", None, "c:", "configuration=")
here = os.path.dirname(os.path.dirname(sys.argv[0]))
- searchpaths = [os.path.join(here, 'etc', 'supervisord.conf'),
- os.path.join(here, 'supervisord.conf'),
-- 'supervisord.conf', 'etc/supervisord.conf',
-- '/etc/supervisord.conf']
-+ searchpaths = [ '/usr/local/etc/supervisord.conf' ]
+- 'supervisord.conf',
+- 'etc/supervisord.conf',
+- '/etc/supervisord.conf',
+- '/etc/supervisor/supervisord.conf',
+- ]
++ searchpaths = [ '%%PREFIX%%/etc/supervisord.conf' ]
self.searchpaths = searchpaths
- def default_configfile(self):
+ self.environ_expansions = {}