View | Details | Raw Unified | Return to bug 210140
Collapse All | Expand All

(-)Makefile (-2 / +1 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	supervisor
4
PORTNAME=	supervisor
5
PORTVERSION=	3.0
5
PORTVERSION=	3.3.0
6
PORTREVISION=	1
7
PORTEPOCH=	1
6
PORTEPOCH=	1
8
CATEGORIES=	sysutils python
7
CATEGORIES=	sysutils python
9
MASTER_SITES=	CHEESESHOP
8
MASTER_SITES=	CHEESESHOP
(-)distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (supervisor-3.0.tar.gz) = 82aac54c5760b6a4f4c28dda203714e362a68b4a9ba8549fa65955998e3a2212
1
TIMESTAMP = 1465394448
2
SIZE (supervisor-3.0.tar.gz) = 459820
2
SHA256 (supervisor-3.3.0.tar.gz) = 3176fb8a78c60164020e252e4a2b50b039cfec1f410b4562a843b66186188652
3
SIZE (supervisor-3.3.0.tar.gz) = 416329
(-)files/patch-supervisor-tests-test_options.py (-53 / +67 lines)
Lines 1-71 Link Here
1
--- supervisor/tests/test_options.py.old	2013-08-23 15:04:37.000000000 +0400
1
--- supervisor/tests/test_options.py.orig	2016-05-14 21:19:49.000000000 +0300
2
+++ supervisor/tests/test_options.py	2013-08-23 15:07:45.000000000 +0400
2
+++ supervisor/tests/test_options.py	2016-06-08 17:05:08.114929000 +0300
3
@@ -56,12 +56,12 @@
3
@@ -157,15 +157,15 @@ class OptionTests(unittest.TestCase):
4
                     short='p:', long='other=', handler=integer)
4
             short=False,
5
         return options
5
             )
6
 
6
 
7
-    def test_searchpaths(self):
7
-    def test_searchpaths(self):
8
-        options = self._makeOptions()
8
-        options = self._makeOptions()
9
-        self.assertEquals(len(options.searchpaths), 5)
9
-        self.assertEqual(len(options.searchpaths), 6)
10
-        self.assertTrue('supervisord.conf' in options.searchpaths)
10
-        self.assertEqual(options.searchpaths[-4:], [
11
-        self.assertTrue('etc/supervisord.conf' in options.searchpaths)
11
-            'supervisord.conf',
12
-        self.assertTrue('/etc/supervisord.conf' in options.searchpaths)
12
-            'etc/supervisord.conf',
13
-            '/etc/supervisord.conf',
14
-            '/etc/supervisor/supervisord.conf',
15
-            ])
13
+#    def test_searchpaths(self):
16
+#    def test_searchpaths(self):
14
+#        options = self._makeOptions()
17
+#        options = self._makeOptions()
15
+#        self.assertEquals(len(options.searchpaths), 5)
18
+#        self.assertEqual(len(options.searchpaths), 6)
16
+#        self.assertTrue('supervisord.conf' in options.searchpaths)
19
+#        self.assertEqual(options.searchpaths[-4:], [
17
+#        self.assertTrue('etc/supervisord.conf' in options.searchpaths)
20
+#            'supervisord.conf',
18
+#        self.assertTrue('/etc/supervisord.conf' in options.searchpaths)
21
+#            'etc/supervisord.conf',
22
+#            '/etc/supervisord.conf',
23
+#            '/etc/supervisor/supervisord.conf',
24
+#            ])
19
 
25
 
20
     def test_options_and_args_order(self):
26
     def test_options_and_args_order(self):
21
         # Only config file exists
27
         # Only config file exists
