| OLD | NEW |
| 1 #!/usr/bin/env bash | 1 #!/usr/bin/env bash |
| 2 # | 2 # |
| 3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 # | 6 # |
| 7 # Script to create a Debian wheezy chroot environment for building Dart | 7 # Script to create a Debian wheezy chroot environment for building Dart |
| 8 # Debian packages. | 8 # Debian packages. |
| 9 # | 9 # |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 SVN_PATH="branches/$CHANNEL/deps/all.deps" | 65 SVN_PATH="branches/$CHANNEL/deps/all.deps" |
| 66 fi | 66 fi |
| 67 SRC_URI=$SVN_REPRO$SVN_PATH | 67 SRC_URI=$SVN_REPRO$SVN_PATH |
| 68 fi | 68 fi |
| 69 | 69 |
| 70 # Create Debian wheezy chroot. | 70 # Create Debian wheezy chroot. |
| 71 debootstrap --arch=$ARCH --components=main,restricted,universe,multiverse \ | 71 debootstrap --arch=$ARCH --components=main,restricted,universe,multiverse \ |
| 72 wheezy $CHROOT http://http.us.debian.org/debian/ | 72 wheezy $CHROOT http://http.us.debian.org/debian/ |
| 73 chroot $CHROOT apt-get update | 73 chroot $CHROOT apt-get update |
| 74 chroot $CHROOT apt-get -y install \ | 74 chroot $CHROOT apt-get -y install \ |
| 75 debhelper python g++-4.6 git subversion | 75 debhelper python git gcc sudo make |
| 76 | 76 |
| 77 # Add chrome-bot user. | 77 # Add chrome-bot user. |
| 78 chroot $CHROOT groupadd --gid 1000 chrome-bot | 78 chroot $CHROOT groupadd --gid 1001 chrome-bot |
| 79 chroot $CHROOT useradd --gid 1000 --uid 1000 --create-home chrome-bot | 79 chroot $CHROOT useradd --gid 1001 --uid 1001 --create-home chrome-bot |
| 80 mkdir $CHROOT/b | 80 mkdir $CHROOT/b |
| 81 chown 1000:1000 $CHROOT/b | 81 chown 1001:1001 $CHROOT/b |
| 82 | 82 |
| 83 # Create trampoline script for running the initialization as chrome-bot. | 83 # Create trampoline script for running the initialization as chrome-bot. |
| 84 cat << EOF > $CHROOT/b/init_chroot_trampoline.sh | 84 cat << EOF > $CHROOT/b/init_chroot_trampoline.sh |
| 85 #!/bin/sh | 85 #!/bin/sh |
| 86 su -c /b/init_chroot.sh chrome-bot | 86 su -c /b/init_chroot.sh chrome-bot |
| 87 EOF | 87 EOF |
| 88 | 88 |
| 89 # Create initialization script which does nothing. | 89 # Create initialization script which does nothing. |
| 90 cat << 'EOF' > $CHROOT/b/init_chroot.sh | 90 cat << 'EOF' > $CHROOT/b/init_chroot.sh |
| 91 #!/bin/sh | 91 #!/bin/sh |
| (...skipping 12 matching lines...) Expand all Loading... |
| 104 | 104 |
| 105 cat << EOF >> $CHROOT/b/init_chroot.sh | 105 cat << EOF >> $CHROOT/b/init_chroot.sh |
| 106 gclient config $SRC_URI | 106 gclient config $SRC_URI |
| 107 gclient sync | 107 gclient sync |
| 108 gclient runhooks | 108 gclient runhooks |
| 109 EOF | 109 EOF |
| 110 fi | 110 fi |
| 111 | 111 |
| 112 chmod 755 $CHROOT/b/init_chroot_trampoline.sh | 112 chmod 755 $CHROOT/b/init_chroot_trampoline.sh |
| 113 | 113 |
| 114 chown 1000:1000 $CHROOT/b/init_chroot.sh | 114 chown 1001:1001 $CHROOT/b/init_chroot.sh |
| 115 chmod 755 $CHROOT/b/init_chroot.sh | 115 chmod 755 $CHROOT/b/init_chroot.sh |
| 116 chroot $CHROOT /bin/sh /b/init_chroot_trampoline.sh | 116 chroot $CHROOT /bin/sh /b/init_chroot_trampoline.sh |
| OLD | NEW |