As part of the infrastructure team for Linaro, I’m working on various kinds of build service — particular image builds and package builds.  Both of these involve running things like ‘apt-get update’ and ‘debootstrap’ a lot, and for as I’m in New Zealand and the servers these commands pull from are in London, a caching proxy between the board and the internet makes things go a _lot_ faster.

On Michael Hope‘s recommendation I installed polipo which seems to mostly work, although it seems to fall over whenever I sleep my laptop, which is a bit lame.  I have it configured to listen on and answer requests from and (so I can point programs running on my laptop at it if I want/to test it’s working).  My config file looks like this:

proxyAddress =
allowedClients =,
cacheIsShared = false
dnsUseGethostbyname = happily

The only non-trivial thing to figure out was the dnsUseGethostbyname thing — this is required for hostnames in /etc/hosts to be resolved by the proxy, something that matters when the board is trying to download files from “”.

Then it just remains to set http_proxy to in .bashrc on the board and allow the http_proxy environment variable to be passed though sudo by adding the following line using visudo:

Defaults        env_keep += "http_proxy"

Then just enjoy the better performance of the package manipulations (after the first time, at least).