View | Details | Raw Unified | Return to bug 230711 | Differences between
and this patch

Collapse All | Expand All

(-)sysutils/py-supervisor/Makefile (-2 / +10 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	supervisor
4
PORTNAME=	supervisor
5
PORTVERSION=	3.3.3
5
PORTVERSION=	3.3.4
6
PORTEPOCH=	1
6
PORTEPOCH=	1
7
CATEGORIES=	sysutils python
7
CATEGORIES=	sysutils python
8
MASTER_SITES=	CHEESESHOP
8
MASTER_SITES=	CHEESESHOP
Lines 14-19 Link Here
14
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}meld3>=0.6.5:www/py-meld3@${PY_FLAVOR}
14
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}meld3>=0.6.5:www/py-meld3@${PY_FLAVOR}
15
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mock>=0.5.0:devel/py-mock@${PY_FLAVOR}
15
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mock>=0.5.0:devel/py-mock@${PY_FLAVOR}
16
16
17
OPTIONS_DEFINE=	DOCS
17
PORTDOCS=	*.txt *.rst
18
PORTDOCS=	*.txt *.rst
18
19
19
NO_ARCH=	yes
20
NO_ARCH=	yes
Lines 22-27 Link Here
22
USE_PYTHON=	distutils autoplist
23
USE_PYTHON=	distutils autoplist
23
PIDDIR?=	/var/run/supervisor
24
PIDDIR?=	/var/run/supervisor
24
25
26
PLIST_FILES=	'@sample etc/supervisord.conf.sample'
27
PLIST_DIRS=	${PIDDIR}
28
25
SUB_LIST=	PYTHON_CMD=${PYTHON_CMD} \
29
SUB_LIST=	PYTHON_CMD=${PYTHON_CMD} \
26
		PIDDIR=${PIDDIR}
30
		PIDDIR=${PIDDIR}
27
PLIST_SUB=	PIDDIR=${PIDDIR}
31
PLIST_SUB=	PIDDIR=${PIDDIR}
Lines 32-41 Link Here
32
python_OLD_CMD+=	"<<PYTHON>>"
36
python_OLD_CMD+=	"<<PYTHON>>"
33
37
34
post-patch:
38
post-patch:
35
	@${REINPLACE_CMD} -e 's!%%PREFIX%%!${PREFIX}!' ${WRKSRC}/supervisor/options.py
39
	@${REINPLACE_CMD} -e 's!%%PREFIX%%!${PREFIX}!' ${WRKSRC}/supervisor/options.py \
40
		${WRKSRC}/supervisor/tests/test_options.py
36
41
37
post-install:
42
post-install:
38
	${INSTALL_DATA} ${FILESDIR}/supervisord.conf.sample ${STAGEDIR}${PREFIX}/etc
43
	${INSTALL_DATA} ${FILESDIR}/supervisord.conf.sample ${STAGEDIR}${PREFIX}/etc
44
	${INSTALL} -d ${STAGEDIR}${PIDDIR}
45
46
post-install-DOCS-on:
39
	${MKDIR} ${STAGEDIR}${DOCSDIR}
47
	${MKDIR} ${STAGEDIR}${DOCSDIR}
