File: FAQ

package info (click to toggle)
approx 5.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 320 kB
  • sloc: ml: 2,292; sh: 43; makefile: 32
file content (103 lines) | stat: -rw-r--r-- 3,839 bytes parent folder | download | duplicates (2)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Changing the location of the approx cache (symlink)

  Move your cache where you want it, then
  replace the /var/cache/approx directory by a symlink:

      mv /var/cache/approx /somewhere
      ln -s /somewhere/approx /var/cache/approx
      
  The advantage with this method is that the weekly cron job in charge of
  removing old files (/etc/cron.weekly/approx) still works. However, if
  you want multiple config files with multiple cache paths, this approach
  doesn't help.

Changing the location of the approx cache (configuration)

  Use the $cache parameter in /etc/approx/approx.conf. Make sure the
  specified location exists and is owned by the approx user and group.
  Use a subdirectory for the cache, not a top-level filesystem with a
  lost+found directory in it.

  Note that this will break the weekly cron job (/etc/cron.weekly/approx),
  you will have to edit this file and adjust the cache path. See #930328
  for more details.

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.

Using approx with xinetd

  An example configuration file is provided in
  /usr/share/doc/approx/examples/approx.xinetd

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.bz2 index. You can maintain a local repo with a tool like
  dpkg-scanpackages or reprepro.

Changing the TCP port on which approx listens

  Modify the "ListenStream" line in approx.socket file.

Changing the IP addresses on which approx listens

  Modify the "ListenStream" line in approx.socket file (see systemd.socket(5)
  manual page for more information).

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.

Passing options to the curl(1) command used by approx

  Use the above method to pass the CURL_HOME environment variable to approx,
  and use the file $CURL_HOME/.curlrc to specify the desired curl options.

  For example, adding the line "--ipv4" to this file will force curl to
  resolve hostnames to IPv4 addresses only.