]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/schroot/files/schroot-setup.d/99porterbox-extra-sources
include debian-ports-archive-keyring on ppc64
[dsa-puppet.git] / modules / schroot / files / schroot-setup.d / 99porterbox-extra-sources
1 #!/bin/bash
2
3 ##
4 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
5 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
6 ##
7
8 # by weasel
9
10 set -e
11
12 [ "$CHROOT_PROFILE" = "dsa" ] || [ "$CHROOT_PROFILE" = "buildd-dsa" ] || exit 0
13
14 . "$SETUP_DATA_DIR/common-data"
15 . "$SETUP_DATA_DIR/common-functions"
16
17 if [ -f "${CHROOT_SCRIPT_CONFIG:-}" ]; then
18     . "$CHROOT_SCRIPT_CONFIG"
19 elif [ -f "$CHROOT_PROFILE_DIR/config" ]; then
20     . "$CHROOT_PROFILE_DIR/config"
21 else
22     fatal "Cannot find config script"
23 fi
24
25 suite_alias="$SUITE_BASE"
26 case "$SUITE_ARCH" in
27     kfreebsd-*)
28         case "$SUITE_BASE" in
29             jessie)
30                 suite_alias="$SUITE_BASE-kfreebsd"
31             ;;
32         esac
33         ;;
34 esac
35
36 if [ "$1" = "setup-start" ] || [ "$1" = "setup-recover" ]; then
37   SRCL="${CHROOT_PATH}/etc/apt/sources.list.d/auto.list"
38   rm -f "$SRCL"
39   mirror=${MIRROR:-http://ftp.debian.org/debian}
40
41   case "${SUITE_BASE:-}" in
42     experimental)
43       echo "deb     $mirror sid main" >> "$SRCL"
44       echo "deb-src $mirror sid main" >> "$SRCL"
45       ;;
46     sid|stretch)
47       ;;
48     *)
49       echo "deb     http://security.debian.org/ ${suite_alias}/updates main" >> "$SRCL"
50       echo "deb-src http://security.debian.org/ ${suite_alias}/updates main" >> "$SRCL"
51       ;;
52   esac
53   echo "deb     $mirror ${suite_alias} main" >> "$SRCL"
54   echo "deb-src $mirror ${suite_alias} main" >> "$SRCL"
55
56   case "${SUITE_VARIANT:-}" in
57     backports)
58       case "${SUITE_BASE:-}" in
59         squeeze)
60           echo "deb     http://backports.debian.org/debian-backports/ ${suite_alias}-${SUITE_VARIANT} main" >> "$SRCL"
61           echo "deb-src http://backports.debian.org/debian-backports/ ${suite_alias}-${SUITE_VARIANT} main" >> "$SRCL"
62           ;;
63         *)
64           echo "deb     $mirror ${suite_alias}-${SUITE_VARIANT} main" >> "$SRCL"
65           echo "deb-src $mirror ${suite_alias}-${SUITE_VARIANT} main" >> "$SRCL"
66           ;;
67       esac
68       ;;
69   esac
70   echo "o To install build dependencies run"
71   echo "  dd-schroot-cmd -c ${SESSION_ID} apt-get update"
72   echo "  followed by build-dep/install as appropriate in the host system."
73   echo "o If you started this session with schroot -b, please do not forget to run"
74   echo "  schroot --end-session -c ${SESSION_ID}"
75   echo "  when you no longer need this environment."
76 fi