2 # automatically run by "lb config"
4 # we require building from git
5 if ! git rev-parse
--is-inside-work-tree; then
6 echo "${PWD} is not a Git tree. Exiting."
11 if [ -e config
/amnesia.
local ] ; then
12 . config
/amnesia.
local
16 RUN_LB_CONFIG
="lb config noauto"
18 # init config/ with defaults for the target distribution
19 $RUN_LB_CONFIG --distribution wheezy
${@}
21 # set Amnesia's general options
23 --apt-recommends false \
26 --binary-indices false \
28 --bootappend-live "${AMNESIA_APPEND}" \
29 --bootstrap "cdebootstrap" \
30 --archive-areas "main contrib non-free" \
32 --iso-application="The Amnesic Incognito Live System" \
33 --iso-publisher="https://tails.boum.org/" \
34 --iso-volume="TAILS ${AMNESIA_FULL_VERSION}" \
36 --packages-lists="standard" \
38 --linux-packages="linux-image-3.14-2" \
39 --syslinux-menu vesamenu \
40 --syslinux-splash data
/splash.png \
41 --syslinux-timeout 4 \
42 --initramfs=live-boot \
45 # build i386 images on amd64 as well, include a bunch of kernels
46 hw_arch
="`dpkg --print-architecture`"
47 if [ "$hw_arch" = i386
-o "$hw_arch" = amd64
]; then
50 --linux-flavours "486 amd64" \
52 # build powerpc images on powerpc64 as well, include only powerpc kernel
53 elif [ "$hw_arch" = powerpc
-o "$hw_arch" = powerpc64
]; then
55 --architecture powerpc \
56 --linux-flavours powerpc \
60 install -d config
/chroot_local-includes
/etc
/amnesia
/
63 TAILS_WIKI_SUPPORTED_LANGUAGES
="$(ikiwiki-supported-languages ikiwiki.setup)"
64 [ -n "$TAILS_WIKI_SUPPORTED_LANGUAGES" ] ||
exit 16
65 echo "TAILS_WIKI_SUPPORTED_LANGUAGES='${TAILS_WIKI_SUPPORTED_LANGUAGES}'" \
66 >> config
/chroot_local-includes
/etc
/amnesia
/environment
69 echo "${AMNESIA_FULL_VERSION}" > config
/chroot_local-includes
/etc
/amnesia
/version
70 if git rev-list HEAD
2>&1 >/dev
/null
; then
71 git rev-list HEAD |
head -n 1 >> config
/chroot_local-includes
/etc
/amnesia
/version
73 echo "live-build: `dpkg-query -W -f='${Version}\n' live-build`" \
74 >> config
/chroot_local-includes
/etc
/amnesia
/version
76 cat >> config
/chroot_local-includes
/etc
/os-release
<<EOF
77 TAILS_PRODUCT_NAME="Tails"
78 TAILS_VERSION_ID="$AMNESIA_VERSION"
82 cp debian
/changelog config
/chroot_local-includes
/usr
/share
/doc
/amnesia
/Changelog
84 # create readahead-list from squashfs.sort
85 if [ -e config
/binary_rootfs
/squashfs.
sort ]; then
86 mkdir
-p config
/chroot_local-includes
/usr
/share
/amnesia
87 sort -k2 -n -r config
/binary_rootfs
/squashfs.
sort |
88 cut
-d' ' -f1 > config
/chroot_local-includes
/usr
/share
/amnesia
/readahead-list
92 tails-custom-apt-sources
> config
/chroot_sources
/tails.chroot