public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-nntp/hellanzb/files: hellanzb-0.13-fix_multiples_hosts.diff hellanzb-0.13-Fix_conf_file_search_path.patch hellanzb-0.13-Choose_interface_to_bind_on.patch digest-hellanzb-0.13-r2 digest-hellanzb-0.13-r1
@ 2007-11-20 14:43 Alexis Ballier (aballier)
  0 siblings, 0 replies; only message in thread
From: Alexis Ballier (aballier) @ 2007-11-20 14:43 UTC (permalink / raw
  To: gentoo-commits

aballier    07/11/20 14:43:08

  Added:                hellanzb-0.13-fix_multiples_hosts.diff
                        hellanzb-0.13-Fix_conf_file_search_path.patch
                        hellanzb-0.13-Choose_interface_to_bind_on.patch
                        digest-hellanzb-0.13-r2
  Removed:              digest-hellanzb-0.13-r1
  Log:
  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)

Revision  Changes    Path
1.1                  net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff?rev=1.1&content-type=text/plain

Index: hellanzb-0.13-fix_multiples_hosts.diff
===================================================================
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 = ''



1.1                  net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch?rev=1.1&content-type=text/plain

Index: hellanzb-0.13-Fix_conf_file_search_path.patch
===================================================================
#! /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



1.1                  net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch?rev=1.1&content-type=text/plain

Index: hellanzb-0.13-Choose_interface_to_bind_on.patch
===================================================================
#! /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



1.1                  net-nntp/hellanzb/files/digest-hellanzb-0.13-r2

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/digest-hellanzb-0.13-r2?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/digest-hellanzb-0.13-r2?rev=1.1&content-type=text/plain

Index: digest-hellanzb-0.13-r2
===================================================================
MD5 d3510c6b1b2c7b935332a469fdc8e7e2 hellanzb-0.13.tar.gz 163698
RMD160 2ec3069cd0c9cb6c9fdaa4a4edc4f311a86d944c hellanzb-0.13.tar.gz 163698
SHA256 565b08725eb92ac1e278fa7df2c7b27b21588c4e24c140fddbec4a5625159127 hellanzb-0.13.tar.gz 163698



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-20 14:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-20 14:43 [gentoo-commits] gentoo-x86 commit in net-nntp/hellanzb/files: hellanzb-0.13-fix_multiples_hosts.diff hellanzb-0.13-Fix_conf_file_search_path.patch hellanzb-0.13-Choose_interface_to_bind_on.patch digest-hellanzb-0.13-r2 digest-hellanzb-0.13-r1 Alexis Ballier (aballier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox