Re: Using live-build and apt caching behind a proxy
On Sat, Nov 19, 2011 at 03:31:28PM +0100, intrigeri wrote:
> Nick Bailey wrote (18 Nov 2011 16:11:27 GMT) :
> > Hi, I'm trying to build a live hdd image for distribution on USB key
> > with some of our software and an ability to install a debian system
> > on the host machine. Unfortunately, my institution has a proxy-enforcing
> > policy. I also need to use apt-cacher-ng (or similar) to avoid hitting
> > the repositories hard while tweeking the additional software.
> The setup I, and several other Tails developers, have been using for
> a while, is documented on our website:
> Hope it helps.
> intrigeri <email@example.com>
> | GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc
> | OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr.asc
> | Who wants a world in which the guarantee that we shall not
> | die of starvation would entail the risk of dying of boredom ?
Thanks for the URL, intrigeri.
I had given up on --apt-http-proxy because it didn't work with
apt-cacher-ng, failing at the debootstrap stage as below. Now I see
you are using it with squid, so I investigated further.
It seems that it's possible to get past the debootstrap by settng http_proxy
to point at the local apt-cacher-ng proxy as well. However this fails
at the debian installer phase with the message:
E: Could not download file: http://localhost:3142/ftp.uk.debian.org/debian//dists/wheezy/main/installer-i386/current/images//cdrom/vmlinuz
Is this a bug? I should imagine that most sites don't have the
overly restrictive proxy policy I have to work with, so maybe it
slipped though testing. There again, many people would be using
squid or apt-cacher-ng, I'm sure.
I've tried everything else I can think of, such as setting and unsetting
the http_proxy environment variable during the build, but no dice.
Any hints gratefully appreciated. Meanwhile, I guess I'll have to build
the final image using my cell phone's data modem :P
Failure when environment variable http_proxy is unset:
root@ingrid:~/smrg-live# lb config --apt-http-proxy "http://127.0.0.1:3142/"
P: Executing auto/config script.
P: Considering defaults defined in /etc/live/build.conf
P: Updating config tree
root@ingrid:~/smrg-live# lb build
P: Executing auto/build script.
P: Setting up cleanup function
P: Restoring bootstrap stage from cache...
P: Begin bootstrapping system...
P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
P: Running debootstrap (download-only)...
I: Retrieving Release
E: Failed getting release file http://ftp.de.debian.org/debian/dists/wheezy/Release