File: FAQ

package info (click to toggle)
approx 4.5-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 428 kB
  • ctags: 683
  • sloc: ml: 1,957; sh: 45; makefile: 36
file content (67 lines) | stat: -rw-r--r-- 2,485 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Changing the temporary directory used by approx

  The TMPDIR environment variable can be used to specify the temporary
  directory used by approx. Please see the section on
  "Passing environment variables to approx", below.

Exporting a local package repository

  This is supported with file URLs. Note that the syntax for file URLs
  requires 3 leading slashes (two for the URL syntax, and one for
  the root of the pathname). So you can add something like this
  to /etc/approx/approx.conf:

      local   file:///my/local/repo

  The repo must have the structure that apt expects, including a
  Packages.gz index. You can maintain a local repo with a tool like
  dpkg-scanpackages or reprepro.

Changing the TCP port on which approx listens

  Run "dpkg-reconfigure approx" and enter the desired port number
  when prompted.

Changing the IP addresses on which approx listens

  Add a host address specifier at the beginning of the approx entry
  in /etc/inetd.conf. See the inetd(8) manual page for details.

Controlling access to approx using TCP wrappers (hosts.allow and hosts.deny)

  The /etc/hosts.allow and /etc/hosts.deny files can be used for
  host-based control of the approx service.

  After adding the appropriate entries (see the hosts_access(5) manual page),
  add the line
      OPTIONS="-l"
  to the file /etc/default/openbsd-inetd and then restart openbsd-inetd.

Making approx use a proxy for its downloads

  Since approx uses the curl(1) command to download files from
  remote repositories, you can use the http_proxy environment variable
  (or one of the others documented in the curl(1) manual page).
  Please see the section on "Passing environment variables to approx", below.

Handling high client load

  The openbsd-inetd version of inetd limits the rate of requests by default.
  See the inetd(8) man page for ways to change the limit.

Passing environment variables to approx

  The openbsd-inetd version of inetd passes only certain environment
  variables to servers. Here are some workarounds:

  1. Modify the inetd.conf entry for approx to run an executable wrapper
     script instead of the /usr/sbin/approx binary. You can use something
     like this for the wrapper:

         #!/bin/sh
         export MY_ENVIRONMENT_VARIABLE=...
         exec /usr/sbin/approx

  2. Modify the inetd.conf entry for approx to run the "/usr/bin/env" command,
     with the desired environment variable settings and "/usr/sbin/approx"
     as arguments.