Change the module location of the apt OpProgress class (Closes: #641732)
[quix0rs-apt-p2p.git] / debian / apt-p2p.conf.sgml
1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2
3   <!-- Fill in your name for FIRSTNAME and SURNAME. -->
4   <!ENTITY dhfirstname "<firstname>Cameron</firstname>">
5   <!ENTITY dhsurname   "<surname>Dale</surname>">
6   <!-- Please adjust the date whenever revising the manpage. -->
7   <!ENTITY dhdate      "<date>April 25, 2008</date>">
8   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
9        allowed: see man(7), man(1). -->
10   <!ENTITY dhsection   "<manvolnum>5</manvolnum>">
11   <!ENTITY dhemail     "<email>camrdale@gmail.com</email>">
12   <!ENTITY dhusername  "Cameron Dale">
13   <!ENTITY dhucpackage "<refentrytitle>apt-p2p.conf</refentrytitle>">
14   <!ENTITY dhpackage   "apt-p2p.conf">
15
16   <!ENTITY debian      "<productname>Debian</productname>">
17   <!ENTITY gnu         "<acronym>GNU</acronym>">
18   <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
19 ]>
20
21 <refentry>
22   <refentryinfo>
23     <address>
24       &dhemail;
25     </address>
26     <author>
27       &dhfirstname;
28       &dhsurname;
29     </author>
30     <copyright>
31       <year>2008</year>
32       <holder>&dhusername;</holder>
33     </copyright>
34     &dhdate;
35   </refentryinfo>
36   <refmeta>
37     &dhucpackage;
38
39     &dhsection;
40   </refmeta>
41
42   <refnamediv>
43     <refname>&dhpackage;</refname>
44
45     <refpurpose>configuration file for &dhpackage;</refpurpose>
46   </refnamediv>
47
48   <refsect1>
49     <title>DESCRIPTION</title>
50
51     <para>Configuration information for &dhpackage; is searched for in the following order, with later
52       entries overriding former ones:
53       <OrderedList>
54         <ListItem><para>/etc/apt-p2p/apt-p2p.conf</para></ListItem>
55         <ListItem><para>$HOME/.apt-p2p/apt-p2p.conf</para></ListItem>
56         <ListItem><para>the location specified by the config-file parameter</para></ListItem>
57       </OrderedList>
58     </para>
59     
60   </refsect1>
61   <refsect1>
62     <title>FORMAT</title>
63
64     <para>&dhpackage; has a structure similar to Microsoft Windows INI files.
65         The configuration file consists of sections, led by a '[section]' header and followed
66         by 'name = value' or 'name: value' entries, with continuations in the style of RFC 822
67         (values can span multiple lines by starting the subsequent lines with one or more spaces).
68         Some values indicate times, in which case a suffix of 'd' for
69         days, 'h' for hours, 'm' for minutes, and 's' for seconds can be used.
70         Boolean values can be '1', 'yes', 'true', and 'on' to evaluate to True,
71         or '0', 'no', 'false', and 'off' to evaluate to false.
72         Note that leading whitespace is removed from values, and case is not important.
73         Lines beginning with '#' or ';' are ignored and may be used to provide comments.</para>
74     
75   </refsect1>
76   <refsect1>
77     <title>VARIABLES</title>
78       <para>There are 2 required sections in the config file. The first is the DEFAULT section, providing
79         variables for the configuration of the main application. The second is the section that provides
80         variables for the configuration of the DHT.</para>
81         
82       <refsect2>
83         <title>DEFAULT</title>
84
85         <variablelist>
86           <varlistentry>
87             <term><option>PORT = <replaceable>number</replaceable></option></term>
88              <listitem>
89               <para>The <replaceable>number</replaceable> of the port to listen on for requests.
90                   The main application will use this TCP port to listen for requests from APT, and
91                   for uploads to other peers. If a port is not specified for the DHT, it will also
92                   use this UDP port to listen for DHT requests.
93                   (Default is 9977.)</para>
94             </listitem>
95           </varlistentry>
96           <varlistentry>
97             <term><option>UPLOAD_LIMIT = <replaceable>speed</replaceable></option></term>
98              <listitem>
99               <para>The <replaceable>speed</replaceable> to limit sending data to peers to, in KBytes/sec.
100                 Set this to 0 to not limit the upload bandwidth.
101                 (Default is 0)</para>
102             </listitem>
103           </varlistentry>
104           <varlistentry>
105             <term><option>MIN_DOWNLOAD_PEERS = <replaceable>number</replaceable></option></term>
106              <listitem>
107               <para>The minimum <replaceable>number</replaceable> of peers before the mirror is not used.
108                 If there are fewer peers than this for a file, the mirror will also be
109                 used to speed up the download. Set to 0 to never use the mirror if
110                 there are peers.                
111                 (Default is 3)</para>
112             </listitem>
113           </varlistentry>
114           <varlistentry>
115             <term><option>CACHE_DIR = <replaceable>directory</replaceable></option></term>
116              <listitem>
117               <para>The <replaceable>directory</replaceable> to store the downloaded files in.
118                 (Default is $HOME/.apt-p2p/cache.)</para>
119             </listitem>
120           </varlistentry>
121           <varlistentry>
122             <term><option>OTHER_DIRS = <replaceable>list</replaceable></option></term>
123              <listitem>
124               <para>The <replaceable>list</replaceable> of directories containing packages to share with others.
125                 All files in these directories will be hashed and available for everybody to download.
126                 (Default is to share only the files downloaded.)</para>
127             </listitem>
128           </varlistentry>
129           <varlistentry>
130             <term><option>LOCAL_OK = <replaceable>boolean</replaceable></option></term>
131              <listitem>
132               <para>Whether it's OK for the application to use for sharing files an IP address from a
133             known local or private range (RFC 1918). This should only be set true if you are running
134             your own private apt-p2p network that no one else will be connecting to.
135                 (Default is false)</para>
136             </listitem>
137           </varlistentry>
138           <varlistentry>
139             <term><option>REMOTE_STATS = <replaceable>boolean</replaceable></option></term>
140              <listitem>
141               <para>Whether a remote peer can access the statistics page.
142                 (Default is True)</para>
143             </listitem>
144           </varlistentry>
145           <varlistentry>
146             <term><option>UNLOAD_PACKAGES_CACHE = <replaceable>time</replaceable></option></term>
147              <listitem>
148               <para>The <replaceable>time</replaceable> of inactivity to wait for before unloading the
149                   packages cache. The packages cache uses a lot of memory, and only takes a few seconds
150                   to reload when a new request arrives. (Default is 5 minutes.)</para>
151             </listitem>
152           </varlistentry>
153           <varlistentry>
154             <term><option>KEY_REFRESH = <replaceable>time</replaceable></option></term>
155              <listitem>
156               <para>The <replaceable>time</replaceable> after which to refresh DHT keys.
157                   This should be a time slightly less than the DHT's KEY_EXPIRE value.
158                   (Default is 2.5 hours.)</para>
159             </listitem>
160           </varlistentry>
161           <varlistentry>
162             <term><option>USERNAME = <replaceable>user</replaceable></option></term>
163              <listitem>
164               <para>The <replaceable>user</replaceable> name to try and run as.
165                   Leaving this blank will try to run as current user.
166                   (Default is 'apt-p2p'.)</para>
167             </listitem>
168           </varlistentry>
169           <varlistentry>
170             <term><option>DHT = <replaceable>string</replaceable></option></term>
171              <listitem>
172               <para>The DHT implementation to use. It must be possile to do (in python) 'from
173                 &lt;DHT&gt;.DHT import DHT' to get a class that implements the IDHT interface.
174                 There should also be a similarly named section in the config file to specify
175                 the options for the DHT. (Default is 'apt_p2p_Khashmir')</para>
176             </listitem>
177           </varlistentry>
178           <varlistentry>
179             <term><option>DHT-ONLY = <replaceable>boolean</replaceable></option></term>
180              <listitem>
181               <para>Whether to only run the DHT. This can be useful for providing only a bootstrap node.
182                 (Default is false)</para>
183             </listitem>
184           </varlistentry>
185         </variablelist>
186       </refsect2>
187       <refsect2>
188         <title>apt_p2p_Khashmir</title>
189
190         <variablelist>
191           <varlistentry>
192             <term><option>PORT = <replaceable>number</replaceable></option></term>
193              <listitem>
194               <para>The <replaceable>number</replaceable> of the port to listen on for DHT (UDP) requests.
195                   (Default is to use the value specified in the DEFAULT section.)</para>
196             </listitem>
197           </varlistentry>
198           <varlistentry>
199             <term><option>BOOTSTRAP = <replaceable>list</replaceable></option></term>
200              <listitem>
201               <para>The <replaceable>list</replaceable> of bootstrap nodes to contact to join the DHT.
202                 Each node should be on a separate line, and start with the IP address or host name,
203                 followed by a colon and the port number.
204                 (Default is a list of known good nodes.)</para>
205             </listitem>
206           </varlistentry>
207           <varlistentry>
208             <term><option>BOOTSTRAP_NODE = <replaceable>boolean</replaceable></option></term>
209              <listitem>
210               <para>Whether this node is a bootstrap node.
211                 (Default is false)</para>
212             </listitem>
213           </varlistentry>
214           <varlistentry>
215             <term><option>CHECKPOINT_INTERVAL = <replaceable>time</replaceable></option></term>
216              <listitem>
217               <para>The <replaceable>time</replaceable> to wait between saves of the running state.
218                   (Default is 5 minutes.)</para>
219             </listitem>
220           </varlistentry>
221           <varlistentry>
222             <term><option>CONCURRENT_REQS = <replaceable>number</replaceable></option></term>
223              <listitem>
224               <para>The concurrent <replaceable>number</replaceable> of calls per find node/value request.
225                   (Default is 8.)</para>
226             </listitem>
227           </varlistentry>
228           <varlistentry>
229             <term><option>STORE_REDUNDANCY = <replaceable>number</replaceable></option></term>
230              <listitem>
231               <para>The <replaceable>number</replaceable> of redundant copies of a value to store in the DHT.
232                   (Default is 6.)</para>
233             </listitem>
234           </varlistentry>
235           <varlistentry>
236             <term><option>RETRIEVE_VALUES = <replaceable>number</replaceable></option></term>
237              <listitem>
238               <para>The <replaceable>number</replaceable> of values to attempt to retrieve from the DHT.
239                   Setting this to 0 will try and get all values (which could take a while if
240                   a lot of nodes have values). Setting it negative will try to get that
241                   number of results from only the closest STORE_REDUNDANCY nodes to the hash.
242                   (Default is -10000, which is a large negative number so all values from the closest
243                   STORE_REDUNDANCY nodes will be retrieved.)</para>
244             </listitem>
245           </varlistentry>
246           <varlistentry>
247             <term><option>MAX_FAILURES = <replaceable>number</replaceable></option></term>
248              <listitem>
249               <para>The <replaceable>number</replaceable> of times in a row a node can fail to
250                   respond before it's booted from the routing table.
251                   (Default is 3.)</para>
252             </listitem>
253           </varlistentry>
254           <varlistentry>
255             <term><option>MIN_PING_INTERVAL = <replaceable>time</replaceable></option></term>
256              <listitem>
257               <para>The minimum <replaceable>time</replaceable> to wait before re-pinging a node.
258                   (Default is 15 minutes.)</para>
259             </listitem>
260           </varlistentry>
261           <varlistentry>
262             <term><option>BUCKET_STALENESS = <replaceable>time</replaceable></option></term>
263              <listitem>
264               <para>The maximum <replaceable>time</replaceable> to wait before refreshing a bucket.
265                   (Default is 1 hour.)</para>
266             </listitem>
267           </varlistentry>
268           <varlistentry>
269             <term><option>LOCAL_OK = <replaceable>boolean</replaceable></option></term>
270              <listitem>
271               <para>Whether it's OK to add nodes to the routing table that use an IP address from a
272             known local or private range (RFC 1918). This should only be set true if you are running
273             your own private apt-p2p network that no one else will be connecting to.
274                 (Default is to use the value specified in the DEFAULT section.)</para>
275             </listitem>
276           </varlistentry>
277           <varlistentry>
278             <term><option>KEY_EXPIRE = <replaceable>time</replaceable></option></term>
279              <listitem>
280               <para>The <replaceable>time</replaceable> to wait before expiring unrefreshed keys.
281                   (Default is 3 hours.)</para>
282             </listitem>
283           </varlistentry>
284           <varlistentry>
285             <term><option>KRPC_TIMEOUT = <replaceable>time</replaceable></option></term>
286              <listitem>
287               <para>The <replaceable>time</replaceable> to wait before KRPC requests timeout.
288                   (Default is 9 seconds.)</para>
289             </listitem>
290           </varlistentry>
291           <varlistentry>
292             <term><option>KRPC_INITIAL_DELAY = <replaceable>time</replaceable></option></term>
293              <listitem>
294               <para>The <replaceable>time</replaceable> to start with when resending KRPC requests using exponential backoff.
295                   The request will first be resent after the delay set here.
296                   The request will be resent again after twice the delay set here, and so on.
297                   e.g. if TIMEOUT is 9 sec., and INITIAL_DELAY is 2 sec., then requests will
298                   be resent at times 0, 2 (2 sec. later), and 6 (4 sec. later), and then will
299                   timeout at 9. (Default is 2 seconds.)</para>
300             </listitem>
301           </varlistentry>
302           <varlistentry>
303             <term><option>SPEW = <replaceable>boolean</replaceable></option></term>
304              <listitem>
305               <para>Whether to log lots of info about the requests and responses in the protocol.
306                 (Default is false)</para>
307             </listitem>
308           </varlistentry>
309         </variablelist>
310      </refsect2>
311   </refsect1>
312
313   <refsect1>
314     <title>SEE ALSO</title>
315
316     <para>
317       <citerefentry><refentrytitle>apt-p2p</refentrytitle><manvolnum>8</manvolnum></citerefentry>
318     </para>
319   </refsect1>
320   <refsect1>
321     <title>AUTHOR</title>
322     <para>This manual page was written by &dhusername; &lt;&dhemail;> for
323       the &debian; system (but may be used by others).  Permission is
324       granted to copy, distribute and/or modify this document under
325       the terms of the &gnu; General Public License, Version 2 or any
326       later version published by the Free Software Foundation.
327     </para>
328     <para>
329       On Debian systems, the complete text of the GNU General Public
330       License can be found in /usr/share/common-licenses/GPL.
331     </para>
332   </refsect1>
333 </refentry>
334
335 <!-- Keep this comment at the end of the file
336 Local variables:
337 mode: sgml
338 sgml-omittag:t
339 sgml-shorttag:t
340 sgml-minimize-attributes:nil
341 sgml-always-quote-attributes:t
342 sgml-indent-step:2
343 sgml-indent-data:t
344 sgml-parent-document:nil
345 sgml-default-dtd-file:nil
346 sgml-exposed-tags:nil
347 sgml-local-catalogs:nil
348 sgml-local-ecat-files:nil
349 End:
350 -->