On Wed, 10 Oct 2007, James A. Peltier wrote:
Tronn Wærdahl wrote:
I dont know about apt-cacher, but if its something to do with apt-get you could you --download-only. Like apt-get upgrade --download-only
apt-cacher allows you to point all clients to a centralized location, when one client performs, say and apt-get dist-upgrade, the apt-cache server caches all of the packages to it's local apt directory. It's very convienent and easy to setup, whereas the squid solution proposed by Dag is a fair bit more conviluted.
I think it is fairly easy to write a proxy-server that forwards requests to repositories and caches it locally. A very simple implementation only needs to hold a list of known mirrors, only caches RPM information (not the metadata, although adding that could be done at some later stage).
The information cached should be indexed based on filename and md5 so that for storing you never end up caching the same file on disk (even when you list of known mirrors is wrong) and so that retrieval is fast.
And you get some bonus-points if you can log every attempt of downloading/caching a file that you already have stored and use that information to automatically update your list of known mirrors.
Implementing something like that would automatically cause a list of known mirrors to be build and improved for every download made.
Who wants to take this up ? :)
PS the difference between this scheme and a squid setup is basically that you do not pollute your cache/bandwidth for retrieval of mirrored files.