Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/deluge/
Date: Fri, 26 Aug 2022 07:22:44
Message-Id: 1661498328.463a06f28960ff4931f3811e884eef363573701e.sam@gentoo
1 commit: 463a06f28960ff4931f3811e884eef363573701e
2 Author: Matt Jolly <Matt.Jolly <AT> footclan <DOT> ninja>
3 AuthorDate: Thu Aug 18 04:09:55 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 26 07:18:48 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=463a06f2
7
8 net-p2p/deluge: add 2.1.1, update 9999
9
10 - USE gtk -> gui
11 - distutils PEP517
12
13 Signed-off-by: Matt Jolly <Matt.Jolly <AT> footclan.ninja>
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 net-p2p/deluge/Manifest | 1 +
17 .../{deluge-9999.ebuild => deluge-2.1.1.ebuild} | 111 +++++++++++++--------
18 net-p2p/deluge/deluge-9999.ebuild | 111 +++++++++++++--------
19 3 files changed, 137 insertions(+), 86 deletions(-)
20
21 diff --git a/net-p2p/deluge/Manifest b/net-p2p/deluge/Manifest
22 index 35c526df0cbb..1304a7562619 100644
23 --- a/net-p2p/deluge/Manifest
24 +++ b/net-p2p/deluge/Manifest
25 @@ -1 +1,2 @@
26 DIST deluge-2.0.5.tar.xz 1895268 BLAKE2B 2c815aa9dbbbed5ba780d694b0518f224577b9c370a03712b15c706eda6de55e34b834f624ec18001c9d41b925677b6a001a384691a7ffd9f29c16731a735d4b SHA512 6c2994ca2906fdb92e96aa3534a4ffd5199e9ab6a1b5b12de94c94ec29850cad0cef7546ae1bea5188075fd16a07e584a17bf2f8b5eb1d2b91dee2da1e494588
27 +DIST deluge-2.1.1.tar.xz 2541968 BLAKE2B 3fe59ad8b402281dd0e19504d10a8d9e2967911e9967613a0d5a146d9ca261cb59d2208f8bd529e7f1da824e125ffb590d12b337dd9655e78b54252b021ae8da SHA512 e94208981aee45f42b88e1c544b07e7b0d0f2c4ade6b7f37257b69d4a3394c89aff217cde699e79ad59de6d2ee4eca7a558f2b85505d2140ba73f1f76f184455
28
29 diff --git a/net-p2p/deluge/deluge-9999.ebuild b/net-p2p/deluge/deluge-2.1.1.ebuild
30 similarity index 56%
31 copy from net-p2p/deluge/deluge-9999.ebuild
32 copy to net-p2p/deluge/deluge-2.1.1.ebuild
33 index 344df118563b..10e6eba69d52 100644
34 --- a/net-p2p/deluge/deluge-9999.ebuild
35 +++ b/net-p2p/deluge/deluge-2.1.1.ebuild
36 @@ -1,9 +1,10 @@
37 # Copyright 1999-2022 Gentoo Authors
38 # Distributed under the terms of the GNU General Public License v2
39
40 -EAPI="7"
41 +EAPI="8"
42
43 -PYTHON_COMPAT=( python3_{8,9,10} )
44 +PYTHON_COMPAT=( python3_{8..10} )
45 +DISTUTILS_USE_PEP517=setuptools
46 DISTUTILS_SINGLE_IMPL=1
47 inherit xdg distutils-r1 systemd
48
49 @@ -14,30 +15,39 @@ if [[ ${PV} == 9999 ]]; then
50 inherit git-r3
51 EGIT_REPO_URI="https://git.deluge-torrent.org/${PN}"
52 else
53 - SRC_URI="http://download.deluge-torrent.org/source/2.0/${P}.tar.xz"
54 - KEYWORDS="~amd64 ~arm ~ppc ~x86"
55 + SRC_URI="http://download.deluge-torrent.org/source/$(ver_cut 1-2)/${P}.tar.xz"
56 + KEYWORDS="~amd64"
57 fi
58
59 LICENSE="GPL-2"
60 SLOT="0"
61 -IUSE="console gtk libnotify sound webinterface"
62 +IUSE="console gui libnotify sound webinterface"
63 REQUIRED_USE="
64 ${PYTHON_REQUIRED_USE}
65 - libnotify? ( gtk )
66 - sound? ( gtk )
67 + libnotify? ( gui )
68 + sound? ( gui )
69 "
70
71 -DEPEND="
72 - net-libs/libtorrent-rasterbar:=[python,${PYTHON_SINGLE_USEDEP}]
73 - $(python_gen_cond_dep '
74 - dev-python/wheel[${PYTHON_USEDEP}]
75 - ')
76 +BDEPEND="
77 dev-util/intltool
78 - acct-group/deluge
79 - acct-user/deluge"
80 + test? (
81 + $(python_gen_cond_dep '
82 + dev-python/pytest-twisted[${PYTHON_USEDEP}]
83 + ')
84 + )
85 +"
86 +
87 RDEPEND="
88 + acct-group/deluge
89 + acct-user/deluge
90 net-libs/libtorrent-rasterbar:=[python,${PYTHON_SINGLE_USEDEP}]
91 $(python_gen_cond_dep '
92 + gui? (
93 + sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
94 + dev-python/pygobject:3[${PYTHON_USEDEP}]
95 + gnome-base/librsvg
96 + libnotify? ( x11-libs/libnotify )
97 + )
98 dev-python/chardet[${PYTHON_USEDEP}]
99 dev-python/distro[${PYTHON_USEDEP}]
100 dev-python/pillow[${PYTHON_USEDEP}]
101 @@ -45,32 +55,19 @@ RDEPEND="
102 dev-python/pyxdg[${PYTHON_USEDEP}]
103 dev-python/rencode[${PYTHON_USEDEP}]
104 dev-python/setproctitle[${PYTHON_USEDEP}]
105 - dev-python/six[${PYTHON_USEDEP}]
106 || (
107 >=dev-python/twisted-17.1.0[ssl(-),${PYTHON_USEDEP}]
108 >=dev-python/twisted-17.1.0[crypt(-),${PYTHON_USEDEP}]
109 )
110 >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}]
111 - gtk? (
112 - sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
113 - dev-python/pygobject:3[${PYTHON_USEDEP}]
114 - gnome-base/librsvg
115 - libnotify? ( x11-libs/libnotify )
116 - )
117 dev-python/mako[${PYTHON_USEDEP}]
118 - ')"
119 + ')
120 +"
121
122 -PATCHES=(
123 - "${FILESDIR}/${PN}-2.0.3-setup.py.patch"
124 - "${FILESDIR}/${PN}-2.0.3-UI-status.patch"
125 -)
126 +distutils_enable_tests pytest
127
128 python_prepare_all() {
129 local args=(
130 - -e "/Compiling po file/a \\\tuptoDate = False"
131 - )
132 - sed -i "${args[@]}" -- 'setup.py' || die
133 - args=(
134 -e 's|"new_release_check": True|"new_release_check": False|'
135 -e 's|"check_new_releases": True|"check_new_releases": False|'
136 -e 's|"show_new_releases": True|"show_new_releases": False|'
137 @@ -80,13 +77,36 @@ python_prepare_all() {
138 distutils-r1_python_prepare_all
139 }
140
141 -esetup.py() {
142 - # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
143 - # Override this call from the distutils-r1 eclass.
144 - # This does not respect the distutils-r1 API. DONOT copy this example.
145 - set -- "${PYTHON}" setup.py "$@"
146 - echo "$@"
147 - "$@" || die
148 +python_test() {
149 + local EPYTEST_IGNORE=(
150 + # Upstream CI/CD skips these and they seem to intentionally segfault to collect core dumps...
151 + deluge/plugins/Stats/deluge_stats/tests/test_stats.py
152 + # Skipped upstream
153 + deluge/tests/test_security.py
154 + )
155 + local EPYTEST_DESELECT=(
156 + # Skipped upstream
157 + 'deluge/plugins/WebUi/deluge_webui/tests/test_plugin_webui.py::TestWebUIPlugin::test_enable_webui'
158 + 'deluge/tests/test_torrent.py::TestTorrent::test_torrent_error_resume_data_unaltered'
159 + 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_seo_svg_with_sni'
160 + # never returns
161 + 'deluge/tests/test_ui_entry.py::TestConsoleScriptEntryWithDaemon'
162 + # failing network(?)-related tests, even with sandbox disabled
163 + 'deluge/tests/test_common.py::TestCommon::test_is_interface'
164 + # fails
165 + 'deluge/tests/test_core.py::TestCore::test_pause_torrents'
166 + # fails because of network sandbox
167 + 'deluge/tests/test_core.py::TestCore::test_test_listen_port'
168 + 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_deluge_png'
169 + 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico'
170 + 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico_hebrew'
171 + 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico_with_redirect'
172 + # segfaults with FEATURES="network-sandbox"
173 + 'deluge/tests/test_core.py::TestCore::test_pause_torrent'
174 + )
175 +
176 + # dev-python/pytest-twisted has disabled autoloading
177 + epytest -m "not (todo or gtkui)" -p pytest_twisted -v
178 }
179
180 python_install_all() {
181 @@ -96,13 +116,18 @@ python_install_all() {
182 rm "${ED}/usr/bin/deluge-console" || die
183 rm "${ED}/usr/share/man/man1/deluge-console.1" ||die
184 fi
185 - if ! use gtk ; then
186 + if ! use gui ; then
187 rm -r "${D}/$(python_get_sitedir)/deluge/ui/gtk3/" || die
188 rm -r "${ED}/usr/share/icons/" || die
189 rm "${ED}/usr/bin/deluge-gtk" || die
190 rm "${ED}/usr/share/man/man1/deluge-gtk.1" || die
191 - rm "${ED}/usr/share/applications/deluge.desktop" || die
192 + else
193 + mkdir -p "${ED}/usr/share/applications/" || die
194 + cp "${WORKDIR}/${P}/deluge/ui/data/share/applications/deluge.desktop" "${ED}/usr/share/applications/" || die
195 + mkdir -p "${ED}/usr/share/metainfo" || die
196 + cp "${WORKDIR}/${P}/deluge/ui/data/share/appdata/deluge.appdata.xml" "${ED}/usr/share/metainfo/" || die
197 fi
198 +
199 if use webinterface; then
200 newinitd "${FILESDIR}/deluge-web.init-2" deluge-web
201 newconfd "${FILESDIR}/deluge-web.conf" deluge-web
202 @@ -113,6 +138,7 @@ python_install_all() {
203 rm "${ED}/usr/bin/deluge-web" || die
204 rm "${ED}/usr/share/man/man1/deluge-web.1" || die
205 fi
206 +
207 newinitd "${FILESDIR}"/deluged.init-2 deluged
208 newconfd "${FILESDIR}"/deluged.conf-2 deluged
209 systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
210 @@ -125,9 +151,8 @@ pkg_postinst() {
211 xdg_pkg_postinst
212
213 elog
214 - elog "If, after upgrading, deluge doesn't work, please remove the"
215 - elog "'~/.config/deluge' directory and try again, but make a backup"
216 - elog "first!"
217 + elog "If, after upgrading, deluge doesn't work please back up and then"
218 + elog "remove your '~/.config/deluge' directory and try again"
219 elog
220 elog "To start the daemon either run 'deluged' as user"
221 elog "or modify /etc/conf.d/deluged and run"
222 @@ -139,6 +164,6 @@ pkg_postinst() {
223 elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
224 elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
225 elog
226 - elog "For more information look at https://dev.deluge-torrent.org/wiki/Faq"
227 + elog "For more information see https://dev.deluge-torrent.org/wiki/Faq"
228 elog
229 }
230
231 diff --git a/net-p2p/deluge/deluge-9999.ebuild b/net-p2p/deluge/deluge-9999.ebuild
232 index 344df118563b..10e6eba69d52 100644
233 --- a/net-p2p/deluge/deluge-9999.ebuild
234 +++ b/net-p2p/deluge/deluge-9999.ebuild
235 @@ -1,9 +1,10 @@
236 # Copyright 1999-2022 Gentoo Authors
237 # Distributed under the terms of the GNU General Public License v2
238
239 -EAPI="7"
240 +EAPI="8"
241
242 -PYTHON_COMPAT=( python3_{8,9,10} )
243 +PYTHON_COMPAT=( python3_{8..10} )
244 +DISTUTILS_USE_PEP517=setuptools
245 DISTUTILS_SINGLE_IMPL=1
246 inherit xdg distutils-r1 systemd
247
248 @@ -14,30 +15,39 @@ if [[ ${PV} == 9999 ]]; then
249 inherit git-r3
250 EGIT_REPO_URI="https://git.deluge-torrent.org/${PN}"
251 else
252 - SRC_URI="http://download.deluge-torrent.org/source/2.0/${P}.tar.xz"
253 - KEYWORDS="~amd64 ~arm ~ppc ~x86"
254 + SRC_URI="http://download.deluge-torrent.org/source/$(ver_cut 1-2)/${P}.tar.xz"
255 + KEYWORDS="~amd64"
256 fi
257
258 LICENSE="GPL-2"
259 SLOT="0"
260 -IUSE="console gtk libnotify sound webinterface"
261 +IUSE="console gui libnotify sound webinterface"
262 REQUIRED_USE="
263 ${PYTHON_REQUIRED_USE}
264 - libnotify? ( gtk )
265 - sound? ( gtk )
266 + libnotify? ( gui )
267 + sound? ( gui )
268 "
269
270 -DEPEND="
271 - net-libs/libtorrent-rasterbar:=[python,${PYTHON_SINGLE_USEDEP}]
272 - $(python_gen_cond_dep '
273 - dev-python/wheel[${PYTHON_USEDEP}]
274 - ')
275 +BDEPEND="
276 dev-util/intltool
277 - acct-group/deluge
278 - acct-user/deluge"
279 + test? (
280 + $(python_gen_cond_dep '
281 + dev-python/pytest-twisted[${PYTHON_USEDEP}]
282 + ')
283 + )
284 +"
285 +
286 RDEPEND="
287 + acct-group/deluge
288 + acct-user/deluge
289 net-libs/libtorrent-rasterbar:=[python,${PYTHON_SINGLE_USEDEP}]
290 $(python_gen_cond_dep '
291 + gui? (
292 + sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
293 + dev-python/pygobject:3[${PYTHON_USEDEP}]
294 + gnome-base/librsvg
295 + libnotify? ( x11-libs/libnotify )
296 + )
297 dev-python/chardet[${PYTHON_USEDEP}]
298 dev-python/distro[${PYTHON_USEDEP}]
299 dev-python/pillow[${PYTHON_USEDEP}]
300 @@ -45,32 +55,19 @@ RDEPEND="
301 dev-python/pyxdg[${PYTHON_USEDEP}]
302 dev-python/rencode[${PYTHON_USEDEP}]
303 dev-python/setproctitle[${PYTHON_USEDEP}]
304 - dev-python/six[${PYTHON_USEDEP}]
305 || (
306 >=dev-python/twisted-17.1.0[ssl(-),${PYTHON_USEDEP}]
307 >=dev-python/twisted-17.1.0[crypt(-),${PYTHON_USEDEP}]
308 )
309 >=dev-python/zope-interface-4.4.2[${PYTHON_USEDEP}]
310 - gtk? (
311 - sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
312 - dev-python/pygobject:3[${PYTHON_USEDEP}]
313 - gnome-base/librsvg
314 - libnotify? ( x11-libs/libnotify )
315 - )
316 dev-python/mako[${PYTHON_USEDEP}]
317 - ')"
318 + ')
319 +"
320
321 -PATCHES=(
322 - "${FILESDIR}/${PN}-2.0.3-setup.py.patch"
323 - "${FILESDIR}/${PN}-2.0.3-UI-status.patch"
324 -)
325 +distutils_enable_tests pytest
326
327 python_prepare_all() {
328 local args=(
329 - -e "/Compiling po file/a \\\tuptoDate = False"
330 - )
331 - sed -i "${args[@]}" -- 'setup.py' || die
332 - args=(
333 -e 's|"new_release_check": True|"new_release_check": False|'
334 -e 's|"check_new_releases": True|"check_new_releases": False|'
335 -e 's|"show_new_releases": True|"show_new_releases": False|'
336 @@ -80,13 +77,36 @@ python_prepare_all() {
337 distutils-r1_python_prepare_all
338 }
339
340 -esetup.py() {
341 - # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
342 - # Override this call from the distutils-r1 eclass.
343 - # This does not respect the distutils-r1 API. DONOT copy this example.
344 - set -- "${PYTHON}" setup.py "$@"
345 - echo "$@"
346 - "$@" || die
347 +python_test() {
348 + local EPYTEST_IGNORE=(
349 + # Upstream CI/CD skips these and they seem to intentionally segfault to collect core dumps...
350 + deluge/plugins/Stats/deluge_stats/tests/test_stats.py
351 + # Skipped upstream
352 + deluge/tests/test_security.py
353 + )
354 + local EPYTEST_DESELECT=(
355 + # Skipped upstream
356 + 'deluge/plugins/WebUi/deluge_webui/tests/test_plugin_webui.py::TestWebUIPlugin::test_enable_webui'
357 + 'deluge/tests/test_torrent.py::TestTorrent::test_torrent_error_resume_data_unaltered'
358 + 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_seo_svg_with_sni'
359 + # never returns
360 + 'deluge/tests/test_ui_entry.py::TestConsoleScriptEntryWithDaemon'
361 + # failing network(?)-related tests, even with sandbox disabled
362 + 'deluge/tests/test_common.py::TestCommon::test_is_interface'
363 + # fails
364 + 'deluge/tests/test_core.py::TestCore::test_pause_torrents'
365 + # fails because of network sandbox
366 + 'deluge/tests/test_core.py::TestCore::test_test_listen_port'
367 + 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_deluge_png'
368 + 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico'
369 + 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico_hebrew'
370 + 'deluge/tests/test_tracker_icons.py::TestTrackerIcons::test_get_google_ico_with_redirect'
371 + # segfaults with FEATURES="network-sandbox"
372 + 'deluge/tests/test_core.py::TestCore::test_pause_torrent'
373 + )
374 +
375 + # dev-python/pytest-twisted has disabled autoloading
376 + epytest -m "not (todo or gtkui)" -p pytest_twisted -v
377 }
378
379 python_install_all() {
380 @@ -96,13 +116,18 @@ python_install_all() {
381 rm "${ED}/usr/bin/deluge-console" || die
382 rm "${ED}/usr/share/man/man1/deluge-console.1" ||die
383 fi
384 - if ! use gtk ; then
385 + if ! use gui ; then
386 rm -r "${D}/$(python_get_sitedir)/deluge/ui/gtk3/" || die
387 rm -r "${ED}/usr/share/icons/" || die
388 rm "${ED}/usr/bin/deluge-gtk" || die
389 rm "${ED}/usr/share/man/man1/deluge-gtk.1" || die
390 - rm "${ED}/usr/share/applications/deluge.desktop" || die
391 + else
392 + mkdir -p "${ED}/usr/share/applications/" || die
393 + cp "${WORKDIR}/${P}/deluge/ui/data/share/applications/deluge.desktop" "${ED}/usr/share/applications/" || die
394 + mkdir -p "${ED}/usr/share/metainfo" || die
395 + cp "${WORKDIR}/${P}/deluge/ui/data/share/appdata/deluge.appdata.xml" "${ED}/usr/share/metainfo/" || die
396 fi
397 +
398 if use webinterface; then
399 newinitd "${FILESDIR}/deluge-web.init-2" deluge-web
400 newconfd "${FILESDIR}/deluge-web.conf" deluge-web
401 @@ -113,6 +138,7 @@ python_install_all() {
402 rm "${ED}/usr/bin/deluge-web" || die
403 rm "${ED}/usr/share/man/man1/deluge-web.1" || die
404 fi
405 +
406 newinitd "${FILESDIR}"/deluged.init-2 deluged
407 newconfd "${FILESDIR}"/deluged.conf-2 deluged
408 systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
409 @@ -125,9 +151,8 @@ pkg_postinst() {
410 xdg_pkg_postinst
411
412 elog
413 - elog "If, after upgrading, deluge doesn't work, please remove the"
414 - elog "'~/.config/deluge' directory and try again, but make a backup"
415 - elog "first!"
416 + elog "If, after upgrading, deluge doesn't work please back up and then"
417 + elog "remove your '~/.config/deluge' directory and try again"
418 elog
419 elog "To start the daemon either run 'deluged' as user"
420 elog "or modify /etc/conf.d/deluged and run"
421 @@ -139,6 +164,6 @@ pkg_postinst() {
422 elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
423 elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
424 elog
425 - elog "For more information look at https://dev.deluge-torrent.org/wiki/Faq"
426 + elog "For more information see https://dev.deluge-torrent.org/wiki/Faq"
427 elog
428 }