OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script sets up an Ubuntu chroot environment. The ideas come | 7 # This script sets up an Ubuntu chroot environment. The ideas come |
8 # from https://wiki.ubuntu.com/DebootstrapChroot and conversations with | 8 # from https://wiki.ubuntu.com/DebootstrapChroot and conversations with |
9 # tedbo. The script is passed the path to an empty folder, which will be | 9 # tedbo. The script is passed the path to an empty folder, which will be |
10 # populated with the files to form an Ubuntu Jaunty system with the packages | 10 # populated with the files to form an Ubuntu Jaunty system with the packages |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 # Copy ssh keys, so chroot'd chrome-bot can scp files from chrome-web. | 175 # Copy ssh keys, so chroot'd chrome-bot can scp files from chrome-web. |
176 cp -r ~/.ssh "$FLAGS_chroot/home/$USER/" | 176 cp -r ~/.ssh "$FLAGS_chroot/home/$USER/" |
177 fi | 177 fi |
178 | 178 |
179 # Install additional packages | 179 # Install additional packages |
180 echo "Installing additional packages..." | 180 echo "Installing additional packages..." |
181 in_chroot apt-get update | 181 in_chroot apt-get update |
182 bash_chroot "export DEBIAN_FRONTEND=noninteractive LANG=C && \ | 182 bash_chroot "export DEBIAN_FRONTEND=noninteractive LANG=C && \ |
183 apt-get --yes --force-yes install $COMPONENTS" | 183 apt-get --yes --force-yes install $COMPONENTS" |
184 | 184 |
| 185 echo "Installing chromiumos-build tool..." |
| 186 bash_chroot "cd $CHROOT_TRUNK_DIR/tools/chromiumos-build && \ |
| 187 debuild -us -uc && sudo dpkg -i ../*.deb" |
| 188 |
| 189 |
185 # Clean up the chroot mounts | 190 # Clean up the chroot mounts |
186 trap - EXIT | 191 trap - EXIT |
187 cleanup | 192 cleanup |
188 | 193 |
189 if [ "$FLAGS_chroot" = "$DEFAULT_CHROOT_DIR" ] | 194 if [ "$FLAGS_chroot" = "$DEFAULT_CHROOT_DIR" ] |
190 then | 195 then |
191 CHROOT_EXAMPLE_OPT="" | 196 CHROOT_EXAMPLE_OPT="" |
192 else | 197 else |
193 CHROOT_EXAMPLE_OPT="--chroot=$FLAGS_chroot" | 198 CHROOT_EXAMPLE_OPT="--chroot=$FLAGS_chroot" |
194 fi | 199 fi |
195 | 200 |
196 echo "All set up. To enter the chroot, run:" | 201 echo "All set up. To enter the chroot, run:" |
197 echo " $SCRIPTS_DIR/enter_chroot.sh $CHROOT_EXAMPLE_OPT" | 202 echo " $SCRIPTS_DIR/enter_chroot.sh $CHROOT_EXAMPLE_OPT" |
198 echo "" | 203 echo "" |
199 echo "CAUTION: Do *NOT* rm -rf the chroot directory; if there are stale bind" | 204 echo "CAUTION: Do *NOT* rm -rf the chroot directory; if there are stale bind" |
200 echo "mounts you may end up deleting your source tree too. To unmount and" | 205 echo "mounts you may end up deleting your source tree too. To unmount and" |
201 echo "delete the chroot cleanly, use:" | 206 echo "delete the chroot cleanly, use:" |
202 echo " $0 --delete $CHROOT_EXAMPLE_OPT" | 207 echo " $0 --delete $CHROOT_EXAMPLE_OPT" |
OLD | NEW |