40
.for i in ${PORTDOCS}
48
.for i in ${PORTDOCS}
41
	${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/
49
	${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/
(-)sysutils/py-supervisor/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1505483926
1
TIMESTAMP = 1534438600
2
SHA256 (supervisor-3.3.3.tar.gz) = 96287ebfabf9a6923f74123b056c4da39c617fef367980f007cac02fba6527ad
2
SHA256 (supervisor-3.3.4.tar.gz) = 212201a3fd1d35c150ef0c35bf0676fd1a6c195fb60bf0f2147fe7dbd317e672
3
SIZE (supervisor-3.3.3.tar.gz) = 418354
3
SIZE (supervisor-3.3.4.tar.gz) = 419794
(-)sysutils/py-supervisor/files/patch-supervisor-tests-test_options.py (-85 lines)
Lines 1-85 Link Here
1
--- supervisor/tests/test_options.py.orig	2016-05-14 21:19:49.000000000 +0300
2
+++ supervisor/tests/test_options.py	2016-06-08 17:05:08.114929000 +0300
3
@@ -157,15 +157,15 @@ class OptionTests(unittest.TestCase):
4
             short=False,
5
             )
6
 
7
-    def test_searchpaths(self):
8
-        options = self._makeOptions()
9
-        self.assertEqual(len(options.searchpaths), 6)
10
-        self.assertEqual(options.searchpaths[-4:], [
11
-            'supervisord.conf',
12
-            'etc/supervisord.conf',
13
-            '/etc/supervisord.conf',
14
-            '/etc/supervisor/supervisord.conf',
15
-            ])
16
+#    def test_searchpaths(self):
17
+#        options = self._makeOptions()
18
+#        self.assertEqual(len(options.searchpaths), 6)
19
+#        self.assertEqual(options.searchpaths[-4:], [
20
+#            'supervisord.conf',
21
+#            'etc/supervisord.conf',
22
+#            '/etc/supervisord.conf',
23
+#            '/etc/supervisor/supervisord.conf',
24
+#            ])
25
 
26
     def test_options_and_args_order(self):
27
         # Only config file exists
28
@@ -352,17 +352,17 @@ class ClientOptionsTests(unittest.TestCa
29
         except ValueError, exc:
30
             self.assertTrue("could not find config file" in exc.args[0])
31
 
32
-    def test_read_config_unreadable(self):
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
-
38
-        try:
39
-            instance.read_config(__file__)
40
-            self.fail("expected exception")
41
-        except ValueError, exc:
42
-            self.assertTrue("could not read config file" in exc.args[0])
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
+
49
+#        try:
50
+#            instance.read_config(__file__)
51
+#            self.fail("expected exception")
52
+#        except ValueError, exc:
53
+#            self.assertTrue("could not read config file" in exc.args[0])
54
 
55
     def test_read_config_no_supervisord_section_raises_valueerror(self):
56
         instance = self._makeOne()
57
@@ -803,17 +803,17 @@ class ServerOptionsTests(unittest.TestCa
58
         except ValueError, exc:
59
             self.assertTrue("could not find config file" in exc.args[0])
60
 
61
-    def test_read_config_unreadable(self):
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
-
67
-        try:
68
-            instance.read_config(__file__)
69
-            self.fail("nothing raised")
70
-        except ValueError, exc:
71
-            self.assertTrue("could not read config file" in exc.args[0])
72
+#    def test_read_config_unreadable(self):
73
+#        instance = self._makeOne()
74
+#        def dummy_open(fn, mode):
75
+#            raise IOError(errno.EACCES, 'Permission denied: %s' % fn)
76
+#        instance.open = dummy_open
77
+
78
+#        try:
79
+#            instance.read_config(__file__)
80
+#            self.fail("nothing raised")
81
+#        except ValueError, exc:
82
+#            self.assertTrue("could not read config file" in exc.args[0])
83
 
84
     def test_read_config_malformed_config_file_raises_valueerror(self):
85
         instance = self._makeOne()
(-)sysutils/py-supervisor/files/patch-supervisor-tests-test_supervisorctl.py (-40 lines)
Lines 1-40 Link Here
1
--- supervisor/tests/test_supervisorctl.py.orig	2016-06-08 17:08:09.404989000 +0300
2
+++ supervisor/tests/test_supervisorctl.py	2016-06-08 17:08:32.361939000 +0300
3
@@ -1562,23 +1562,23 @@ class TestDefaultControllerPlugin(unitte
4
         val = plugin.ctl.stdout.getvalue()
5
         self.assertTrue(val.startswith('Error: bad argument wrong'), val)
6
 
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.
12
-        plugin = self._makeOne()
13
-        plugin.listener = DummyListener()
14
-        result = plugin.do_maintail('-f')
15
-        self.assertEqual(result, None)
16
-        errors = plugin.listener.errors
17
-        self.assertEqual(len(errors), 1)
18
-        error = errors[0]
19
-        self.assertEqual(plugin.listener.closed,
20
-                         'http://localhost:65532/mainlogtail')
21
-        self.assertEqual(error[0],
22
-                         'http://localhost:65532/mainlogtail')
23
-        for msg in ('Cannot connect', 'socket.error'):
24
-            self.assertTrue(msg in error[1])
25
+#        plugin = self._makeOne()
26
+#        plugin.listener = DummyListener()
27
+#        result = plugin.do_maintail('-f')
28
+#        self.assertEqual(result, None)
29
+#        errors = plugin.listener.errors
30
+#        self.assertEqual(len(errors), 1)
31
+#        error = errors[0]
32
+#        self.assertEqual(plugin.listener.closed,
33
+#                         'http://localhost:65532/mainlogtail')
34
+#        self.assertEqual(error[0],
35
+#                         'http://localhost:65532/mainlogtail')
36
+#        for msg in ('Cannot connect', 'socket.error'):
37
+#            self.assertTrue(msg in error[1])
38
 
39
     def test_maintail_bad_modifier(self):
40
         plugin = self._makeOne()
(-)sysutils/py-supervisor/files/patch-supervisor_options.py (-2 / +2 lines)
Lines 1-5 Link Here
1
--- supervisor/options.py.orig	2016-06-08 17:09:41.213297000 +0300
1
--- supervisor/options.py.orig	2018-02-15 21:18:33 UTC
2
+++ supervisor/options.py	2016-06-08 17:10:18.970354000 +0300
2
+++ supervisor/options.py
3
@@ -96,13 +96,7 @@ class Options:
3
@@ -96,13 +96,7 @@ class Options:
4
         self.add("configfile", None, "c:", "configuration=")
4
         self.add("configfile", None, "c:", "configuration=")
5
 
5
 
(-)sysutils/py-supervisor/files/patch-supervisor_tests_test__options.py (+85 lines)
Line 0 Link Here
1
--- supervisor/tests/test_options.py.orig	2016-05-14 21:19:49.000000000 +0300
2
+++ supervisor/tests/test_options.py	2016-06-08 17:05:08.114929000 +0300
3
@@ -157,15 +157,15 @@ class OptionTests(unittest.TestCase):
4
             short=False,
5
             )
6
 
7
-    def test_searchpaths(self):
8
-        options = self._makeOptions()
9
-        self.assertEqual(len(options.searchpaths), 6)
10
-        self.assertEqual(options.searchpaths[-4:], [
11
-            'supervisord.conf',
12
-            'etc/supervisord.conf',
13
-            '/etc/supervisord.conf',
14
-            '/etc/supervisor/supervisord.conf',
15
-            ])
16
+#    def test_searchpaths(self):
17
+#        options = self._makeOptions()
18
+#        self.assertEqual(len(options.searchpaths), 6)
19
+#        self.assertEqual(options.searchpaths[-4:], [
20
+#            'supervisord.conf',
21
+#            'etc/supervisord.conf',
22
+#            '/etc/supervisord.conf',
23
+#            '/etc/supervisor/supervisord.conf',
24
+#            ])
25
 
26
     def test_options_and_args_order(self):
27
         # Only config file exists
28
@@ -352,17 +352,17 @@ class ClientOptionsTests(unittest.TestCa
29
         except ValueError, exc:
30
             self.assertTrue("could not find config file" in exc.args[0])
31
 
32
-    def test_read_config_unreadable(self):
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
-
38
-        try:
39
-            instance.read_config(__file__)
40
-            self.fail("expected exception")
41
-        except ValueError, exc:
42
-            self.assertTrue("could not read config file" in exc.args[0])
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
+
49
+#        try:
50
+#            instance.read_config(__file__)
51
+#            self.fail("expected exception")
52
+#        except ValueError, exc:
53
+#            self.assertTrue("could not read config file" in exc.args[0])
54
 
55
     def test_read_config_no_supervisord_section_raises_valueerror(self):
56
         instance = self._makeOne()
57
@@ -803,17 +803,17 @@ class ServerOptionsTests(unittest.TestCa
58
         except ValueError, exc:
59
             self.assertTrue("could not find config file" in exc.args[0])
60
 
61
-    def test_read_config_unreadable(self):
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
-
67
-        try:
68
-            instance.read_config(__file__)
69
-            self.fail("nothing raised")
70
-        except ValueError, exc:
71
-            self.assertTrue("could not read config file" in exc.args[0])
72
+#    def test_read_config_unreadable(self):
73
+#        instance = self._makeOne()
74
+#        def dummy_open(fn, mode):
75
+#            raise IOError(errno.EACCES, 'Permission denied: %s' % fn)
76
+#        instance.open = dummy_open
77
+
78
+#        try:
79
+#            instance.read_config(__file__)
80
+#            self.fail("nothing raised")
81
+#        except ValueError, exc:
82
+#            self.assertTrue("could not read config file" in exc.args[0])
83
 
84
     def test_read_config_malformed_config_file_raises_valueerror(self):
85
         instance = self._makeOne()
(-)sysutils/py-supervisor/pkg-plist (-6 lines)
Lines 1-6 Link Here
1
@sample etc/supervisord.conf.sample
2
@exec mkdir -p %%PIDDIR%%
3
@unexec echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
4
@unexec echo "If you are permanently removing py-supervisor, you should also:" | /usr/bin/fmt
5
@unexec echo "'rm -rf %%PIDDIR%%'" | /usr/bin/fmt
6
@unexec echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="

Return to bug 230711