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 # Add unstable repository for ikiwiki, and pin it low
21 echo 'deb http://cdn.debian.net/debian unstable main' > /etc
/apt
/sources.list.d
/unstable.list
22 sed -e 's/^[[:blank:]]*//' > /etc
/apt
/preferences.d
/unstable
<<EOF
24 Pin: release a=unstable
27 sed -e 's/^[[:blank:]]*//' > /etc
/apt
/preferences.d
/ikiwiki
<<EOF
29 Pin: release a=unstable
34 apt-get
-y install apt-cacher-ng
36 # Install custom configuration for apt-cacher-ng and restart
37 install -o root
-g root
-m 644 /vagrant
/provision
/assets
/acng.conf
/etc
/apt-cacher-ng
/acng.conf
38 service apt-cacher-ng restart
40 # Restore local HTTP proxy if needed
41 if [ "$LOCAL_HTTP_PROXY" ]; then
42 http_proxy
="$LOCAL_HTTP_PROXY"
46 apt-get
-y dist-upgrade
48 # Those are needed to build Tails
51 eatmydata
/squeeze-backports \
58 # Be sure to get all the modules we need for our Ikiwiki
59 apt-get
-y --no-install-recommends install \
60 libyaml-perl libyaml-libyaml-perl po4a perlmagick libyaml-syck-perl \
61 libfile-chdir-perl liburi-perl libhtml-parser-perl wdg-html-validator \
62 libhtml-scrubber-perl libhtml-template-perl libtimedate-perl \
63 libxml-simple-perl libtext-multimarkdown-perl
66 install -o root
-g root
-m 755 /vagrant
/provision
/assets
/build-tails
/usr
/local
/bin
68 update_live_build_conf
()
74 touch /etc
/live
/build.conf
75 sed -e "/^[[:space:]]*$var=/d" -i /etc
/live
/build.conf
76 echo "$var='$value'" >> /etc
/live
/build.conf
79 # Force APT repositories to a fixed mirror
80 update_live_build_conf LB_MIRROR_BINARY
"http://ftp.us.debian.org/debian/"
81 update_live_build_conf LB_PARENT_MIRROR_BINARY
"http://ftp.us.debian.org/debian/"