22
@@ -209,15 +209,15 @@
28
@@ -352,17 +352,17 @@ class ClientOptionsTests(unittest.TestCa
23
         else:
29
         except ValueError, exc:
24
             self.fail("expected exception")
30
             self.assertTrue("could not find config file" in exc.args[0])
25
 
31
 
26
-        tempf = tempfile.NamedTemporaryFile()
32
-    def test_read_config_unreadable(self):
27
-        os.chmod(tempf.name, 0) # Removing read perms
33
-        instance = self._makeOne()
34
-        def dummy_open(fn, mode):
35
-            raise IOError(errno.EACCES, 'Permission denied: %s' % fn)
36
-        instance.open = dummy_open
37
-
28
-        try:
38
-        try:
29
-            instance.read_config(tempf.name)
39
-            instance.read_config(__file__)
30
-        except ValueError, e:
31
-            self.assertTrue("could not read config file" in str(e))
32
-        else:
33
-            self.fail("expected exception")
40
-            self.fail("expected exception")
34
-        tempf.close()
41
-        except ValueError, exc:
35
+#        tempf = tempfile.NamedTemporaryFile()
42
-            self.assertTrue("could not read config file" in exc.args[0])
36
+#        os.chmod(tempf.name, 0) # Removing read perms
43
+#    def test_read_config_unreadable(self):
44
+#        instance = self._makeOne()
45
+#        def dummy_open(fn, mode):
46
+#            raise IOError(errno.EACCES, 'Permission denied: %s' % fn)
47
+#        instance.open = dummy_open
48
+
37
+#        try:
49
+#        try:
38
+#            instance.read_config(tempf.name)
50
+#            instance.read_config(__file__)
39
+#        except ValueError, e:
40
+#            self.assertTrue("could not read config file" in str(e))
41
+#        else:
42
+#            self.fail("expected exception")
51
+#            self.fail("expected exception")
43
+#        tempf.close()
52
+#        except ValueError, exc:
53
+#            self.assertTrue("could not read config file" in exc.args[0])
44
 
54
 
45
     def test_options_unixsocket_cli(self):
55
     def test_read_config_no_supervisord_section_raises_valueerror(self):
46
         from StringIO import StringIO
56
         instance = self._makeOne()
47
@@ -616,15 +616,15 @@
57
@@ -803,17 +803,17 @@ class ServerOptionsTests(unittest.TestCa
48
         else:
58
         except ValueError, exc:
49
             self.fail("expected exception")
59
             self.assertTrue("could not find config file" in exc.args[0])
50
 
60
 
51
-        tempf = tempfile.NamedTemporaryFile()
61
-    def test_read_config_unreadable(self):
52
-        os.chmod(tempf.name, 0) # Removing read perms
62
-        instance = self._makeOne()
63
-        def dummy_open(fn, mode):
64
-            raise IOError(errno.EACCES, 'Permission denied: %s' % fn)
65
-        instance.open = dummy_open
66
-
53
-        try:
67
-        try:
54
-            instance.read_config(tempf.name)
68
-            instance.read_config(__file__)
55
-        except ValueError, e:
69
-            self.fail("nothing raised")
56
-            self.assertTrue("could not read config file" in str(e))
70
-        except ValueError, exc:
57
-        else:
71
-            self.assertTrue("could not read config file" in exc.args[0])
58
-            self.fail("expected exception")
72
+#    def test_read_config_unreadable(self):
59
-        tempf.close()
73
+#        instance = self._makeOne()
60
+#        tempf = tempfile.NamedTemporaryFile()
74
+#        def dummy_open(fn, mode):
61
+#        os.chmod(tempf.name, 0) # Removing read perms
75
+#            raise IOError(errno.EACCES, 'Permission denied: %s' % fn)
76
+#        instance.open = dummy_open
77
+
62
+#        try:
78
+#        try:
63
+#            instance.read_config(tempf.name)
79
+#            instance.read_config(__file__)
64
+#        except ValueError, e:
80
+#            self.fail("nothing raised")
65
+#            self.assertTrue("could not read config file" in str(e))
81
+#        except ValueError, exc:
66
+#        else:
82
+#            self.assertTrue("could not read config file" in exc.args[0])
67
+#            self.fail("expected exception")
68
+#        tempf.close()
69
 
83
 
70
     def test_readFile_failed(self):
84
     def test_read_config_malformed_config_file_raises_valueerror(self):
71
         from supervisor.options import readFile
85
         instance = self._makeOne()
(-)files/patch-supervisor-tests-test_supervisorctl.py (-7 / +12 lines)
Lines 1-13 Link Here
1
--- supervisor/tests/test_supervisorctl.py.old	2013-05-27 06:39:09.000000000 +0400
1
--- supervisor/tests/test_supervisorctl.py.orig	2016-06-08 17:08:09.404989000 +0300
2
+++ supervisor/tests/test_supervisorctl.py	2013-08-23 15:06:11.000000000 +0400
2
+++ supervisor/tests/test_supervisorctl.py	2016-06-08 17:08:32.361939000 +0300
3
@@ -889,19 +889,19 @@
3
@@ -1562,23 +1562,23 @@ class TestDefaultControllerPlugin(unitte
4
         val = plugin.ctl.stdout.getvalue()
4
         val = plugin.ctl.stdout.getvalue()
5
         self.failUnless(val.startswith('Error: bad argument wrong'), val)
5
         self.assertTrue(val.startswith('Error: bad argument wrong'), val)
6
 
6
 
7
-    def test_maintail_dashf(self):
7
-    def _dont_test_maintail_dashf(self):
8
+#    def _dont_test_maintail_dashf(self):
9
         # https://github.com/Supervisor/supervisor/issues/285
10
         # TODO: Refactor so we can test more of maintail -f than just a
11
         # connect error, and fix this test so it passes on FreeBSD.
8
-        plugin = self._makeOne()
12
-        plugin = self._makeOne()
9
-        plugin.listener = DummyListener()
13
-        plugin.listener = DummyListener()
10
-        result = plugin.do_maintail('-f')
14
-        result = plugin.do_maintail('-f')
15
-        self.assertEqual(result, None)
11
-        errors = plugin.listener.errors
16
-        errors = plugin.listener.errors
12
-        self.assertEqual(len(errors), 1)
17
-        self.assertEqual(len(errors), 1)
13
-        error = errors[0]
18
-        error = errors[0]
Lines 17-26 Link Here
17
-                         'http://localhost:65532/mainlogtail')
22
-                         'http://localhost:65532/mainlogtail')
18
-        for msg in ('Cannot connect', 'socket.error'):
23
-        for msg in ('Cannot connect', 'socket.error'):
19
-            self.assertTrue(msg in error[1])
24
-            self.assertTrue(msg in error[1])
20
+#    def test_maintail_dashf(self):
21
+#        plugin = self._makeOne()
25
+#        plugin = self._makeOne()
22
+#        plugin.listener = DummyListener()
26
+#        plugin.listener = DummyListener()
23
+#        result = plugin.do_maintail('-f')
27
+#        result = plugin.do_maintail('-f')
28
+#        self.assertEqual(result, None)
24
+#        errors = plugin.listener.errors
29
+#        errors = plugin.listener.errors
25
+#        self.assertEqual(len(errors), 1)
30
+#        self.assertEqual(len(errors), 1)
26
+#        error = errors[0]
31
+#        error = errors[0]
Lines 31-35 Link Here
31
+#        for msg in ('Cannot connect', 'socket.error'):
36
+#        for msg in ('Cannot connect', 'socket.error'):
32
+#            self.assertTrue(msg in error[1])
37
+#            self.assertTrue(msg in error[1])
33
 
38
 
34
     def test_maintail_nobytes(self):
39
     def test_maintail_bad_modifier(self):
35
         plugin = self._makeOne()
40
         plugin = self._makeOne()
(-)files/patch-supervisor_options.py (-7 / +10 lines)
Lines 1-14 Link Here
1
--- supervisor/options.py.orig	2013-06-20 21:00:12.000000000 +0400
1
--- supervisor/options.py.orig	2016-06-08 17:09:41.213297000 +0300
2
+++ supervisor/options.py	2013-08-08 14:41:08.000000000 +0400
2
+++ supervisor/options.py	2016-06-08 17:10:18.970354000 +0300
3
@@ -99,10 +99,7 @@
3
@@ -96,13 +96,7 @@ class Options:
4
         self.add("configfile", None, "c:", "configuration=")
4
         self.add("configfile", None, "c:", "configuration=")
5
 
5
 
6
         here = os.path.dirname(os.path.dirname(sys.argv[0]))
6
         here = os.path.dirname(os.path.dirname(sys.argv[0]))
7
-        searchpaths = [os.path.join(here, 'etc', 'supervisord.conf'),
7
-        searchpaths = [os.path.join(here, 'etc', 'supervisord.conf'),
8
-                       os.path.join(here, 'supervisord.conf'),
8
-                       os.path.join(here, 'supervisord.conf'),
9
-                       'supervisord.conf', 'etc/supervisord.conf',
9
-                       'supervisord.conf',
10
-                       '/etc/supervisord.conf']
10
-                       'etc/supervisord.conf',
11
+        searchpaths = [ '/usr/local/etc/supervisord.conf' ]
11
-                       '/etc/supervisord.conf',
12
-                       '/etc/supervisor/supervisord.conf',
13
-                       ]
14
+        searchpaths = [ '%%PREFIX%%/etc/supervisord.conf' ]
12
         self.searchpaths = searchpaths
15
         self.searchpaths = searchpaths
13
 
16
 
14
     def default_configfile(self):
17
         self.environ_expansions = {}

Return to bug 210140