[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Using live-build and apt caching behind a proxy



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 combinations of institution proxy enforcement and a local cache is
doing my head in :) The best I can do is to get a live image which has
localhost:3142 in its /etc/apt/sources.list.

Here's my configuration:

	live-build		3.0~a38-1
	platform		wheezy

In /etc/apt-cacher-ng/acnc.conf:

	proxy: http://wwwcache.gla.ac.uk:8080

In /etc/apt/apt.conf.d/01proxy:

	Acquire::http:Proxy::127.0.0.1 "DIRECT";
	Acquire::http::Proxy "http://our.slow.annoying.proxy:8080/";;


auto/config below. (I'm aware it's overspecified, but I've tried a lot of
different combinations!) having localhost:3142 everywhere works, except
that it ends up in the image of course. I can apt-get update/upgrade the
building machine fine with the above apt Acquire settings.

Nick Bailey
Science and Music Research Group, School of Engineering, Glasgow Uni.

#!/bin/sh

lb config noauto \
        --distribution "wheezy" \
        --parent-distribution "wheezy" \
        --debian-installer-distribution "wheezy" \
        --parent-debian-installer-distribution "wheezy" \
        --debian-installer "cdrom" \
        --binary-images "hdd" \
        --package-lists "lxde" \
        --architecture "i386" \
        --linux-flavours "686" \
        --archive-areas "main contrib" \
        --parent-archive-areas "main contrib" \
        --mirror-bootstrap "http://localhost:3142/ftp.uk.debian.org/debian/"; \
        --parent-mirror-bootstrap "http://ftp.uk.debian.org/debian/"; \
        --mirror-chroot "http://ftp.uk.debian.org/debian/"; \
        --parent-mirror-chroot "http://localhost:3142/ftp.uk.debian.org/debian \
        --mirror-binary "http://ftp.uk.debian.org/debian/"; \
        --parent-mirror-binary "http://localhost:3142/ftp.uk.debian.org/debian \
        --mirror-debian-installer "http://ftp.uk.debian.org/debn/"; \
        --parent-mirror-debian-installer "http://localhost:3142/ftp.uk.debian.g/debian/"; \
        --parent-mirror-bootstrap "http://localhost:3142/ftp.uk.debian.org/debn/"; \
        --mirror-chroot "http://ftp.uk.debian.org/debian/"; \
        --parent-mirror-chroot "http://localhost:3142/ftp.uk.debian.org/debian \
        --mirror-binary "http://ftp.uk.debian.org/debian/"; \
        --parent-mirror-binary "http://localhost:3142/ftp.uk.debian.org/debian \
        --mirror-debian-installer "http://ftp.uk.debian.org/debn/"; \
        --parent-mirror-debian-installer "http://localhost:3142/ftp.uk.debian.g/debian/"; \
        --apt-indices false \
        --bootappend-live "locales=en_GB.UTF-8 keyboard-layouts=gb" \
        "${@}"



Reply to: