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 then | 122 then |
123 INSIDE_CHROOT=1 | 123 INSIDE_CHROOT=1 |
124 else | 124 else |
125 INSIDE_CHROOT=0 | 125 INSIDE_CHROOT=0 |
126 fi | 126 fi |
127 | 127 |
128 # Directory locations inside the dev chroot | 128 # Directory locations inside the dev chroot |
129 CHROOT_TRUNK_DIR="/home/$USER/trunk" | 129 CHROOT_TRUNK_DIR="/home/$USER/trunk" |
130 | 130 |
131 # Install make for portage ebuilds. Used by build_image and gmergefs. | 131 # Install make for portage ebuilds. Used by build_image and gmergefs. |
| 132 # TODO: Is /usr/local/autotest-chrome still used by anyone? |
132 DEFAULT_INSTALL_MASK="/usr/include /usr/man /usr/share/man /usr/share/doc \ | 133 DEFAULT_INSTALL_MASK="/usr/include /usr/man /usr/share/man /usr/share/doc \ |
133 /usr/share/gtk-doc /usr/share/gtk-2.0 /usr/lib/gtk-2.0/include \ | 134 /usr/share/gtk-doc /usr/share/gtk-2.0 /usr/lib/gtk-2.0/include \ |
134 /usr/share/info /usr/share/aclocal /usr/lib/gcc /usr/lib/pkgconfig \ | 135 /usr/share/info /usr/share/aclocal /usr/lib/gcc /usr/lib/pkgconfig \ |
135 /usr/share/pkgconfig /usr/share/gettext /usr/share/readline /etc/runlevels \ | 136 /usr/share/pkgconfig /usr/share/gettext /usr/share/readline /etc/runlevels \ |
136 /usr/share/openrc /lib/rc *.a *.la /etc/init.d /usr/lib/debug | 137 /usr/share/openrc /lib/rc *.a *.la /etc/init.d /usr/lib/debug |
137 /usr/local/autotest /usr/local/autotest-chrome" | 138 /usr/local/autotest /usr/local/autotest-chrome" |
138 | 139 |
139 FACTORY_INSTALL_MASK="/opt/google/chrome /opt/google/o3d /opt/netscape \ | 140 FACTORY_INSTALL_MASK="/opt/google/chrome /opt/google/o3d /opt/netscape \ |
140 /opt/google/talkplugin /opt/Qualcomm /opt/Synaptics \ | 141 /opt/google/talkplugin /opt/Qualcomm /opt/Synaptics \ |
141 /usr/lib/dri /usr/lib/python2.6/test \ | 142 /usr/lib/dri /usr/lib/python2.6/test \ |
142 /usr/share/chewing /usr/share/fonts \ | 143 /usr/share/chewing /usr/share/fonts \ |
143 /usr/share/ibus-pinyin /usr/share/libhangul /usr/share/locale \ | 144 /usr/share/ibus-pinyin /usr/share/libhangul /usr/share/locale \ |
144 /usr/share/m17n /usr/share/mime /usr/share/sounds /usr/share/tts \ | 145 /usr/share/m17n /usr/share/mime /usr/share/sounds /usr/share/tts \ |
145 /usr/share/X11 /usr/share/zoneinfo /usr/lib/debug | 146 /usr/share/X11 /usr/share/zoneinfo /usr/lib/debug |
146 /usr/local/autotest /usr/local/autotest-chrome" | 147 /usr/local/autotest /usr/local/autotest-chrome /usr/local/autotest-pkgs" |
147 | 148 |
148 # Check to ensure not running old scripts | 149 # Check to ensure not running old scripts |
149 V_REVERSE='[7m' | 150 V_REVERSE='[7m' |
150 V_VIDOFF='[m' | 151 V_VIDOFF='[m' |
151 case "$(basename $0)" in | 152 case "$(basename $0)" in |
152 build_image.sh|build_platform_packages.sh|customize_rootfs.sh|make_chroot.sh) | 153 build_image.sh|build_platform_packages.sh|customize_rootfs.sh|make_chroot.sh) |
153 echo | 154 echo |
154 echo "$V_REVERSE============================================================" | 155 echo "$V_REVERSE============================================================" |
155 echo "=========================== WARNING ======================" | 156 echo "=========================== WARNING ======================" |
156 echo "============================================================$V_VIDOFF" | 157 echo "============================================================$V_VIDOFF" |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 chroot_hacks_from_outside() { | 517 chroot_hacks_from_outside() { |
517 # Give args better names. | 518 # Give args better names. |
518 local chroot_dir="${1}" | 519 local chroot_dir="${1}" |
519 | 520 |
520 # Add root as a sudoer if not already done. | 521 # Add root as a sudoer if not already done. |
521 if ! sudo grep -q '^root ALL=(ALL) ALL$' "${chroot_dir}/etc/sudoers" ; then | 522 if ! sudo grep -q '^root ALL=(ALL) ALL$' "${chroot_dir}/etc/sudoers" ; then |
522 info "Upgrading old chroot (pre 2010-10-19) - adding root to sudoers" | 523 info "Upgrading old chroot (pre 2010-10-19) - adding root to sudoers" |
523 sudo bash -c "echo root ALL=\(ALL\) ALL >> \"${chroot_dir}/etc/sudoers\"" | 524 sudo bash -c "echo root ALL=\(ALL\) ALL >> \"${chroot_dir}/etc/sudoers\"" |
524 fi | 525 fi |
525 } | 526 } |
OLD | NEW |