apt-cacher-ng for Debian
------------------------

See apt-cacher-ng.pdf for configuration instructions (or HTML version or README).
The configuration directory on Debian systems is located in
/etc/apt-cacher-ng/. Some files which are unlikely to be changed are stored
outside of /etc and only symlinks to them are placed among other config files.
To customize them, remove the symlink and replace it with the file which the
symlink pointed to.

The logs are stored in /var/log/apt-cacher-ng/ and are rotated/expired by
logrotate except of temporary maintenance logs which are removed ASAP.

REMOTE MIRROR CONFIGURATION
---------------------------

The Debian setup includes some semi-automatic backend configuration. The
remapping rules for many known mirrors are shipped with the package. On
installation, the setup script picks up a list of preferred backend hosts from
local machine's current sources.list files and puts them into
/etc/apt-cacher-ng/backends_* files.

To change the mirrors used by apt-cacher-ng, user needs to add/remove/reorder
the lists in this backends files. To execute or enable automatic configuration,
run "dpkg-reconfigure apt-cacher-ng".

SECURITY
--------

See apt-cacher-ng manual for details. On Debian systems, the file
/etc/apt-cacher-ng/security.conf is installed which contains security related
options (but it can be in any other *.conf file as well). Currently it sets the
"AdminAuth: user:pass" option to protect some action triggers in the web user
interface against unauthorized use.

INETD USAGE
-----------

For inetd usage, the in.acng binary is shipped with the Debian package.
However, it needs to be installed manually by adding the line:

3142  stream  tcp nowait  apt-cacher-ng /usr/sbin/tcpd /usr/lib/apt-cacher-ng/in.acng /var/run/apt-cacher-ng/socket

to /etc/inetd.conf and reload of the inetd daemon. The parameters above need to
be adapted as needed, also see the package documentation for more details.

MISCELANEOUS NOTES
------------------

Apparently some versions of apt used URL encoding for tilde
character in file names in certain configurations. This could have caused
storage of files under suboptimal locations in the local cache of
apt-cacher-ng, followed by a removal of that files in later expiration
runs.

The current version of apt-cacher-ng works around that problem. It also
includes a script (/usr/lib/apt-cacher-ng/urlencode-fixer.pl) which checks
and corrects the files already existing in the cache directory.

 -- Eduard Bloch <blade@debian.org>  Mon, 01 Aug 2011 21:10:09 +0200
