config 2.57 KB
Newer Older
amnesia's avatar
amnesia committed
1
#! /bin/sh
2
# automatically run by "lb config"
amnesia's avatar
amnesia committed
3

4 5 6
. config/amnesia
if [ -e config/amnesia.local ] ; then
   . config/amnesia.local
amnesia's avatar
amnesia committed
7 8
fi

9
# init variables
10
RUN_LB_CONFIG="lb config noauto"
amnesia's avatar
amnesia committed
11

12
# init config/ with defaults for the target distribution
amnesia's avatar
amnesia committed
13
$RUN_LB_CONFIG --distribution squeeze ${@}
amnesia's avatar
amnesia committed
14 15

# set Amnesia's general options
16
$RUN_LB_CONFIG \
17
   --apt-recommends false \
18
   --backports true \
19
   --binary-images iso-hybrid \
20
   --binary-indices false \
21
   --checksums none \
22
   --isohybrid-options "$AMNESIA_ISOHYBRID_OPTS" \
amnesia's avatar
amnesia committed
23
   --bootappend-live "${AMNESIA_APPEND}" \
24
   --bootstrap "cdebootstrap" \
25
   --archive-areas "main contrib non-free" \
26
   --includes none \
27
   --iso-application="The Amnesic Incognito Live System" \
28
   --iso-publisher="https://tails.boum.org/" \
amnesia's avatar
amnesia committed
29
   --iso-volume="TAILS ${AMNESIA_FULL_VERSION}" \
amnesia's avatar
amnesia committed
30
   --memtest none \
31
   --packages-lists="standard" \
32
   --syslinux-menu vesamenu \
T(A)ILS developers's avatar
T(A)ILS developers committed
33
   --syslinux-splash data/splash.png \
amnesia's avatar
amnesia committed
34
   --syslinux-timeout 4 \
35
   --initramfs=live-boot \
amnesia's avatar
amnesia committed
36 37
   ${@}

38
# build i386 images on amd64 as well, include only 686 kernel
amnesia's avatar
amnesia committed
39 40
hw_arch="`dpkg --print-architecture`"
if [ "$hw_arch" = i386 -o "$hw_arch" = amd64 ]; then
41
   $RUN_LB_CONFIG \
amnesia's avatar
amnesia committed
42
      --architecture i386 \
43
      --linux-flavours 486 \
amnesia's avatar
amnesia committed
44
      ${@}
45 46
# build powerpc images on powerpc64 as well, include only powerpc kernel
elif [ "$hw_arch" = powerpc -o "$hw_arch" = powerpc64 ]; then
47
   $RUN_LB_CONFIG \
48 49 50
      --architecture powerpc \
      --linux-flavours powerpc \
      ${@}
amnesia's avatar
amnesia committed
51 52
fi

53 54 55 56 57 58 59 60
install -d config/chroot_local-includes/etc/amnesia/

# environment
TAILS_WIKI_SUPPORTED_LANGUAGES="$(ikiwiki-supported-languages ikiwiki.setup)"
[ -n "$TAILS_WIKI_SUPPORTED_LANGUAGES" ] || exit 16
echo "TAILS_WIKI_SUPPORTED_LANGUAGES='${TAILS_WIKI_SUPPORTED_LANGUAGES}'" \
   >> config/chroot_local-includes/etc/amnesia/environment

amnesia's avatar
amnesia committed
61
# version
62
echo "${AMNESIA_FULL_VERSION}" > config/chroot_local-includes/etc/amnesia/version
amnesia's avatar
amnesia committed
63
if git rev-list HEAD 2>&1 >/dev/null; then
64 65
   git rev-list HEAD | head -n 1 >> config/chroot_local-includes/etc/amnesia/version
fi
66 67
echo "live-build: `dpkg-query -W -f='${Version}\n' live-build`" \
   >> config/chroot_local-includes/etc/amnesia/version
68 69

# changelog
70
cp debian/changelog config/chroot_local-includes/usr/share/doc/amnesia/Changelog
71 72 73

# GnuPG key
cp wiki/src/amnesia.asc config/chroot_local-includes/usr/share/doc/amnesia/
74 75 76 77 78 79 80

# create readahead-list from squashfs.sort
if [ -e config/binary_rootfs/squashfs.sort ]; then
    mkdir -p config/chroot_local-includes/usr/share/amnesia
    sort -k2 -n -r config/binary_rootfs/squashfs.sort |
        cut -d' ' -f1 > config/chroot_local-includes/usr/share/amnesia/readahead-list
fi