diff options
author | Alexis Ballier <aballier@gentoo.org> | 2007-11-20 14:43:08 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2007-11-20 14:43:08 +0000 |
commit | 41f847236acd896173d89cc4de8b0b894d19ebce (patch) | |
tree | c24a9f90af9359bd5f991e9df8feb2185df5104c /net-nntp | |
parent | amd64 stable wrt #199740 (diff) | |
download | gentoo-2-41f847236acd896173d89cc4de8b0b894d19ebce.tar.gz gentoo-2-41f847236acd896173d89cc4de8b0b894d19ebce.tar.bz2 gentoo-2-41f847236acd896173d89cc4de8b0b894d19ebce.zip |
import debian patchset: bind rpc to localhost by default, fix config file searching. Add a fix from tonfa to fix display in non daemon mode when multiple hosts are used
(Portage version: 2.1.3.19)
Diffstat (limited to 'net-nntp')
-rw-r--r-- | net-nntp/hellanzb/ChangeLog | 13 | ||||
-rw-r--r-- | net-nntp/hellanzb/files/digest-hellanzb-0.13-r2 (renamed from net-nntp/hellanzb/files/digest-hellanzb-0.13-r1) | 0 | ||||
-rw-r--r-- | net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch | 52 | ||||
-rw-r--r-- | net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch | 31 | ||||
-rw-r--r-- | net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff | 81 | ||||
-rw-r--r-- | net-nntp/hellanzb/hellanzb-0.13-r2.ebuild (renamed from net-nntp/hellanzb/hellanzb-0.13-r1.ebuild) | 5 |
6 files changed, 180 insertions, 2 deletions
diff --git a/net-nntp/hellanzb/ChangeLog b/net-nntp/hellanzb/ChangeLog index db8ba1ce1339..cc24afb8a9b3 100644 --- a/net-nntp/hellanzb/ChangeLog +++ b/net-nntp/hellanzb/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for net-nntp/hellanzb # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-nntp/hellanzb/ChangeLog,v 1.2 2007/04/11 17:53:10 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nntp/hellanzb/ChangeLog,v 1.3 2007/11/20 14:43:07 aballier Exp $ + +*hellanzb-0.13-r2 (20 Nov 2007) + + 20 Nov 2007; Alexis Ballier <aballier@gentoo.org> + +files/hellanzb-0.13-Choose_interface_to_bind_on.patch, + +files/hellanzb-0.13-Fix_conf_file_search_path.patch, + +files/hellanzb-0.13-fix_multiples_hosts.diff, -hellanzb-0.13-r1.ebuild, + +hellanzb-0.13-r2.ebuild: + import debian patchset: bind rpc to localhost by default, fix config file + searching. Add a fix from tonfa to fix display in non daemon mode when + multiple hosts are used *hellanzb-0.13-r1 (05 Apr 2007) diff --git a/net-nntp/hellanzb/files/digest-hellanzb-0.13-r1 b/net-nntp/hellanzb/files/digest-hellanzb-0.13-r2 index 49b039d674c3..49b039d674c3 100644 --- a/net-nntp/hellanzb/files/digest-hellanzb-0.13-r1 +++ b/net-nntp/hellanzb/files/digest-hellanzb-0.13-r2 diff --git a/net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch b/net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch new file mode 100644 index 000000000000..a254a9d23c9a --- /dev/null +++ b/net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch @@ -0,0 +1,52 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 001-Choose_interface_to_bind_on +## by Adam Cécile (Le_Vert) <gandalf@le-vert.net> +## +## DP: Add a Hellanzb.XMLRPC_SERVER option which allowusers to set on which +## DP: IP address XMLRPC server will be binded. + +@DPATCH@ +diff -u hellanzb-0.11/Hellanzb/HellaXMLRPC/__init__.py hellanzb-0.11/Hellanzb/HellaXMLRPC/__init__.py.new +--- hellanzb-0.11/Hellanzb/HellaXMLRPC/__init__.py 2007-01-30 03:51:05.000000000 +0100 ++++ hellanzb-0.11/Hellanzb/HellaXMLRPC/__init__.py.new 2007-02-10 15:19:14.000000000 +0100 +@@ -597,9 +597,9 @@ + try: + if SECURE: + secure = HtPasswdWrapper(hxmlrpcs, 'hellanzb', Hellanzb.XMLRPC_PASSWORD, 'hellanzb XML RPC') +- reactor.listenTCP(Hellanzb.XMLRPC_PORT, Site(secure)) ++ reactor.listenTCP(Hellanzb.XMLRPC_PORT, Site(secure), 50, Hellanzb.XMLRPC_SERVER_BIND) + else: +- reactor.listenTCP(Hellanzb.XMLRPC_PORT, Site(hxmlrpcs)) ++ reactor.listenTCP(Hellanzb.XMLRPC_PORT, Site(hxmlrpcs), 50, Hellanzb.XMLRPC_SERVER_BIND) + except CannotListenError, cle: + error(str(cle)) + raise FatalError('Cannot bind to XML RPC port, is another hellanzb queue daemon already running?') + +diff -u hellanzb-0.11/etc/hellanzb.conf.sample hellanzb-0.11/etc/hellanzb.conf.sample.new +--- hellanzb-0.11/etc/hellanzb.conf.sample 2007-01-30 03:51:05.000000000 +0100 ++++ hellanzb-0.11/etc/hellanzb.conf.sample.new 2007-02-10 15:18:10.000000000 +0100 +@@ -151,6 +151,10 @@ + # Hostname for the XMLRPC client to connect to. By default, localhost + Hellanzb.XMLRPC_SERVER = 'localhost' + ++# IP address on which the XMLRPC Server will be binded to. ++# Type '0.0.0.0' for any interfaces, '127.0.0.1' will disable remote access ++Hellanzb.XMLRPC_SERVER_BIND = '127.0.0.1' ++ + # Port number the XML RPC server will listen on, and the client will connect to. + # Set to 'None' (without the quotes!) for no XML RPC server + Hellanzb.XMLRPC_PORT = 8760 +diff -u hellanzb-0.11/Hellanzb/Core.py hellanzb-0.11/Hellanzb/Core.py.new +--- hellanzb-0.11/Hellanzb/Core.py 2007-01-30 03:51:05.000000000 +0100 ++++ hellanzb-0.11/Hellanzb/Core.py.new 2007-02-10 15:18:10.000000000 +0100 +@@ -113,7 +106,9 @@ + + if not hasattr(Hellanzb, 'SKIP_UNRAR') or Hellanzb.SKIP_UNRAR is None: + Hellanzb.SKIP_UNRAR = False +- ++ if not hasattr(Hellanzb, 'XMLRPC_SERVER_BIND') or Hellanzb.XMLRPC_SERVER_BIND is None: ++ print 'Warning: Hellanzb.XMLRPC_SERVER_BIND is not set, bind to 127.0.0.1' ++ Hellanzb.XMLRPC_SERVER_BIND = '127.0.0.1' + + if not hasattr(Hellanzb, 'SMART_PAR'): + Hellanzb.SMART_PAR = True diff --git a/net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch b/net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch new file mode 100644 index 000000000000..ee22dd20c1ed --- /dev/null +++ b/net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch @@ -0,0 +1,31 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 000-Fix_conf_file_search_path by +## Adam Cécile (Le_Vert) <gandalf@le-vert.net> +## +## DP: Search for configuration file in $HOME/.hellanzb/ or /etc/ + +@DPATCH@ + +diff -u hellanzb-0.11/Hellanzb/Core.py hellanzb-0.11/Hellanzb/Core.py.new +--- hellanzb-0.11/Hellanzb/Core.py 2007-02-10 15:01:50.000000000 +0100 ++++ hellanzb-0.11/Hellanzb/Core.py.new 2007-02-10 15:05:48.000000000 +0100 +@@ -33,16 +33,9 @@ + else: + error('Unable to load specified config file: ' + optionalConfigFile) + sys.exit(1) +- +- # look for conf in this order: sys.prefix, ./, or ./etc/ +- confDirs = [os.path.join(sys.prefix, 'etc')] +- try: +- confDirs.append(os.path.join(os.getcwd(), 'etc')) +- confDirs.append(os.getcwd()) +- except OSError, ose: +- if ose.errno != 2: +- raise +- # OSError: [Errno 2] No such file or directory. cwd doesn't exist ++ ++ # Look for conf file in /etc or $HOME/.hellanzb ++ confDirs = [ os.path.expanduser('~') + '/.hellanzb', '/etc' ] + + # hard coding preferred Darwin config file location, kind of lame. but I'd rather do + # this then make an etc dir in os x's Python.framework directory diff --git a/net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff b/net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff new file mode 100644 index 000000000000..695c62ce3bc4 --- /dev/null +++ b/net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff @@ -0,0 +1,81 @@ +diff -r bdbcba80e0fa Hellanzb/NZBLeecher/Protocol.py +--- a/Hellanzb/NZBLeecher/Protocol.py Wed Nov 14 10:00:29 2007 +0100 ++++ b/Hellanzb/NZBLeecher/Protocol.py Wed Nov 14 10:01:07 2007 +0100 +@@ -27,18 +27,14 @@ PHI = 1.6180339887498948 # (1 + math.sqr + PHI = 1.6180339887498948 # (1 + math.sqrt(5)) / 2 + class NZBLeecherFactory(ReconnectingClientFactory): + +- def __init__(self, username, password, activeTimeout, antiIdleTimeout, hostname, ++ def __init__(self, username, password, activeTimeout, antiIdleTimeout, + serverPoolName, skipGroupCmd, fillServerPriority = 0, color = None): + self.username = username + self.password = password + self.antiIdleTimeout = antiIdleTimeout + self.activeTimeout = activeTimeout +- self.hostname = hostname + self.serverPoolName = serverPoolName + self.fillServerPriority = fillServerPriority +- +- self.host = None +- self.port = None + + # statistics for the current session (sessions end when downloading stops on all + # clients). sessionReadBytes and sessionStartime are used to calculate the average +diff -r bdbcba80e0fa Hellanzb/NZBLeecher/__init__.py +--- a/Hellanzb/NZBLeecher/__init__.py Wed Nov 14 10:00:29 2007 +0100 ++++ b/Hellanzb/NZBLeecher/__init__.py Wed Nov 14 10:01:07 2007 +0100 +@@ -122,30 +122,28 @@ def connectServer(serverName, serverDict + connectionCount = 0 + hosts = serverDict['hosts'] + connections = int(serverDict['connections']) ++ antiIdle = int(setWithDefault(serverDict, 'antiIdle', defaultAntiIdle)) ++ idleTimeout = int(setWithDefault(serverDict, 'idleTimeout', defaultIdleTimeout)) ++ skipGroupCmd = setWithDefault(serverDict, 'skipGroupCmd', False) ++ fillServer = setWithDefault(serverDict, 'fillserver', 0) ++ useSSL = setWithDefault(serverDict, 'ssl', False) ++ ++ nsf = NZBLeecherFactory(serverDict['username'], serverDict['password'], ++ idleTimeout, antiIdle, serverName, skipGroupCmd, ++ fillServer) ++ color = nsf.color ++ Hellanzb.nsfs.append(nsf) ++ ++ preWrappedNsf = nsf ++ nsf = HellaThrottlingFactory(nsf) + + for host in hosts: +- antiIdle = int(setWithDefault(serverDict, 'antiIdle', defaultAntiIdle)) +- idleTimeout = int(setWithDefault(serverDict, 'idleTimeout', defaultIdleTimeout)) +- skipGroupCmd = setWithDefault(serverDict, 'skipGroupCmd', False) +- fillServer = setWithDefault(serverDict, 'fillserver', 0) +- useSSL = setWithDefault(serverDict, 'ssl', False) +- +- nsf = NZBLeecherFactory(serverDict['username'], serverDict['password'], +- idleTimeout, antiIdle, host, serverName, skipGroupCmd, +- fillServer) +- color = nsf.color +- Hellanzb.nsfs.append(nsf) +- + split = host.split(':') + host = split[0] + if len(split) == 2: + port = int(split[1]) + else: + port = 119 +- nsf.host, nsf.port = host, port +- +- preWrappedNsf = nsf +- nsf = HellaThrottlingFactory(nsf) + + ctxf = None + if useSSL: +@@ -195,7 +193,8 @@ def connectServer(serverName, serverDict + if antiIdle == 0: + preWrappedNsf.leecherConnectors.append(connector) + connectionCount += 1 +- preWrappedNsf.setConnectionCount(connectionCount) ++ ++ preWrappedNsf.setConnectionCount(connectionCount) + + if antiIdle == 0: + action = '' diff --git a/net-nntp/hellanzb/hellanzb-0.13-r1.ebuild b/net-nntp/hellanzb/hellanzb-0.13-r2.ebuild index 16ee7aca43bd..a7e73ebbcd07 100644 --- a/net-nntp/hellanzb/hellanzb-0.13-r1.ebuild +++ b/net-nntp/hellanzb/hellanzb-0.13-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nntp/hellanzb/hellanzb-0.13-r1.ebuild,v 1.1 2007/04/05 18:35:25 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nntp/hellanzb/hellanzb-0.13-r2.ebuild,v 1.1 2007/11/20 14:43:07 aballier Exp $ inherit distutils eutils @@ -29,6 +29,9 @@ src_unpack() { cd "${S}" epatch "${FILESDIR}/${P}-datafiles.patch" + epatch "${FILESDIR}/${P}-Fix_conf_file_search_path.patch" + epatch "${FILESDIR}/${P}-Choose_interface_to_bind_on.patch" + epatch "${FILESDIR}/${P}-fix_multiples_hosts.diff" } src_install() { |