OLD | NEW |
1 #!/bin/bash | 1 #!/bin/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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 then | 57 then |
58 if [ "$CHANNEL" == "be" ] | 58 if [ "$CHANNEL" == "be" ] |
59 then | 59 then |
60 SVN_PATH="branches/bleeding_edge/deps/all.deps" | 60 SVN_PATH="branches/bleeding_edge/deps/all.deps" |
61 elif [ "$CHANNEL" == "dev" ] | 61 elif [ "$CHANNEL" == "dev" ] |
62 then | 62 then |
63 SVN_PATH="trunk/deps/all.deps" | 63 SVN_PATH="trunk/deps/all.deps" |
64 else | 64 else |
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 fi | 68 fi |
68 SRC_URI=$SVN_REPRO$SVN_PATH | |
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 mount -o bind /proc $CHROOT/proc # Needed for openjdk-6-jdk. | |
75 chroot $CHROOT apt-get -y install \ | 74 chroot $CHROOT apt-get -y install \ |
76 debhelper python g++-4.6 openjdk-6-jdk git subversion | 75 debhelper python g++-4.6 git subversion |
77 | 76 |
78 # Add chrome-bot user. | 77 # Add chrome-bot user. |
79 chroot $CHROOT groupadd --gid 1000 chrome-bot | 78 chroot $CHROOT groupadd --gid 1000 chrome-bot |
80 chroot $CHROOT useradd --gid 1000 --uid 1000 --create-home chrome-bot | 79 chroot $CHROOT useradd --gid 1000 --uid 1000 --create-home chrome-bot |
81 mkdir $CHROOT/b | 80 mkdir $CHROOT/b |
82 chown 1000:1000 $CHROOT/b | 81 chown 1000:1000 $CHROOT/b |
83 | 82 |
84 # Create trampoline script for running the initialization as chrome-bot. | 83 # Create trampoline script for running the initialization as chrome-bot. |
85 cat << EOF > $CHROOT/b/init_chroot_trampoline.sh | 84 cat << EOF > $CHROOT/b/init_chroot_trampoline.sh |
86 #!/bin/sh | 85 #!/bin/sh |
(...skipping 21 matching lines...) Expand all Loading... |
108 gclient sync | 107 gclient sync |
109 gclient runhooks | 108 gclient runhooks |
110 EOF | 109 EOF |
111 fi | 110 fi |
112 | 111 |
113 chmod 755 $CHROOT/b/init_chroot_trampoline.sh | 112 chmod 755 $CHROOT/b/init_chroot_trampoline.sh |
114 | 113 |
115 chown 1000:1000 $CHROOT/b/init_chroot.sh | 114 chown 1000:1000 $CHROOT/b/init_chroot.sh |
116 chmod 755 $CHROOT/b/init_chroot.sh | 115 chmod 755 $CHROOT/b/init_chroot.sh |
117 chroot $CHROOT /bin/sh /b/init_chroot_trampoline.sh | 116 chroot $CHROOT /bin/sh /b/init_chroot_trampoline.sh |
OLD | NEW |