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

Side by Side Diff: build/install-chroot.sh

Issue 11191019: Stop cron during cleanup. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 months 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 | « no previous file | 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 -e 1 #!/bin/bash -e
2 2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium 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 installs Debian-derived distributions in a chroot environment. 7 # This script installs Debian-derived distributions in a chroot environment.
8 # It can for example be used to have an accurate 32bit build and test 8 # It can for example be used to have an accurate 32bit build and test
9 # environment when otherwise working on a 64bit machine. 9 # environment when otherwise working on a 64bit machine.
10 # N. B. it is unlikely that this script will ever work on anything other than a 10 # N. B. it is unlikely that this script will ever work on anything other than a
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 echo 656 echo
657 # We prefer running the script in-place, but this might not be 657 # We prefer running the script in-place, but this might not be
658 # possible, if it lives on a network filesystem that denies 658 # possible, if it lives on a network filesystem that denies
659 # access to root. 659 # access to root.
660 tmp_script= 660 tmp_script=
661 if ! sudo "${target%bit}" sh -c "[ -x '${script}' ]" >&/dev/null; then 661 if ! sudo "${target%bit}" sh -c "[ -x '${script}' ]" >&/dev/null; then
662 tmp_script="/tmp/${script##*/}" 662 tmp_script="/tmp/${script##*/}"
663 cp "${script}" "${tmp_script}" 663 cp "${script}" "${tmp_script}"
664 fi 664 fi
665 # Some distributions automatically start an instance of the system- 665 # Some distributions automatically start an instance of the system-
666 # wide dbus daemon or of the logging daemon, when installing the Chrome 666 # wide dbus daemon, cron daemon or of the logging daemon, when
667 # build depencies. This prevents the chroot session from being closed. 667 # installing the Chrome build depencies. This prevents the chroot
668 # So, we always try to shut down any running instance of dbus and 668 # session from being closed. So, we always try to shut down any running
669 # rsyslog. 669 # instance of dbus and rsyslog.
670 sudo "${target%bit}" sh -c "${script} --no-lib32; 670 sudo /usr/local/bin/"${target%bit}" sh -c "${script} --no-lib32;
671 rc=$?; 671 rc=$?;
672 /etc/init.d/cron stop >/dev/null 2>&1 || :;
672 /etc/init.d/rsyslog stop >/dev/null 2>&1 || :; 673 /etc/init.d/rsyslog stop >/dev/null 2>&1 || :;
673 /etc/init.d/dbus stop >/dev/null 2>&1 || :; 674 /etc/init.d/dbus stop >/dev/null 2>&1 || :;
674 exit $rc" 675 exit $rc"
675 rc=$? 676 rc=$?
676 [ -n "${tmp_script}" ] && rm -f "${tmp_script}" 677 [ -n "${tmp_script}" ] && rm -f "${tmp_script}"
677 [ $rc -ne 0 ] && exit $rc 678 [ $rc -ne 0 ] && exit $rc
678 break 679 break
679 ;; 680 ;;
680 n|N) 681 n|N)
681 break 682 break
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 799
799 For Chrome, this probably means you want to make your "out" directory a 800 For Chrome, this probably means you want to make your "out" directory a
800 symbolic link that points somewhere inside of "${HOME}/chroot". 801 symbolic link that points somewhere inside of "${HOME}/chroot".
801 802
802 You still need to run "gclient runhooks" whenever you switch from building 803 You still need to run "gclient runhooks" whenever you switch from building
803 outside of the chroot to inside of the chroot. But you will find that you 804 outside of the chroot to inside of the chroot. But you will find that you
804 don't have to repeatedly erase and then completely rebuild all your object 805 don't have to repeatedly erase and then completely rebuild all your object
805 and binary files. 806 and binary files.
806 807
807 EOF 808 EOF
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698