summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-p2p/deluge/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-p2p/deluge/files')
-rw-r--r--net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch42
-rw-r--r--net-p2p/deluge/files/deluge-1.3.5-rb_libtorrent-disable-python-bindings60
-rw-r--r--net-p2p/deluge/files/deluge-web.service11
-rw-r--r--net-p2p/deluge/files/deluged.conf8
-rw-r--r--net-p2p/deluge/files/deluged.init71
-rw-r--r--net-p2p/deluge/files/deluged.service13
6 files changed, 205 insertions, 0 deletions
diff --git a/net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch b/net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch
new file mode 100644
index 000000000000..235b7f7c2438
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch
@@ -0,0 +1,42 @@
+--- setup.py
++++ setup.py
+@@ -205,38 +205,7 @@
+
+ _ext_modules = []
+
+-# Check for a system libtorrent and if found, then do not build the libtorrent extension
+-build_libtorrent = True
+-try:
+- from deluge._libtorrent import lt
+-except ImportError:
+- build_libtorrent = True
+-else:
+- build_libtorrent = False
+-
+-if build_libtorrent:
+- got_libtorrent = False
+- if not os.path.exists("libtorrent"):
+- import subprocess
+- if subprocess.call(['./get_libtorrent.sh']) > 0:
+- got_libtorrent = False
+- else:
+- got_libtorrent = True
+- else:
+- got_libtorrent = True
+-
+- if got_libtorrent:
+- # There isn't a system libtorrent library, so let's build the one included with deluge
+- libtorrent = Extension(
+- 'libtorrent',
+- extra_compile_args = _extra_compile_args,
+- include_dirs = _include_dirs,
+- libraries = _libraries,
+- library_dirs = _library_dirs,
+- sources = _sources
+- )
+-
+- _ext_modules = [libtorrent]
++import deluge._libtorrent
+
+ desktop_data = 'deluge/data/share/applications/deluge.desktop'
+
diff --git a/net-p2p/deluge/files/deluge-1.3.5-rb_libtorrent-disable-python-bindings b/net-p2p/deluge/files/deluge-1.3.5-rb_libtorrent-disable-python-bindings
new file mode 100644
index 000000000000..301019e04aed
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-1.3.5-rb_libtorrent-disable-python-bindings
@@ -0,0 +1,60 @@
+https://bugs.gentoo.org/show_bug.cgi?id=437356
+
+From 37ea2854a21e50debdf7bc953a3411e5934b74d9 Mon Sep 17 00:00:00 2001
+From: Calum Lind <calumlind+deluge@gmail.com>
+Date: Thu, 27 Sep 2012 16:53:22 +0000
+Subject: Fix 2160 : Disable use of python bindings for libtorrent extensions and replace with session flag
+
+The fixes a GIL issue causing libtorrent segfault. https://code.google.com/p/libtorrent/issues/detail?id=369
+
+Note: The ut_pex plugin (Peer Exchange) will now always be enabled.
+---
+diff --git a/deluge/core/core.py b/deluge/core/core.py
+index 4bda811..4ca3d96 100644
+--- a/deluge/core/core.py
++++ b/deluge/core/core.py
+@@ -84,7 +84,10 @@ class Core(component.Component):
+ while len(version) < 4:
+ version.append(0)
+
+- self.session = lt.session(lt.fingerprint("DE", *version), flags=0)
++ # Note: All libtorrent python bindings to set plugins/extensions need to be disabled
++ # due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369
++ # Setting session flags to 1 enables all libtorrent default plugins
++ self.session = lt.session(lt.fingerprint("DE", *version), flags=1)
+
+ # Load the session state if available
+ self.__load_session_state()
+@@ -103,9 +106,11 @@ class Core(component.Component):
+ self.session.set_settings(self.settings)
+
+ # Load metadata extension
+- self.session.add_extension(lt.create_metadata_plugin)
+- self.session.add_extension(lt.create_ut_metadata_plugin)
+- self.session.add_extension(lt.create_smart_ban_plugin)
++ # Note: All libtorrent python bindings to set plugins/extensions need to be disabled
++ # due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369
++ # self.session.add_extension(lt.create_metadata_plugin)
++ # self.session.add_extension(lt.create_ut_metadata_plugin)
++ # self.session.add_extension(lt.create_smart_ban_plugin)
+
+ # Create the components
+ self.eventmanager = EventManager()
+diff --git a/deluge/core/preferencesmanager.py b/deluge/core/preferencesmanager.py
+index 40070bb..2a5cb1b 100644
+--- a/deluge/core/preferencesmanager.py
++++ b/deluge/core/preferencesmanager.py
+@@ -338,7 +338,10 @@ class PreferencesManager(component.Component):
+ def _on_set_utpex(self, key, value):
+ log.debug("utpex value set to %s", value)
+ if value:
+- self.session.add_extension(lt.create_ut_pex_plugin)
++ # Note: All libtorrent python bindings to set plugins/extensions need to be disabled
++ # due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369
++ #self.session.add_extension(lt.create_ut_pex_plugin)
++ pass
+
+ def _on_set_encryption(self, key, value):
+ log.debug("encryption value %s set to %s..", key, value)
+--
+cgit v0.9.0.2
diff --git a/net-p2p/deluge/files/deluge-web.service b/net-p2p/deluge/files/deluge-web.service
new file mode 100644
index 000000000000..426401a95e08
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-web.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Deluge WebUI
+After=deluged.service
+
+[Service]
+User=deluge
+ExecStart=/usr/bin/deluge-web
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-p2p/deluge/files/deluged.conf b/net-p2p/deluge/files/deluged.conf
new file mode 100644
index 000000000000..0918f45fc7ff
--- /dev/null
+++ b/net-p2p/deluge/files/deluged.conf
@@ -0,0 +1,8 @@
+# /etc/conf.d/deluged
+# Change this to the user you want to run deluged as.
+# You may specify a group too, after a colon
+DELUGED_USER=""
+# DELUGED_OPTS="-p 58846"
+DELUGEUI_START="false"
+DELUGEUI_OPTS="-u web"
+
diff --git a/net-p2p/deluge/files/deluged.init b/net-p2p/deluge/files/deluged.init
new file mode 100644
index 000000000000..e60945df1558
--- /dev/null
+++ b/net-p2p/deluge/files/deluged.init
@@ -0,0 +1,71 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ "${DELUGED_USER}" = "" ] ; then
+ eerror "Please edit /etc/conf.d/deluged"
+ eerror "You have to specify a user to run deluged as, as we will not run it as root!"
+ eerror "Modify DELUGED_USER to your needs (you can also add a group, after a colon)"
+ return 1
+ fi
+ if ! getent passwd "${DELUGED_USER%:*}" >/dev/null ; then
+ eerror "Please edit /etc/conf.d/deluged"
+ eerror "Your user has to exist!"
+ return 1
+ fi
+ if [ "${DELUGED_USER%:*}" = "${DELUGED_USER}" ] ; then
+ return 0
+ else
+ if ! getent group "${DELUGED_USER#*:}" >/dev/null ; then
+ eerror "Please edit /etc/conf.d/deluged"
+ eerror "Your group has to exist too!"
+ return 1
+ fi
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ if [ "${DELUGED_HOME}" = "" ] ; then
+ DELUGED_USER_HOME=$(getent passwd "${DELUGED_USER%:*}" | cut -d ':' -f 6)
+ else
+ DELUGED_USER_HOME=${DELUGED_HOME}
+ fi
+ ebegin "Starting Deluged"
+ start-stop-daemon --start --user "${DELUGED_USER%:*}" \
+ --name deluged --pidfile /var/run/deluged.pid --background --make-pidfile \
+ --exec /usr/bin/deluged -e HOME="${DELUGED_USER_HOME}" -- --do-not-daemonize "${DELUGED_OPTS}"
+ eend $?
+
+
+ if [ "${DELUGEUI_START}" = "true" ] ; then
+ ebegin "Starting Deluge"
+ start-stop-daemon --start --background --pidfile \
+ /var/run/deluge.pid --make-pidfile \
+ --exec /usr/bin/deluge --user "${DELUGED_USER%:*}" \
+ -e HOME="${DELUGED_USER_HOME}" -- ${DELUGEUI_OPTS}
+ eend $?
+ fi
+}
+
+stop() {
+ ebegin "Stopping Deluged"
+ start-stop-daemon --stop --user "${DELUGED_USER%:*}" \
+ --name deluged --pidfile /var/run/deluged.pid
+ eend $?
+
+
+ if [ "${DELUGEUI_START}" = "true" ] ; then
+ ebegin "Stopping Deluge"
+ start-stop-daemon --stop --user "${DELUGED_USER%:*}" \
+ --name deluge --pidfile /var/run/deluge.pid
+ eend $?
+ fi
+}
diff --git a/net-p2p/deluge/files/deluged.service b/net-p2p/deluge/files/deluged.service
new file mode 100644
index 000000000000..74876b008ccf
--- /dev/null
+++ b/net-p2p/deluge/files/deluged.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Deluge BitTorrent client
+After=network.target local-fs.target
+Wants=local-fs.target
+
+[Service]
+EnvironmentFile=/etc/conf.d/deluged
+User=deluge
+Group=deluge
+ExecStart=/usr/bin/deluged -d -p $DELUGED_PORT $DELUGED_OPTIONS
+
+[Install]
+WantedBy=multi-user.target