5 # Do not use virtual machine proxy before apt-cacher-ng is installed
6 if [ "$http_proxy" = "http://$(hostname -f):3142" ] &&
7 ! [ -f /etc
/apt-cacher-ng
/acng.conf
]; then
8 LOCAL_HTTP_PROXY
="$http_proxy"
12 # Uninstall custom Ikiwiki in case the build directory is still there
13 if [ -d /home
/vagrant
/ikiwiki
]; then
14 rm -f /usr
/local
/bin
/ikiwiki
*
15 rm -rf /usr
/local
/lib
/perl
/5.10.1/auto
/IkiWiki
16 rm -rf /usr
/local
/share
/perl
/5.10.1/
17 rm -rf /home
/vagrant
/ikiwiki
20 rm -f /etc
/apt
/preferences.d
/* /etc
/apt
/sources.list.d
/*
22 # Add our builder-wheezy repository for live-build, and pin it low
23 echo 'deb http://deb.tails.boum.org/ builder-wheezy main' > /etc
/apt
/sources.list.d
/tails.list
24 sed -e 's/^[[:blank:]]*//' > /etc
/apt
/preferences.d
/tails
<<EOF
26 Pin: origin deb.tails.boum.org
29 sed -e 's/^[[:blank:]]*//' > /etc
/apt
/preferences.d
/live-build
<<EOF
31 Pin: origin deb.tails.boum.org
35 # We don't want to use apt-cacher-ng for gpg
36 http_proxy
="" gpg
--keyserver hkps.pool.sks-keyservers.net
--recv-key C7988EA7A358D82E
37 gpg
--export C7988EA7A358D82E | sudo apt-key add
-
39 # Add unstable repository for ikiwiki, and pin it low
40 echo 'deb http://ftp.us.debian.org/debian unstable main' > /etc
/apt
/sources.list.d
/unstable.list
41 sed -e 's/^[[:blank:]]*//' > /etc
/apt
/preferences.d
/unstable
<<EOF
43 Pin: release a=unstable
46 sed -e 's/^[[:blank:]]*//' > /etc
/apt
/preferences.d
/ikiwiki
<<EOF
48 Pin: release a=unstable
53 apt-get
-y install apt-cacher-ng
55 # Install custom configuration for apt-cacher-ng and restart
56 install -o root
-g root
-m 644 /vagrant
/provision
/assets
/acng.conf
/etc
/apt-cacher-ng
/acng.conf
57 service apt-cacher-ng restart
59 # Restore local HTTP proxy if needed
60 if [ "$LOCAL_HTTP_PROXY" ]; then
61 http_proxy
="$LOCAL_HTTP_PROXY"
65 apt-get
-y dist-upgrade
67 # Those are needed to build Tails
78 # Be sure to get all the modules we need for our Ikiwiki
79 apt-get
-y --no-install-recommends install \
80 libyaml-perl libyaml-libyaml-perl po4a perlmagick libyaml-syck-perl \
81 libfile-chdir-perl liburi-perl libhtml-parser-perl wdg-html-validator \
82 libhtml-scrubber-perl libhtml-template-perl libtimedate-perl \
83 libxml-simple-perl libtext-multimarkdown-perl
86 install -o root
-g root
-m 755 /vagrant
/provision
/assets
/build-tails
/usr
/local
/bin
88 update_live_build_conf
()
94 touch /etc
/live
/build.conf
95 sed -e "/^[[:space:]]*$var=/d" -i /etc
/live
/build.conf
96 echo "$var='$value'" >> /etc
/live
/build.conf
99 # Force APT repositories to a fixed mirror
100 update_live_build_conf LB_MIRROR_BINARY
"http://ftp.us.debian.org/debian/"
101 update_live_build_conf LB_PARENT_MIRROR_BINARY
"http://ftp.us.debian.org/debian/"