Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Side by Side Diff: src/scripts/make_chroot.sh

Issue 501071: Here's the upgrade-everything-to-Karmic change. As promised, some fairly (Closed)
Patch Set: Remove java stuff, restore image size. Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/scripts/install_packages.sh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 exit 1 107 exit 1
108 fi 108 fi
109 fi 109 fi
110 110
111 # Create the destination directory 111 # Create the destination directory
112 mkdir -p "$FLAGS_chroot" 112 mkdir -p "$FLAGS_chroot"
113 113
114 # Run debootstrap to create the base chroot environment 114 # Run debootstrap to create the base chroot environment
115 echo "Running debootstrap..." 115 echo "Running debootstrap..."
116 echo "You may need to enter password for sudo now..." 116 echo "You may need to enter password for sudo now..."
117 sudo debootstrap --arch=i386 "$FLAGS_suite" "$FLAGS_chroot" "$FLAGS_mirror" 117 sudo debootstrap --arch=i386 --exclude=rsyslog,ubuntu-minimal \
118 "$FLAGS_suite" "$FLAGS_chroot" "$FLAGS_mirror"
118 echo "Done running debootstrap." 119 echo "Done running debootstrap."
119 120
120 # Set up necessary mounts 121 # Set up necessary mounts
121 sudo mount none -t proc "$FLAGS_chroot/proc" 122 sudo mount none -t proc "$FLAGS_chroot/proc"
122 sudo mount none -t devpts "$FLAGS_chroot/dev/pts" 123 sudo mount none -t devpts "$FLAGS_chroot/dev/pts"
123 # ...and make sure we clean them up on exit 124 # ...and make sure we clean them up on exit
124 trap cleanup EXIT 125 trap cleanup EXIT
125 126
126 # Set up sudoers. Inside the chroot, the user can sudo without a password. 127 # Set up sudoers. Inside the chroot, the user can sudo without a password.
127 # (Safe enough, since the only way into the chroot is to 'sudo chroot', so 128 # (Safe enough, since the only way into the chroot is to 'sudo chroot', so
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 CHROOT_EXAMPLE_OPT="--chroot=$FLAGS_chroot" 207 CHROOT_EXAMPLE_OPT="--chroot=$FLAGS_chroot"
207 fi 208 fi
208 209
209 echo "All set up. To enter the chroot, run:" 210 echo "All set up. To enter the chroot, run:"
210 echo " $SCRIPTS_DIR/enter_chroot.sh $CHROOT_EXAMPLE_OPT" 211 echo " $SCRIPTS_DIR/enter_chroot.sh $CHROOT_EXAMPLE_OPT"
211 echo "" 212 echo ""
212 echo "CAUTION: Do *NOT* rm -rf the chroot directory; if there are stale bind" 213 echo "CAUTION: Do *NOT* rm -rf the chroot directory; if there are stale bind"
213 echo "mounts you may end up deleting your source tree too. To unmount and" 214 echo "mounts you may end up deleting your source tree too. To unmount and"
214 echo "delete the chroot cleanly, use:" 215 echo "delete the chroot cleanly, use:"
215 echo " $0 --delete $CHROOT_EXAMPLE_OPT" 216 echo " $0 --delete $CHROOT_EXAMPLE_OPT"
OLDNEW
« no previous file with comments | « src/scripts/install_packages.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698