1 |
commit: 284bb3c18946ef782e1bd25ac763fb1aa532283a |
2 |
Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr> |
3 |
AuthorDate: Thu Feb 25 17:57:18 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 26 14:26:00 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=284bb3c1 |
7 |
|
8 |
net-im/err: Remove old |
9 |
|
10 |
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr> |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
net-im/err/Manifest | 1 - |
14 |
net-im/err/err-6.1.4.ebuild | 91 --------------- |
15 |
net-im/err/files/err-6.1.4-slixmpp.patch | 190 ------------------------------- |
16 |
3 files changed, 282 deletions(-) |
17 |
|
18 |
diff --git a/net-im/err/Manifest b/net-im/err/Manifest |
19 |
index 9b09a0caeaa..96da875a11a 100644 |
20 |
--- a/net-im/err/Manifest |
21 |
+++ b/net-im/err/Manifest |
22 |
@@ -1,2 +1 @@ |
23 |
DIST err-6.1.7.tar.gz 1359383 BLAKE2B 400bbf4a4180f74993a4414dc55f07a69b34b04277fecd073bd860df9dcd5da4873949df766c0c2f6b7a43b4e87153d0aa77b0abaf95bf9702d76c3c7b290abe SHA512 cd0dadc5ff380c71631bae7711bdba7345046fbe14e369c8efa8eed98752b9ea03f6e4fa3171df257a9d76686c610e28fac5f39f7e8e107348a5746e4354694b |
24 |
-DIST errbot-6.1.4.tar.gz 207370 BLAKE2B 187e87cc36393f85c1405a29d332d703cdd2ac9d9c6b50178ff7382bc5feb620b69a77dc21ce8144fc24045f11067865c7273118fc25ec1ad9afb93d6ccc635e SHA512 60cc8f070e2420e4ef5f0124eb6d03b3cf01c44e148ebb8b92f5b504eb6968c754fd82771da9528daab62c9e9f4d6ef97ab1063f1093163208521b26e36b2f2d |
25 |
|
26 |
diff --git a/net-im/err/err-6.1.4.ebuild b/net-im/err/err-6.1.4.ebuild |
27 |
deleted file mode 100644 |
28 |
index 65c20b5d54f..00000000000 |
29 |
--- a/net-im/err/err-6.1.4.ebuild |
30 |
+++ /dev/null |
31 |
@@ -1,91 +0,0 @@ |
32 |
-# Copyright 1999-2020 Gentoo Authors |
33 |
-# Distributed under the terms of the GNU General Public License v2 |
34 |
- |
35 |
-EAPI=7 |
36 |
- |
37 |
-PYTHON_COMPAT=( python3_7 ) |
38 |
- |
39 |
-MY_PN="errbot" |
40 |
-MY_P="${MY_PN}-${PV}" |
41 |
- |
42 |
-inherit distutils-r1 user |
43 |
- |
44 |
-DESCRIPTION="Multiprotocol chatbot designed to be easily deployable and maintainable" |
45 |
-HOMEPAGE="https://errbot.readthedocs.io/en/latest/" |
46 |
-SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_P}.tar.gz" |
47 |
- |
48 |
-KEYWORDS="~amd64" |
49 |
-LICENSE="GPL-3" |
50 |
-SLOT="0" |
51 |
-IUSE="irc +xmpp" |
52 |
- |
53 |
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" |
54 |
-RDEPEND=" |
55 |
- dev-python/ansi[${PYTHON_USEDEP}] |
56 |
- dev-python/bottle[${PYTHON_USEDEP}] |
57 |
- dev-python/colorlog[${PYTHON_USEDEP}] |
58 |
- dev-python/cryptography[${PYTHON_USEDEP}] |
59 |
- dev-python/daemonize[${PYTHON_USEDEP}] |
60 |
- dev-python/dnspython[${PYTHON_USEDEP}] |
61 |
- >=dev-python/dulwich-0.19.16[${PYTHON_USEDEP}] |
62 |
- dev-python/flask[${PYTHON_USEDEP}] |
63 |
- dev-python/jinja[${PYTHON_USEDEP}] |
64 |
- <dev-python/markdown-3.0[${PYTHON_USEDEP}] |
65 |
- dev-python/pygments[${PYTHON_USEDEP}] |
66 |
- dev-python/pyopenssl[${PYTHON_USEDEP}] |
67 |
- dev-python/requests[${PYTHON_USEDEP}] |
68 |
- dev-python/webtest[${PYTHON_USEDEP}] |
69 |
- dev-python/yapsy[${PYTHON_USEDEP}] |
70 |
- irc? ( |
71 |
- dev-python/irc[${PYTHON_USEDEP}] |
72 |
- ) |
73 |
- xmpp? ( |
74 |
- dev-python/pyasn1[${PYTHON_USEDEP}] |
75 |
- dev-python/pyasn1-modules[${PYTHON_USEDEP}] |
76 |
- dev-python/slixmpp[${PYTHON_USEDEP}] |
77 |
- ) |
78 |
-" |
79 |
- |
80 |
-PATCHES=( "${FILESDIR}/${P}-slixmpp.patch" ) |
81 |
- |
82 |
-S="${WORKDIR}/${MY_P}" |
83 |
- |
84 |
-# NOTES: |
85 |
-# 1. Support for BOT_SENTRY option is missing, cause |
86 |
-# we do not have apropriate packages in portage yet |
87 |
-# 2. Currently only XMPP is supported(IRC still untested) |
88 |
-# 3. Internal web server is temporarily removed (rocket-err from requires.txt) |
89 |
-# 4. pygments-markdown-lexer dependency(needed only for debugging?) is temporarily removed (pygments-markdown-lexer from requires.txt) |
90 |
- |
91 |
-pkg_setup() { |
92 |
- ebegin "Creating err group and user" |
93 |
- enewgroup 'err' |
94 |
- enewuser 'err' -1 -1 -1 'err' |
95 |
- eend ${?} |
96 |
-} |
97 |
- |
98 |
-python_prepare_all() { |
99 |
- sed -i \ |
100 |
- -e '/rocket-errbot/d' \ |
101 |
- -e 's/dnspython3/dnspython/' \ |
102 |
- -e '/pygments-markdown-lexer/d' \ |
103 |
- setup.py || die |
104 |
- |
105 |
- distutils-r1_python_prepare_all |
106 |
-} |
107 |
- |
108 |
-python_install_all() { |
109 |
- distutils-r1_python_install_all |
110 |
- |
111 |
- newinitd "${FILESDIR}"/errd.initd.2 errd |
112 |
- newconfd "${FILESDIR}"/errd.confd errd |
113 |
- |
114 |
- dodir /etc/${PN} |
115 |
- keepdir /var/lib/${PN} |
116 |
- keepdir /var/log/${PN} |
117 |
- fowners -R err:err /var/lib/${PN} |
118 |
- fowners -R err:err /var/log/${PN} |
119 |
- |
120 |
- insinto /etc/${PN} |
121 |
- newins errbot/config-template.py config.py |
122 |
-} |
123 |
|
124 |
diff --git a/net-im/err/files/err-6.1.4-slixmpp.patch b/net-im/err/files/err-6.1.4-slixmpp.patch |
125 |
deleted file mode 100644 |
126 |
index ccccc171f23..00000000000 |
127 |
--- a/net-im/err/files/err-6.1.4-slixmpp.patch |
128 |
+++ /dev/null |
129 |
@@ -1,190 +0,0 @@ |
130 |
-From e68c539c727c7275665a198fc7a217a3c1ad3be2 Mon Sep 17 00:00:00 2001 |
131 |
-From: Birger Schacht <1143280+bisco2@××××××××××××××××××××.com> |
132 |
-Date: Sat, 11 Jul 2020 11:20:53 +0000 |
133 |
-Subject: [PATCH] Replace sleekxmpp with slixmpp (#1430) |
134 |
- |
135 |
-* Start moving to slixmpp |
136 |
- |
137 |
-* Pass a default value for ssl_version to the XMPPConnection |
138 |
---- |
139 |
- .../plugin_development/backend_specifics.rst | 6 +-- |
140 |
- errbot/backends/xmpp.py | 49 +++++++++---------- |
141 |
- setup.py | 4 +- |
142 |
- |
143 |
-diff --git a/errbot/backends/xmpp.py b/errbot/backends/xmpp.py |
144 |
-index 08f49340..e27c2893 100644 |
145 |
---- a/errbot/backends/xmpp.py |
146 |
-+++ b/errbot/backends/xmpp.py |
147 |
-@@ -2,7 +2,6 @@ |
148 |
- import sys |
149 |
- from functools import lru_cache |
150 |
- |
151 |
--from threading import Thread |
152 |
- from time import sleep |
153 |
- |
154 |
- from errbot.backends.base import Message, Room, Presence, RoomNotJoinedError, Identifier, RoomOccupant, Person |
155 |
-@@ -13,10 +12,10 @@ |
156 |
- log = logging.getLogger(__name__) |
157 |
- |
158 |
- try: |
159 |
-- from sleekxmpp import ClientXMPP |
160 |
-- from sleekxmpp.xmlstream import resolver, cert |
161 |
-- from sleekxmpp import JID |
162 |
-- from sleekxmpp.exceptions import IqError |
163 |
-+ from slixmpp import ClientXMPP |
164 |
-+ from slixmpp.xmlstream import resolver, cert |
165 |
-+ from slixmpp import JID |
166 |
-+ from slixmpp.exceptions import IqError |
167 |
- |
168 |
- except ImportError: |
169 |
- log.exception("Could not start the XMPP backend") |
170 |
-@@ -114,15 +113,10 @@ def join(self, username=None, password=None): |
171 |
- :meth:`create` on it first. |
172 |
- """ |
173 |
- room = str(self) |
174 |
-- self.xep0045.joinMUC(room, username, password=password, wait=True) |
175 |
-+ self.xep0045.join_muc(room, username, password=password, wait=True) |
176 |
- self._bot.conn.add_event_handler(f'muc::{room}::got_online', self._bot.user_joined_chat) |
177 |
- self._bot.conn.add_event_handler(f'muc::{room}::got_offline', self._bot.user_left_chat) |
178 |
-- # Room configuration can only be done once a MUC presence stanza |
179 |
-- # has been received from the server. This HAS to take place in a |
180 |
-- # separate thread because of how SleekXMPP processes these stanzas. |
181 |
-- t = Thread(target=self.configure) |
182 |
-- t.setDaemon(True) |
183 |
-- t.start() |
184 |
-+ self.configure() |
185 |
- self._bot.callback_room_joined(self) |
186 |
- log.info('Joined room %s.', room) |
187 |
- |
188 |
-@@ -137,7 +131,7 @@ def leave(self, reason=None): |
189 |
- reason = "" |
190 |
- room = str(self) |
191 |
- try: |
192 |
-- self.xep0045.leaveMUC(room=room, nick=self.xep0045.ourNicks[room], msg=reason) |
193 |
-+ self.xep0045.leave_muc(room=room, nick=self.xep0045.ourNicks[room], msg=reason) |
194 |
- |
195 |
- self._bot.conn.del_event_handler(f'muc::{room}::got_online', self._bot.user_joined_chat) |
196 |
- self._bot.conn.del_event_handler(f'muc::{room}::got_offline', self._bot.user_left_chat) |
197 |
-@@ -148,7 +142,7 @@ def leave(self, reason=None): |
198 |
- |
199 |
- def create(self): |
200 |
- """ |
201 |
-- Not supported on this back-end (SleekXMPP doesn't support it). |
202 |
-+ Not supported on this back-end (Slixmpp doesn't support it). |
203 |
- Will join the room to ensure it exists, instead. |
204 |
- """ |
205 |
- logging.warning( |
206 |
-@@ -186,7 +180,7 @@ def joined(self): |
207 |
- :getter: |
208 |
- Returns `True` if the room has been joined, `False` otherwise. |
209 |
- """ |
210 |
-- return str(self) in self.xep0045.getJoinedRooms() |
211 |
-+ return str(self) in self.xep0045.get_joined_rooms() |
212 |
- |
213 |
- @property |
214 |
- def topic(self): |
215 |
-@@ -214,7 +208,7 @@ def topic(self, topic): |
216 |
- :param topic: |
217 |
- The topic to set. |
218 |
- """ |
219 |
-- # Not supported by SleekXMPP at the moment :( |
220 |
-+ # Not supported by Slixmpp at the moment :( |
221 |
- raise NotImplementedError("Setting the topic is not supported on this back-end.") |
222 |
- |
223 |
- @property |
224 |
-@@ -261,16 +255,16 @@ def configure(self): |
225 |
- affiliation = None |
226 |
- while affiliation is None: |
227 |
- sleep(0.5) |
228 |
-- affiliation = self.xep0045.getJidProperty( |
229 |
-+ affiliation = self.xep0045.get_jid_property( |
230 |
- room=room, |
231 |
-- nick=self.xep0045.ourNicks[room], |
232 |
-- jidProperty='affiliation' |
233 |
-+ nick=self.xep0045.our_nicks[room], |
234 |
-+ jid_property='affiliation' |
235 |
- ) |
236 |
- |
237 |
- if affiliation == "owner": |
238 |
- log.debug('Configuring room %s: we have owner affiliation.', room) |
239 |
-- form = self.xep0045.getRoomConfig(room) |
240 |
-- self.xep0045.configureRoom(room, form) |
241 |
-+ form = yield from self.xep0045.get_room_config(room) |
242 |
-+ self.xep0045.configure_room(room, form) |
243 |
- else: |
244 |
- log.debug("Not configuring room %s: we don't have owner affiliation (affiliation=%s)", room, affiliation) |
245 |
- |
246 |
-@@ -291,7 +285,7 @@ def real_jid(self): |
247 |
- Will only work if the errbot is moderator in the MUC or it is not anonymous. |
248 |
- """ |
249 |
- room_jid = self._node + '@' + self._domain |
250 |
-- jid = JID(self._room.xep0045.getJidProperty(room_jid, self.resource, 'jid')) |
251 |
-+ jid = JID(self._room.xep0045.get_jid_property(room_jid, self.resource, 'jid')) |
252 |
- return jid.bare |
253 |
- |
254 |
- @property |
255 |
-@@ -303,7 +297,8 @@ def room(self): |
256 |
- |
257 |
- class XMPPConnection(object): |
258 |
- def __init__(self, jid, password, feature=None, keepalive=None, |
259 |
-- ca_cert=None, server=None, use_ipv6=None, bot=None): |
260 |
-+ ca_cert=None, server=None, use_ipv6=None, bot=None, |
261 |
-+ ssl_version=None): |
262 |
- if feature is None: |
263 |
- feature = {} |
264 |
- self._bot = bot |
265 |
-@@ -317,7 +312,7 @@ def __init__(self, jid, password, feature=None, keepalive=None, |
266 |
- self.client.register_plugin('xep_0249') # XMPP direct MUC invites |
267 |
- |
268 |
- if keepalive is not None: |
269 |
-- self.client.whitespace_keepalive = True # Just in case SleekXMPP's default changes to False in the future |
270 |
-+ self.client.whitespace_keepalive = True # Just in case Slixmpp's default changes to False in the future |
271 |
- self.client.whitespace_keepalive_interval = keepalive |
272 |
- |
273 |
- if use_ipv6 is not None: |
274 |
-@@ -348,7 +343,7 @@ def disconnect(self): |
275 |
- self.connected = False |
276 |
- |
277 |
- def serve_forever(self): |
278 |
-- self.client.process(block=True) |
279 |
-+ self.client.process() |
280 |
- |
281 |
- def add_event_handler(self, name, cb): |
282 |
- self.client.add_event_handler(name, cb) |
283 |
-@@ -447,7 +442,7 @@ def incoming_message(self, xmppmsg): |
284 |
- msg.to = self._build_person(xmppmsg['to'].full) |
285 |
- |
286 |
- msg.nick = xmppmsg['mucnick'] |
287 |
-- msg.delayed = bool(xmppmsg['delay']._get_attr('stamp')) # this is a bug in sleekxmpp it should be ['from'] |
288 |
-+ msg.delayed = bool(xmppmsg['delay']._get_attr('stamp')) # this is a bug in slixmpp it should be ['from'] |
289 |
- self.callback_message(msg) |
290 |
- |
291 |
- def _idd_from_event(self, event): |
292 |
-@@ -582,7 +577,7 @@ def rooms(self): |
293 |
- A list of :class:`~errbot.backends.base.XMPPMUCRoom` instances. |
294 |
- """ |
295 |
- xep0045 = self.conn.client.plugin['xep_0045'] |
296 |
-- return [XMPPRoom(room, self) for room in xep0045.getJoinedRooms()] |
297 |
-+ return [XMPPRoom(room, self) for room in xep0045.get_joined_rooms()] |
298 |
- |
299 |
- def query_room(self, room): |
300 |
- """ |
301 |
-diff --git a/setup.py b/setup.py |
302 |
-index 3d0c09f8..4a3c1ea1 100755 |
303 |
---- a/setup.py |
304 |
-+++ b/setup.py |
305 |
-@@ -105,12 +105,12 @@ def read(fname, encoding='ascii'): |
306 |
- }, |
307 |
- extras_require={ |
308 |
- 'graphic': ['PySide', ], |
309 |
-- 'hipchat': ['hypchat', 'sleekxmpp', 'pyasn1', 'pyasn1-modules'], |
310 |
-+ 'hipchat': ['hypchat', 'slixmpp', 'pyasn1', 'pyasn1-modules'], |
311 |
- 'IRC': ['irc', ], |
312 |
- 'slack': ['slackclient>=1.0.5,<2.0', ], |
313 |
- 'slack-rtm': ['slackclient>=2.0', ], |
314 |
- 'telegram': ['python-telegram-bot', ], |
315 |
-- 'XMPP': ['sleekxmpp', 'pyasn1', 'pyasn1-modules'], |
316 |
-+ 'XMPP': ['slixmpp', 'pyasn1', 'pyasn1-modules'], |
317 |
- ':python_version<"3.7"': ['dataclasses'], # backward compatibility for 3.3->3.6 for dataclasses |
318 |
- ':sys_platform!="win32"': ['daemonize'], |
319 |
- }, |