summaryrefslogtreecommitdiff
path: root/net-p2p/deluge
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /net-p2p/deluge
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'net-p2p/deluge')
-rw-r--r--net-p2p/deluge/Manifest2
-rw-r--r--net-p2p/deluge/deluge-2.0.3-r8.ebuild142
-rw-r--r--net-p2p/deluge/files/deluge-2.0.3-fix-pickle.patch143
3 files changed, 287 insertions, 0 deletions
diff --git a/net-p2p/deluge/Manifest b/net-p2p/deluge/Manifest
index 97104606ff52..975c93f2af0a 100644
--- a/net-p2p/deluge/Manifest
+++ b/net-p2p/deluge/Manifest
@@ -1,4 +1,5 @@
AUX deluge-2.0.3-UI-status.patch 1406 BLAKE2B 7da865fa6d87fbfc0443572d34cbf7324cc76037c603b7d2199081533fab04362d78e15dcaf37ceeb606f04017e8b1b5ad9ceb2028a9bd4d11bb859f02d3d898 SHA512 4860c7147ff4ec6da072a4245be7a80e6512f6cf2eecfd4db8260a206e76d1cb44b9f063e82e5a57ef70ab3d7dd020d9ba5ddb1c96b2bbb72ed9d3b2f20d85c8
+AUX deluge-2.0.3-fix-pickle.patch 3843 BLAKE2B d4b15eac2d0f114f4efbbf21d94164bd2ec3cb1819f02e3cc48af8fc7c5a02abc3d8c40e1a46d02680bd4d63c1a8167405b57ed312ecaceb513050bd95fc4661 SHA512 b4507292eb47ad054f0a0fef716951aae305bd0a4c0ec8f26cf0ababda5b181c1ba9eff1c977ac374d6740928bd1e5bde1488a4a183b5f9af81b753ad212aef0
AUX deluge-2.0.3-gettext.patch 483 BLAKE2B 5c0c4462a27c9e8339979593c7868cca6a3f56549cba094d7f3932b76fe65c5f6d50390db7bbfc39268de05ebaa92bf1a22caffe6ae858e6adf222f17cec15d4 SHA512 122127744960786d7c3b247feb69fa4397ceb70bb1a4f2d30be4a683f163096f120cc5a0f72602cab39374eae5351bd5b3cf8bfd527bf036cc8e5e7f0700cf32
AUX deluge-2.0.3-setup.py.patch 428 BLAKE2B f9469cac78d66cf71b510d846bceb1e59e6c887d89b239d39f67aa3757434dd2f3e384531733ceb332b8b57d62b56f34244caa592a279aa812269cde6106b1cc SHA512 d2f23dd8a27aa5537610c34b6197962b986f4811a89dffbfc82fade0dc8c0942a8f58480e0235d11d049f89dd38c48da43bbf1dc8a66f26cbc16db764b672af5
AUX deluge-web.conf 210 BLAKE2B 169ddb5ad6259940cf0539e884874b42b739c2425011a86208a608bbaece9db386dca186246671d5dc10b61677b843c0a2b6f7dbd6f8a99da2061a1f83867fa3 SHA512 ecea3cd59dff0c2f0215d98c9e4adda49b6f1f95d43d844262fe73c335d93a6e9076ff5143ff7f3e9f4433087d16a1d0497f75e2b1e0a3d788f5ad60705c9999
@@ -15,5 +16,6 @@ EBUILD deluge-2.0.3-r4.ebuild 4551 BLAKE2B ca627923fdbb7144d4e4891916e5ef9f6e85f
EBUILD deluge-2.0.3-r5.ebuild 4498 BLAKE2B 36a76f2ac7e3729c02fbe55778a4e03f180bc9a786a2e588f9824a2da3f30a01bd414b114fcf00e41f4be7dc35190f204fba5558718894f5ebc7c49aaa0b7e99 SHA512 eb2175efa677e713c9f4f43f8eee4dffbd152b3b15e9344ee402d056504c62a87851bebdc6e5c9b899f58bf24ddf1dfaeed58a402d6bc5ec43558a8de9e57ad5
EBUILD deluge-2.0.3-r6.ebuild 4536 BLAKE2B 2e364f8ab18cd863e062883a44347e25d1013423fab81731b8ed5ed12f16d46d7bf1dd3c334092ad8d2d4f6a8a827036a3432dca0a287c430e021b3d27d192c3 SHA512 907108811c97d88e8ccdee666623f8a130503e45ca4c148ce9266d802654075136940fbcc5563a6ce7de82bf602c6339e277d3e14fd66e3569895ec98dbfb97c
EBUILD deluge-2.0.3-r7.ebuild 4544 BLAKE2B d04ab2b41c9f3080a6743768f844daa65673f19d105e616d8398f6015674c8570e28d996ce809ac2fb6028caeb590c55d36f64cd407ffb929d91b397798aaa43 SHA512 71bbcefe5ede6133321753afa10739936878e214b7df56881abe1db4348c0feb0eff07e01f376f2fba338ffe1f2f425bc72336764f9b5c2feaf071dcf8206ef9
+EBUILD deluge-2.0.3-r8.ebuild 4581 BLAKE2B f4963cadc822339bd3d4473ddc81bef2f15738d02dbc87b9dc28bae903569cf1c41059ef7a1393127bd6507dd5b63cd59541e666579e12d5247c2bf553cb894c SHA512 2e49d3f71fcb466f34f065d3b2c41297fd57e0e38c60a93cd5c36a9a78213103419f2440e227d99e2337c23c33685bd4230f8718e8b4344eef02a3faf6ddda1d
EBUILD deluge-9999.ebuild 4544 BLAKE2B d04ab2b41c9f3080a6743768f844daa65673f19d105e616d8398f6015674c8570e28d996ce809ac2fb6028caeb590c55d36f64cd407ffb929d91b397798aaa43 SHA512 71bbcefe5ede6133321753afa10739936878e214b7df56881abe1db4348c0feb0eff07e01f376f2fba338ffe1f2f425bc72336764f9b5c2feaf071dcf8206ef9
MISC metadata.xml 756 BLAKE2B bc8720edfa5af1ee53bdf84af194bce3f3620d228d3cffa2b7af0b239b8d0988ff9df2f6cd24931496bb474867403164870f46170db0b1697ee80035c07760e3 SHA512 19ffe8fe672b0a3929cae6351e07c3422e445479a9627d968aefc2b8f7ff042460a6b4e76ea4aa131b3136e3237b700cd8039b1efdefaacc30a194707df86d81
diff --git a/net-p2p/deluge/deluge-2.0.3-r8.ebuild b/net-p2p/deluge/deluge-2.0.3-r8.ebuild
new file mode 100644
index 000000000000..8c09d112b658
--- /dev/null
+++ b/net-p2p/deluge/deluge-2.0.3-r8.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+DISTUTILS_SINGLE_IMPL=1
+inherit distutils-r1 systemd
+
+DESCRIPTION="BitTorrent client with a client/server model"
+HOMEPAGE="https://deluge-torrent.org/"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.deluge-torrent.org/${PN}"
+else
+ SRC_URI="http://download.deluge-torrent.org/source/2.0/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="console geoip gtk libnotify sound webinterface"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ libnotify? ( gtk )
+ sound? ( gtk )
+"
+
+DEPEND="
+ $(python_gen_cond_dep '
+ net-libs/libtorrent-rasterbar[python,${PYTHON_MULTI_USEDEP}]
+ dev-python/wheel[${PYTHON_MULTI_USEDEP}]
+ ')
+ dev-util/intltool
+ acct-group/deluge
+ acct-user/deluge"
+RDEPEND="
+ $(python_gen_cond_dep '
+ dev-python/chardet[${PYTHON_MULTI_USEDEP}]
+ dev-python/distro[${PYTHON_MULTI_USEDEP}]
+ dev-python/pillow[${PYTHON_MULTI_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_MULTI_USEDEP}]
+ dev-python/pyxdg[${PYTHON_MULTI_USEDEP}]
+ dev-python/rencode[${PYTHON_MULTI_USEDEP}]
+ dev-python/setproctitle[${PYTHON_MULTI_USEDEP}]
+ dev-python/six[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/twisted-17.1.0[crypt,${PYTHON_MULTI_USEDEP}]
+ >=dev-python/zope-interface-4.4.2[${PYTHON_MULTI_USEDEP}]
+ geoip? ( dev-python/geoip-python[${PYTHON_MULTI_USEDEP}] )
+ gtk? (
+ sound? ( dev-python/pygame[${PYTHON_MULTI_USEDEP}] )
+ dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
+ gnome-base/librsvg
+ libnotify? ( x11-libs/libnotify )
+ )
+ net-libs/libtorrent-rasterbar[python,${PYTHON_MULTI_USEDEP}]
+ dev-python/mako[${PYTHON_MULTI_USEDEP}]
+ ')"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0.3-setup.py.patch"
+ "${FILESDIR}/${PN}-2.0.3-UI-status.patch"
+ "${FILESDIR}/${PN}-2.0.3-gettext.patch"
+ "${FILESDIR}/${P}-fix-pickle.patch"
+)
+
+python_prepare_all() {
+ local args=(
+ -e "/Compiling po file/a \\\tuptoDate = False"
+ )
+ sed -i "${args[@]}" -- 'setup.py' || die
+ args=(
+ -e 's|"new_release_check": True|"new_release_check": False|'
+ -e 's|"check_new_releases": True|"check_new_releases": False|'
+ -e 's|"show_new_releases": True|"show_new_releases": False|'
+ )
+ sed -i "${args[@]}" -- 'deluge/core/preferencesmanager.py' || die
+
+ distutils-r1_python_prepare_all
+}
+
+esetup.py() {
+ # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
+ # Override this call from the distutils-r1 eclass.
+ # This does not respect the distutils-r1 API. DONOT copy this example.
+ set -- "${PYTHON}" setup.py "$@"
+ echo "$@"
+ "$@" || die
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ if ! use console ; then
+ rm -r "${D}/$(python_get_sitedir)/deluge/ui/console/" || die
+ rm "${ED}/usr/bin/deluge-console" || die
+ rm "${ED}/usr/share/man/man1/deluge-console.1" ||die
+ fi
+ if ! use gtk ; then
+ rm -r "${D}/$(python_get_sitedir)/deluge/ui/gtk3/" || die
+ rm -r "${ED}/usr/share/icons/" || die
+ rm "${ED}/usr/bin/deluge-gtk" || die
+ rm "${ED}/usr/share/man/man1/deluge-gtk.1" || die
+ rm "${ED}/usr/share/applications/deluge.desktop" || die
+ fi
+ if use webinterface; then
+ newinitd "${FILESDIR}/deluge-web.init-2" deluge-web
+ newconfd "${FILESDIR}/deluge-web.conf" deluge-web
+ systemd_newunit "${FILESDIR}/deluge-web.service-3" deluge-web.service
+ systemd_install_serviced "${FILESDIR}/deluge-web.service.conf"
+ else
+ rm -r "${D}/$(python_get_sitedir)/deluge/ui/web/" || die
+ rm "${ED}/usr/bin/deluge-web" || die
+ rm "${ED}/usr/share/man/man1/deluge-web.1" || die
+ fi
+ newinitd "${FILESDIR}"/deluged.init-2 deluged
+ newconfd "${FILESDIR}"/deluged.conf-2 deluged
+ systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
+ systemd_install_serviced "${FILESDIR}"/deluged.service.conf
+
+ python_optimize
+}
+
+pkg_postinst() {
+ elog
+ elog "If, after upgrading, deluge doesn't work, please remove the"
+ elog "'~/.config/deluge' directory and try again, but make a backup"
+ elog "first!"
+ elog
+ elog "To start the daemon either run 'deluged' as user"
+ elog "or modify /etc/conf.d/deluged and run"
+ elog "/etc/init.d/deluged start as root"
+ elog "You can still use deluge the old way"
+ elog
+ elog "Systemd unit files for deluged and deluge-web no longer source"
+ elog "/etc/conf.d/deluge* files. Environment variable customization now"
+ elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
+ elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
+ elog
+ elog "For more information look at https://dev.deluge-torrent.org/wiki/Faq"
+ elog
+}
diff --git a/net-p2p/deluge/files/deluge-2.0.3-fix-pickle.patch b/net-p2p/deluge/files/deluge-2.0.3-fix-pickle.patch
new file mode 100644
index 000000000000..446ae2e9a0e1
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-2.0.3-fix-pickle.patch
@@ -0,0 +1,143 @@
+https://dev.deluge-torrent.org/changeset/23b3f144fce3424ae
+
+Index: deluge/core/torrentmanager.py
+===================================================================
+--- deluge-2.0.3/deluge/core/torrentmanager.py (revision 8b62e50eb8bf81a177c4d62484a44b766c6f54a6)
++++ deluge-2.0.3/deluge/core/torrentmanager.py (revision 23b3f144fce3424ae874d54a659cb7b8dd624ade)
+@@ -26,5 +26,5 @@
+ import deluge.component as component
+ from deluge._libtorrent import lt
+-from deluge.common import archive_files, decode_bytes, get_magnet_info, is_magnet
++from deluge.common import PY2, archive_files, decode_bytes, get_magnet_info, is_magnet
+ from deluge.configmanager import ConfigManager, get_config_dir
+ from deluge.core.authmanager import AUTH_LEVEL_ADMIN
+@@ -810,5 +810,8 @@
+ try:
+ with open(filepath, 'rb') as _file:
+- state = pickle.load(_file)
++ if PY2:
++ state = pickle.load(_file)
++ else:
++ state = pickle.load(_file, encoding='utf8')
+ except (IOError, EOFError, pickle.UnpicklingError) as ex:
+ message = 'Unable to load {}: {}'.format(filepath, ex)
+Index: deluge/tests/data/utf8_filename_torrents.state
+===================================================================
+--- deluge-2.0.3/deluge/tests/data/utf8_filename_torrents.state (revision 23b3f144fce3424ae874d54a659cb7b8dd624ade)
++++ deluge-2.0.3/deluge/tests/data/utf8_filename_torrents.state (revision 23b3f144fce3424ae874d54a659cb7b8dd624ade)
+@@ -0,0 +1,85 @@
++(ideluge.core.torrentmanager
++TorrentManagerState
++p1
++(dp2
++S'torrents'
++p3
++(lp4
++(ideluge.core.torrentmanager
++TorrentState
++p5
++(dp6
++S'max_download_speed'
++p7
++I-1
++sS'move_completed_path'
++p8
++S'/home/calum/Downloads'
++p9
++sS'paused'
++p10
++I00
++sS'max_upload_slots'
++p11
++I-1
++sS'prioritize_first_last'
++p12
++I00
++sS'max_connections'
++p13
++I-1
++sS'compact'
++p14
++I00
++sS'queue'
++p15
++I0
++sS'file_priorities'
++p16
++(lp17
++I4
++asS'filename'
++p18
++S'\xc2\xa2.torrent'
++p19
++sS'max_upload_speed'
++p20
++I-1
++sS'save_path'
++p21
++S'/home/calum/Downloads'
++p22
++sS'time_added'
++p23
++F1573563097.749759
++sS'total_uploaded'
++p24
++I0
++sS'torrent_id'
++p25
++S'80d81d55ef3b85f3c1b634c362e014b35594dc71'
++p26
++sS'auto_managed'
++p27
++I01
++sS'stop_at_ratio'
++p28
++I00
++sS'move_completed'
++p29
++I00
++sS'trackers'
++p30
++(lp31
++sS'magnet'
++p32
++NsS'remove_at_ratio'
++p33
++I00
++sS'stop_ratio'
++p34
++F2
++sS'is_finished'
++p35
++I00
++sbasb.
+Index: deluge/tests/test_torrentmanager.py
+===================================================================
+--- deluge-2.0.3/deluge/tests/test_torrentmanager.py (revision c6b6902e9f3e37f5b15184eb509b48b43817a331)
++++ deluge-2.0.3/deluge/tests/test_torrentmanager.py (revision 23b3f144fce3424ae874d54a659cb7b8dd624ade)
+@@ -8,4 +8,6 @@
+ from __future__ import unicode_literals
+
++import os
++import shutil
+ import warnings
+ from base64 import b64encode
+@@ -29,5 +31,5 @@
+ class TorrentmanagerTestCase(BaseTestCase):
+ def set_up(self):
+- common.set_tmp_config_dir()
++ self.config_dir = common.set_tmp_config_dir()
+ self.rpcserver = RPCServer(listen=False)
+ self.core = Core()
+@@ -119,2 +121,11 @@
+ InvalidTorrentError, self.tm.remove, 'torrentidthatdoesntexist'
+ )
++
++ def test_open_state_from_python2(self):
++ """Open a Python2 state with a UTF-8 encoded torrent filename."""
++ shutil.copy(
++ common.get_test_data_file('utf8_filename_torrents.state'),
++ os.path.join(self.config_dir, 'state', 'torrents.state'),
++ )
++ state = self.tm.open_state()
++ self.assertEqual(len(state.torrents), 1)