Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [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
Date: Tue, 20 Nov 2007 14:43:14
Message-Id: E1IuUJg-0001tI-MM@stork.gentoo.org
1 aballier 07/11/20 14:43:08
2
3 Added: hellanzb-0.13-fix_multiples_hosts.diff
4 hellanzb-0.13-Fix_conf_file_search_path.patch
5 hellanzb-0.13-Choose_interface_to_bind_on.patch
6 digest-hellanzb-0.13-r2
7 Removed: digest-hellanzb-0.13-r1
8 Log:
9 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
10 (Portage version: 2.1.3.19)
11
12 Revision Changes Path
13 1.1 net-nntp/hellanzb/files/hellanzb-0.13-fix_multiples_hosts.diff
14
15 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
16 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
17
18 Index: hellanzb-0.13-fix_multiples_hosts.diff
19 ===================================================================
20 diff -r bdbcba80e0fa Hellanzb/NZBLeecher/Protocol.py
21 --- a/Hellanzb/NZBLeecher/Protocol.py Wed Nov 14 10:00:29 2007 +0100
22 +++ b/Hellanzb/NZBLeecher/Protocol.py Wed Nov 14 10:01:07 2007 +0100
23 @@ -27,18 +27,14 @@ PHI = 1.6180339887498948 # (1 + math.sqr
24 PHI = 1.6180339887498948 # (1 + math.sqrt(5)) / 2
25 class NZBLeecherFactory(ReconnectingClientFactory):
26
27 - def __init__(self, username, password, activeTimeout, antiIdleTimeout, hostname,
28 + def __init__(self, username, password, activeTimeout, antiIdleTimeout,
29 serverPoolName, skipGroupCmd, fillServerPriority = 0, color = None):
30 self.username = username
31 self.password = password
32 self.antiIdleTimeout = antiIdleTimeout
33 self.activeTimeout = activeTimeout
34 - self.hostname = hostname
35 self.serverPoolName = serverPoolName
36 self.fillServerPriority = fillServerPriority
37 -
38 - self.host = None
39 - self.port = None
40
41 # statistics for the current session (sessions end when downloading stops on all
42 # clients). sessionReadBytes and sessionStartime are used to calculate the average
43 diff -r bdbcba80e0fa Hellanzb/NZBLeecher/__init__.py
44 --- a/Hellanzb/NZBLeecher/__init__.py Wed Nov 14 10:00:29 2007 +0100
45 +++ b/Hellanzb/NZBLeecher/__init__.py Wed Nov 14 10:01:07 2007 +0100
46 @@ -122,30 +122,28 @@ def connectServer(serverName, serverDict
47 connectionCount = 0
48 hosts = serverDict['hosts']
49 connections = int(serverDict['connections'])
50 + antiIdle = int(setWithDefault(serverDict, 'antiIdle', defaultAntiIdle))
51 + idleTimeout = int(setWithDefault(serverDict, 'idleTimeout', defaultIdleTimeout))
52 + skipGroupCmd = setWithDefault(serverDict, 'skipGroupCmd', False)
53 + fillServer = setWithDefault(serverDict, 'fillserver', 0)
54 + useSSL = setWithDefault(serverDict, 'ssl', False)
55 +
56 + nsf = NZBLeecherFactory(serverDict['username'], serverDict['password'],
57 + idleTimeout, antiIdle, serverName, skipGroupCmd,
58 + fillServer)
59 + color = nsf.color
60 + Hellanzb.nsfs.append(nsf)
61 +
62 + preWrappedNsf = nsf
63 + nsf = HellaThrottlingFactory(nsf)
64
65 for host in hosts:
66 - antiIdle = int(setWithDefault(serverDict, 'antiIdle', defaultAntiIdle))
67 - idleTimeout = int(setWithDefault(serverDict, 'idleTimeout', defaultIdleTimeout))
68 - skipGroupCmd = setWithDefault(serverDict, 'skipGroupCmd', False)
69 - fillServer = setWithDefault(serverDict, 'fillserver', 0)
70 - useSSL = setWithDefault(serverDict, 'ssl', False)
71 -
72 - nsf = NZBLeecherFactory(serverDict['username'], serverDict['password'],
73 - idleTimeout, antiIdle, host, serverName, skipGroupCmd,
74 - fillServer)
75 - color = nsf.color
76 - Hellanzb.nsfs.append(nsf)
77 -
78 split = host.split(':')
79 host = split[0]
80 if len(split) == 2:
81 port = int(split[1])
82 else:
83 port = 119
84 - nsf.host, nsf.port = host, port
85 -
86 - preWrappedNsf = nsf
87 - nsf = HellaThrottlingFactory(nsf)
88
89 ctxf = None
90 if useSSL:
91 @@ -195,7 +193,8 @@ def connectServer(serverName, serverDict
92 if antiIdle == 0:
93 preWrappedNsf.leecherConnectors.append(connector)
94 connectionCount += 1
95 - preWrappedNsf.setConnectionCount(connectionCount)
96 +
97 + preWrappedNsf.setConnectionCount(connectionCount)
98
99 if antiIdle == 0:
100 action = ''
101
102
103
104 1.1 net-nntp/hellanzb/files/hellanzb-0.13-Fix_conf_file_search_path.patch
105
106 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
107 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
108
109 Index: hellanzb-0.13-Fix_conf_file_search_path.patch
110 ===================================================================
111 #! /bin/sh /usr/share/dpatch/dpatch-run
112 ## 000-Fix_conf_file_search_path by
113 ## Adam Cécile (Le_Vert) <gandalf@×××××××.net>
114 ##
115 ## DP: Search for configuration file in $HOME/.hellanzb/ or /etc/
116
117 @DPATCH@
118
119 diff -u hellanzb-0.11/Hellanzb/Core.py hellanzb-0.11/Hellanzb/Core.py.new
120 --- hellanzb-0.11/Hellanzb/Core.py 2007-02-10 15:01:50.000000000 +0100
121 +++ hellanzb-0.11/Hellanzb/Core.py.new 2007-02-10 15:05:48.000000000 +0100
122 @@ -33,16 +33,9 @@
123 else:
124 error('Unable to load specified config file: ' + optionalConfigFile)
125 sys.exit(1)
126 -
127 - # look for conf in this order: sys.prefix, ./, or ./etc/
128 - confDirs = [os.path.join(sys.prefix, 'etc')]
129 - try:
130 - confDirs.append(os.path.join(os.getcwd(), 'etc'))
131 - confDirs.append(os.getcwd())
132 - except OSError, ose:
133 - if ose.errno != 2:
134 - raise
135 - # OSError: [Errno 2] No such file or directory. cwd doesn't exist
136 +
137 + # Look for conf file in /etc or $HOME/.hellanzb
138 + confDirs = [ os.path.expanduser('~') + '/.hellanzb', '/etc' ]
139
140 # hard coding preferred Darwin config file location, kind of lame. but I'd rather do
141 # this then make an etc dir in os x's Python.framework directory
142
143
144
145 1.1 net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch
146
147 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
148 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
149
150 Index: hellanzb-0.13-Choose_interface_to_bind_on.patch
151 ===================================================================
152 #! /bin/sh /usr/share/dpatch/dpatch-run
153 ## 001-Choose_interface_to_bind_on
154 ## by Adam Cécile (Le_Vert) <gandalf@×××××××.net>
155 ##
156 ## DP: Add a Hellanzb.XMLRPC_SERVER option which allowusers to set on which
157 ## DP: IP address XMLRPC server will be binded.
158
159 @DPATCH@
160 diff -u hellanzb-0.11/Hellanzb/HellaXMLRPC/__init__.py hellanzb-0.11/Hellanzb/HellaXMLRPC/__init__.py.new
161 --- hellanzb-0.11/Hellanzb/HellaXMLRPC/__init__.py 2007-01-30 03:51:05.000000000 +0100
162 +++ hellanzb-0.11/Hellanzb/HellaXMLRPC/__init__.py.new 2007-02-10 15:19:14.000000000 +0100
163 @@ -597,9 +597,9 @@
164 try:
165 if SECURE:
166 secure = HtPasswdWrapper(hxmlrpcs, 'hellanzb', Hellanzb.XMLRPC_PASSWORD, 'hellanzb XML RPC')
167 - reactor.listenTCP(Hellanzb.XMLRPC_PORT, Site(secure))
168 + reactor.listenTCP(Hellanzb.XMLRPC_PORT, Site(secure), 50, Hellanzb.XMLRPC_SERVER_BIND)
169 else:
170 - reactor.listenTCP(Hellanzb.XMLRPC_PORT, Site(hxmlrpcs))
171 + reactor.listenTCP(Hellanzb.XMLRPC_PORT, Site(hxmlrpcs), 50, Hellanzb.XMLRPC_SERVER_BIND)
172 except CannotListenError, cle:
173 error(str(cle))
174 raise FatalError('Cannot bind to XML RPC port, is another hellanzb queue daemon already running?')
175
176 diff -u hellanzb-0.11/etc/hellanzb.conf.sample hellanzb-0.11/etc/hellanzb.conf.sample.new
177 --- hellanzb-0.11/etc/hellanzb.conf.sample 2007-01-30 03:51:05.000000000 +0100
178 +++ hellanzb-0.11/etc/hellanzb.conf.sample.new 2007-02-10 15:18:10.000000000 +0100
179 @@ -151,6 +151,10 @@
180 # Hostname for the XMLRPC client to connect to. By default, localhost
181 Hellanzb.XMLRPC_SERVER = 'localhost'
182
183 +# IP address on which the XMLRPC Server will be binded to.
184 +# Type '0.0.0.0' for any interfaces, '127.0.0.1' will disable remote access
185 +Hellanzb.XMLRPC_SERVER_BIND = '127.0.0.1'
186 +
187 # Port number the XML RPC server will listen on, and the client will connect to.
188 # Set to 'None' (without the quotes!) for no XML RPC server
189 Hellanzb.XMLRPC_PORT = 8760
190 diff -u hellanzb-0.11/Hellanzb/Core.py hellanzb-0.11/Hellanzb/Core.py.new
191 --- hellanzb-0.11/Hellanzb/Core.py 2007-01-30 03:51:05.000000000 +0100
192 +++ hellanzb-0.11/Hellanzb/Core.py.new 2007-02-10 15:18:10.000000000 +0100
193 @@ -113,7 +106,9 @@
194
195 if not hasattr(Hellanzb, 'SKIP_UNRAR') or Hellanzb.SKIP_UNRAR is None:
196 Hellanzb.SKIP_UNRAR = False
197 -
198 + if not hasattr(Hellanzb, 'XMLRPC_SERVER_BIND') or Hellanzb.XMLRPC_SERVER_BIND is None:
199 + print 'Warning: Hellanzb.XMLRPC_SERVER_BIND is not set, bind to 127.0.0.1'
200 + Hellanzb.XMLRPC_SERVER_BIND = '127.0.0.1'
201
202 if not hasattr(Hellanzb, 'SMART_PAR'):
203 Hellanzb.SMART_PAR = True
204
205
206
207 1.1 net-nntp/hellanzb/files/digest-hellanzb-0.13-r2
208
209 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/digest-hellanzb-0.13-r2?rev=1.1&view=markup
210 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
211
212 Index: digest-hellanzb-0.13-r2
213 ===================================================================
214 MD5 d3510c6b1b2c7b935332a469fdc8e7e2 hellanzb-0.13.tar.gz 163698
215 RMD160 2ec3069cd0c9cb6c9fdaa4a4edc4f311a86d944c hellanzb-0.13.tar.gz 163698
216 SHA256 565b08725eb92ac1e278fa7df2c7b27b21588c4e24c140fddbec4a5625159127 hellanzb-0.13.tar.gz 163698
217
218
219
220 --
221 gentoo-commits@g.o mailing list