Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # Common constants for build scripts | 5 # Common constants for build scripts |
| 6 # This must evaluate properly for both /bin/bash and /bin/sh | 6 # This must evaluate properly for both /bin/bash and /bin/sh |
| 7 | 7 |
| 8 # All scripts should die on error unless commands are specifically excepted | 8 # All scripts should die on error unless commands are specifically excepted |
| 9 # by prefixing with '!' or surrounded by 'set +e' / 'set -e'. | 9 # by prefixing with '!' or surrounded by 'set +e' / 'set -e'. |
| 10 # TODO: Re-enable this once shflags is less prone to dying. | 10 # TODO: Re-enable this once shflags is less prone to dying. |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 122 INSIDE_CHROOT=1 | 122 INSIDE_CHROOT=1 |
| 123 else | 123 else |
| 124 INSIDE_CHROOT=0 | 124 INSIDE_CHROOT=0 |
| 125 fi | 125 fi |
| 126 | 126 |
| 127 # Directory locations inside the dev chroot | 127 # Directory locations inside the dev chroot |
| 128 CHROOT_TRUNK_DIR="/home/$USER/trunk" | 128 CHROOT_TRUNK_DIR="/home/$USER/trunk" |
| 129 | 129 |
| 130 # Install make for portage ebuilds. Used by build_image and gmergefs. | 130 # Install make for portage ebuilds. Used by build_image and gmergefs. |
| 131 # TODO: Is /usr/local/autotest-chrome still used by anyone? | 131 # TODO: Is /usr/local/autotest-chrome still used by anyone? |
| 132 DEFAULT_INSTALL_MASK="/usr/include /usr/man /usr/share/man /usr/share/doc \ | 132 DEFAULT_INSTALL_MASK=" |
| 133 /usr/share/gtk-doc /usr/share/gtk-2.0 /usr/lib/gtk-2.0/include \ | 133 *.a |
| 134 /usr/share/info /usr/share/aclocal /usr/lib/gcc /usr/lib/pkgconfig \ | 134 *.la |
| 135 /usr/share/pkgconfig /usr/share/gettext /usr/share/readline /etc/runlevels \ | 135 /etc/init.d |
| 136 /usr/share/openrc /lib/rc *.a *.la /etc/init.d /usr/lib/debug | 136 /etc/runlevels |
| 137 /usr/local/autotest /usr/local/autotest-chrome" | 137 /lib/rc |
| 138 /usr/bin/Xnest | |
|
Daniel Erat
2010/12/21 18:49:57
This line and the Xvfb one after it are the only f
| |
| 139 /usr/bin/Xvfb | |
| 140 /usr/include | |
| 141 /usr/lib/debug | |
| 142 /usr/lib/gcc | |
| 143 /usr/lib/gtk-2.0/include | |
| 144 /usr/lib/pkgconfig | |
| 145 /usr/local/autotest | |
| 146 /usr/local/autotest-chrome | |
| 147 /usr/man | |
| 148 /usr/share/aclocal | |
| 149 /usr/share/doc | |
| 150 /usr/share/gettext | |
| 151 /usr/share/gtk-2.0 | |
| 152 /usr/share/gtk-doc | |
| 153 /usr/share/info | |
| 154 /usr/share/man | |
| 155 /usr/share/openrc | |
| 156 /usr/share/pkgconfig | |
| 157 /usr/share/readline | |
| 158 " | |
| 138 | 159 |
| 139 FACTORY_INSTALL_MASK="/opt/google/chrome /opt/google/o3d /opt/netscape \ | 160 FACTORY_INSTALL_MASK=" |
| 140 /opt/google/talkplugin /opt/Qualcomm /opt/Synaptics \ | 161 /opt/Qualcomm |
| 141 /usr/lib/dri /usr/lib/python2.6/test \ | 162 /opt/Synaptics |
| 142 /usr/share/chewing /usr/share/fonts \ | 163 /opt/google/chrome |
| 143 /usr/share/ibus-pinyin /usr/share/libhangul /usr/share/locale \ | 164 /opt/google/o3d |
| 144 /usr/share/m17n /usr/share/mime /usr/share/sounds /usr/share/tts \ | 165 /opt/google/talkplugin |
| 145 /usr/share/X11 /usr/share/zoneinfo /usr/lib/debug | 166 /opt/netscape |
| 146 /usr/local/autotest /usr/local/autotest-chrome /usr/local/autotest-pkgs" | 167 /usr/lib/debug |
| 168 /usr/lib/dri | |
| 169 /usr/lib/python2.6/test | |
| 170 /usr/local/autotest | |
| 171 /usr/local/autotest-chrome | |
| 172 /usr/local/autotest-pkgs | |
| 173 /usr/share/X11 | |
| 174 /usr/share/chewing | |
| 175 /usr/share/fonts | |
| 176 /usr/share/ibus-pinyin | |
| 177 /usr/share/libhangul | |
| 178 /usr/share/locale | |
| 179 /usr/share/m17n | |
| 180 /usr/share/mime | |
| 181 /usr/share/sounds | |
| 182 /usr/share/tts | |
| 183 /usr/share/zoneinfo | |
| 184 " | |
| 147 | 185 |
| 148 # Check to ensure not running old scripts | 186 # Check to ensure not running old scripts |
| 149 V_REVERSE='[7m' | 187 V_REVERSE='[7m' |
| 150 V_VIDOFF='[m' | 188 V_VIDOFF='[m' |
| 151 case "$(basename $0)" in | 189 case "$(basename $0)" in |
| 152 build_image.sh|build_platform_packages.sh|customize_rootfs.sh|make_chroot.sh) | 190 build_image.sh|build_platform_packages.sh|customize_rootfs.sh|make_chroot.sh) |
| 153 echo | 191 echo |
| 154 echo "$V_REVERSE============================================================" | 192 echo "$V_REVERSE============================================================" |
| 155 echo "=========================== WARNING ======================" | 193 echo "=========================== WARNING ======================" |
| 156 echo "============================================================$V_VIDOFF" | 194 echo "============================================================$V_VIDOFF" |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 517 chroot_hacks_from_outside() { | 555 chroot_hacks_from_outside() { |
| 518 # Give args better names. | 556 # Give args better names. |
| 519 local chroot_dir="${1}" | 557 local chroot_dir="${1}" |
| 520 | 558 |
| 521 # Add root as a sudoer if not already done. | 559 # Add root as a sudoer if not already done. |
| 522 if ! sudo grep -q '^root ALL=(ALL) ALL$' "${chroot_dir}/etc/sudoers" ; then | 560 if ! sudo grep -q '^root ALL=(ALL) ALL$' "${chroot_dir}/etc/sudoers" ; then |
| 523 info "Upgrading old chroot (pre 2010-10-19) - adding root to sudoers" | 561 info "Upgrading old chroot (pre 2010-10-19) - adding root to sudoers" |
| 524 sudo bash -c "echo root ALL=\(ALL\) ALL >> \"${chroot_dir}/etc/sudoers\"" | 562 sudo bash -c "echo root ALL=\(ALL\) ALL >> \"${chroot_dir}/etc/sudoers\"" |
| 525 fi | 563 fi |
| 526 } | 564 } |
| OLD | NEW |