summaryrefslogtreecommitdiff
path: root/chrome/installer
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-06-11 10:57:03 +0100
committerTorne (Richard Coles) <torne@google.com>2013-06-11 10:57:03 +0100
commit868fa2fe829687343ffae624259930155e16dbd8 (patch)
tree54d316199dd9739c57c3aacd131853bbd6554a94 /chrome/installer
parentbb1bdbd796f966b5bf11f40ecbea12621c7bfac9 (diff)
downloadchromium_org-868fa2fe829687343ffae624259930155e16dbd8.tar.gz
Merge from Chromium at DEPS revision r205460
This commit was generated by merge_to_master.py. Change-Id: I4a744a5e426bd3bb378d887cfa56fe054742a540
Diffstat (limited to 'chrome/installer')
-rw-r--r--chrome/installer/gcapi/gcapi_last_run_test.cc2
-rw-r--r--chrome/installer/gcapi/gcapi_reactivation_test.cc2
-rw-r--r--chrome/installer/linux/OWNERS4
-rw-r--r--chrome/installer/linux/WATCHLISTS12
-rw-r--r--chrome/installer/linux/common/apt.include200
-rw-r--r--chrome/installer/linux/common/chromium-browser/chromium-browser.info30
-rw-r--r--chrome/installer/linux/common/default-app-block.template10
-rw-r--r--chrome/installer/linux/common/default-app.template19
-rw-r--r--chrome/installer/linux/common/desktop.template222
-rw-r--r--chrome/installer/linux/common/google-chrome/google-chrome.info30
-rw-r--r--chrome/installer/linux/common/installer.include249
-rw-r--r--chrome/installer/linux/common/postinst.include49
-rw-r--r--chrome/installer/linux/common/prerm.include23
-rwxr-xr-xchrome/installer/linux/common/repo.cron42
-rw-r--r--chrome/installer/linux/common/rpm.include318
-rwxr-xr-xchrome/installer/linux/common/rpmrepo.cron65
-rw-r--r--chrome/installer/linux/common/symlinks.include51
-rwxr-xr-xchrome/installer/linux/common/updater26
-rw-r--r--chrome/installer/linux/common/variables.include5
-rwxr-xr-xchrome/installer/linux/common/wrapper42
-rwxr-xr-xchrome/installer/linux/debian/build.sh330
-rw-r--r--chrome/installer/linux/debian/changelog.template5
-rw-r--r--chrome/installer/linux/debian/control.template16
-rw-r--r--chrome/installer/linux/debian/debian.menu6
-rw-r--r--chrome/installer/linux/debian/expected_deps26
-rwxr-xr-xchrome/installer/linux/debian/postinst64
-rwxr-xr-xchrome/installer/linux/debian/postrm31
-rwxr-xr-xchrome/installer/linux/debian/prerm21
-rwxr-xr-xchrome/installer/linux/rpm/build.sh300
-rw-r--r--chrome/installer/linux/rpm/chrome.spec.template204
-rw-r--r--chrome/installer/linux/rpm/expected_deps_i38671
-rw-r--r--chrome/installer/linux/rpm/expected_deps_x86_6461
-rwxr-xr-xchrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py119
-rw-r--r--chrome/installer/linux/sysroot_scripts/packagelist.debian.wheezy.amd64149
-rw-r--r--chrome/installer/linux/sysroot_scripts/packagelist.debian.wheezy.i386149
-rwxr-xr-xchrome/installer/linux/sysroot_scripts/sysroot-creator-debian.wheezy.sh517
-rw-r--r--chrome/installer/setup/chrome_frame_ready_mode.cc2
-rw-r--r--chrome/installer/setup/install.cc2
-rw-r--r--chrome/installer/setup/install_unittest.cc2
-rw-r--r--chrome/installer/setup/install_worker.cc2
-rw-r--r--chrome/installer/setup/run_all_unittests.cc7
-rw-r--r--chrome/installer/setup/setup_main.cc7
-rw-r--r--chrome/installer/setup/setup_util.cc29
-rw-r--r--chrome/installer/setup/setup_util.h5
-rw-r--r--chrome/installer/setup/setup_util_unittest.cc88
-rw-r--r--chrome/installer/setup/setup_util_unittest.h24
-rw-r--r--chrome/installer/setup/uninstall.cc18
-rw-r--r--chrome/installer/test/alternate_version_generator.cc4
-rw-r--r--chrome/installer/util/auto_launch_util.cc2
-rw-r--r--chrome/installer/util/delete_after_reboot_helper.cc9
-rw-r--r--chrome/installer/util/duplicate_tree_detector.cc6
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc2
-rw-r--r--chrome/installer/util/google_update_experiment_util.cc4
-rw-r--r--chrome/installer/util/google_update_experiment_util.h2
-rw-r--r--chrome/installer/util/google_update_settings.cc4
-rw-r--r--chrome/installer/util/google_update_settings.h2
-rw-r--r--chrome/installer/util/google_update_settings_unittest.cc2
-rw-r--r--chrome/installer/util/google_update_util.cc2
-rw-r--r--chrome/installer/util/install_util.cc2
-rw-r--r--chrome/installer/util/install_util.h2
-rw-r--r--chrome/installer/util/install_util_unittest.cc2
-rw-r--r--chrome/installer/util/installation_state.cc2
-rw-r--r--chrome/installer/util/installation_validator.cc2
-rw-r--r--chrome/installer/util/installation_validator.h2
-rw-r--r--chrome/installer/util/installer_state.cc9
-rw-r--r--chrome/installer/util/installer_state_unittest.cc9
-rw-r--r--chrome/installer/util/installer_util_test_common.cc2
-rw-r--r--chrome/installer/util/l10n_string_util.cc4
-rw-r--r--chrome/installer/util/l10n_string_util.h2
-rw-r--r--chrome/installer/util/language_selector.cc2
-rw-r--r--chrome/installer/util/logging_installer.cc4
-rw-r--r--chrome/installer/util/lzma_util.cc2
-rw-r--r--chrome/installer/util/master_preferences.cc2
-rw-r--r--chrome/installer/util/master_preferences_unittest.cc2
-rw-r--r--chrome/installer/util/move_tree_work_item_unittest.cc2
-rw-r--r--chrome/installer/util/product_operations.h2
-rw-r--r--chrome/installer/util/product_state_unittest.cc2
-rw-r--r--chrome/installer/util/product_unittest.cc2
-rw-r--r--chrome/installer/util/self_cleaning_temp_dir_unittest.cc2
-rw-r--r--chrome/installer/util/self_reg_work_item.cc4
-rw-r--r--chrome/installer/util/set_reg_value_work_item.cc2
-rw-r--r--chrome/installer/util/set_reg_value_work_item_unittest.cc2
-rw-r--r--chrome/installer/util/shell_util.cc11
-rw-r--r--chrome/installer/util/shell_util.h2
-rw-r--r--chrome/installer/util/shell_util_unittest.cc9
-rw-r--r--chrome/installer/util/uninstall_metrics.cc2
-rw-r--r--chrome/installer/util/uninstall_metrics.h2
-rw-r--r--chrome/installer/util/uninstall_metrics_unittest.cc2
-rw-r--r--chrome/installer/util/user_experiment.cc4
-rw-r--r--chrome/installer/util/user_experiment.h2
-rw-r--r--chrome/installer/util/wmi.h2
-rw-r--r--chrome/installer/util/work_item_list_unittest.cc2
92 files changed, 3708 insertions, 93 deletions
diff --git a/chrome/installer/gcapi/gcapi_last_run_test.cc b/chrome/installer/gcapi/gcapi_last_run_test.cc
index 79fd835a02..b02cca959f 100644
--- a/chrome/installer/gcapi/gcapi_last_run_test.cc
+++ b/chrome/installer/gcapi/gcapi_last_run_test.cc
@@ -9,9 +9,9 @@
#include "base/guid.h"
#include "base/stringprintf.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/test/test_reg_util_win.h"
#include "base/time.h"
-#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
#include "chrome/installer/gcapi/gcapi.h"
#include "chrome/installer/util/google_update_constants.h"
diff --git a/chrome/installer/gcapi/gcapi_reactivation_test.cc b/chrome/installer/gcapi/gcapi_reactivation_test.cc
index e8cc34de83..e7a53efe76 100644
--- a/chrome/installer/gcapi/gcapi_reactivation_test.cc
+++ b/chrome/installer/gcapi/gcapi_reactivation_test.cc
@@ -8,9 +8,9 @@
#include "base/guid.h"
#include "base/stringprintf.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/test/test_reg_util_win.h"
#include "base/time.h"
-#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
#include "chrome/installer/gcapi/gcapi.h"
#include "chrome/installer/gcapi/gcapi_omaha_experiment.h"
diff --git a/chrome/installer/linux/OWNERS b/chrome/installer/linux/OWNERS
new file mode 100644
index 0000000000..4e6e0d049e
--- /dev/null
+++ b/chrome/installer/linux/OWNERS
@@ -0,0 +1,4 @@
+set noparent
+mmoss@chromium.org
+phajdan.jr@chromium.org
+thestig@chromium.org
diff --git a/chrome/installer/linux/WATCHLISTS b/chrome/installer/linux/WATCHLISTS
new file mode 100644
index 0000000000..de92fdeceb
--- /dev/null
+++ b/chrome/installer/linux/WATCHLISTS
@@ -0,0 +1,12 @@
+{
+ 'WATCHLIST_DEFINITIONS': {
+ 'linux_installer_tools': {
+ 'filepath': '(common|debian|rpm)/',
+ },
+ },
+ 'WATCHLISTS': {
+ 'linux_installer_tools': [
+ 'mmoss@chromium.org',
+ ],
+ },
+}
diff --git a/chrome/installer/linux/common/apt.include b/chrome/installer/linux/common/apt.include
new file mode 100644
index 0000000000..50f1b6df79
--- /dev/null
+++ b/chrome/installer/linux/common/apt.include
@@ -0,0 +1,200 @@
+@@include@@variables.include
+
+APT_GET="`which apt-get 2> /dev/null`"
+APT_CONFIG="`which apt-config 2> /dev/null`"
+
+SOURCES_PREAMBLE="### THIS FILE IS AUTOMATICALLY CONFIGURED ###
+# You may comment out this entry, but any other modifications may be lost.\n"
+
+# Parse apt configuration and return requested variable value.
+apt_config_val() {
+ APTVAR="$1"
+ if [ -x "$APT_CONFIG" ]; then
+ "$APT_CONFIG" dump | sed -e "/^$APTVAR /"'!d' -e "s/^$APTVAR \"\(.*\)\".*/\1/"
+ fi
+}
+
+# Install the repository signing key (see also:
+# http://www.google.com/linuxrepositories/aboutkey.html)
+install_key() {
+ APT_KEY="`which apt-key 2> /dev/null`"
+ if [ -x "$APT_KEY" ]; then
+ "$APT_KEY" add - >/dev/null 2>&1 <<KEYDATA
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.2.2 (GNU/Linux)
+
+mQGiBEXwb0YRBADQva2NLpYXxgjNkbuP0LnPoEXruGmvi3XMIxjEUFuGNCP4Rj/a
+kv2E5VixBP1vcQFDRJ+p1puh8NU0XERlhpyZrVMzzS/RdWdyXf7E5S8oqNXsoD1z
+fvmI+i9b2EhHAA19Kgw7ifV8vMa4tkwslEmcTiwiw8lyUl28Wh4Et8SxzwCggDcA
+feGqtn3PP5YAdD0km4S4XeMEAJjlrqPoPv2Gf//tfznY2UyS9PUqFCPLHgFLe80u
+QhI2U5jt6jUKN4fHauvR6z3seSAsh1YyzyZCKxJFEKXCCqnrFSoh4WSJsbFNc4PN
+b0V0SqiTCkWADZyLT5wll8sWuQ5ylTf3z1ENoHf+G3um3/wk/+xmEHvj9HCTBEXP
+78X0A/0Tqlhc2RBnEf+AqxWvM8sk8LzJI/XGjwBvKfXe+l3rnSR2kEAvGzj5Sg0X
+4XmfTg4Jl8BNjWyvm2Wmjfet41LPmYJKsux3g0b8yzQxeOA4pQKKAU3Z4+rgzGmf
+HdwCG5MNT2A5XxD/eDd+L4fRx0HbFkIQoAi1J3YWQSiTk15fw7RMR29vZ2xlLCBJ
+bmMuIExpbnV4IFBhY2thZ2UgU2lnbmluZyBLZXkgPGxpbnV4LXBhY2thZ2VzLWtl
+eW1hc3RlckBnb29nbGUuY29tPohjBBMRAgAjAhsDBgsJCAcDAgQVAggDBBYCAwEC
+HgECF4AFAkYVdn8CGQEACgkQoECDD3+sWZHKSgCfdq3HtNYJLv+XZleb6HN4zOcF
+AJEAniSFbuv8V5FSHxeRimHx25671az+uQINBEXwb0sQCACuA8HT2nr+FM5y/kzI
+A51ZcC46KFtIDgjQJ31Q3OrkYP8LbxOpKMRIzvOZrsjOlFmDVqitiVc7qj3lYp6U
+rgNVaFv6Qu4bo2/ctjNHDDBdv6nufmusJUWq/9TwieepM/cwnXd+HMxu1XBKRVk9
+XyAZ9SvfcW4EtxVgysI+XlptKFa5JCqFM3qJllVohMmr7lMwO8+sxTWTXqxsptJo
+pZeKz+UBEEqPyw7CUIVYGC9ENEtIMFvAvPqnhj1GS96REMpry+5s9WKuLEaclWpd
+K3krttbDlY1NaeQUCRvBYZ8iAG9YSLHUHMTuI2oea07Rh4dtIAqPwAX8xn36JAYG
+2vgLAAMFB/wKqaycjWAZwIe98Yt0qHsdkpmIbarD9fGiA6kfkK/UxjL/k7tmS4Vm
+CljrrDZkPSQ/19mpdRcGXtb0NI9+nyM5trweTvtPw+HPkDiJlTaiCcx+izg79Fj9
+KcofuNb3lPdXZb9tzf5oDnmm/B+4vkeTuEZJ//IFty8cmvCpzvY+DAz1Vo9rA+Zn
+cpWY1n6z6oSS9AsyT/IFlWWBZZ17SpMHu+h4Bxy62+AbPHKGSujEGQhWq8ZRoJAT
+G0KSObnmZ7FwFWu1e9XFoUCt0bSjiJWTIyaObMrWu/LvJ3e9I87HseSJStfw6fki
+5og9qFEkMrIrBCp3QGuQWBq/rTdMuwNFiEkEGBECAAkFAkXwb0sCGwwACgkQoECD
+D3+sWZF/WACfeNAu1/1hwZtUo1bR+MWiCjpvHtwAnA1R3IHqFLQ2X3xJ40XPuAyY
+/FJG
+=Quqp
+-----END PGP PUBLIC KEY BLOCK-----
+KEYDATA
+ fi
+}
+
+# Set variables for the locations of the apt sources lists.
+find_apt_sources() {
+ APTDIR=$(apt_config_val Dir)
+ APTETC=$(apt_config_val 'Dir::Etc')
+ APT_SOURCES="$APTDIR$APTETC$(apt_config_val 'Dir::Etc::sourcelist')"
+ APT_SOURCESDIR="$APTDIR$APTETC$(apt_config_val 'Dir::Etc::sourceparts')"
+}
+
+# Update the Google repository if it's not set correctly.
+# Note: this doesn't necessarily enable the repository, it just makes sure the
+# correct settings are available in the sources list.
+# Returns:
+# 0 - no update necessary
+# 2 - error
+update_bad_sources() {
+ if [ ! "$REPOCONFIG" ]; then
+ return 0
+ fi
+
+ find_apt_sources
+
+ SOURCELIST="$APT_SOURCESDIR/@@PACKAGE@@.list"
+ # Don't do anything if the file isn't there, since that probably means the
+ # user disabled it.
+ if [ ! -r "$SOURCELIST" ]; then
+ return 0
+ fi
+
+ # Basic check for active configurations (non-blank, non-comment lines).
+ ACTIVECONFIGS=$(grep -v "^[[:space:]]*\(#.*\)\?$" "$SOURCELIST" 2>/dev/null)
+
+ # Check if the correct repository configuration is in there.
+ REPOMATCH=$(grep "^[[:space:]#]*\b$REPOCONFIG\b" "$SOURCELIST" \
+ 2>/dev/null)
+
+ # Check if the correct repository is disabled.
+ MATCH_DISABLED=$(echo "$REPOMATCH" | grep "^[[:space:]]*#" 2>/dev/null)
+
+ # Now figure out if we need to fix things.
+ BADCONFIG=1
+ if [ "$REPOMATCH" ]; then
+ # If it's there and active, that's ideal, so nothing to do.
+ if [ ! "$MATCH_DISABLED" ]; then
+ BADCONFIG=0
+ else
+ # If it's not active, but neither is anything else, that's fine too.
+ if [ ! "$ACTIVECONFIGS" ]; then
+ BADCONFIG=0
+ fi
+ fi
+ fi
+
+ if [ $BADCONFIG -eq 0 ]; then
+ return 0
+ fi
+
+ # At this point, either the correct configuration is completely missing, or
+ # the wrong configuration is active. In that case, just abandon the mess and
+ # recreate the file with the correct configuration. If there were no active
+ # configurations before, create the new configuration disabled.
+ DISABLE=""
+ if [ ! "$ACTIVECONFIGS" ]; then
+ DISABLE="#"
+ fi
+ printf "$SOURCES_PREAMBLE" > "$SOURCELIST"
+ printf "$DISABLE$REPOCONFIG\n" >> "$SOURCELIST"
+ if [ $? -eq 0 ]; then
+ return 0
+ fi
+ return 2
+}
+
+# Add the Google repository to the apt sources.
+# Returns:
+# 0 - sources list was created
+# 2 - error
+create_sources_lists() {
+ if [ ! "$REPOCONFIG" ]; then
+ return 0
+ fi
+
+ find_apt_sources
+
+ SOURCELIST="$APT_SOURCESDIR/@@PACKAGE@@.list"
+ if [ -d "$APT_SOURCESDIR" ]; then
+ printf "$SOURCES_PREAMBLE" > "$SOURCELIST"
+ printf "$REPOCONFIG\n" >> "$SOURCELIST"
+ if [ $? -eq 0 ]; then
+ return 0
+ fi
+ fi
+ return 2
+}
+
+# Remove our custom sources list file.
+# Returns:
+# 0 - successfully removed, or not configured
+# !0 - failed to remove
+clean_sources_lists() {
+ if [ ! "$REPOCONFIG" ]; then
+ return 0
+ fi
+
+ find_apt_sources
+
+ rm -f "$APT_SOURCESDIR/@@PACKAGE@@.list" \
+ "$APT_SOURCESDIR/@@PACKAGE@@-@@CHANNEL@@.list"
+}
+
+# Detect if the repo config was disabled by distro upgrade and enable if
+# necessary.
+handle_distro_upgrade() {
+ if [ ! "$REPOCONFIG" ]; then
+ return 0
+ fi
+
+ find_apt_sources
+ SOURCELIST="$APT_SOURCESDIR/@@PACKAGE@@.list"
+ if [ -r "$SOURCELIST" ]; then
+ REPOLINE=$(grep -E "^[[:space:]]*#[[:space:]]*$REPOCONFIG[[:space:]]*# disabled on upgrade to .*" "$SOURCELIST")
+ if [ $? -eq 0 ]; then
+ sed -i -e "s,^[[:space:]]*#[[:space:]]*\($REPOCONFIG\)[[:space:]]*# disabled on upgrade to .*,\1," \
+ "$SOURCELIST"
+ LOGGER=$(which logger 2> /dev/null)
+ if [ "$LOGGER" ]; then
+ "$LOGGER" -t "$0" "Reverted repository modification: $REPOLINE."
+ fi
+ fi
+ fi
+}
+
+DEFAULT_ARCH="@@ARCHITECTURE@@"
+
+get_lib_dir() {
+ if [ "$DEFAULT_ARCH" = "i386" ]; then
+ LIBDIR=lib/i386-linux-gnu
+ elif [ "$DEFAULT_ARCH" = "amd64" ]; then
+ LIBDIR=lib/x86_64-linux-gnu
+ else
+ echo Unknown CPU Architecture: "$DEFAULT_ARCH"
+ exit 1
+ fi
+}
diff --git a/chrome/installer/linux/common/chromium-browser/chromium-browser.info b/chrome/installer/linux/common/chromium-browser/chromium-browser.info
new file mode 100644
index 0000000000..3593c9e797
--- /dev/null
+++ b/chrome/installer/linux/common/chromium-browser/chromium-browser.info
@@ -0,0 +1,30 @@
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# This file provides common configuration information for building
+# chromium-browser packages for various platforms.
+
+# Base name of the package.
+PACKAGE="chromium-browser"
+
+# Filename of the main executable (for generating launcher scripts, etc.)
+PROGNAME=chrome
+
+# Base directory for package installation.
+INSTALLDIR=/opt/chromium.org/chromium
+
+# Display string for desktop menu/icon.
+MENUNAME="Chromium Web Browser"
+
+# Brief package description.
+SHORTDESC="The web browser from Chromium.org"
+
+# Detailed package description.
+FULLDESC="Chromium is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier."
+
+# Package maintainer information.
+# TODO(mmoss) Setup a mailbox for this address
+MAINTNAME="Chromium Linux Team"
+MAINTMAIL="chromium-linux-packager@chromium.org"
+PRODUCTURL="http://www.chromium.org/"
diff --git a/chrome/installer/linux/common/default-app-block.template b/chrome/installer/linux/common/default-app-block.template
new file mode 100644
index 0000000000..6c5a7bfa5f
--- /dev/null
+++ b/chrome/installer/linux/common/default-app-block.template
@@ -0,0 +1,10 @@
+ <web-browser>
+ <name>@@MENUNAME@@</name>
+ <executable>@@INSTALLDIR@@/@@PACKAGE@@</executable>
+ <command>@@INSTALLDIR@@/@@PACKAGE@@ %s</command>
+ <icon-name>@@PACKAGE@@</icon-name>
+ <run-in-terminal>false</run-in-terminal>
+ <netscape-remote>true</netscape-remote>
+ <tab-command>@@INSTALLDIR@@/@@PACKAGE@@ %s</tab-command>
+ <win-command>@@INSTALLDIR@@/@@PACKAGE@@ --new-window %s</win-command>
+ </web-browser>
diff --git a/chrome/installer/linux/common/default-app.template b/chrome/installer/linux/common/default-app.template
new file mode 100644
index 0000000000..d3aeb346ac
--- /dev/null
+++ b/chrome/installer/linux/common/default-app.template
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd">
+<!-- This file should be put in /usr/share/gnome-control-center/default-apps,
+ or, if that directory does not exist, its web-browser tag patched into
+ /usr/share/gnome-control-center/gnome-default-applications.xml -->
+<default-apps>
+ <web-browsers>
+ <web-browser>
+ <name>@@MENUNAME@@</name>
+ <executable>@@INSTALLDIR@@/@@PACKAGE@@</executable>
+ <command>@@INSTALLDIR@@/@@PACKAGE@@ %s</command>
+ <icon-name>@@PACKAGE@@</icon-name>
+ <run-in-terminal>false</run-in-terminal>
+ <netscape-remote>true</netscape-remote>
+ <tab-command>@@INSTALLDIR@@/@@PACKAGE@@ %s</tab-command>
+ <win-command>@@INSTALLDIR@@/@@PACKAGE@@ --new-window %s</win-command>
+ </web-browser>
+ </web-browsers>
+</default-apps>
diff --git a/chrome/installer/linux/common/desktop.template b/chrome/installer/linux/common/desktop.template
new file mode 100644
index 0000000000..10f8ea4df6
--- /dev/null
+++ b/chrome/installer/linux/common/desktop.template
@@ -0,0 +1,222 @@
+[Desktop Entry]
+Version=1.0
+Name=@@MENUNAME@@
+# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
+# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
+GenericName=Web Browser
+GenericName[ar]=متصفح الشبكة
+GenericName[bg]=Уеб браузър
+GenericName[ca]=Navegador web
+GenericName[cs]=WWW prohlížeč
+GenericName[da]=Browser
+GenericName[de]=Web-Browser
+GenericName[el]=Περιηγητής ιστού
+GenericName[en_GB]=Web Browser
+GenericName[es]=Navegador web
+GenericName[et]=Veebibrauser
+GenericName[fi]=WWW-selain
+GenericName[fr]=Navigateur Web
+GenericName[gu]=વેબ બ્રાઉઝર
+GenericName[he]=דפדפן אינטרנט
+GenericName[hi]=वेब ब्राउज़र
+GenericName[hu]=Webböngésző
+GenericName[it]=Browser Web
+GenericName[ja]=ウェブブラウザ
+GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ
+GenericName[ko]=웹 브라우저
+GenericName[lt]=Žiniatinklio naršyklė
+GenericName[lv]=Tīmekļa pārlūks
+GenericName[ml]=വെബ് ബ്രൌസര്‍
+GenericName[mr]=वेब ब्राऊजर
+GenericName[nb]=Nettleser
+GenericName[nl]=Webbrowser
+GenericName[pl]=Przeglądarka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador da Internet
+GenericName[ro]=Navigator de Internet
+GenericName[ru]=Веб-браузер
+GenericName[sl]=Spletni brskalnik
+GenericName[sv]=Webbläsare
+GenericName[ta]=இணைய உலாவி
+GenericName[th]=เว็บเบราว์เซอร์
+GenericName[tr]=Web Tarayıcı
+GenericName[uk]=Навігатор Тенет
+GenericName[zh_CN]=网页浏览器
+GenericName[zh_HK]=網頁瀏覽器
+GenericName[zh_TW]=網頁瀏覽器
+# Not translated in KDE, from Epiphany 2.26.1-0ubuntu1.
+GenericName[bn]=ওয়েব ব্রাউজার
+GenericName[fil]=Web Browser
+GenericName[hr]=Web preglednik
+GenericName[id]=Browser Web
+GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର
+GenericName[sk]=WWW prehliadač
+GenericName[sr]=Интернет прегледник
+GenericName[te]=మహాతల అన్వేషి
+GenericName[vi]=Bộ duyệt Web
+# Gnome and KDE 3 uses Comment.
+Comment=Access the Internet
+Comment[ar]=الدخول إلى الإنترنت
+Comment[bg]=Достъп до интернет
+Comment[bn]=ইন্টারনেটটি অ্যাক্সেস করুন
+Comment[ca]=Accedeix a Internet
+Comment[cs]=Přístup k internetu
+Comment[da]=Få adgang til internettet
+Comment[de]=Internetzugriff
+Comment[el]=Πρόσβαση στο Διαδίκτυο
+Comment[en_GB]=Access the Internet
+Comment[es]=Accede a Internet.
+Comment[et]=Pääs Internetti
+Comment[fi]=Käytä internetiä
+Comment[fil]=I-access ang Internet
+Comment[fr]=Accéder à Internet
+Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો
+Comment[he]=גישה אל האינטרנט
+Comment[hi]=इंटरनेट तक पहुंच स्थापित करें
+Comment[hr]=Pristup Internetu
+Comment[hu]=Internetelérés
+Comment[id]=Akses Internet
+Comment[it]=Accesso a Internet
+Comment[ja]=インターネットにアクセス
+Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿ
+Comment[ko]=인터넷 연결
+Comment[lt]=Interneto prieiga
+Comment[lv]=Piekļūt internetam
+Comment[ml]=ഇന്റര്‍‌നെറ്റ് ആക്‌സസ് ചെയ്യുക
+Comment[mr]=इंटरनेटमध्ये प्रवेश करा
+Comment[nb]=Gå til Internett
+Comment[nl]=Verbinding maken met internet
+Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ
+Comment[pl]=Skorzystaj z internetu
+Comment[pt]=Aceder à Internet
+Comment[pt_BR]=Acessar a internet
+Comment[ro]=Accesaţi Internetul
+Comment[ru]=Доступ в Интернет
+Comment[sk]=Prístup do siete Internet
+Comment[sl]=Dostop do interneta
+Comment[sr]=Приступите Интернету
+Comment[sv]=Gå ut på Internet
+Comment[ta]=இணையத்தை அணுகுதல்
+Comment[te]=ఇంటర్నెట్‌ను ఆక్సెస్ చెయ్యండి
+Comment[th]=เข้าถึงอินเทอร์เน็ต
+Comment[tr]=İnternet'e erişin
+Comment[uk]=Доступ до Інтернету
+Comment[vi]=Truy cập Internet
+Comment[zh_CN]=访问互联网
+Comment[zh_HK]=連線到網際網路
+Comment[zh_TW]=連線到網際網路
+Exec=@@INSTALLDIR@@/@@PACKAGE@@ %U
+Terminal=false
+Icon=@@PACKAGE@@
+Type=Application
+Categories=Network;WebBrowser;
+MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
+X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito
+
+[NewWindow Shortcut Group]
+Name=New Window
+Name[am]=አዲስ መስኮት
+Name[ar]=نافذة جديدة
+Name[bg]=Нов прозорец
+Name[bn]=নতুন উইন্ডো
+Name[ca]=Finestra nova
+Name[cs]=Nové okno
+Name[da]=Nyt vindue
+Name[de]=Neues Fenster
+Name[el]=Νέο Παράθυρο
+Name[en_GB]=New Window
+Name[es]=Nueva ventana
+Name[et]=Uus aken
+Name[fa]=پنجره جدید
+Name[fi]=Uusi ikkuna
+Name[fil]=New Window
+Name[fr]=Nouvelle fenêtre
+Name[gu]=નવી વિંડો
+Name[hi]=नई विंडो
+Name[hr]=Novi prozor
+Name[hu]=Új ablak
+Name[id]=Jendela Baru
+Name[it]=Nuova finestra
+Name[iw]=חלון חדש
+Name[ja]=新規ウインドウ
+Name[kn]=ಹೊಸ ವಿಂಡೊ
+Name[ko]=새 창
+Name[lt]=Naujas langas
+Name[lv]=Jauns logs
+Name[ml]=പുതിയ വിന്‍ഡോ
+Name[mr]=नवीन विंडो
+Name[nl]=Nieuw venster
+Name[no]=Nytt vindu
+Name[pl]=Nowe okno
+Name[pt]=Nova janela
+Name[pt_BR]=Nova janela
+Name[ro]=Fereastră nouă
+Name[ru]=Новое окно
+Name[sk]=Nové okno
+Name[sl]=Novo okno
+Name[sr]=Нови прозор
+Name[sv]=Nytt fönster
+Name[sw]=Dirisha Jipya
+Name[ta]=புதிய சாளரம்
+Name[te]=క్రొత్త విండో
+Name[th]=หน้าต่างใหม่
+Name[tr]=Yeni Pencere
+Name[uk]=Нове вікно
+Name[vi]=Cửa sổ Mới
+Name[zh_CN]=新建窗口
+Name[zh_TW]=開新視窗
+Exec=@@INSTALLDIR@@/@@PACKAGE@@
+TargetEnvironment=Unity
+
+[NewIncognito Shortcut Group]
+Name=New Incognito Window
+Name[ar]=نافذة جديدة للتصفح المتخفي
+Name[bg]=Нов прозорец „инкогнито“
+Name[bn]=নতুন ছদ্মবেশী উইন্ডো
+Name[ca]=Finestra d'incògnit nova
+Name[cs]=Nové anonymní okno
+Name[da]=Nyt inkognitovindue
+Name[de]=Neues Inkognito-Fenster
+Name[el]=Νέο παράθυρο για ανώνυμη περιήγηση
+Name[en_GB]=New Incognito window
+Name[es]=Nueva ventana de incógnito
+Name[et]=Uus inkognito aken
+Name[fa]=پنجره جدید حالت ناشناس
+Name[fi]=Uusi incognito-ikkuna
+Name[fil]=Bagong Incognito window
+Name[fr]=Nouvelle fenêtre de navigation privée
+Name[gu]=નવી છુપી વિંડો
+Name[hi]=नई गुप्त विंडो
+Name[hr]=Novi anoniman prozor
+Name[hu]=Új Inkognitóablak
+Name[id]=Jendela Penyamaran baru
+Name[it]=Nuova finestra di navigazione in incognito
+Name[iw]=חלון חדש לגלישה בסתר
+Name[ja]=新しいシークレット ウィンドウ
+Name[kn]=ಹೊಸ ಅಜ್ಞಾತ ವಿಂಡೋ
+Name[ko]=새 시크릿 창
+Name[lt]=Naujas inkognito langas
+Name[lv]=Jauns inkognito režīma logs
+Name[ml]=പുതിയ വേഷ പ്രച്ഛന്ന വിന്‍ഡോ
+Name[mr]=नवीन गुप्त विंडो
+Name[nl]=Nieuw incognitovenster
+Name[no]=Nytt inkognitovindu
+Name[pl]=Nowe okno incognito
+Name[pt]=Nova janela de navegação anónima
+Name[pt_BR]=Nova janela anônima
+Name[ro]=Fereastră nouă incognito
+Name[ru]=Новое окно в режиме инкогнито
+Name[sk]=Nové okno inkognito
+Name[sl]=Novo okno brez beleženja zgodovine
+Name[sr]=Нови прозор за прегледање без архивирања
+Name[sv]=Nytt inkognitofönster
+Name[ta]=புதிய மறைநிலைச் சாளரம்
+Name[te]=క్రొత్త అజ్ఞాత విండో
+Name[th]=หน้าต่างใหม่ที่ไม่ระบุตัวตน
+Name[tr]=Yeni Gizli pencere
+Name[uk]=Нове вікно в режимі анонімного перегляду
+Name[vi]=Cửa sổ ẩn danh mới
+Name[zh_CN]=新建隐身窗口
+Name[zh_TW]=新增無痕式視窗
+Exec=@@INSTALLDIR@@/@@PACKAGE@@ --incognito
+TargetEnvironment=Unity
diff --git a/chrome/installer/linux/common/google-chrome/google-chrome.info b/chrome/installer/linux/common/google-chrome/google-chrome.info
new file mode 100644
index 0000000000..414efdefa1
--- /dev/null
+++ b/chrome/installer/linux/common/google-chrome/google-chrome.info
@@ -0,0 +1,30 @@
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# This file provides common configuration information for building
+# google-chrome packages for various platforms.
+
+# Base name of the package.
+PACKAGE="google-chrome"
+
+# Filename of the main executable (for generating launcher scripts, etc.)
+PROGNAME=chrome
+
+# Base directory for package installation.
+INSTALLDIR=/opt/google/chrome
+
+# Display string for desktop menu/icon.
+MENUNAME="Google Chrome"
+
+# Brief package description.
+SHORTDESC="The web browser from Google"
+
+# Detailed package description.
+FULLDESC="Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier."
+
+# Package maintainer information.
+# TODO(mmoss) Setup a mailbox for this address
+MAINTNAME="Chrome Linux Team"
+MAINTMAIL="chromium-dev@chromium.org"
+PRODUCTURL="http://chrome.google.com/"
diff --git a/chrome/installer/linux/common/installer.include b/chrome/installer/linux/common/installer.include
new file mode 100644
index 0000000000..ef2914fef3
--- /dev/null
+++ b/chrome/installer/linux/common/installer.include
@@ -0,0 +1,249 @@
+# Recursively replace @@include@@ template variables with the referenced file,
+# and write the resulting text to stdout.
+process_template_includes() {
+ INCSTACK+="$1->"
+ # Includes are relative to the file that does the include.
+ INCDIR=$(dirname $1)
+ # Clear IFS so 'read' doesn't trim whitespace
+ local OLDIFS="$IFS"
+ IFS=''
+ while read -r LINE
+ do
+ INCLINE=$(sed -e '/^[[:space:]]*@@include@@/!d' <<<$LINE)
+ if [ -n "$INCLINE" ]; then
+ INCFILE=$(echo $INCLINE | sed -e "s#@@include@@\(.*\)#\1#")
+ # Simple filename match to detect cyclic includes.
+ CYCLE=$(sed -e "\#$INCFILE#"'!d' <<<$INCSTACK)
+ if [ "$CYCLE" ]; then
+ echo "ERROR: Possible cyclic include detected." 1>&2
+ echo "$INCSTACK$INCFILE" 1>&2
+ exit 1
+ fi
+ if [ ! -r "$INCDIR/$INCFILE" ]; then
+ echo "ERROR: Couldn't read include file: $INCDIR/$INCFILE" 1>&2
+ exit 1
+ fi
+ process_template_includes "$INCDIR/$INCFILE"
+ else
+ echo "$LINE"
+ fi
+ done < "$1"
+ IFS="$OLDIFS"
+ INCSTACK=${INCSTACK%"$1->"}
+}
+
+# Replace template variables (@@VARNAME@@) in the given template file. If a
+# second argument is given, save the processed text to that filename, otherwise
+# modify the template file in place.
+process_template() (
+ # Don't worry if some of these substitution variables aren't set.
+ # Note that this function is run in a sub-shell so we don't leak this
+ # setting, since we still want unbound variables to be an error elsewhere.
+ set +u
+
+ local TMPLIN="$1"
+ if [ -z "$2" ]; then
+ local TMPLOUT="$TMPLIN"
+ else
+ local TMPLOUT="$2"
+ fi
+ # Process includes first so included text also gets substitutions.
+ TMPLINCL="$(process_template_includes "$TMPLIN")"
+ sed \
+ -e "s#@@PACKAGE@@#${PACKAGE}#g" \
+ -e "s#@@PACKAGE_FILENAME@@#${PACKAGE_FILENAME}#g" \
+ -e "s#@@PROGNAME@@#${PROGNAME}#g" \
+ -e "s#@@CHANNEL@@#${CHANNEL}#g" \
+ -e "s#@@COMPANY_FULLNAME@@#${COMPANY_FULLNAME}#g" \
+ -e "s#@@VERSION@@#${VERSION}#g" \
+ -e "s#@@REVISION@@#${REVISION}#g" \
+ -e "s#@@VERSIONFULL@@#${VERSIONFULL}#g" \
+ -e "s#@@INSTALLDIR@@#${INSTALLDIR}#g" \
+ -e "s#@@BUILDDIR@@#${BUILDDIR}#g" \
+ -e "s#@@STAGEDIR@@#${STAGEDIR}#g" \
+ -e "s#@@SCRIPTDIR@@#${SCRIPTDIR}#g" \
+ -e "s#@@MENUNAME@@#${MENUNAME}#g" \
+ -e "s#@@PRODUCTURL@@#${PRODUCTURL}#g" \
+ -e "s#@@PREDEPENDS@@#${PREDEPENDS}#g" \
+ -e "s#@@DEPENDS@@#${DEPENDS}#g" \
+ -e "s#@@PROVIDES@@#${PROVIDES}#g" \
+ -e "s#@@REPLACES@@#${REPLACES}#g" \
+ -e "s#@@CONFLICTS@@#${CONFLICTS}#g" \
+ -e "s#@@ARCHITECTURE@@#${ARCHITECTURE}#g" \
+ -e "s#@@MAINTNAME@@#${MAINTNAME}#g" \
+ -e "s#@@MAINTMAIL@@#${MAINTMAIL}#g" \
+ -e "s#@@REPOCONFIG@@#${REPOCONFIG}#g" \
+ -e "s#@@SHORTDESC@@#${SHORTDESC}#g" \
+ -e "s#@@FULLDESC@@#${FULLDESC}#g" \
+ -e "s#@@DEFAULT_FLAGS@@#${DEFAULT_FLAGS:-}#g" \
+ > "$TMPLOUT" <<< "$TMPLINCL"
+)
+
+# Setup the installation directory hierachy in the package staging area.
+prep_staging_common() {
+ install -m 755 -d "${STAGEDIR}/${INSTALLDIR}" \
+ "${STAGEDIR}/usr/bin" \
+ "${STAGEDIR}/usr/share/applications" \
+ "${STAGEDIR}/usr/share/gnome-control-center/default-apps" \
+ "${STAGEDIR}/usr/share/man/man1"
+}
+
+get_version_info() {
+ # Default to a bogus low version, so if somebody creates and installs
+ # a package with no version info, it won't prevent upgrading when
+ # trying to install a properly versioned package (i.e. a proper
+ # package will always be "newer").
+ VERSION="0.0.0.0"
+ # Use epoch timestamp so packages with bogus versions still increment
+ # and will upgrade older bogus-versioned packages.
+ REVISION=$(date +"%s")
+ # Default to non-official build since official builds set this
+ # properly.
+ OFFICIAL_BUILD=0
+
+ VERSIONFILE="${BUILDDIR}/installer/version.txt"
+ if [ -f "${VERSIONFILE}" ]; then
+ source "${VERSIONFILE}"
+ VERSION="${MAJOR}.${MINOR}.${BUILD}.${PATCH}"
+ REVISION="${LASTCHANGE}"
+ fi
+}
+
+stage_install_common() {
+ echo "Staging common install files in '${STAGEDIR}'..."
+
+ # TODO(mmoss) This assumes we built the static binaries. To support shared
+ # builds, we probably want an install target in scons so it can give us all
+ # the right files. See also:
+ # http://code.google.com/p/chromium/issues/detail?id=4451
+ #
+ # app
+ # We need to add the debug link so gdb knows to look for the symbols.
+ DEBUGFILE="${BUILDDIR}/${PROGNAME}.debug"
+ STRIPPEDFILE="${BUILDDIR}/${PROGNAME}.stripped"
+ eu-strip -o "${STRIPPEDFILE}" -f "${DEBUGFILE}" "${BUILDDIR}/${PROGNAME}"
+ install -m 755 "${STRIPPEDFILE}" "${STAGEDIR}/${INSTALLDIR}/${PROGNAME}"
+ rm "${DEBUGFILE}" "${STRIPPEDFILE}"
+
+ # resources
+ install -m 644 "${BUILDDIR}/${PROGNAME}.pak" "${STAGEDIR}/${INSTALLDIR}/"
+ install -m 644 "${BUILDDIR}/resources.pak" "${STAGEDIR}/${INSTALLDIR}/"
+ # TODO(mmoss): This has broken a couple times on adding new .pak files. Maybe
+ # we should flag all installer files in FILES.cfg and get them from there, so
+ # there's only one place people need to keep track of such things (and in
+ # only the public repository).
+ if [ -r "${BUILDDIR}/chrome_100_percent.pak" ]; then
+ install -m 644 "${BUILDDIR}/chrome_100_percent.pak" "${STAGEDIR}/${INSTALLDIR}/"
+ else
+ install -m 644 "${BUILDDIR}/theme_resources_100_percent.pak" "${STAGEDIR}/${INSTALLDIR}/"
+ install -m 644 "${BUILDDIR}/ui_resources_100_percent.pak" "${STAGEDIR}/${INSTALLDIR}/"
+ fi
+
+ # sandbox
+ # Rename sandbox binary with hyphen instead of underscore because that's what
+ # the code looks for, but the build targets can't use hyphens (scons bug?)
+ install -m 4755 -s "${BUILDDIR}/${PROGNAME}_sandbox" \
+ "${STAGEDIR}/${INSTALLDIR}/${PROGNAME}-sandbox"
+
+ # l10n paks
+ cp -a "${BUILDDIR}/locales" "${STAGEDIR}/${INSTALLDIR}/"
+ find "${STAGEDIR}/${INSTALLDIR}/locales" -type f -exec chmod 644 '{}' \;
+ find "${STAGEDIR}/${INSTALLDIR}/locales" -type d -exec chmod 755 '{}' \;
+
+ # ffmpeg libs
+ install -m 644 -s "${BUILDDIR}/libffmpegsumo.so" "${STAGEDIR}/${INSTALLDIR}/"
+
+ # Widevine CDM.
+ if [ -f "${BUILDDIR}/libwidevinecdmadapter.so" ]; then
+ install -m 644 -s "${BUILDDIR}/libwidevinecdmadapter.so" "${STAGEDIR}/${INSTALLDIR}/"
+ install -m 644 "${BUILDDIR}/libwidevinecdm.so" "${STAGEDIR}/${INSTALLDIR}/"
+ fi
+
+ # Pepper Flash.
+ PEPPERFLASH_SRCDIR="${BUILDDIR}/PepperFlash"
+ PEPPERFLASH_DESTDIR="${STAGEDIR}/${INSTALLDIR}/PepperFlash"
+ install -m 755 -d "${PEPPERFLASH_DESTDIR}"
+ install -m 644 -s "${PEPPERFLASH_SRCDIR}/libpepflashplayer.so" \
+ "${PEPPERFLASH_DESTDIR}/"
+ install -m 644 "${PEPPERFLASH_SRCDIR}/manifest.json" \
+ "${PEPPERFLASH_DESTDIR}/"
+
+ # pdf plugin
+ if [ -f "${BUILDDIR}/libpdf.so" ]; then
+ install -m 644 -s "${BUILDDIR}/libpdf.so" "${STAGEDIR}/${INSTALLDIR}/"
+ fi
+
+ # peerconnection shared library
+ if [ -f "${BUILDDIR}/lib/libpeerconnection.so" ]; then
+ install -m 755 -d "${STAGEDIR}/${INSTALLDIR}/lib/"
+ install -m 644 -s "${BUILDDIR}/lib/libpeerconnection.so" "${STAGEDIR}/${INSTALLDIR}/lib/"
+ fi
+
+ # nacl pepper plugin
+ if [ -f "${BUILDDIR}/libppGoogleNaClPluginChrome.so" ]; then
+ install -m 644 -s "${BUILDDIR}/libppGoogleNaClPluginChrome.so" "${STAGEDIR}/${INSTALLDIR}/"
+ fi
+
+ # nacl_helper and nacl_helper_bootstrap
+ # Don't use "-s" (strip) because this runs binutils "strip", which
+ # mangles the special ELF program headers of nacl_helper_bootstrap.
+ # Explicitly use eu-strip instead, because it doesn't have that problem.
+ for file in nacl_helper nacl_helper_bootstrap; do
+ buildfile="${BUILDDIR}/${file}"
+ if [ -f "${buildfile}" ]; then
+ strippedfile="${buildfile}.stripped"
+ debugfile="${buildfile}.debug"
+ eu-strip -o "${strippedfile}" -f "${debugfile}" "${buildfile}"
+ install -m 755 "${strippedfile}" "${STAGEDIR}/${INSTALLDIR}/${file}"
+ fi
+ done
+ # Don't use "-s" (strip) because this would use the Linux toolchain to
+ # strip the NaCl binary, which has the potential to break it. It
+ # certainly resets the OSABI and ABIVERSION fields to non-NaCl values,
+ # although the NaCl IRT loader doesn't care about these fields. In any
+ # case, the IRT binaries are already stripped by NaCl's build process.
+ for filename in ${BUILDDIR}/nacl_irt_*.nexe; do
+ # Re-check the filename in case globbing matched nothing.
+ if [ -f "$filename" ]; then
+ install -m 644 "$filename" "${STAGEDIR}/${INSTALLDIR}/`basename "$filename"`"
+ fi
+ done
+
+ # default apps
+ if [ -d "${BUILDDIR}/default_apps" ]; then
+ cp -a "${BUILDDIR}/default_apps" "${STAGEDIR}/${INSTALLDIR}/"
+ find "${STAGEDIR}/${INSTALLDIR}/default_apps" -type d -exec chmod 755 '{}' \;
+ find "${STAGEDIR}/${INSTALLDIR}/default_apps" -type f -exec chmod 644 '{}' \;
+ fi
+
+ # launcher script and symlink
+ process_template "${BUILDDIR}/installer/common/wrapper" \
+ "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}"
+ chmod 755 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}"
+ pushd "${STAGEDIR}/usr/bin/"
+ ln -snf "${INSTALLDIR}/${PACKAGE}" "${PACKAGE}"
+ popd
+
+ # app icons
+ install -m 644 \
+ "${BUILDDIR}/installer/theme/product_logo_"*.png \
+ "${BUILDDIR}/installer/theme/product_logo_32.xpm" \
+ "${STAGEDIR}/${INSTALLDIR}/"
+
+ # desktop integration
+ install -m 755 "${BUILDDIR}/xdg-mime" "${STAGEDIR}${INSTALLDIR}/"
+ install -m 755 "${BUILDDIR}/xdg-settings" "${STAGEDIR}${INSTALLDIR}/"
+ process_template "${BUILDDIR}/installer/common/desktop.template" \
+ "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}.desktop"
+ chmod 644 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}.desktop"
+ process_template "${BUILDDIR}/installer/common/default-app.template" \
+ "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml"
+ chmod 644 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml"
+ process_template "${BUILDDIR}/installer/common/default-app-block.template" \
+ "${STAGEDIR}${INSTALLDIR}/default-app-block"
+ chmod 644 "${STAGEDIR}${INSTALLDIR}/default-app-block"
+
+ # documentation
+ install -m 755 "${BUILDDIR}/${PROGNAME}.1" \
+ "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1"
+}
diff --git a/chrome/installer/linux/common/postinst.include b/chrome/installer/linux/common/postinst.include
new file mode 100644
index 0000000000..1ddc7a2292
--- /dev/null
+++ b/chrome/installer/linux/common/postinst.include
@@ -0,0 +1,49 @@
+# Add icons to the system icons
+XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null`"
+if [ ! -x "$XDG_ICON_RESOURCE" ]; then
+ echo "Error: Could not find xdg-icon-resource" >&2
+ exit 1
+fi
+for icon in "@@INSTALLDIR@@/product_logo_"*.png; do
+ size="${icon##*/product_logo_}"
+ "$XDG_ICON_RESOURCE" install --size "${size%.png}" "$icon" "@@PACKAGE@@"
+done
+
+# Add an entry to the system menu
+XDG_DESKTOP_MENU="`which xdg-desktop-menu 2> /dev/null`"
+UPDATE_MENUS="`which update-menus 2> /dev/null`"
+if [ ! -x "$XDG_DESKTOP_MENU" ]; then
+ echo "Error: Could not find xdg-desktop-menu" >&2
+ exit 1
+fi
+"$XDG_DESKTOP_MENU" install @@INSTALLDIR@@/@@PACKAGE@@.desktop
+
+if [ -x "$UPDATE_MENUS" ]; then
+ update-menus
+fi
+
+# This function uses sed to insert the contents of one file into another file,
+# after the first line matching a given regular expression. If there is no
+# matching line, then the file is unchanged.
+insert_after_first_match() {
+ # $1: file to update
+ # $2: regular expression
+ # $3: file to insert
+ sed -i -e "1,/$2/ {
+ /$2/ r $3
+ }" "$1"
+}
+
+# If /usr/share/gnome-control-center/gnome-default-applications.xml exists, it
+# may need to be updated to add ourselves to the default applications list. If
+# we find the file and it does not seem to contain our patch already (the patch
+# is safe to leave even after uninstall), update it.
+GNOME_DFL_APPS=/usr/share/gnome-control-center/gnome-default-applications.xml
+if [ -f "$GNOME_DFL_APPS" ]; then
+# Conditionally insert the contents of the file "default-app-block" after the
+# first "<web-browsers>" line we find in gnome-default-applications.xml
+ fgrep -q "@@MENUNAME@@" "$GNOME_DFL_APPS" || insert_after_first_match \
+ "$GNOME_DFL_APPS" \
+ "^[ ]*<web-browsers>[ ]*$" \
+ "@@INSTALLDIR@@/default-app-block"
+fi
diff --git a/chrome/installer/linux/common/prerm.include b/chrome/installer/linux/common/prerm.include
new file mode 100644
index 0000000000..3e6f9d7b55
--- /dev/null
+++ b/chrome/installer/linux/common/prerm.include
@@ -0,0 +1,23 @@
+# Remove icons from the system icons
+XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null`"
+if [ ! -x "$XDG_ICON_RESOURCE" ]; then
+ echo "Error: Could not find xdg-icon-resource" >&2
+ exit 1
+fi
+for icon in "@@INSTALLDIR@@/product_logo_"*.png; do
+ size="${icon##*/product_logo_}"
+ "$XDG_ICON_RESOURCE" uninstall --size "${size%.png}" "@@PACKAGE@@"
+done
+
+# Remove the entry from the system menu
+XDG_DESKTOP_MENU="`which xdg-desktop-menu 2> /dev/null`"
+UPDATE_MENUS="`which update-menus 2> /dev/null`"
+if [ ! -x "$XDG_DESKTOP_MENU" ]; then
+ echo "Error: Could not find xdg-desktop-menu" >&2
+ exit 1
+fi
+"$XDG_DESKTOP_MENU" uninstall @@INSTALLDIR@@/@@PACKAGE@@.desktop
+
+if [ -x "$UPDATE_MENUS" ]; then
+ update-menus
+fi
diff --git a/chrome/installer/linux/common/repo.cron b/chrome/installer/linux/common/repo.cron
new file mode 100755
index 0000000000..fbb3e744ab
--- /dev/null
+++ b/chrome/installer/linux/common/repo.cron
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# This script is part of the @@PACKAGE@@ package.
+#
+# It creates the repository configuration file for package updates, and it
+# monitors that config to see if it has been disabled by the overly aggressive
+# distro upgrade process (e.g. intrepid -> jaunty). When this situation is
+# detected, the respository will be re-enabled. If the respository is disabled
+# for any other reason, this won't re-enable it.
+#
+# This functionality can be controlled by creating the $DEFAULTS_FILE and
+# setting "repo_add_once" and/or "repo_reenable_on_distupgrade" to "true" or
+# "false" as desired. An empty $DEFAULTS_FILE is the same as setting both values
+# to "false".
+
+@@include@@apt.include
+
+## MAIN ##
+DEFAULTS_FILE="/etc/default/@@PACKAGE@@"
+if [ -r "$DEFAULTS_FILE" ]; then
+ . "$DEFAULTS_FILE"
+fi
+
+if [ "$repo_add_once" = "true" ]; then
+ install_key
+ create_sources_lists
+ RES=$?
+ # Sources creation succeeded, so stop trying.
+ if [ $RES -ne 2 ]; then
+ sed -i -e 's/[[:space:]]*repo_add_once=.*/repo_add_once="false"/' "$DEFAULTS_FILE"
+ fi
+else
+ update_bad_sources
+fi
+
+if [ "$repo_reenable_on_distupgrade" = "true" ]; then
+ handle_distro_upgrade
+fi
diff --git a/chrome/installer/linux/common/rpm.include b/chrome/installer/linux/common/rpm.include
new file mode 100644
index 0000000000..91b4459626
--- /dev/null
+++ b/chrome/installer/linux/common/rpm.include
@@ -0,0 +1,318 @@
+@@include@@variables.include
+
+# Install the repository signing key (see also:
+# http://www.google.com/linuxrepositories/aboutkey.html)
+install_rpm_key() {
+ # Check to see if key already exists.
+ rpm -q gpg-pubkey-7fac5991-4615767f > /dev/null 2>&1
+ if [ "$?" -eq "0" ]; then
+ # Key already exists
+ return 0
+ fi
+ # This is to work around a bug in RPM 4.7.0. (see http://crbug.com/22312)
+ rpm -q gpg-pubkey-7fac5991-45f06f46 > /dev/null 2>&1
+ if [ "$?" -eq "0" ]; then
+ # Key already exists
+ return 0
+ fi
+
+ # RPM on Mandriva 2009 is dumb and does not understand "rpm --import -"
+ TMPKEY=$(mktemp /tmp/google.sig.XXXXXX)
+ if [ -n "$TMPKEY" ]; then
+ cat > "$TMPKEY" <<KEYDATA
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.2.2 (GNU/Linux)
+
+mQGiBEXwb0YRBADQva2NLpYXxgjNkbuP0LnPoEXruGmvi3XMIxjEUFuGNCP4Rj/a
+kv2E5VixBP1vcQFDRJ+p1puh8NU0XERlhpyZrVMzzS/RdWdyXf7E5S8oqNXsoD1z
+fvmI+i9b2EhHAA19Kgw7ifV8vMa4tkwslEmcTiwiw8lyUl28Wh4Et8SxzwCggDcA
+feGqtn3PP5YAdD0km4S4XeMEAJjlrqPoPv2Gf//tfznY2UyS9PUqFCPLHgFLe80u
+QhI2U5jt6jUKN4fHauvR6z3seSAsh1YyzyZCKxJFEKXCCqnrFSoh4WSJsbFNc4PN
+b0V0SqiTCkWADZyLT5wll8sWuQ5ylTf3z1ENoHf+G3um3/wk/+xmEHvj9HCTBEXP
+78X0A/0Tqlhc2RBnEf+AqxWvM8sk8LzJI/XGjwBvKfXe+l3rnSR2kEAvGzj5Sg0X
+4XmfTg4Jl8BNjWyvm2Wmjfet41LPmYJKsux3g0b8yzQxeOA4pQKKAU3Z4+rgzGmf
+HdwCG5MNT2A5XxD/eDd+L4fRx0HbFkIQoAi1J3YWQSiTk15fw7RMR29vZ2xlLCBJ
+bmMuIExpbnV4IFBhY2thZ2UgU2lnbmluZyBLZXkgPGxpbnV4LXBhY2thZ2VzLWtl
+eW1hc3RlckBnb29nbGUuY29tPohjBBMRAgAjAhsDBgsJCAcDAgQVAggDBBYCAwEC
+HgECF4AFAkYVdn8CGQEACgkQoECDD3+sWZHKSgCfdq3HtNYJLv+XZleb6HN4zOcF
+AJEAniSFbuv8V5FSHxeRimHx25671az+uQINBEXwb0sQCACuA8HT2nr+FM5y/kzI
+A51ZcC46KFtIDgjQJ31Q3OrkYP8LbxOpKMRIzvOZrsjOlFmDVqitiVc7qj3lYp6U
+rgNVaFv6Qu4bo2/ctjNHDDBdv6nufmusJUWq/9TwieepM/cwnXd+HMxu1XBKRVk9
+XyAZ9SvfcW4EtxVgysI+XlptKFa5JCqFM3qJllVohMmr7lMwO8+sxTWTXqxsptJo
+pZeKz+UBEEqPyw7CUIVYGC9ENEtIMFvAvPqnhj1GS96REMpry+5s9WKuLEaclWpd
+K3krttbDlY1NaeQUCRvBYZ8iAG9YSLHUHMTuI2oea07Rh4dtIAqPwAX8xn36JAYG
+2vgLAAMFB/wKqaycjWAZwIe98Yt0qHsdkpmIbarD9fGiA6kfkK/UxjL/k7tmS4Vm
+CljrrDZkPSQ/19mpdRcGXtb0NI9+nyM5trweTvtPw+HPkDiJlTaiCcx+izg79Fj9
+KcofuNb3lPdXZb9tzf5oDnmm/B+4vkeTuEZJ//IFty8cmvCpzvY+DAz1Vo9rA+Zn
+cpWY1n6z6oSS9AsyT/IFlWWBZZ17SpMHu+h4Bxy62+AbPHKGSujEGQhWq8ZRoJAT
+G0KSObnmZ7FwFWu1e9XFoUCt0bSjiJWTIyaObMrWu/LvJ3e9I87HseSJStfw6fki
+5og9qFEkMrIrBCp3QGuQWBq/rTdMuwNFiEkEGBECAAkFAkXwb0sCGwwACgkQoECD
+D3+sWZF/WACfeNAu1/1hwZtUo1bR+MWiCjpvHtwAnA1R3IHqFLQ2X3xJ40XPuAyY
+/FJG
+=Quqp
+-----END PGP PUBLIC KEY BLOCK-----
+KEYDATA
+ rpm --import "$TMPKEY"
+ rc=$?
+ rm -f "$TMPKEY"
+ if [ "$rc" -eq "0" ]; then
+ return 0
+ fi
+ fi
+ return 1
+}
+
+determine_rpm_package_manager() {
+ local RELEASE
+ LSB_RELEASE="$(which lsb_release 2> /dev/null)"
+ if [ -x "$LSB_RELEASE" ]; then
+ RELEASE=$(lsb_release -i 2> /dev/null | sed 's/:\t/:/' | cut -d ':' -f 2-)
+ case $RELEASE in
+ "Fedora")
+ PACKAGEMANAGER=yum
+ ;;
+ "MandrivaLinux")
+ PACKAGEMANAGER=urpmi
+ ;;
+ "SUSE LINUX")
+ PACKAGEMANAGER=yast
+ ;;
+ esac
+ fi
+
+ if [ "$PACKAGEMANAGER" ]; then
+ return
+ fi
+
+ # Fallback methods that are probably unnecessary on modern systems.
+ if [ -f "/etc/lsb-release" ]; then
+ # file missing on Fedora, does not contain DISTRIB_ID on OpenSUSE.
+ eval $(sed -e '/DISTRIB_ID/!d' /etc/lsb-release)
+ case $DISTRIB_ID in
+ MandrivaLinux)
+ PACKAGEMANAGER=urpmi
+ ;;
+ esac
+ fi
+
+ if [ "$PACKAGEMANAGER" ]; then
+ return
+ fi
+
+ if [ -f "/etc/fedora-release" ] || [ -f "/etc/redhat-release" ]; then
+ PACKAGEMANAGER=yum
+ elif [ -f "/etc/SuSE-release" ]; then
+ PACKAGEMANAGER=yast
+ elif [ -f "/etc/mandriva-release" ]; then
+ PACKAGEMANAGER=urpmi
+ fi
+}
+
+DEFAULT_ARCH="@@ARCHITECTURE@@"
+YUM_REPO_FILE="/etc/yum.repos.d/@@PACKAGE@@.repo"
+ZYPPER_REPO_FILE="/etc/zypp/repos.d/@@PACKAGE@@.repo"
+URPMI_REPO_FILE="/etc/urpmi/urpmi.cfg"
+
+install_yum() {
+ install_rpm_key
+
+ if [ ! "$REPOCONFIG" ]; then
+ return 0
+ fi
+
+ if [ -d "/etc/yum.repos.d" ]; then
+cat > "$YUM_REPO_FILE" << REPOCONTENT
+[@@PACKAGE@@]
+name=@@PACKAGE@@
+baseurl=$REPOCONFIG/$DEFAULT_ARCH
+enabled=1
+gpgcheck=1
+REPOCONTENT
+ fi
+}
+
+# This is called by the cron job, rather than in the RPM postinstall.
+# We cannot do this during the install when urpmi is running due to
+# database locking. We also need to enable the repository, and we can
+# only do that while we are online.
+# see: https://qa.mandriva.com/show_bug.cgi?id=31893
+configure_urpmi() {
+ if [ ! "$REPOCONFIG" ]; then
+ return 0
+ fi
+
+ urpmq --list-media | grep -q -s "^@@PACKAGE@@$"
+ if [ "$?" -eq "0" ]; then
+ # Repository already configured
+ return 0
+ fi
+ urpmi.addmedia --update \
+ "@@PACKAGE@@" "$REPOCONFIG/$DEFAULT_ARCH"
+}
+
+install_urpmi() {
+ # urpmi not smart enough to pull media_info/pubkey from the repository?
+ install_rpm_key
+
+ # Defer urpmi.addmedia to configure_urpmi() in the cron job.
+ # See comment there.
+ #
+ # urpmi.addmedia --update \
+ # "@@PACKAGE@@" "$REPOCONFIG/$DEFAULT_ARCH"
+}
+
+install_yast() {
+ if [ ! "$REPOCONFIG" ]; then
+ return 0
+ fi
+
+ # We defer adding the key to later. See comment in the cron job.
+
+ # Ideally, we would run: zypper addrepo -t YUM -f \
+ # "$REPOCONFIG/$DEFAULT_ARCH" "@@PACKAGE@@"
+ # but that does not work when zypper is running.
+ if [ -d "/etc/zypp/repos.d" ]; then
+cat > "$ZYPPER_REPO_FILE" << REPOCONTENT
+[@@PACKAGE@@]
+name=@@PACKAGE@@
+enabled=1
+autorefresh=1
+baseurl=$REPOCONFIG/$DEFAULT_ARCH
+type=rpm-md
+keeppackages=0
+REPOCONTENT
+ fi
+}
+
+# Check if the automatic repository configuration is done, so we know when to
+# stop trying.
+verify_install() {
+ # It's probably enough to see that the repo configs have been created. If they
+ # aren't configured properly, update_bad_repo should catch that when it's run.
+ case $1 in
+ "yum")
+ [ -f "$YUM_REPO_FILE" ]
+ ;;
+ "yast")
+ [ -f "$ZYPPER_REPO_FILE" ]
+ ;;
+ "urpmi")
+ urpmq --list-url | grep -q -s "\b@@PACKAGE@@\b"
+ ;;
+ esac
+}
+
+# Update the Google repository if it's not set correctly.
+update_bad_repo() {
+ if [ ! "$REPOCONFIG" ]; then
+ return 0
+ fi
+
+ determine_rpm_package_manager
+
+ case $PACKAGEMANAGER in
+ "yum")
+ update_repo_file "$YUM_REPO_FILE"
+ ;;
+ "yast")
+ update_repo_file "$ZYPPER_REPO_FILE"
+ ;;
+ "urpmi")
+ update_urpmi_cfg
+ ;;
+ esac
+}
+
+update_repo_file() {
+ REPO_FILE="$1"
+
+ # Don't do anything if the file isn't there, since that probably means the
+ # user disabled it.
+ if [ ! -r "$REPO_FILE" ]; then
+ return 0
+ fi
+
+ # Check if the correct repository configuration is in there.
+ REPOMATCH=$(grep "^baseurl=$REPOCONFIG/$DEFAULT_ARCH" "$REPO_FILE" \
+ 2>/dev/null)
+ # If it's there, nothing to do
+ if [ "$REPOMATCH" ]; then
+ return 0
+ fi
+
+ # Check if it's there but disabled by commenting out (as opposed to using the
+ # 'enabled' setting).
+ MATCH_DISABLED=$(grep "^[[:space:]]*#.*baseurl=$REPOCONFIG/$DEFAULT_ARCH" \
+ "$REPO_FILE" 2>/dev/null)
+ if [ "$MATCH_DISABLED" ]; then
+ # It's OK for it to be disabled, as long as nothing bogus is enabled in its
+ # place.
+ ACTIVECONFIGS=$(grep "^baseurl=.*" "$REPO_FILE" 2>/dev/null)
+ if [ ! "$ACTIVECONFIGS" ]; then
+ return 0
+ fi
+ fi
+
+ # If we get here, the correct repository wasn't found, or something else is
+ # active, so fix it. This assumes there is a 'baseurl' setting, but if not,
+ # then that's just another way of disabling, so we won't try to add it.
+ sed -i -e "s,^baseurl=.*,baseurl=$REPOCONFIG/$DEFAULT_ARCH," "$REPO_FILE"
+}
+
+update_urpmi_cfg() {
+ REPOCFG=$(urpmq --list-url | grep "\b@@PACKAGE@@\b")
+ if [ ! "$REPOCFG" ]; then
+ # Don't do anything if the repo isn't there, since that probably means the
+ # user deleted it.
+ return 0
+ fi
+
+ # See if it's the right repo URL
+ REPOMATCH=$(echo "$REPOCFG" | grep "\b$REPOCONFIG/$DEFAULT_ARCH\b")
+ # If so, nothing to do
+ if [ "$REPOMATCH" ]; then
+ return 0
+ fi
+
+ # Looks like it's the wrong URL, so recreate it.
+ urpmi.removemedia "@@PACKAGE@@" && \
+ urpmi.addmedia --update "@@PACKAGE@@" "$REPOCONFIG/$DEFAULT_ARCH"
+}
+
+# We only remove the repository configuration during a purge. Since RPM has
+# no equivalent to dpkg --purge, the code below is actually never used. We
+# keep it only for reference purposes, should we ever need it.
+#
+#remove_yum() {
+# rm -f "$YUM_REPO_FILE"
+#}
+#
+#remove_urpmi() {
+# # Ideally, we would run: urpmi.removemedia "@@PACKAGE@@"
+# # but that does not work when urpmi is running.
+# # Sentinel comment text does not work either because urpmi.update removes
+# # all comments. So we just delete the entry that matches what we originally
+# # inserted. If such an entry was added manually, that's tough luck.
+# if [ -f "$URPMI_REPO_FILE" ]; then
+# sed -i '\_^@@PACKAGE@@ $REPOCONFIG/$DEFAULT_ARCH {$_,/^}$/d' "$URPMI_REPO_FILE"
+# fi
+#}
+#
+#remove_yast() {
+# # Ideally, we would run: zypper removerepo "@@PACKAGE@@"
+# # but that does not work when zypper is running.
+# rm -f /etc/zypp/repos.d/@@PACKAGE@@.repo
+#}
+
+DEFAULT_ARCH="@@ARCHITECTURE@@"
+
+get_lib_dir() {
+ if [ "$DEFAULT_ARCH" = "i386" ]; then
+ LIBDIR=lib
+ elif [ "$DEFAULT_ARCH" = "x86_64" ]; then
+ LIBDIR=lib64
+ else
+ echo Unknown CPU Architecture: "$DEFAULT_ARCH"
+ exit 1
+ fi
+}
diff --git a/chrome/installer/linux/common/rpmrepo.cron b/chrome/installer/linux/common/rpmrepo.cron
new file mode 100755
index 0000000000..1e6a3a694d
--- /dev/null
+++ b/chrome/installer/linux/common/rpmrepo.cron
@@ -0,0 +1,65 @@
+#!/bin/sh
+#
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# This script is part of the @@PACKAGE@@ package.
+#
+# It creates the repository configuration file for package updates, since
+# we cannot do this during the @@PACKAGE@@ installation since the repository
+# is locked.
+#
+# This functionality can be controlled by creating the $DEFAULTS_FILE and
+# setting "repo_add_once" to "true" or "false" as desired. An empty
+# $DEFAULTS_FILE is the same as setting the value to "false".
+
+@@include@@rpm.include
+
+## MAIN ##
+DEFAULTS_FILE="/etc/default/@@PACKAGE@@"
+if [ -r "$DEFAULTS_FILE" ]; then
+ . "$DEFAULTS_FILE"
+fi
+
+if [ "$repo_add_once" = "true" ]; then
+ determine_rpm_package_manager
+
+ # The initial install happens in the post-install scripts, but there have been
+ # reports of configuration problems, so just verify that everything looks
+ # good, and if not, try to install again.
+ verify_install $PACKAGEMANAGER
+ if [ $? -ne 0 ]; then
+ install_${PACKAGEMANAGER}
+ fi
+
+ # Now do any extra configuration that couldn't be done by post-install.
+ case $PACKAGEMANAGER in
+ "urpmi")
+ # We need to configure urpmi after the install has finished.
+ # See configure_urpmi() for details.
+ configure_urpmi
+ ;;
+ "yast")
+ # It looks as though yast/zypper has a lock on the RPM DB during
+ # postinstall, so we cannot add the signing key with install_rpm_key().
+ # Instead, we attempt to do this here. If the user attempt to update before
+ # the cron job imports the key, Yast will grab the key from our server and
+ # prompt the user to accept the key.
+ install_rpm_key
+ ;;
+ esac
+
+ if [ $? -eq 0 ]; then
+ # Before we quit auto-configuration, check that everything looks sane, since
+ # part of this happened during package install and we don't have the return
+ # value of that process.
+ verify_install $PACKAGEMANAGER
+ if [ $? -eq 0 ]; then
+ sed -i -e 's/[[:space:]]*repo_add_once=.*/repo_add_once="false"/' \
+ "$DEFAULTS_FILE"
+ fi
+ fi
+else
+ update_bad_repo
+fi
diff --git a/chrome/installer/linux/common/symlinks.include b/chrome/installer/linux/common/symlinks.include
new file mode 100644
index 0000000000..7bad92ecf0
--- /dev/null
+++ b/chrome/installer/linux/common/symlinks.include
@@ -0,0 +1,51 @@
+NSS_FILES="libnspr4.so.0d libplds4.so.0d libplc4.so.0d libssl3.so.1d \
+ libnss3.so.1d libsmime3.so.1d libnssutil3.so.1d"
+
+add_nss_symlinks() {
+ get_lib_dir
+ for f in $NSS_FILES
+ do
+ target=$(echo $f | sed 's/\.[01]d$//')
+ if [ -f "/$LIBDIR/$target" ]; then
+ ln -snf "/$LIBDIR/$target" "@@INSTALLDIR@@/$f"
+ elif [ -f "/usr/$LIBDIR/$target" ]; then
+ ln -snf "/usr/$LIBDIR/$target" "@@INSTALLDIR@@/$f"
+ else
+ echo $f not found in "/$LIBDIR/$target" or "/usr/$LIBDIR/$target".
+ exit 1
+ fi
+ done
+}
+
+remove_nss_symlinks() {
+ for f in $NSS_FILES
+ do
+ rm -rf "@@INSTALLDIR@@/$f"
+ done
+}
+
+# Fedora 18 now has libudev.so.1. http://crbug.com/145160
+# Same for Ubuntu 13.04. http://crbug.com/226002
+LIBUDEV_0=libudev.so.0
+LIBUDEV_1=libudev.so.1
+
+add_udev_symlinks() {
+ get_lib_dir
+ if [ -f "/$LIBDIR/$LIBUDEV_0" -o -f "/usr/$LIBDIR/$LIBUDEV_0" -o -f "/lib/$LIBUDEV_0" ]; then
+ return 0
+ fi
+
+ if [ -f "/$LIBDIR/$LIBUDEV_1" ]; then
+ ln -snf "/$LIBDIR/$LIBUDEV_1" "@@INSTALLDIR@@/$LIBUDEV_0"
+ elif [ -f "/usr/$LIBDIR/$LIBUDEV_1" ];
+ then
+ ln -snf "/usr/$LIBDIR/$LIBUDEV_1" "@@INSTALLDIR@@/$LIBUDEV_0"
+ else
+ echo "$LIBUDEV_1" not found in "$LIBDIR" or "/usr/$LIBDIR".
+ exit 1
+ fi
+}
+
+remove_udev_symlinks() {
+ rm -rf "@@INSTALLDIR@@/$LIBUDEV_0"
+}
diff --git a/chrome/installer/linux/common/updater b/chrome/installer/linux/common/updater
new file mode 100755
index 0000000000..53a8a80e95
--- /dev/null
+++ b/chrome/installer/linux/common/updater
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# TODO
+# - handle other distros (e.g. non-apt).
+
+@@include@@apt.include
+
+if [ -x "$APT_GET" ]; then
+ update_sources_lists
+ # If the repo was just added, force a cache update.
+ if [ $? -eq 1 ]; then
+ install_key
+ "$APT_GET" -qq update
+ fi
+
+ # TODO(mmoss) detect if apt cache is stale (> 1 day) and force update?
+
+ # Just try to install the packge. If it's already installed, apt-get won't do
+ # anything.
+ "$APT_GET" install -y -q @@PACKAGE@@
+fi
+
diff --git a/chrome/installer/linux/common/variables.include b/chrome/installer/linux/common/variables.include
new file mode 100644
index 0000000000..f3a17cd44e
--- /dev/null
+++ b/chrome/installer/linux/common/variables.include
@@ -0,0 +1,5 @@
+# System-wide package configuration.
+DEFAULTS_FILE="/etc/default/@@PACKAGE@@"
+
+# sources.list setting for @@PACKAGE@@ updates.
+REPOCONFIG="@@REPOCONFIG@@"
diff --git a/chrome/installer/linux/common/wrapper b/chrome/installer/linux/common/wrapper
new file mode 100755
index 0000000000..3cd55d507a
--- /dev/null
+++ b/chrome/installer/linux/common/wrapper
@@ -0,0 +1,42 @@
+#!/bin/bash
+#
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Let the wrapped binary know that it has been run through the wrapper.
+export CHROME_WRAPPER="`readlink -f "$0"`"
+
+HERE="`dirname "$CHROME_WRAPPER"`"
+
+# We include some xdg utilities next to the binary, and we want to prefer them
+# over the system versions when we know the system versions are very old. We
+# detect whether the system xdg utilities are sufficiently new to be likely to
+# work for us by looking for xdg-settings. If we find it, we leave $PATH alone,
+# so that the system xdg utilities (including any distro patches) will be used.
+if ! which xdg-settings &> /dev/null; then
+ # Old xdg utilities. Prepend $HERE to $PATH to use ours instead.
+ export PATH="$HERE:$PATH"
+else
+ # Use system xdg utilities. But first create mimeapps.list if it doesn't
+ # exist; some systems have bugs in xdg-mime that make it fail without it.
+ xdg_app_dir="${XDG_DATA_HOME:-$HOME/.local/share/applications}"
+ mkdir -p "$xdg_app_dir"
+ [ -f "$xdg_app_dir/mimeapps.list" ] || touch "$xdg_app_dir/mimeapps.list"
+fi
+
+# Always use our versions of ffmpeg libs.
+# This also makes RPMs find the compatibly-named library symlinks.
+if [[ -n "$LD_LIBRARY_PATH" ]]; then
+ LD_LIBRARY_PATH="$HERE:$HERE/lib:$LD_LIBRARY_PATH"
+else
+ LD_LIBRARY_PATH="$HERE:$HERE/lib"
+fi
+export LD_LIBRARY_PATH
+
+export CHROME_VERSION_EXTRA="@@CHANNEL@@"
+
+# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
+export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
+
+exec -a "$0" "$HERE/@@PROGNAME@@" @@DEFAULT_FLAGS@@ "$@"
diff --git a/chrome/installer/linux/debian/build.sh b/chrome/installer/linux/debian/build.sh
new file mode 100755
index 0000000000..03ee100e3a
--- /dev/null
+++ b/chrome/installer/linux/debian/build.sh
@@ -0,0 +1,330 @@
+#!/bin/bash
+#
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# TODO(mmoss) This currently only works with official builds, since non-official
+# builds don't add the "${BUILDDIR}/installer/" files needed for packaging.
+
+set -e
+if [ "$VERBOSE" ]; then
+ set -x
+fi
+set -u
+
+# Create the Debian changelog file needed by dpkg-gencontrol. This just adds a
+# placeholder change, indicating it is the result of an automatic build.
+# TODO(mmoss) Release packages should create something meaningful for a
+# changelog, but simply grabbing the actual 'svn log' is way too verbose. Do we
+# have any type of "significant/visible changes" log that we could use for this?
+gen_changelog() {
+ rm -f "${DEB_CHANGELOG}"
+ process_template "${SCRIPTDIR}/changelog.template" "${DEB_CHANGELOG}"
+ debchange -a --nomultimaint -m --changelog "${DEB_CHANGELOG}" \
+ "Release Notes: ${RELEASENOTES}"
+ # Trunk packages need to install to a custom path and with custom filenames
+ # (e.g. not /usr/bin/google-chrome) so they don't conflict with release
+ # channel packages.
+ if [ "$CHANNEL" = "trunk" ] || [ "$CHANNEL" = "asan" ]; then
+ local PACKAGE="${PACKAGE}-${CHANNEL}"
+ fi
+ GZLOG="${STAGEDIR}/usr/share/doc/${PACKAGE}/changelog.gz"
+ mkdir -p "$(dirname "${GZLOG}")"
+ gzip -9 -c "${DEB_CHANGELOG}" > "${GZLOG}"
+ chmod 644 "${GZLOG}"
+}
+
+# Create the Debian control file needed by dpkg-deb.
+gen_control() {
+ dpkg-gencontrol -v"${VERSIONFULL}" -c"${DEB_CONTROL}" -l"${DEB_CHANGELOG}" \
+ -f"${DEB_FILES}" -p"${PACKAGE}-${CHANNEL}" -P"${STAGEDIR}" \
+ -O > "${STAGEDIR}/DEBIAN/control"
+ rm -f "${DEB_CONTROL}"
+}
+
+# Setup the installation directory hierachy in the package staging area.
+prep_staging_debian() {
+ prep_staging_common
+ install -m 755 -d "${STAGEDIR}/DEBIAN" \
+ "${STAGEDIR}/etc/cron.daily" \
+ "${STAGEDIR}/usr/share/menu" \
+ "${STAGEDIR}/usr/share/doc/${PACKAGE}"
+}
+
+# Put the package contents in the staging area.
+stage_install_debian() {
+ # Trunk packages need to install to a custom path and with custom filenames
+ # (e.g. not /usr/bin/google-chrome) so they don't conflict with release
+ # channel packages.
+ if [ "$CHANNEL" = "trunk" ] || [ "$CHANNEL" = "asan" ]; then
+ local PACKAGE="${PACKAGE}-${CHANNEL}"
+ local INSTALLDIR="${INSTALLDIR}-${CHANNEL}"
+ # This would ideally be compiled into the app, but that's a bit too
+ # intrusive of a change for these limited use channels, so we'll just hack
+ # it into the wrapper script. The user can still override since it seems to
+ # work to specify --user-data-dir multiple times on the command line, with
+ # the last occurrence winning.
+ local DEFAULT_FLAGS="--user-data-dir=\"\${HOME}/.config/${PACKAGE}\""
+ local MENUNAME="${MENUNAME} (${CHANNEL})"
+ fi
+ prep_staging_debian
+ stage_install_common
+ echo "Staging Debian install files in '${STAGEDIR}'..."
+ install -m 755 -d "${STAGEDIR}/${INSTALLDIR}/cron"
+ process_template "${BUILDDIR}/installer/common/repo.cron" \
+ "${STAGEDIR}/${INSTALLDIR}/cron/${PACKAGE}"
+ chmod 755 "${STAGEDIR}/${INSTALLDIR}/cron/${PACKAGE}"
+ pushd "${STAGEDIR}/etc/cron.daily/"
+ ln -snf "${INSTALLDIR}/cron/${PACKAGE}" "${PACKAGE}"
+ popd
+ process_template "${BUILDDIR}/installer/debian/debian.menu" \
+ "${STAGEDIR}/usr/share/menu/${PACKAGE}.menu"
+ chmod 644 "${STAGEDIR}/usr/share/menu/${PACKAGE}.menu"
+ process_template "${BUILDDIR}/installer/debian/postinst" \
+ "${STAGEDIR}/DEBIAN/postinst"
+ chmod 755 "${STAGEDIR}/DEBIAN/postinst"
+ process_template "${BUILDDIR}/installer/debian/prerm" \
+ "${STAGEDIR}/DEBIAN/prerm"
+ chmod 755 "${STAGEDIR}/DEBIAN/prerm"
+ process_template "${BUILDDIR}/installer/debian/postrm" \
+ "${STAGEDIR}/DEBIAN/postrm"
+ chmod 755 "${STAGEDIR}/DEBIAN/postrm"
+}
+
+# Actually generate the package file.
+do_package() {
+ echo "Packaging ${ARCHITECTURE}..."
+ PREDEPENDS="$COMMON_PREDEPS"
+ DEPENDS="${COMMON_DEPS}"
+ # Trunk is a special package, mostly for development testing, so don't make
+ # it replace any installed release packages.
+ if [ "$CHANNEL" != "trunk" ] && [ "$CHANNEL" != "asan" ]; then
+ REPLACES="${PACKAGE}"
+ CONFLICTS="${PACKAGE}"
+ PROVIDES="${PACKAGE}, www-browser"
+ fi
+ gen_changelog
+ process_template "${SCRIPTDIR}/control.template" "${DEB_CONTROL}"
+ export DEB_HOST_ARCH="${ARCHITECTURE}"
+ if [ -f "${DEB_CONTROL}" ]; then
+ gen_control
+ fi
+ fakeroot dpkg-deb -Zlzma -b "${STAGEDIR}" .
+}
+
+# Remove temporary files and unwanted packaging output.
+cleanup() {
+ echo "Cleaning..."
+ rm -rf "${STAGEDIR}"
+ rm -rf "${TMPFILEDIR}"
+}
+
+usage() {
+ echo "usage: $(basename $0) [-c channel] [-a target_arch] [-o 'dir'] "
+ echo " [-b 'dir']"
+ echo "-c channel the package channel (trunk, asan, unstable, beta, stable)"
+ echo "-a arch package architecture (ia32 or x64)"
+ echo "-o dir package output directory [${OUTPUTDIR}]"
+ echo "-b dir build input directory [${BUILDDIR}]"
+ echo "-h this help message"
+}
+
+# Check that the channel name is one of the allowable ones.
+verify_channel() {
+ case $CHANNEL in
+ stable )
+ CHANNEL=stable
+ RELEASENOTES="http://googlechromereleases.blogspot.com/search/label/Stable%20updates"
+ ;;
+ unstable|dev|alpha )
+ CHANNEL=unstable
+ RELEASENOTES="http://googlechromereleases.blogspot.com/search/label/Dev%20updates"
+ ;;
+ testing|beta )
+ CHANNEL=beta
+ RELEASENOTES="http://googlechromereleases.blogspot.com/search/label/Beta%20updates"
+ ;;
+ trunk|asan )
+ # Setting this to empty will prevent it from updating any existing configs
+ # from release packages.
+ REPOCONFIG=""
+ RELEASENOTES="http://googlechromereleases.blogspot.com/"
+ ;;
+ * )
+ echo
+ echo "ERROR: '$CHANNEL' is not a valid channel type."
+ echo
+ exit 1
+ ;;
+ esac
+}
+
+process_opts() {
+ while getopts ":o:b:c:a:h" OPTNAME
+ do
+ case $OPTNAME in
+ o )
+ OUTPUTDIR=$(readlink -f "${OPTARG}")
+ mkdir -p "${OUTPUTDIR}"
+ ;;
+ b )
+ BUILDDIR=$(readlink -f "${OPTARG}")
+ ;;
+ c )
+ CHANNEL="$OPTARG"
+ ;;
+ a )
+ TARGETARCH="$OPTARG"
+ ;;
+ h )
+ usage
+ exit 0
+ ;;
+ \: )
+ echo "'-$OPTARG' needs an argument."
+ usage
+ exit 1
+ ;;
+ * )
+ echo "invalid command-line option: $OPTARG"
+ usage
+ exit 1
+ ;;
+ esac
+ done
+}
+
+#=========
+# MAIN
+#=========
+
+SCRIPTDIR=$(readlink -f "$(dirname "$0")")
+OUTPUTDIR="${PWD}"
+STAGEDIR=$(mktemp -d -t deb.build.XXXXXX) || exit 1
+TMPFILEDIR=$(mktemp -d -t deb.tmp.XXXXXX) || exit 1
+DEB_CHANGELOG="${TMPFILEDIR}/changelog"
+DEB_FILES="${TMPFILEDIR}/files"
+DEB_CONTROL="${TMPFILEDIR}/control"
+CHANNEL="trunk"
+# Default target architecture to same as build host.
+if [ "$(uname -m)" = "x86_64" ]; then
+ TARGETARCH="x64"
+else
+ TARGETARCH="ia32"
+fi
+
+# call cleanup() on exit
+trap cleanup 0
+process_opts "$@"
+if [ ! "$BUILDDIR" ]; then
+ BUILDDIR=$(readlink -f "${SCRIPTDIR}/../../../../../out/Release")
+fi
+
+source ${BUILDDIR}/installer/common/installer.include
+
+get_version_info
+VERSIONFULL="${VERSION}-r${REVISION}"
+
+if [ "$CHROMIUM_BUILD" = "_google_chrome" ]; then
+ source "${BUILDDIR}/installer/common/google-chrome.info"
+else
+ source "${BUILDDIR}/installer/common/chromium-browser.info"
+fi
+eval $(sed -e "s/^\([^=]\+\)=\(.*\)$/export \1='\2'/" \
+ "${BUILDDIR}/installer/theme/BRANDING")
+
+REPOCONFIG="deb http://dl.google.com/linux/${PACKAGE#google-}/deb/ stable main"
+verify_channel
+
+# Some Debian packaging tools want these set.
+export DEBFULLNAME="${MAINTNAME}"
+export DEBEMAIL="${MAINTMAIL}"
+
+# We'd like to eliminate more of these deps by relying on the 'lsb' package, but
+# that brings in tons of unnecessary stuff, like an mta and rpm. Until that full
+# 'lsb' package is installed by default on DEB distros, we'll have to stick with
+# the LSB sub-packages, to avoid pulling in all that stuff that's not installed
+# by default.
+
+# Need a dummy debian/control file for dpkg-shlibdeps.
+DUMMY_STAGING_DIR="${TMPFILEDIR}/dummy_staging"
+mkdir "$DUMMY_STAGING_DIR"
+cd "$DUMMY_STAGING_DIR"
+mkdir debian
+touch debian/control
+
+# Generate the dependencies,
+# TODO(mmoss): This is a workaround for a problem where dpkg-shlibdeps was
+# resolving deps using some of our build output shlibs (i.e.
+# out/Release/lib.target/libfreetype.so.6), and was then failing with:
+# dpkg-shlibdeps: error: no dependency information found for ...
+# It's not clear if we ever want to look in LD_LIBRARY_PATH to resolve deps,
+# but it seems that we don't currently, so this is the most expediant fix.
+SAVE_LDLP=${LD_LIBRARY_PATH:-}
+unset LD_LIBRARY_PATH
+DPKG_SHLIB_DEPS=$(dpkg-shlibdeps -O "$BUILDDIR/chrome" 2> /dev/null | \
+ sed 's/^shlibs:Depends=//')
+if [ -n "$SAVE_LDLP" ]; then
+ LD_LIBRARY_PATH=$SAVE_LDLP
+fi
+
+# Format it nicely and save it for comparison.
+# The grep -v is for a duplicate libc6 dep caused by Lucid glibc silliness.
+echo "$DPKG_SHLIB_DEPS" | sed 's/, /\n/g' | \
+ grep -v '^libc6 (>= 2.3.6-6~)$' > actual
+
+# Compare the expected dependency list to the generate list.
+BAD_DIFF=0
+diff "$SCRIPTDIR/expected_deps" actual || BAD_DIFF=1
+if [ $BAD_DIFF -ne 0 ] && [ -z "${IGNORE_DEPS_CHANGES:-}" ]; then
+ echo
+ echo "ERROR: Shared library dependencies changed!"
+ echo "If this is intentional, please update:"
+ echo "chrome/installer/linux/debian/expected_deps"
+ echo
+ exit $BAD_DIFF
+fi
+rm -rf "$DUMMY_STAGING_DIR"
+
+# Additional dependencies not in the dpkg-shlibdeps output.
+ADDITION_DEPS="ca-certificates, libcurl3, \
+ lsb-base (>=3.2), xdg-utils (>= 1.0.2), wget"
+
+# Fix-up libnspr dependency due to renaming in Ubuntu (the old package still
+# exists, but it was moved to "universe" repository, which isn't installed by
+# default).
+DPKG_SHLIB_DEPS=$(sed \
+ 's/\(libnspr4-0d ([^)]*)\), /\1 | libnspr4 (>= 4.8.7-0ubuntu1), /g' \
+ <<< $DPKG_SHLIB_DEPS)
+
+# Fix-up libudev dependency because Ubuntu 13.04 has libudev1 instead of
+# libudev0.
+DPKG_SHLIB_DEPS=$(sed 's/\(libudev0 ([^)]*)\), /\1 | libudev1 (>= 198), /g' \
+ <<< $DPKG_SHLIB_DEPS)
+
+COMMON_DEPS="${DPKG_SHLIB_DEPS}, ${ADDITION_DEPS}"
+COMMON_PREDEPS="dpkg (>= 1.14.0)"
+
+
+# Make everything happen in the OUTPUTDIR.
+cd "${OUTPUTDIR}"
+
+case "$TARGETARCH" in
+ ia32 )
+ export ARCHITECTURE="i386"
+ stage_install_debian
+ ;;
+ x64 )
+ export ARCHITECTURE="amd64"
+ stage_install_debian
+ ;;
+ * )
+ echo
+ echo "ERROR: Don't know how to build DEBs for '$TARGETARCH'."
+ echo
+ exit 1
+ ;;
+esac
+
+do_package
diff --git a/chrome/installer/linux/debian/changelog.template b/chrome/installer/linux/debian/changelog.template
new file mode 100644
index 0000000000..fa2d1dda05
--- /dev/null
+++ b/chrome/installer/linux/debian/changelog.template
@@ -0,0 +1,5 @@
+@@PACKAGE@@-@@CHANNEL@@ (@@VERSIONFULL@@) @@CHANNEL@@; urgency=low
+
+ * Build spec: http://src.chromium.org/viewvc/chrome/releases/@@VERSION@@/
+
+ -- @@MAINTNAME@@ <@@MAINTMAIL@@> Tue, 03 Feb 2009 14:54:35 -0800
diff --git a/chrome/installer/linux/debian/control.template b/chrome/installer/linux/debian/control.template
new file mode 100644
index 0000000000..9b185bb448
--- /dev/null
+++ b/chrome/installer/linux/debian/control.template
@@ -0,0 +1,16 @@
+Source: @@PACKAGE@@-@@CHANNEL@@
+Section: web
+Priority: optional
+Maintainer: @@MAINTNAME@@ <@@MAINTMAIL@@>
+Build-Depends: dpkg-dev, devscripts, fakeroot, lzma
+Standards-Version: 3.8.0
+
+Package: @@PACKAGE@@-@@CHANNEL@@
+Provides: @@PROVIDES@@
+Replaces: @@REPLACES@@
+Conflicts: @@CONFLICTS@@
+Pre-Depends: @@PREDEPENDS@@
+Depends: @@DEPENDS@@
+Architecture: @@ARCHITECTURE@@
+Description: @@SHORTDESC@@
+ @@FULLDESC@@
diff --git a/chrome/installer/linux/debian/debian.menu b/chrome/installer/linux/debian/debian.menu
new file mode 100644
index 0000000000..96a99c23d5
--- /dev/null
+++ b/chrome/installer/linux/debian/debian.menu
@@ -0,0 +1,6 @@
+?package(@@PACKAGE@@):needs="x11" \
+ section="Applications/Network/Web Browsing" \
+ hints="Web browsers" \
+ title="@@MENUNAME@@" \
+ icon="@@INSTALLDIR@@/product_logo_32.xpm" \
+ command="@@INSTALLDIR@@/@@PACKAGE@@"
diff --git a/chrome/installer/linux/debian/expected_deps b/chrome/installer/linux/debian/expected_deps
new file mode 100644
index 0000000000..6ed8890d31
--- /dev/null
+++ b/chrome/installer/linux/debian/expected_deps
@@ -0,0 +1,26 @@
+libasound2 (>> 1.0.22)
+libatk1.0-0 (>= 1.29.3)
+libc6 (>= 2.11)
+libcairo2 (>= 1.6.0)
+libcups2 (>= 1.4.0)
+libdbus-1-3 (>= 1.2.14)
+libexpat1 (>= 1.95.8)
+libfontconfig1 (>= 2.8.0)
+libfreetype6 (>= 2.3.9)
+libgcc1 (>= 1:4.1.1)
+libgconf2-4 (>= 2.27.0)
+libgcrypt11 (>= 1.4.2)
+libglib2.0-0 (>= 2.20.0)
+libgtk2.0-0 (>= 2.18.0)
+libnspr4-0d (>= 4.7.3-0ubuntu1~)
+libnss3-1d (>= 3.12.6)
+libpango1.0-0 (>= 1.22.0)
+libstdc++6 (>= 4.4.0)
+libudev0 (>= 147)
+libx11-6 (>= 0)
+libxcomposite1 (>= 1:0.3-1)
+libxdamage1 (>= 1:1.1)
+libxext6 (>= 0)
+libxfixes3 (>= 1:4.0.1)
+libxrender1
+libxss1
diff --git a/chrome/installer/linux/debian/postinst b/chrome/installer/linux/debian/postinst
new file mode 100755
index 0000000000..e35da61801
--- /dev/null
+++ b/chrome/installer/linux/debian/postinst
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+@@include@@../common/postinst.include
+
+# Add to the alternatives system
+#
+# On Ubuntu 12.04, we have the following priorities
+# (which can be obtain be installing browsers and running
+# update-alternatives --query x-www-browser):
+#
+# /usr/bin/epiphany-browser 85
+# /usr/bin/firefox 40
+# /usr/bin/konqueror 30
+#
+# While we would expect these values to be keyed off the most popular
+# browser (Firefox), in practice, we treat Epiphany as the lower bound,
+# resulting in the following scheme:
+
+CHANNEL=@@CHANNEL@@
+case $CHANNEL in
+ stable )
+ # Good enough to be the default.
+ PRIORITY=200
+ ;;
+ beta )
+ # Almost good enough to be the default. (Firefox stable should arguably be
+ # higher than this, but since that's below the "Epiphany threshold", we're
+ # not setting our priority below it. Anyone want to poke Firefox to raise
+ # their priority?)
+ PRIORITY=150
+ ;;
+ unstable )
+ # Unstable, give it the "lowest" priority.
+ PRIORITY=120
+ ;;
+ * )
+ PRIORITY=0
+ ;;
+esac
+
+update-alternatives --install /usr/bin/x-www-browser x-www-browser \
+ /usr/bin/@@PACKAGE@@ $PRIORITY
+update-alternatives --install /usr/bin/gnome-www-browser gnome-www-browser \
+ /usr/bin/@@PACKAGE@@ $PRIORITY
+
+@@include@@../common/apt.include
+
+@@include@@../common/symlinks.include
+
+remove_udev_symlinks
+add_udev_symlinks
+
+## MAIN ##
+if [ ! -e "$DEFAULTS_FILE" ]; then
+ echo 'repo_add_once="true"' > "$DEFAULTS_FILE"
+ echo 'repo_reenable_on_distupgrade="true"' >> "$DEFAULTS_FILE"
+fi
+
+# Run the cron job immediately to perform repository configuration.
+nohup sh /etc/cron.daily/@@PACKAGE@@ > /dev/null 2>&1 &
diff --git a/chrome/installer/linux/debian/postrm b/chrome/installer/linux/debian/postrm
new file mode 100755
index 0000000000..be6a95379b
--- /dev/null
+++ b/chrome/installer/linux/debian/postrm
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+action="$1"
+
+# Only do complete clean-up on purge.
+if [ "$action" != "purge" ] ; then
+ exit 0
+fi
+
+@@include@@../common/apt.include
+
+@@include@@../common/symlinks.include
+
+remove_udev_symlinks
+
+# Only remove the defaults file if it is not empty. An empty file was probably
+# put there by the sysadmin to disable automatic repository configuration, as
+# per the instructions on the package download page.
+if [ -s "$DEFAULTS_FILE" ]; then
+ # Make sure the package defaults are removed before the repository config,
+ # otherwise it could result in the repository config being removed, but the
+ # package defaults remain and are set to not recreate the repository config.
+ # In that case, future installs won't recreate it and won't get auto-updated.
+ rm "$DEFAULTS_FILE" || exit 1
+fi
+# Remove any Google repository added by the package.
+clean_sources_lists
diff --git a/chrome/installer/linux/debian/prerm b/chrome/installer/linux/debian/prerm
new file mode 100755
index 0000000000..48ccf1bb35
--- /dev/null
+++ b/chrome/installer/linux/debian/prerm
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+action="$1"
+if [ "$2" = "in-favour" ]; then
+ # Treat conflict remove as an upgrade.
+ action="upgrade"
+fi
+# Don't clean-up just for an upgrade.`
+if [ "$action" = "upgrade" ] ; then
+ exit 0
+fi
+
+@@include@@../common/prerm.include
+
+# Remove from the alternatives system
+update-alternatives --remove x-www-browser /usr/bin/@@PACKAGE@@
+update-alternatives --remove gnome-www-browser /usr/bin/@@PACKAGE@@
diff --git a/chrome/installer/linux/rpm/build.sh b/chrome/installer/linux/rpm/build.sh
new file mode 100755
index 0000000000..68a5f41291
--- /dev/null
+++ b/chrome/installer/linux/rpm/build.sh
@@ -0,0 +1,300 @@
+#!/bin/bash
+#
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# TODO(mmoss) This currently only works with official builds, since non-official
+# builds don't add the "${BUILDDIR}/installer/" files needed for packaging.
+
+set -e
+if [ "$VERBOSE" ]; then
+ set -x
+fi
+set -u
+
+gen_spec() {
+ rm -f "${SPEC}"
+ # Trunk packages need to install to a custom path so they don't conflict with
+ # release channel packages.
+ local PACKAGE_FILENAME="${PACKAGE}"
+ if [ "$CHANNEL" = "trunk" ] || [ "$CHANNEL" = "asan" ]; then
+ local INSTALLDIR="${INSTALLDIR}-${CHANNEL}"
+ PACKAGE_FILENAME="${PACKAGE}-${CHANNEL}"
+ local MENUNAME="${MENUNAME} (${CHANNEL})"
+ fi
+ process_template "${SCRIPTDIR}/chrome.spec.template" "${SPEC}"
+}
+
+# Setup the installation directory hierachy in the package staging area.
+prep_staging_rpm() {
+ prep_staging_common
+ install -m 755 -d "${STAGEDIR}/etc/cron.daily"
+}
+
+# Put the package contents in the staging area.
+stage_install_rpm() {
+ # Trunk packages need to install to a custom path and with custom filenames
+ # (e.g. not /usr/bin/google-chrome) so they don't conflict with release
+ # channel packages.
+ if [ "$CHANNEL" = "trunk" ] || [ "$CHANNEL" = "asan" ]; then
+ local PACKAGE="${PACKAGE}-${CHANNEL}"
+ local INSTALLDIR="${INSTALLDIR}-${CHANNEL}"
+ # This would ideally be compiled into the app, but that's a bit too
+ # intrusive of a change for these limited use channels, so we'll just hack
+ # it into the wrapper script. The user can still override since it seems to
+ # work to specify --user-data-dir multiple times on the command line, with
+ # the last occurrence winning.
+ local DEFAULT_FLAGS="--user-data-dir=\"\${HOME}/.config/${PACKAGE}\""
+ local MENUNAME="${MENUNAME} (${CHANNEL})"
+ fi
+ prep_staging_rpm
+ stage_install_common
+ echo "Staging RPM install files in '${STAGEDIR}'..."
+ process_template "${BUILDDIR}/installer/common/rpmrepo.cron" \
+ "${STAGEDIR}/etc/cron.daily/${PACKAGE}"
+ chmod 755 "${STAGEDIR}/etc/cron.daily/${PACKAGE}"
+}
+
+# Actually generate the package file.
+do_package() {
+ echo "Packaging ${ARCHITECTURE}..."
+ PROVIDES="${PACKAGE}"
+ local REPS="$REPLACES"
+ REPLACES=""
+ for rep in $REPS; do
+ if [ -z "$REPLACES" ]; then
+ REPLACES="$PACKAGE-$rep"
+ else
+ REPLACES="$REPLACES $PACKAGE-$rep"
+ fi
+ done
+
+ # The symbols in libX11.so are not versioned, so when a newer version has new
+ # symbols like _XGetRequest, RPM's find-requires tool does not detect it, and
+ # there is no way to specify a libX11.so version number to prevent
+ # installation on affected distros like OpenSUSE 12.1 and Fedora 16.
+ # Thus there has to be distro-specific conflict here.
+ # TODO(thestig) Remove these in the future when other requirements prevent
+ # installation on affected distros.
+ ADDITIONAL_CONFLICTS="xorg-x11-libX11 < 7.6_1 libX11 < 1.4.99"
+ REPLACES="$REPLACES $ADDITIONAL_CONFLICTS"
+
+ # If we specify a dependecy of foo.so below, we would depend on both the
+ # 32 and 64-bit versions on a 64-bit machine. The current version of RPM
+ # we use is too old and doesn't provide %{_isa}, so we do this manually.
+ if [ "$ARCHITECTURE" = "x86_64" ] ; then
+ local EMPTY_VERSION="()"
+ local PKG_ARCH="(64bit)"
+ elif [ "$ARCHITECTURE" = "i386" ] ; then
+ local EMPTY_VERSION=""
+ local PKG_ARCH=""
+ fi
+
+ # Use find-requires script to make sure the dependencies are complete
+ # (especially libc and libstdc++ versions). Filter out udev to avoid
+ # libudev.so.0 vs. libudev.so.1 mismatches.
+ DETECTED_DEPENDS="$(echo "${BUILDDIR}/chrome" | /usr/lib/rpm/find-requires |
+ grep -v udev)"
+
+ # Compare the expected dependency list to the generated list.
+ BAD_DIFF=0
+ diff "$SCRIPTDIR/expected_deps_$ARCHITECTURE" \
+ <(echo "${DETECTED_DEPENDS}") || BAD_DIFF=1
+ if [ $BAD_DIFF -ne 0 ] && [ -z "${IGNORE_DEPS_CHANGES:-}" ]; then
+ echo
+ echo "ERROR: Shared library dependencies changed!"
+ echo "If this is intentional, please update:"
+ echo "chrome/installer/linux/rpm/expected_deps_i686"
+ echo "chrome/installer/linux/rpm/expected_deps_x86_64"
+ echo
+ exit $BAD_DIFF
+ fi
+
+ # libgdk_pixbuf is added in LSB 3.2 and no longer explicitly required.
+ # libcairo, libpangocairo, libasound are in LSB 4. and no longer explicitly
+ # required.
+ # xdg-utils is still optional in LSB 4.0.
+ # nss (bundled) is optional in LSB 4.0.
+ #
+ # We want to depend on the system SSL certs so wget can upload crash reports
+ # securely, but there's no common capability between the distros. Bugs filed:
+ # https://qa.mandriva.com/show_bug.cgi?id=55714
+ # https://bugzilla.redhat.com/show_bug.cgi?id=538158
+ # https://bugzilla.novell.com/show_bug.cgi?id=556248
+ DEPENDS="lsb >= 4.0, \
+ libcurl.so.4${EMPTY_VERSION}${PKG_ARCH}, \
+ libnss3.so(NSS_3.12.3)${PKG_ARCH}, \
+ wget, \
+ xdg-utils, \
+ zlib, \
+ $(echo "${DETECTED_DEPENDS}" | tr '\n' ',')"
+ gen_spec
+
+ # Create temporary rpmbuild dirs.
+ RPMBUILD_DIR=$(mktemp -d -t rpmbuild.XXXXXX) || exit 1
+ mkdir -p "$RPMBUILD_DIR/BUILD"
+ mkdir -p "$RPMBUILD_DIR/RPMS"
+
+ # '__os_install_post ${nil}' disables a bunch of automatic post-processing
+ # (brp-compress, etc.), which by default appears to only be enabled on 32-bit,
+ # and which doesn't gain us anything since we already explicitly do all the
+ # compression, symbol stripping, etc. that we want.
+ fakeroot rpmbuild -bb --target="$ARCHITECTURE" --rmspec \
+ --define "_topdir $RPMBUILD_DIR" \
+ --define "_binary_payload w9.bzdio" \
+ --define "__os_install_post %{nil}" \
+ "${SPEC}"
+ PKGNAME="${PACKAGE}-${CHANNEL}-${VERSION}-${REVISION}"
+ mv "$RPMBUILD_DIR/RPMS/$ARCHITECTURE/${PKGNAME}.${ARCHITECTURE}.rpm" \
+ "${OUTPUTDIR}"
+ # Make sure the package is world-readable, otherwise it causes problems when
+ # copied to share drive.
+ chmod a+r "${OUTPUTDIR}/${PKGNAME}.$ARCHITECTURE.rpm"
+ rm -rf "$RPMBUILD_DIR"
+}
+
+# Remove temporary files and unwanted packaging output.
+cleanup() {
+ rm -rf "${STAGEDIR}"
+ rm -rf "${TMPFILEDIR}"
+}
+
+usage() {
+ echo "usage: $(basename $0) [-c channel] [-a target_arch] [-o 'dir']"
+ echo " [-b 'dir']"
+ echo "-c channel the package channel (trunk, asan, unstable, beta, stable)"
+ echo "-a arch package architecture (ia32 or x64)"
+ echo "-o dir package output directory [${OUTPUTDIR}]"
+ echo "-b dir build input directory [${BUILDDIR}]"
+ echo "-h this help message"
+}
+
+# Check that the channel name is one of the allowable ones.
+verify_channel() {
+ case $CHANNEL in
+ stable )
+ CHANNEL=stable
+ REPLACES="unstable beta"
+ ;;
+ unstable|dev|alpha )
+ CHANNEL=unstable
+ REPLACES="stable beta"
+ ;;
+ testing|beta )
+ CHANNEL=beta
+ REPLACES="unstable stable"
+ ;;
+ trunk|asan )
+ # This is a special package, mostly for development testing, so don't make
+ # it replace any installed release packages.
+ REPLACES="dummy"
+ # Setting this to empty will prevent it from updating any existing configs
+ # from release packages.
+ REPOCONFIG=""
+ ;;
+ * )
+ echo
+ echo "ERROR: '$CHANNEL' is not a valid channel type."
+ echo
+ exit 1
+ ;;
+ esac
+}
+
+process_opts() {
+ while getopts ":o:b:c:a:h" OPTNAME
+ do
+ case $OPTNAME in
+ o )
+ OUTPUTDIR=$(readlink -f "${OPTARG}")
+ mkdir -p "${OUTPUTDIR}"
+ ;;
+ b )
+ BUILDDIR=$(readlink -f "${OPTARG}")
+ ;;
+ c )
+ CHANNEL="$OPTARG"
+ verify_channel
+ ;;
+ a )
+ TARGETARCH="$OPTARG"
+ ;;
+ h )
+ usage
+ exit 0
+ ;;
+ \: )
+ echo "'-$OPTARG' needs an argument."
+ usage
+ exit 1
+ ;;
+ * )
+ echo "invalid command-line option: $OPTARG"
+ usage
+ exit 1
+ ;;
+ esac
+ done
+}
+
+#=========
+# MAIN
+#=========
+
+SCRIPTDIR=$(readlink -f "$(dirname "$0")")
+OUTPUTDIR="${PWD}"
+STAGEDIR=$(mktemp -d -t rpm.build.XXXXXX) || exit 1
+TMPFILEDIR=$(mktemp -d -t rpm.tmp.XXXXXX) || exit 1
+CHANNEL="trunk"
+# Default target architecture to same as build host.
+if [ "$(uname -m)" = "x86_64" ]; then
+ TARGETARCH="x64"
+else
+ TARGETARCH="ia32"
+fi
+SPEC="${TMPFILEDIR}/chrome.spec"
+
+# call cleanup() on exit
+trap cleanup 0
+process_opts "$@"
+if [ ! "$BUILDDIR" ]; then
+ BUILDDIR=$(readlink -f "${SCRIPTDIR}/../../../../../out/Release")
+fi
+
+source ${BUILDDIR}/installer/common/installer.include
+
+get_version_info
+
+if [ "$CHROMIUM_BUILD" = "_google_chrome" ]; then
+ source "${BUILDDIR}/installer/common/google-chrome.info"
+else
+ source "${BUILDDIR}/installer/common/chromium-browser.info"
+fi
+eval $(sed -e "s/^\([^=]\+\)=\(.*\)$/export \1='\2'/" \
+ "${BUILDDIR}/installer/theme/BRANDING")
+
+REPOCONFIG="http://dl.google.com/linux/${PACKAGE#google-}/rpm/stable"
+verify_channel
+
+# Make everything happen in the OUTPUTDIR.
+cd "${OUTPUTDIR}"
+
+case "$TARGETARCH" in
+ ia32 )
+ export ARCHITECTURE="i386"
+ stage_install_rpm
+ ;;
+ x64 )
+ export ARCHITECTURE="x86_64"
+ stage_install_rpm
+ ;;
+ * )
+ echo
+ echo "ERROR: Don't know how to build RPMs for '$TARGETARCH'."
+ echo
+ exit 1
+ ;;
+esac
+
+do_package
diff --git a/chrome/installer/linux/rpm/chrome.spec.template b/chrome/installer/linux/rpm/chrome.spec.template
new file mode 100644
index 0000000000..3ec7362a88
--- /dev/null
+++ b/chrome/installer/linux/rpm/chrome.spec.template
@@ -0,0 +1,204 @@
+#------------------------------------------------------------------------------
+# chrome.spec
+#------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------
+# Prologue information
+#------------------------------------------------------------------------------
+Summary : @@MENUNAME@@
+License : Multiple, see @@PRODUCTURL@@
+Name : @@PACKAGE@@-@@CHANNEL@@
+Version : @@VERSION@@
+Release : @@REVISION@@
+Group : Applications/Internet
+Vendor : @@COMPANY_FULLNAME@@
+Url : @@PRODUCTURL@@
+Packager : @@MAINTNAME@@ <@@MAINTMAIL@@>
+
+Provides : @@PROVIDES@@ = %{version}
+Requires : @@DEPENDS@@
+Autoreqprov : No
+Conflicts : @@REPLACES@@
+
+BuildRoot : %{_tmppath}/%{name}-%{version}-root
+
+# The prefix is pretty important; RPM uses this to figure out
+# how to make a package relocatable
+prefix : /opt
+
+#------------------------------------------------------------------------------
+# Description
+#------------------------------------------------------------------------------
+%Description
+@@SHORTDESC@@
+
+@@FULLDESC@@
+
+#------------------------------------------------------------------------------
+# Build rule - How to make the package
+#------------------------------------------------------------------------------
+%build
+
+#------------------------------------------------------------------------------
+# Installation rule - how to install it (note that it
+# gets installed into a temp directory given by $RPM_BUILD_ROOT)
+#------------------------------------------------------------------------------
+%install
+rm -rf "$RPM_BUILD_ROOT"
+
+if [ -z "@@STAGEDIR@@" -o ! -d "@@STAGEDIR@@" ] ; then
+ echo "@@STAGEDIR@@ appears to be incorrectly set - aborting"
+ exit 1
+fi
+
+if [ -z "@@INSTALLDIR@@" -o ! -d "@@STAGEDIR@@/@@INSTALLDIR@@" ] ; then
+ echo "@@INSTALLDIR@@ appears to be incorrectly set - aborting"
+ exit 1
+fi
+
+install -m 755 -d \
+ "$RPM_BUILD_ROOT/etc" \
+ "$RPM_BUILD_ROOT/opt" \
+ "$RPM_BUILD_ROOT/usr"
+# This is hard coded for now
+cp -a "@@STAGEDIR@@/etc/" "$RPM_BUILD_ROOT/"
+cp -a "@@STAGEDIR@@/opt/" "$RPM_BUILD_ROOT/"
+cp -a "@@STAGEDIR@@/usr/" "$RPM_BUILD_ROOT/"
+
+#------------------------------------------------------------------------------
+# Rule to clean up a build
+#------------------------------------------------------------------------------
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+#------------------------------------------------------------------------------
+# Files listing.
+#------------------------------------------------------------------------------
+%files
+%defattr(-,root,root)
+#%doc README
+
+# We cheat and just let RPM figure it out for us; everything we install
+# should go under this prefix anyways.
+@@INSTALLDIR@@
+
+# Be explicit about the files we scatter throughout the system we don't
+# accidentally "own" stuff that's not ours (crbug.com/123990).
+/etc/cron.daily/@@PACKAGE_FILENAME@@
+/usr/bin/@@PACKAGE_FILENAME@@
+/usr/share/gnome-control-center/default-apps/@@PACKAGE_FILENAME@@.xml
+%docdir /usr/share/man/man1
+/usr/share/man/man1/@@PACKAGE_FILENAME@@.1
+
+#------------------------------------------------------------------------------
+# Pre install script
+#------------------------------------------------------------------------------
+%pre
+
+exit 0
+
+
+
+
+#------------------------------------------------------------------------------
+# Post install script
+#------------------------------------------------------------------------------
+%post
+
+@@include@@../common/postinst.include
+
+@@include@@../common/rpm.include
+
+@@include@@../common/symlinks.include
+
+remove_nss_symlinks
+add_nss_symlinks
+
+remove_udev_symlinks
+add_udev_symlinks
+
+DEFAULTS_FILE="/etc/default/@@PACKAGE@@"
+if [ ! -e "$DEFAULTS_FILE" ]; then
+ echo 'repo_add_once="true"' > "$DEFAULTS_FILE"
+fi
+
+. "$DEFAULTS_FILE"
+
+if [ "$repo_add_once" = "true" ]; then
+ determine_rpm_package_manager
+
+ case $PACKAGEMANAGER in
+ "yum")
+ install_yum
+ ;;
+ "urpmi")
+ install_urpmi
+ ;;
+ "yast")
+ install_yast
+ ;;
+ esac
+fi
+
+# Some package managers have locks that prevent everything from being
+# configured at install time, so wait a bit then kick the cron job to do
+# whatever is left. Probably the db will be unlocked by then, but if not, the
+# cron job will keep retrying.
+# Do this with 'at' instead of a backgrounded shell because zypper waits on all
+# sub-shells to finish before it finishes, which is exactly the opposite of
+# what we want here. Also preemptively start atd because for some reason it's
+# not always running, which kind of defeats the purpose of having 'at' as a
+# required LSB command.
+service atd start
+echo "sh /etc/cron.daily/@@PACKAGE@@" | at now + 2 minute > /dev/null 2>&1
+exit 0
+
+
+#------------------------------------------------------------------------------
+# Pre uninstallation script
+#------------------------------------------------------------------------------
+%preun
+
+if [ "$1" -eq "0" ]; then
+ mode="uninstall"
+elif [ "$1" -eq "1" ]; then
+ mode="upgrade"
+fi
+
+@@include@@../common/rpm.include
+
+@@include@@../common/symlinks.include
+
+# Only remove menu items and symlinks on uninstall. When upgrading,
+# old_pkg's %preun runs after new_pkg's %post.
+if [ "$mode" = "uninstall" ]; then
+@@include@@../common/prerm.include
+ remove_nss_symlinks
+ remove_udev_symlinks
+fi
+
+# On Debian we only remove when we purge. However, RPM has no equivalent to
+# dpkg --purge, so this is all disabled.
+#
+#determine_rpm_package_manager
+#
+#case $PACKAGEMANAGER in
+#"yum")
+# remove_yum
+# ;;
+#"urpmi")
+# remove_urpmi
+# ;;
+#"yast")
+# remove_yast
+# ;;
+#esac
+
+exit 0
+
+#------------------------------------------------------------------------------
+# Post uninstallation script
+#------------------------------------------------------------------------------
+%postun
+
+exit 0
diff --git a/chrome/installer/linux/rpm/expected_deps_i386 b/chrome/installer/linux/rpm/expected_deps_i386
new file mode 100644
index 0000000000..969f5b7ade
--- /dev/null
+++ b/chrome/installer/linux/rpm/expected_deps_i386
@@ -0,0 +1,71 @@
+ld-linux.so.2
+ld-linux.so.2(GLIBC_2.3)
+libasound.so.2
+libatk-1.0.so.0
+libcairo.so.2
+libc.so.6
+libc.so.6(GLIBC_2.0)
+libc.so.6(GLIBC_2.1)
+libc.so.6(GLIBC_2.11)
+libc.so.6(GLIBC_2.1.2)
+libc.so.6(GLIBC_2.1.3)
+libc.so.6(GLIBC_2.2)
+libc.so.6(GLIBC_2.2.3)
+libc.so.6(GLIBC_2.3)
+libc.so.6(GLIBC_2.3.4)
+libc.so.6(GLIBC_2.4)
+libc.so.6(GLIBC_2.6)
+libc.so.6(GLIBC_2.7)
+libc.so.6(GLIBC_2.8)
+libc.so.6(GLIBC_2.9)
+libcups.so.2
+libdbus-1.so.3
+libdl.so.2
+libdl.so.2(GLIBC_2.0)
+libdl.so.2(GLIBC_2.1)
+libexpat.so.1
+libfontconfig.so.1
+libfreetype.so.6
+libgcc_s.so.1
+libgcc_s.so.1(GCC_3.0)
+libgcc_s.so.1(GCC_3.4)
+libgcc_s.so.1(GCC_4.0.0)
+libgcc_s.so.1(GLIBC_2.0)
+libgconf-2.so.4
+libgcrypt.so.11
+libgdk_pixbuf-2.0.so.0
+libgdk-x11-2.0.so.0
+libglib-2.0.so.0
+libgobject-2.0.so.0
+libgthread-2.0.so.0
+libgtk-x11-2.0.so.0
+libm.so.6
+libm.so.6(GLIBC_2.0)
+libm.so.6(GLIBC_2.1)
+libnspr4.so
+libnss3.so
+libnssutil3.so
+libpango-1.0.so.0
+libpangocairo-1.0.so.0
+libplc4.so
+libpthread.so.0
+libpthread.so.0(GLIBC_2.0)
+libpthread.so.0(GLIBC_2.1)
+libpthread.so.0(GLIBC_2.2)
+libpthread.so.0(GLIBC_2.3.2)
+libpthread.so.0(GLIBC_2.3.3)
+librt.so.1
+librt.so.1(GLIBC_2.2)
+libsmime3.so
+libstdc++.so.6
+libstdc++.so.6(GLIBCXX_3.4)
+libstdc++.so.6(GLIBCXX_3.4.10)
+libstdc++.so.6(GLIBCXX_3.4.11)
+libstdc++.so.6(GLIBCXX_3.4.9)
+libX11.so.6
+libXcomposite.so.1
+libXdamage.so.1
+libXext.so.6
+libXfixes.so.3
+libXrender.so.1
+libXss.so.1
diff --git a/chrome/installer/linux/rpm/expected_deps_x86_64 b/chrome/installer/linux/rpm/expected_deps_x86_64
new file mode 100644
index 0000000000..f5fbf30f8a
--- /dev/null
+++ b/chrome/installer/linux/rpm/expected_deps_x86_64
@@ -0,0 +1,61 @@
+ld-linux-x86-64.so.2()(64bit)
+ld-linux-x86-64.so.2(GLIBC_2.3)(64bit)
+libasound.so.2()(64bit)
+libatk-1.0.so.0()(64bit)
+libcairo.so.2()(64bit)
+libc.so.6()(64bit)
+libc.so.6(GLIBC_2.11)(64bit)
+libc.so.6(GLIBC_2.2.5)(64bit)
+libc.so.6(GLIBC_2.3.4)(64bit)
+libc.so.6(GLIBC_2.3)(64bit)
+libc.so.6(GLIBC_2.4)(64bit)
+libc.so.6(GLIBC_2.6)(64bit)
+libc.so.6(GLIBC_2.7)(64bit)
+libc.so.6(GLIBC_2.8)(64bit)
+libc.so.6(GLIBC_2.9)(64bit)
+libcups.so.2()(64bit)
+libdbus-1.so.3()(64bit)
+libdl.so.2()(64bit)
+libdl.so.2(GLIBC_2.2.5)(64bit)
+libexpat.so.1()(64bit)
+libfontconfig.so.1()(64bit)
+libfreetype.so.6()(64bit)
+libgcc_s.so.1()(64bit)
+libgcc_s.so.1(GCC_3.0)(64bit)
+libgcc_s.so.1(GCC_3.4)(64bit)
+libgcc_s.so.1(GCC_4.0.0)(64bit)
+libgconf-2.so.4()(64bit)
+libgcrypt.so.11()(64bit)
+libgdk_pixbuf-2.0.so.0()(64bit)
+libgdk-x11-2.0.so.0()(64bit)
+libglib-2.0.so.0()(64bit)
+libgobject-2.0.so.0()(64bit)
+libgthread-2.0.so.0()(64bit)
+libgtk-x11-2.0.so.0()(64bit)
+libm.so.6()(64bit)
+libm.so.6(GLIBC_2.2.5)(64bit)
+libnspr4.so()(64bit)
+libnss3.so()(64bit)
+libnssutil3.so()(64bit)
+libpango-1.0.so.0()(64bit)
+libpangocairo-1.0.so.0()(64bit)
+libplc4.so()(64bit)
+libpthread.so.0()(64bit)
+libpthread.so.0(GLIBC_2.2.5)(64bit)
+libpthread.so.0(GLIBC_2.3.2)(64bit)
+libpthread.so.0(GLIBC_2.3.3)(64bit)
+librt.so.1()(64bit)
+librt.so.1(GLIBC_2.2.5)(64bit)
+libsmime3.so()(64bit)
+libstdc++.so.6()(64bit)
+libstdc++.so.6(GLIBCXX_3.4.10)(64bit)
+libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
+libstdc++.so.6(GLIBCXX_3.4)(64bit)
+libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
+libX11.so.6()(64bit)
+libXcomposite.so.1()(64bit)
+libXdamage.so.1()(64bit)
+libXext.so.6()(64bit)
+libXfixes.so.3()(64bit)
+libXrender.so.1()(64bit)
+libXss.so.1()(64bit)
diff --git a/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py b/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py
new file mode 100755
index 0000000000..089fd66dbf
--- /dev/null
+++ b/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py
@@ -0,0 +1,119 @@
+#!/usr/bin/env python
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Script to install a Debian Wheezy sysroot for making official Google Chrome
+# Linux builds.
+# The sysroot is needed to make Chrome work for Debian Wheezy.
+# This script can be run manually but is more often run as part of gclient
+# hooks. When run from hooks this script should be a no-op on non-linux
+# platforms.
+
+# The sysroot image could be constructed from scratch based on the current
+# state or Debian Wheezy but for consistency we currently use a pre-built root
+# image. The image will normally need to be rebuilt every time chrome's build
+# dependancies are changed.
+
+import platform
+import optparse
+import os
+import re
+import shutil
+import subprocess
+import sys
+
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+URL_PREFIX = 'https://commondatastorage.googleapis.com'
+URL_PATH = 'chrome-linux-sysroot/toolchain'
+REVISION = 36982
+TARBALL_AMD64 = 'debian_wheezy_amd64_sysroot.tgz'
+TARBALL_I386 = 'debian_wheezy_i386_sysroot.tgz'
+SYSROOT_DIR_AMD64 = 'debian_wheezy_amd64-sysroot'
+SYSROOT_DIR_I386 = 'debian_wheezy_i386-sysroot'
+
+
+def main(args):
+ if options.arch not in ['amd64', 'i386']:
+ print 'Unknown architecture: %s' % options.arch
+ return 1
+
+ if options.linux_only:
+ # This argument is passed when run from the gclient hooks.
+ # In this case we return early on non-linux platforms.
+ if not sys.platform.startswith('linux'):
+ return 0
+
+ # Only install the sysroot for an Official Chrome Linux build.
+ defined = ['branding=Chrome', 'buildtype=Official']
+ undefined = ['chromeos=1']
+ gyp_defines = os.environ.get('GYP_DEFINES', '')
+ for option in defined:
+ if option not in gyp_defines:
+ return 0
+ for option in undefined:
+ if option in gyp_defines:
+ return 0
+
+ # Check for optional target_arch and only install for that architecture.
+ # If target_arch is not specified, then only install for the host
+ # architecture.
+ host_arch = ''
+ if 'target_arch=x64' in gyp_defines:
+ host_arch = 'amd64'
+ elif 'target_arch=ia32' in gyp_defines:
+ host_arch = 'i386'
+ else:
+ # Figure out host arch, like the host_arch variable in build/common.gypi.
+ machine_type = platform.machine()
+ if machine_type in ['amd64', 'x86_64']:
+ host_arch = 'amd64'
+ elif re.match('(i[3-6]86|i86pc)$', machine_type):
+ host_arch = 'i386'
+ if host_arch != options.arch:
+ return 0
+
+ # The sysroot directory should match the one specified in build/common.gypi.
+ # TODO(thestig) Consider putting this else where to avoid having to recreate
+ # it on every build.
+ linux_dir = os.path.dirname(SCRIPT_DIR)
+ if options.arch == 'amd64':
+ sysroot = os.path.join(linux_dir, SYSROOT_DIR_AMD64)
+ tarball_filename = TARBALL_AMD64
+ else:
+ sysroot = os.path.join(linux_dir, SYSROOT_DIR_I386)
+ tarball_filename = TARBALL_I386
+ url = '%s/%s/%s/%s' % (URL_PREFIX, URL_PATH, REVISION, tarball_filename)
+
+ stamp = os.path.join(sysroot, '.stamp')
+ if os.path.exists(stamp):
+ with open(stamp) as s:
+ if s.read() == url:
+ print 'Debian Wheezy %s root image already up-to-date: %s' % \
+ (options.arch, sysroot)
+ return 0
+
+ print 'Installing Debian Wheezy %s root image: %s' % (options.arch, sysroot)
+ if os.path.isdir(sysroot):
+ shutil.rmtree(sysroot)
+ os.mkdir(sysroot)
+ tarball = os.path.join(sysroot, tarball_filename)
+ subprocess.check_call(['curl', '-L', url, '-o', tarball])
+ subprocess.check_call(['tar', 'xf', tarball, '-C', sysroot])
+ os.remove(tarball)
+
+ with open(stamp, 'w') as s:
+ s.write(url)
+ return 0
+
+
+if __name__ == '__main__':
+ parser = optparse.OptionParser('usage: %prog [OPTIONS]')
+ parser.add_option('', '--linux-only', dest='linux_only', action='store_true',
+ default=False, help='Only install sysroot for official '
+ 'Linux builds')
+ parser.add_option('', '--arch', dest='arch',
+ help='Sysroot architecture, i386 or amd64')
+ options, args = parser.parse_args()
+ sys.exit(main(options))
diff --git a/chrome/installer/linux/sysroot_scripts/packagelist.debian.wheezy.amd64 b/chrome/installer/linux/sysroot_scripts/packagelist.debian.wheezy.amd64
new file mode 100644
index 0000000000..17972d9fe3
--- /dev/null
+++ b/chrome/installer/linux/sysroot_scripts/packagelist.debian.wheezy.amd64
@@ -0,0 +1,149 @@
+main/a/alsa-lib/libasound2_1.0.25-4_amd64.deb
+main/a/alsa-lib/libasound2-dev_1.0.25-4_amd64.deb
+main/a/atk1.0/libatk1.0-0_2.4.0-2_amd64.deb
+main/a/atk1.0/libatk1.0-dev_2.4.0-2_amd64.deb
+main/a/avahi/libavahi-client3_0.6.31-2_amd64.deb
+main/a/avahi/libavahi-common3_0.6.31-2_amd64.deb
+main/b/bzip2/libbz2-1.0_1.0.6-4_amd64.deb
+main/b/bzip2/libbz2-dev_1.0.6-4_amd64.deb
+main/c/cairo/libcairo2_1.12.2-3_amd64.deb
+main/c/cairo/libcairo2-dev_1.12.2-3_amd64.deb
+main/c/cairo/libcairo-gobject2_1.12.2-3_amd64.deb
+main/c/cairo/libcairo-script-interpreter2_1.12.2-3_amd64.deb
+main/c/cups/libcups2_1.5.3-5_amd64.deb
+main/c/cups/libcups2-dev_1.5.3-5_amd64.deb
+main/d/dbus-glib/libdbus-glib-1-2_0.100.2-1_amd64.deb
+main/d/dbus/libdbus-1-3_1.6.8-1_amd64.deb
+main/d/dbus/libdbus-1-dev_1.6.8-1_amd64.deb
+main/e/e2fsprogs/comerr-dev_2.1-1.42.5-1.1_amd64.deb
+main/e/e2fsprogs/libcomerr2_1.42.5-1.1_amd64.deb
+main/e/eglibc/libc6_2.13-38_amd64.deb
+main/e/eglibc/libc6-dev_2.13-38_amd64.deb
+main/e/elfutils/libelf1_0.152-1+wheezy1_amd64.deb
+main/e/elfutils/libelf-dev_0.152-1+wheezy1_amd64.deb
+main/e/expat/libexpat1_2.1.0-1_amd64.deb
+main/e/expat/libexpat1-dev_2.1.0-1_amd64.deb
+main/f/fontconfig/libfontconfig1_2.9.0-7.1_amd64.deb
+main/f/fontconfig/libfontconfig1-dev_2.9.0-7.1_amd64.deb
+main/f/freetype/libfreetype6_2.4.9-1.1_amd64.deb
+main/f/freetype/libfreetype6-dev_2.4.9-1.1_amd64.deb
+main/g/gcc-4.6/gcc-4.6_4.6.3-14_amd64.deb
+main/g/gcc-4.6/libstdc++6-4.6-dev_4.6.3-14_amd64.deb
+main/g/gcc-4.7/libgcc1_4.7.2-5_amd64.deb
+main/g/gcc-4.7/libgcc1_4.7.2-5_amd64.deb
+main/g/gcc-4.7/libgomp1_4.7.2-5_amd64.deb
+main/g/gcc-4.7/libquadmath0_4.7.2-5_amd64.deb
+main/g/gcc-4.7/libstdc++6_4.7.2-5_amd64.deb
+main/g/gconf/libgconf-2-4_3.2.5-1+build1_amd64.deb
+main/g/gconf/libgconf2-4_3.2.5-1+build1_amd64.deb
+main/g/gconf/libgconf2-dev_3.2.5-1+build1_amd64.deb
+main/g/gdk-pixbuf/libgdk-pixbuf2.0-0_2.26.1-1_amd64.deb
+main/g/gdk-pixbuf/libgdk-pixbuf2.0-dev_2.26.1-1_amd64.deb
+main/g/glib2.0/libglib2.0-0_2.33.12+really2.32.4-5_amd64.deb
+main/g/glib2.0/libglib2.0-dev_2.33.12+really2.32.4-5_amd64.deb
+main/g/gnutls26/libgnutls26_2.12.20-6_amd64.deb
+main/g/gnutls26/libgnutls-dev_2.12.20-6_amd64.deb
+main/g/gnutls26/libgnutls-openssl27_2.12.20-6_amd64.deb
+main/g/gnutls26/libgnutlsxx27_2.12.20-6_amd64.deb
+main/g/gtk+2.0/libgtk2.0-0_2.24.10-2_amd64.deb
+main/g/gtk+2.0/libgtk2.0-dev_2.24.10-2_amd64.deb
+main/k/keyutils/libkeyutils1_1.5.5-3_amd64.deb
+main/k/krb5/krb5-multidev_1.10.1+dfsg-5_amd64.deb
+main/k/krb5/libgssapi-krb5-2_1.10.1+dfsg-5_amd64.deb
+main/k/krb5/libgssrpc4_1.10.1+dfsg-5_amd64.deb
+main/k/krb5/libk5crypto3_1.10.1+dfsg-5_amd64.deb
+main/k/krb5/libkadm5clnt-mit8_1.10.1+dfsg-5_amd64.deb
+main/k/krb5/libkadm5srv-mit8_1.10.1+dfsg-5_amd64.deb
+main/k/krb5/libkdb5-6_1.10.1+dfsg-5_amd64.deb
+main/k/krb5/libkrb5-3_1.10.1+dfsg-5_amd64.deb
+main/k/krb5/libkrb5-dev_1.10.1+dfsg-5_amd64.deb
+main/k/krb5/libkrb5support0_1.10.1+dfsg-5_amd64.deb
+main/libf/libffi/libffi5_3.0.10-3_amd64.deb
+main/libg/libgcrypt11/libgcrypt11_1.5.0-5_amd64.deb
+main/libg/libgcrypt11/libgcrypt11-dev_1.5.0-5_amd64.deb
+main/libg/libgnome-keyring/libgnome-keyring0_3.4.1-1_amd64.deb
+main/libg/libgnome-keyring/libgnome-keyring-dev_3.4.1-1_amd64.deb
+main/libg/libgpg-error/libgpg-error0_1.10-3.1_amd64.deb
+main/libg/libgpg-error/libgpg-error-dev_1.10-3.1_amd64.deb
+main/libn/libnss-db/libnss-db_2.2.3pre1-4_amd64.deb
+main/libp/libp11/libp11-2_0.2.8-2_amd64.deb
+main/libp/libpng/libpng12-0_1.2.49-1_amd64.deb
+main/libp/libpng/libpng12-dev_1.2.49-1_amd64.deb
+main/libs/libselinux/libselinux1_2.1.9-5_amd64.deb
+main/libt/libtasn1-3/libtasn1-3_2.13-2_amd64.deb
+main/libx/libx11/libx11-6_1.5.0-1_amd64.deb
+main/libx/libx11/libx11-dev_1.5.0-1_amd64.deb
+main/libx/libxau/libxau6_1.0.7-1_amd64.deb
+main/libx/libxau/libxau-dev_1.0.7-1_amd64.deb
+main/libx/libxcb/libxcb1_1.8.1-2_amd64.deb
+main/libx/libxcb/libxcb1-dev_1.8.1-2_amd64.deb
+main/libx/libxcb/libxcb-render0_1.8.1-2_amd64.deb
+main/libx/libxcb/libxcb-render0-dev_1.8.1-2_amd64.deb
+main/libx/libxcb/libxcb-shm0_1.8.1-2_amd64.deb
+main/libx/libxcb/libxcb-shm0-dev_1.8.1-2_amd64.deb
+main/libx/libxcomposite/libxcomposite1_0.4.3-2_amd64.deb
+main/libx/libxcomposite/libxcomposite-dev_0.4.3-2_amd64.deb
+main/libx/libxcursor/libxcursor1_1.1.13-1_amd64.deb
+main/libx/libxcursor/libxcursor-dev_1.1.13-1_amd64.deb
+main/libx/libxdamage/libxdamage1_1.1.3-2_amd64.deb
+main/libx/libxdamage/libxdamage-dev_1.1.3-2_amd64.deb
+main/libx/libxdmcp/libxdmcp6_1.1.1-1_amd64.deb
+main/libx/libxext/libxext6_1.3.1-2_amd64.deb
+main/libx/libxext/libxext-dev_1.3.1-2_amd64.deb
+main/libx/libxfixes/libxfixes3_5.0-4_amd64.deb
+main/libx/libxfixes/libxfixes-dev_5.0-4_amd64.deb
+main/libx/libxi/libxi6_1.6.1-1_amd64.deb
+main/libx/libxi/libxi-dev_1.6.1-1_amd64.deb
+main/libx/libxinerama/libxinerama1_1.1.2-1_amd64.deb
+main/libx/libxinerama/libxinerama-dev_1.1.2-1_amd64.deb
+main/libx/libxrandr/libxrandr2_1.3.2-2_amd64.deb
+main/libx/libxrandr/libxrandr-dev_1.3.2-2_amd64.deb
+main/libx/libxrender/libxrender1_0.9.7-1_amd64.deb
+main/libx/libxrender/libxrender-dev_0.9.7-1_amd64.deb
+main/libx/libxss/libxss1_1.2.2-1_amd64.deb
+main/libx/libxss/libxss-dev_1.2.2-1_amd64.deb
+main/libx/libxt/libxt6_1.1.3-1_amd64.deb
+main/libx/libxt/libxt-dev_1.1.3-1_amd64.deb
+main/libx/libxtst/libxtst6_1.2.1-1_amd64.deb
+main/libx/libxtst/libxtst-dev_1.2.1-1_amd64.deb
+main/l/linux/linux-libc-dev_3.2.41-2_amd64.deb
+main/n/nspr/libnspr4_4.9.2-1_amd64.deb
+main/n/nspr/libnspr4-dev_4.9.2-1_amd64.deb
+main/n/nss/libnss3_3.14.3-1_amd64.deb
+main/n/nss/libnss3-dev_3.14.3-1_amd64.deb
+main/o/openssl/libssl1.0.0_1.0.1e-2_amd64.deb
+main/o/openssl/libssl-dev_1.0.1e-2_amd64.deb
+main/o/orbit2/liborbit2_2.14.19-0.1_amd64.deb
+main/p/p11-kit/libp11-kit0_0.12-3_amd64.deb
+main/p/pam/libpam0g_1.1.3-7.1_amd64.deb
+main/p/pam/libpam0g-dev_1.1.3-7.1_amd64.deb
+main/p/pango1.0/libpango1.0-0_1.30.0-1_amd64.deb
+main/p/pango1.0/libpango1.0-dev_1.30.0-1_amd64.deb
+main/p/pciutils/libpci3_3.1.9-6_amd64.deb
+main/p/pciutils/libpci-dev_3.1.9-6_amd64.deb
+main/p/pcre3/libpcre3_8.30-5_amd64.deb
+main/p/pcre3/libpcre3-dev_8.30-5_amd64.deb
+main/p/pcre3/libpcrecpp0_8.30-5_amd64.deb
+main/p/pixman/libpixman-1-0_0.26.0-4_amd64.deb
+main/p/pixman/libpixman-1-dev_0.26.0-4_amd64.deb
+main/p/pulseaudio/libpulse0_2.0-6.1_amd64.deb
+main/p/pulseaudio/libpulse-dev_2.0-6.1_amd64.deb
+main/p/pulseaudio/libpulse-mainloop-glib0_2.0-6.1_amd64.deb
+main/s/speech-dispatcher/libspeechd2_0.7.1-6.2_amd64.deb
+main/s/speech-dispatcher/libspeechd-dev_0.7.1-6.2_amd64.deb
+main/s/speech-dispatcher/speech-dispatcher_0.7.1-6.2_amd64.deb
+main/u/udev/libudev0_175-7.2_amd64.deb
+main/u/udev/libudev-dev_175-7.2_amd64.deb
+main/x/x11proto-composite/x11proto-composite-dev_0.4.2-2_all.deb
+main/x/x11proto-core/x11proto-core-dev_7.0.23-1_all.deb
+main/x/x11proto-damage/x11proto-damage-dev_1.2.1-2_all.deb
+main/x/x11proto-fixes/x11proto-fixes-dev_5.0-2_all.deb
+main/x/x11proto-input/x11proto-input-dev_2.2-1_all.deb
+main/x/x11proto-kb/x11proto-kb-dev_1.0.6-2_all.deb
+main/x/x11proto-randr/x11proto-randr-dev_1.3.2-2_all.deb
+main/x/x11proto-record/x11proto-record-dev_1.14.2-1_all.deb
+main/x/x11proto-render/x11proto-render-dev_0.11.1-2_all.deb
+main/x/x11proto-scrnsaver/x11proto-scrnsaver-dev_1.2.2-1_all.deb
+main/x/x11proto-xext/x11proto-xext-dev_7.2.1-1_all.deb
+main/z/zlib/zlib1g_1.2.7.dfsg-13_amd64.deb
+main/z/zlib/zlib1g-dev_1.2.7.dfsg-13_amd64.deb
diff --git a/chrome/installer/linux/sysroot_scripts/packagelist.debian.wheezy.i386 b/chrome/installer/linux/sysroot_scripts/packagelist.debian.wheezy.i386
new file mode 100644
index 0000000000..91c3259617
--- /dev/null
+++ b/chrome/installer/linux/sysroot_scripts/packagelist.debian.wheezy.i386
@@ -0,0 +1,149 @@
+main/a/alsa-lib/libasound2_1.0.25-4_i386.deb
+main/a/alsa-lib/libasound2-dev_1.0.25-4_i386.deb
+main/a/atk1.0/libatk1.0-0_2.4.0-2_i386.deb
+main/a/atk1.0/libatk1.0-dev_2.4.0-2_i386.deb
+main/a/avahi/libavahi-client3_0.6.31-2_i386.deb
+main/a/avahi/libavahi-common3_0.6.31-2_i386.deb
+main/b/bzip2/libbz2-1.0_1.0.6-4_i386.deb
+main/b/bzip2/libbz2-dev_1.0.6-4_i386.deb
+main/c/cairo/libcairo2_1.12.2-3_i386.deb
+main/c/cairo/libcairo2-dev_1.12.2-3_i386.deb
+main/c/cairo/libcairo-gobject2_1.12.2-3_i386.deb
+main/c/cairo/libcairo-script-interpreter2_1.12.2-3_i386.deb
+main/c/cups/libcups2_1.5.3-5_i386.deb
+main/c/cups/libcups2-dev_1.5.3-5_i386.deb
+main/d/dbus-glib/libdbus-glib-1-2_0.100.2-1_i386.deb
+main/d/dbus/libdbus-1-3_1.6.8-1_i386.deb
+main/d/dbus/libdbus-1-dev_1.6.8-1_i386.deb
+main/e/e2fsprogs/comerr-dev_2.1-1.42.5-1.1_i386.deb
+main/e/e2fsprogs/libcomerr2_1.42.5-1.1_i386.deb
+main/e/eglibc/libc6_2.13-38_i386.deb
+main/e/eglibc/libc6-dev_2.13-38_i386.deb
+main/e/elfutils/libelf1_0.152-1+wheezy1_i386.deb
+main/e/elfutils/libelf-dev_0.152-1+wheezy1_i386.deb
+main/e/expat/libexpat1_2.1.0-1_i386.deb
+main/e/expat/libexpat1-dev_2.1.0-1_i386.deb
+main/f/fontconfig/libfontconfig1_2.9.0-7.1_i386.deb
+main/f/fontconfig/libfontconfig1-dev_2.9.0-7.1_i386.deb
+main/f/freetype/libfreetype6_2.4.9-1.1_i386.deb
+main/f/freetype/libfreetype6-dev_2.4.9-1.1_i386.deb
+main/g/gcc-4.6/gcc-4.6_4.6.3-14_i386.deb
+main/g/gcc-4.6/libstdc++6-4.6-dev_4.6.3-14_i386.deb
+main/g/gcc-4.7/libgcc1_4.7.2-5_i386.deb
+main/g/gcc-4.7/libgcc1_4.7.2-5_i386.deb
+main/g/gcc-4.7/libgomp1_4.7.2-5_i386.deb
+main/g/gcc-4.7/libquadmath0_4.7.2-5_i386.deb
+main/g/gcc-4.7/libstdc++6_4.7.2-5_i386.deb
+main/g/gconf/libgconf-2-4_3.2.5-1+build1_i386.deb
+main/g/gconf/libgconf2-4_3.2.5-1+build1_i386.deb
+main/g/gconf/libgconf2-dev_3.2.5-1+build1_i386.deb
+main/g/gdk-pixbuf/libgdk-pixbuf2.0-0_2.26.1-1_i386.deb
+main/g/gdk-pixbuf/libgdk-pixbuf2.0-dev_2.26.1-1_i386.deb
+main/g/glib2.0/libglib2.0-0_2.33.12+really2.32.4-5_i386.deb
+main/g/glib2.0/libglib2.0-dev_2.33.12+really2.32.4-5_i386.deb
+main/g/gnutls26/libgnutls26_2.12.20-6_i386.deb
+main/g/gnutls26/libgnutls-dev_2.12.20-6_i386.deb
+main/g/gnutls26/libgnutls-openssl27_2.12.20-6_i386.deb
+main/g/gnutls26/libgnutlsxx27_2.12.20-6_i386.deb
+main/g/gtk+2.0/libgtk2.0-0_2.24.10-2_i386.deb
+main/g/gtk+2.0/libgtk2.0-dev_2.24.10-2_i386.deb
+main/k/keyutils/libkeyutils1_1.5.5-3_i386.deb
+main/k/krb5/krb5-multidev_1.10.1+dfsg-5_i386.deb
+main/k/krb5/libgssapi-krb5-2_1.10.1+dfsg-5_i386.deb
+main/k/krb5/libgssrpc4_1.10.1+dfsg-5_i386.deb
+main/k/krb5/libk5crypto3_1.10.1+dfsg-5_i386.deb
+main/k/krb5/libkadm5clnt-mit8_1.10.1+dfsg-5_i386.deb
+main/k/krb5/libkadm5srv-mit8_1.10.1+dfsg-5_i386.deb
+main/k/krb5/libkdb5-6_1.10.1+dfsg-5_i386.deb
+main/k/krb5/libkrb5-3_1.10.1+dfsg-5_i386.deb
+main/k/krb5/libkrb5-dev_1.10.1+dfsg-5_i386.deb
+main/k/krb5/libkrb5support0_1.10.1+dfsg-5_i386.deb
+main/libf/libffi/libffi5_3.0.10-3_i386.deb
+main/libg/libgcrypt11/libgcrypt11_1.5.0-5_i386.deb
+main/libg/libgcrypt11/libgcrypt11-dev_1.5.0-5_i386.deb
+main/libg/libgnome-keyring/libgnome-keyring0_3.4.1-1_i386.deb
+main/libg/libgnome-keyring/libgnome-keyring-dev_3.4.1-1_i386.deb
+main/libg/libgpg-error/libgpg-error0_1.10-3.1_i386.deb
+main/libg/libgpg-error/libgpg-error-dev_1.10-3.1_i386.deb
+main/libn/libnss-db/libnss-db_2.2.3pre1-4_i386.deb
+main/libp/libp11/libp11-2_0.2.8-2_i386.deb
+main/libp/libpng/libpng12-0_1.2.49-1_i386.deb
+main/libp/libpng/libpng12-dev_1.2.49-1_i386.deb
+main/libs/libselinux/libselinux1_2.1.9-5_i386.deb
+main/libt/libtasn1-3/libtasn1-3_2.13-2_i386.deb
+main/libx/libx11/libx11-6_1.5.0-1_i386.deb
+main/libx/libx11/libx11-dev_1.5.0-1_i386.deb
+main/libx/libxau/libxau6_1.0.7-1_i386.deb
+main/libx/libxau/libxau-dev_1.0.7-1_i386.deb
+main/libx/libxcb/libxcb1_1.8.1-2_i386.deb
+main/libx/libxcb/libxcb1-dev_1.8.1-2_i386.deb
+main/libx/libxcb/libxcb-render0_1.8.1-2_i386.deb
+main/libx/libxcb/libxcb-render0-dev_1.8.1-2_i386.deb
+main/libx/libxcb/libxcb-shm0_1.8.1-2_i386.deb
+main/libx/libxcb/libxcb-shm0-dev_1.8.1-2_i386.deb
+main/libx/libxcomposite/libxcomposite1_0.4.3-2_i386.deb
+main/libx/libxcomposite/libxcomposite-dev_0.4.3-2_i386.deb
+main/libx/libxcursor/libxcursor1_1.1.13-1_i386.deb
+main/libx/libxcursor/libxcursor-dev_1.1.13-1_i386.deb
+main/libx/libxdamage/libxdamage1_1.1.3-2_i386.deb
+main/libx/libxdamage/libxdamage-dev_1.1.3-2_i386.deb
+main/libx/libxdmcp/libxdmcp6_1.1.1-1_i386.deb
+main/libx/libxext/libxext6_1.3.1-2_i386.deb
+main/libx/libxext/libxext-dev_1.3.1-2_i386.deb
+main/libx/libxfixes/libxfixes3_5.0-4_i386.deb
+main/libx/libxfixes/libxfixes-dev_5.0-4_i386.deb
+main/libx/libxi/libxi6_1.6.1-1_i386.deb
+main/libx/libxi/libxi-dev_1.6.1-1_i386.deb
+main/libx/libxinerama/libxinerama1_1.1.2-1_i386.deb
+main/libx/libxinerama/libxinerama-dev_1.1.2-1_i386.deb
+main/libx/libxrandr/libxrandr2_1.3.2-2_i386.deb
+main/libx/libxrandr/libxrandr-dev_1.3.2-2_i386.deb
+main/libx/libxrender/libxrender1_0.9.7-1_i386.deb
+main/libx/libxrender/libxrender-dev_0.9.7-1_i386.deb
+main/libx/libxss/libxss1_1.2.2-1_i386.deb
+main/libx/libxss/libxss-dev_1.2.2-1_i386.deb
+main/libx/libxt/libxt6_1.1.3-1_i386.deb
+main/libx/libxt/libxt-dev_1.1.3-1_i386.deb
+main/libx/libxtst/libxtst6_1.2.1-1_i386.deb
+main/libx/libxtst/libxtst-dev_1.2.1-1_i386.deb
+main/l/linux/linux-libc-dev_3.2.41-2_i386.deb
+main/n/nspr/libnspr4_4.9.2-1_i386.deb
+main/n/nspr/libnspr4-dev_4.9.2-1_i386.deb
+main/n/nss/libnss3_3.14.3-1_i386.deb
+main/n/nss/libnss3-dev_3.14.3-1_i386.deb
+main/o/openssl/libssl1.0.0_1.0.1e-2_i386.deb
+main/o/openssl/libssl-dev_1.0.1e-2_i386.deb
+main/o/orbit2/liborbit2_2.14.19-0.1_i386.deb
+main/p/p11-kit/libp11-kit0_0.12-3_i386.deb
+main/p/pam/libpam0g_1.1.3-7.1_i386.deb
+main/p/pam/libpam0g-dev_1.1.3-7.1_i386.deb
+main/p/pango1.0/libpango1.0-0_1.30.0-1_i386.deb
+main/p/pango1.0/libpango1.0-dev_1.30.0-1_i386.deb
+main/p/pciutils/libpci3_3.1.9-6_i386.deb
+main/p/pciutils/libpci-dev_3.1.9-6_i386.deb
+main/p/pcre3/libpcre3_8.30-5_i386.deb
+main/p/pcre3/libpcre3-dev_8.30-5_i386.deb
+main/p/pcre3/libpcrecpp0_8.30-5_i386.deb
+main/p/pixman/libpixman-1-0_0.26.0-4_i386.deb
+main/p/pixman/libpixman-1-dev_0.26.0-4_i386.deb
+main/p/pulseaudio/libpulse0_2.0-6.1_i386.deb
+main/p/pulseaudio/libpulse-dev_2.0-6.1_i386.deb
+main/p/pulseaudio/libpulse-mainloop-glib0_2.0-6.1_i386.deb
+main/s/speech-dispatcher/libspeechd2_0.7.1-6.2_i386.deb
+main/s/speech-dispatcher/libspeechd-dev_0.7.1-6.2_i386.deb
+main/s/speech-dispatcher/speech-dispatcher_0.7.1-6.2_i386.deb
+main/u/udev/libudev0_175-7.2_i386.deb
+main/u/udev/libudev-dev_175-7.2_i386.deb
+main/x/x11proto-composite/x11proto-composite-dev_0.4.2-2_all.deb
+main/x/x11proto-core/x11proto-core-dev_7.0.23-1_all.deb
+main/x/x11proto-damage/x11proto-damage-dev_1.2.1-2_all.deb
+main/x/x11proto-fixes/x11proto-fixes-dev_5.0-2_all.deb
+main/x/x11proto-input/x11proto-input-dev_2.2-1_all.deb
+main/x/x11proto-kb/x11proto-kb-dev_1.0.6-2_all.deb
+main/x/x11proto-randr/x11proto-randr-dev_1.3.2-2_all.deb
+main/x/x11proto-record/x11proto-record-dev_1.14.2-1_all.deb
+main/x/x11proto-render/x11proto-render-dev_0.11.1-2_all.deb
+main/x/x11proto-scrnsaver/x11proto-scrnsaver-dev_1.2.2-1_all.deb
+main/x/x11proto-xext/x11proto-xext-dev_7.2.1-1_all.deb
+main/z/zlib/zlib1g_1.2.7.dfsg-13_i386.deb
+main/z/zlib/zlib1g-dev_1.2.7.dfsg-13_i386.deb
diff --git a/chrome/installer/linux/sysroot_scripts/sysroot-creator-debian.wheezy.sh b/chrome/installer/linux/sysroot_scripts/sysroot-creator-debian.wheezy.sh
new file mode 100755
index 0000000000..31caefa41b
--- /dev/null
+++ b/chrome/installer/linux/sysroot_scripts/sysroot-creator-debian.wheezy.sh
@@ -0,0 +1,517 @@
+#!/bin/sh
+#
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+#@ This script builds a Debian Wheezy sysroot for building Google Chrome.
+#@
+#@ Generally this script is invoked as:
+#@ sysroot-creator-debian.wheezy.sh <mode> <args>*
+#@ Available modes are shown below.
+#@
+#@ List of modes:
+
+######################################################################
+# Config
+######################################################################
+
+set -o nounset
+set -o errexit
+
+readonly SCRIPT_DIR=$(dirname $0)
+
+# This is where the staging sysroot is.
+readonly INSTALL_ROOT_AMD64=$(pwd)/debian_wheezy_amd64_staging
+readonly INSTALL_ROOT_I386=$(pwd)/debian_wheezy_i386_staging
+
+readonly REQUIRED_TOOLS="wget"
+
+######################################################################
+# Package Config
+######################################################################
+
+# this is where we get all the debian packages from
+readonly DEBIAN_REPO=http://http.us.debian.org/debian
+
+readonly PACKAGE_LIST_AMD64="${DEBIAN_REPO}/dists/wheezy/main/binary-amd64/Packages.bz2"
+readonly PACKAGE_LIST_I386="${DEBIAN_REPO}/dists/wheezy/main/binary-i386/Packages.bz2"
+
+# TODO(thestig) Remove unused libbz2 packages in the next sysroot update.
+# Sysroot packages: these are the packages needed to build chrome.
+# NOTE: When DEBIAN_PACKAGES is modified, the packagelist files must be updated
+# by running this script in GeneratePackageList mode.
+readonly DEBIAN_PACKAGES="\
+ comerr-dev \
+ gcc-4.6 \
+ krb5-multidev \
+ libasound2 \
+ libasound2-dev \
+ libatk1.0-0 \
+ libatk1.0-dev \
+ libavahi-client3 \
+ libavahi-common3 \
+ libbz2-1.0 \
+ libbz2-dev \
+ libc6 \
+ libc6-dev \
+ libcairo2 \
+ libcairo2-dev \
+ libcairo-gobject2 \
+ libcairo-script-interpreter2 \
+ libcomerr2 \
+ libcups2 \
+ libcups2-dev \
+ libdbus-1-3 \
+ libdbus-1-dev \
+ libdbus-glib-1-2 \
+ libelf1 \
+ libelf-dev \
+ libexpat1 \
+ libexpat1-dev \
+ libffi5 \
+ libfontconfig1 \
+ libfontconfig1-dev \
+ libfreetype6 \
+ libfreetype6-dev \
+ libgcc1 \
+ libgcc1 \
+ libgconf-2-4 \
+ libgconf2-4 \
+ libgconf2-dev \
+ libgcrypt11 \
+ libgcrypt11-dev \
+ libgdk-pixbuf2.0-0 \
+ libgdk-pixbuf2.0-dev \
+ libglib2.0-0 \
+ libglib2.0-dev \
+ libgnome-keyring0 \
+ libgnome-keyring-dev \
+ libgnutls26 \
+ libgnutls-dev \
+ libgnutls-openssl27 \
+ libgnutlsxx27 \
+ libgomp1 \
+ libgpg-error0 \
+ libgpg-error-dev \
+ libgssapi-krb5-2 \
+ libgssrpc4 \
+ libgtk2.0-0 \
+ libgtk2.0-dev \
+ libk5crypto3 \
+ libkadm5clnt-mit8 \
+ libkadm5srv-mit8 \
+ libkdb5-6 \
+ libkeyutils1 \
+ libkrb5-3 \
+ libkrb5-dev \
+ libkrb5support0 \
+ libnspr4 \
+ libnspr4-dev \
+ libnss3 \
+ libnss3-dev \
+ libnss-db \
+ liborbit2 \
+ libp11-2 \
+ libp11-kit0 \
+ libpam0g \
+ libpam0g-dev \
+ libpango1.0-0 \
+ libpango1.0-dev \
+ libpci3 \
+ libpci-dev \
+ libpcre3 \
+ libpcre3-dev \
+ libpcrecpp0 \
+ libpixman-1-0 \
+ libpixman-1-dev \
+ libpng12-0 \
+ libpng12-dev \
+ libpulse0 \
+ libpulse-dev \
+ libpulse-mainloop-glib0 \
+ libquadmath0 \
+ libselinux1 \
+ libspeechd2 \
+ libspeechd-dev \
+ libssl1.0.0 \
+ libssl-dev \
+ libstdc++6 \
+ libstdc++6-4.6-dev \
+ libtasn1-3 \
+ libudev0 \
+ libudev-dev \
+ libx11-6 \
+ libx11-dev \
+ libxau6 \
+ libxau-dev \
+ libxcb1 \
+ libxcb1-dev \
+ libxcb-render0 \
+ libxcb-render0-dev \
+ libxcb-shm0 \
+ libxcb-shm0-dev \
+ libxcomposite1 \
+ libxcomposite-dev \
+ libxcursor1 \
+ libxcursor-dev \
+ libxdamage1 \
+ libxdamage-dev \
+ libxdmcp6 \
+ libxext6 \
+ libxext-dev \
+ libxfixes3 \
+ libxfixes-dev \
+ libxi6 \
+ libxi-dev \
+ libxinerama1 \
+ libxinerama-dev \
+ libxrandr2 \
+ libxrandr-dev \
+ libxrender1 \
+ libxrender-dev \
+ libxss1 \
+ libxss-dev \
+ libxt6 \
+ libxt-dev \
+ libxtst6 \
+ libxtst-dev \
+ linux-libc-dev \
+ speech-dispatcher \
+ x11proto-composite-dev \
+ x11proto-core-dev \
+ x11proto-damage-dev \
+ x11proto-fixes-dev \
+ x11proto-input-dev \
+ x11proto-kb-dev \
+ x11proto-randr-dev \
+ x11proto-record-dev \
+ x11proto-render-dev \
+ x11proto-scrnsaver-dev \
+ x11proto-xext-dev \
+ zlib1g \
+ zlib1g-dev"
+
+readonly DEBIAN_DEP_LIST_AMD64="${SCRIPT_DIR}/packagelist.debian.wheezy.amd64"
+readonly DEBIAN_DEP_LIST_I386="${SCRIPT_DIR}/packagelist.debian.wheezy.i386"
+readonly DEBIAN_DEP_FILES_AMD64="$(cat ${DEBIAN_DEP_LIST_AMD64})"
+readonly DEBIAN_DEP_FILES_I386="$(cat ${DEBIAN_DEP_LIST_I386})"
+
+######################################################################
+# Helper
+######################################################################
+
+Banner() {
+ echo "######################################################################"
+ echo $*
+ echo "######################################################################"
+}
+
+
+SubBanner() {
+ echo "......................................................................"
+ echo $*
+ echo "......................................................................"
+}
+
+
+Usage() {
+ egrep "^#@" "$0" | cut --bytes=3-
+}
+
+
+DownloadOrCopy() {
+ if [ -f "$2" ] ; then
+ echo "$2 already in place"
+ return
+ fi
+
+ HTTP=0
+ echo "$1" | grep -qs ^http:// && HTTP=1
+ if [ "$HTTP" = "1" ]; then
+ SubBanner "downloading from $1 -> $2"
+ wget "$1" -O "$2"
+ else
+ SubBanner "copying from $1"
+ cp "$1" "$2"
+ fi
+}
+
+
+SetEnvironmentVariables() {
+ ARCH=""
+ echo $1 | grep -qs Amd64$ && ARCH=AMD64
+ if [ -z "$ARCH" ]; then
+ echo $1 | grep -qs I386$ && ARCH=I386
+ fi
+ case "$ARCH" in
+ AMD64)
+ INSTALL_ROOT="$INSTALL_ROOT_AMD64";
+ ;;
+ I386)
+ INSTALL_ROOT="$INSTALL_ROOT_I386";
+ ;;
+ *)
+ echo "ERROR: Unexpected bad architecture."
+ exit 1
+ ;;
+ esac
+}
+
+Cleanup() {
+ rm -rf "$TMP"
+}
+
+# some sanity checks to make sure this script is run from the right place
+# with the right tools
+SanityCheck() {
+ Banner "Sanity Checks"
+
+ if [ "$(basename $(pwd))" != "sysroot_scripts" ] ; then
+ echo -n "ERROR: run this script from "
+ echo "src/chrome/installer/linux/sysroot_scripts"
+ exit 1
+ fi
+
+ if ! mkdir -p "${INSTALL_ROOT}" ; then
+ echo "ERROR: ${INSTALL_ROOT} can't be created."
+ exit 1
+ fi
+
+ TMP=$(mktemp -q -t -d debian-wheezy-XXXXXX)
+ if [ -z "$TMP" ]; then
+ echo "ERROR: temp dir can't be created."
+ exit 1
+ fi
+ trap Cleanup 0
+
+ for tool in ${REQUIRED_TOOLS} ; do
+ if ! which ${tool} ; then
+ echo "Required binary $tool not found."
+ echo "Exiting."
+ exit 1
+ fi
+ done
+}
+
+
+ChangeDirectory() {
+ # Change directory to where this script is.
+ cd $(dirname "$0")
+}
+
+
+ClearInstallDir() {
+ Banner "clearing dirs in ${INSTALL_ROOT}"
+ rm -rf ${INSTALL_ROOT}/*
+}
+
+
+CreateTarBall() {
+ local tarball=$1
+ Banner "creating tar ball ${tarball}"
+ tar zcf ${tarball} -C ${INSTALL_ROOT} .
+}
+
+######################################################################
+#
+######################################################################
+
+HacksAndPatchesAmd64() {
+ Banner "Misc Hacks & Patches"
+ # these are linker scripts with absolute pathnames in them
+ # which we rewrite here
+ lscripts="${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libpthread.so \
+ ${INSTALL_ROOT}/usr/lib/x86_64-linux-gnu/libc.so"
+
+ #SubBanner "Rewriting Linker Scripts"
+ sed -i -e 's|/usr/lib/x86_64-linux-gnu/||g' ${lscripts}
+ sed -i -e 's|/lib/x86_64-linux-gnu/||g' ${lscripts}
+
+ # This is for chrome's ./build/linux/pkg-config-wrapper
+ # which overwrites PKG_CONFIG_PATH internally
+ SubBanner "Package Configs Symlink"
+ mkdir -p ${INSTALL_ROOT}/usr/share
+ ln -s ../lib/x86_64-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/share/pkgconfig
+
+ SubBanner "Adding an additional ld.conf include"
+ LD_SO_HACK_CONF="${INSTALL_ROOT}/etc/ld.so.conf.d/zz_hack.conf"
+ echo /usr/lib/gcc/x86_64-linux-gnu/4.6 > "$LD_SO_HACK_CONF"
+ echo /usr/lib >> "$LD_SO_HACK_CONF"
+}
+
+
+HacksAndPatchesI386() {
+ Banner "Misc Hacks & Patches"
+ # these are linker scripts with absolute pathnames in them
+ # which we rewrite here
+ lscripts="${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libpthread.so \
+ ${INSTALL_ROOT}/usr/lib/i386-linux-gnu/libc.so"
+
+ #SubBanner "Rewriting Linker Scripts"
+ sed -i -e 's|/usr/lib/i386-linux-gnu/||g' ${lscripts}
+ sed -i -e 's|/lib/i386-linux-gnu/||g' ${lscripts}
+
+ # This is for chrome's ./build/linux/pkg-config-wrapper
+ # which overwrites PKG_CONFIG_PATH internally
+ SubBanner "Package Configs Symlink"
+ mkdir -p ${INSTALL_ROOT}/usr/share
+ ln -s ../lib/i386-linux-gnu/pkgconfig ${INSTALL_ROOT}/usr/share/pkgconfig
+
+ SubBanner "Adding an additional ld.conf include"
+ LD_SO_HACK_CONF="${INSTALL_ROOT}/etc/ld.so.conf.d/zz_hack.conf"
+ echo /usr/lib/gcc/i486-linux-gnu/4.6 > "$LD_SO_HACK_CONF"
+ echo /usr/lib >> "$LD_SO_HACK_CONF"
+}
+
+
+InstallIntoSysroot() {
+ Banner "Install Libs And Headers Into Jail"
+
+ mkdir -p ${TMP}/debian-packages
+ mkdir -p ${INSTALL_ROOT}
+ for file in $@ ; do
+ local package="${TMP}/debian-packages/${file##*/}"
+ Banner "installing ${file}"
+ DownloadOrCopy ${DEBIAN_REPO}/pool/${file} ${package}
+ SubBanner "extracting to ${INSTALL_ROOT}"
+ if [ ! -s "${package}" ] ; then
+ echo
+ echo "ERROR: bad package ${package}"
+ exit 1
+ fi
+ dpkg --fsys-tarfile ${package}\
+ | tar -xvf - --exclude=./usr/share -C ${INSTALL_ROOT}
+ done
+}
+
+
+CleanupJailSymlinks() {
+ Banner "jail symlink cleanup"
+
+ SAVEDPWD=$(pwd)
+ cd ${INSTALL_ROOT}
+ find lib lib64 usr/lib -type l -printf '%p %l\n' | while read link target; do
+ # skip links with non-absolute paths
+ echo "${target}" | grep -qs ^/ || continue
+ echo "${link}: ${target}"
+ case "${link}" in
+ usr/lib/gcc/x86_64-linux-gnu/4.*/* | usr/lib/gcc/i486-linux-gnu/4.*/*)
+ # Relativize the symlink.
+ ln -snfv "../../../../..${target}" "${link}"
+ ;;
+ usr/lib/x86_64-linux-gnu/* | usr/lib/i386-linux-gnu/*)
+ # Relativize the symlink.
+ ln -snfv "../../..${target}" "${link}"
+ ;;
+ usr/lib/*)
+ # Relativize the symlink.
+ ln -snfv "../..${target}" "${link}"
+ ;;
+ lib64/* | lib/*)
+ # Relativize the symlink.
+ ln -snfv "..${target}" "${link}"
+ ;;
+ esac
+ done
+
+ find lib lib64 usr/lib -type l -printf '%p %l\n' | while read link target; do
+ # Make sure we catch new bad links.
+ if [ ! -r "${link}" ]; then
+ echo "ERROR: FOUND BAD LINK ${link}"
+ ls -l ${link}
+ exit 1
+ fi
+ done
+ cd "$SAVEDPWD"
+}
+
+#@
+#@ BuildSysrootAmd64 <tarball-name>
+#@
+#@ Build everything and package it
+BuildSysrootAmd64() {
+ ClearInstallDir
+ InstallIntoSysroot ${DEBIAN_DEP_FILES_AMD64}
+ CleanupJailSymlinks
+ HacksAndPatchesAmd64
+ CreateTarBall $1
+}
+
+#@
+#@ BuildSysrootI386 <tarball-name>
+#@
+#@ Build everything and package it
+BuildSysrootI386() {
+ ClearInstallDir
+ InstallIntoSysroot ${DEBIAN_DEP_FILES_I386}
+ CleanupJailSymlinks
+ HacksAndPatchesI386
+ CreateTarBall $1
+}
+
+#
+# GeneratePackageList
+#
+# Looks up package names in ${TMP}/Packages and write list of URLs
+# to output file.
+#
+GeneratePackageList() {
+ local output_file=$1
+ echo "Updating: ${output_file}"
+ /bin/rm -f ${output_file}
+ shift
+ for pkg in $@ ; do
+ local pkg_full=$(grep -A 1 " ${pkg}\$" ${TMP}/Packages | egrep -o "pool/.*")
+ if [ -z "${pkg_full}" ]; then
+ echo "ERROR: missing package: $pkg"
+ exit 1
+ fi
+ echo $pkg_full | sed "s/^pool\///" >> $output_file
+ done
+ # sort -o does an in-place sort of this file
+ sort $output_file -o $output_file
+}
+
+#@
+#@ UpdatePackageListsAmd64
+#@
+#@ Regenerate the package lists such that they contain an up-to-date
+#@ list of URLs within the Debian archive. (For amd64)
+UpdatePackageListsAmd64() {
+ local package_list="${TMP}/Packages.wheezy_amd64.bz2"
+ DownloadOrCopy ${PACKAGE_LIST_AMD64} ${package_list}
+ bzcat ${package_list} | egrep '^(Package:|Filename:)' > ${TMP}/Packages
+
+ GeneratePackageList ${DEBIAN_DEP_LIST_AMD64} "${DEBIAN_PACKAGES}"
+}
+
+#@
+#@ UpdatePackageListsI386
+#@
+#@ Regenerate the package lists such that they contain an up-to-date
+#@ list of URLs within the Debian archive. (For i386)
+UpdatePackageListsI386() {
+ local package_list="${TMP}/Packages.wheezy_i386.bz2"
+ DownloadOrCopy ${PACKAGE_LIST_I386} ${package_list}
+ bzcat ${package_list} | egrep '^(Package:|Filename:)' > ${TMP}/Packages
+
+ GeneratePackageList ${DEBIAN_DEP_LIST_I386} "${DEBIAN_PACKAGES}"
+}
+
+if [ $# -eq 0 ] ; then
+ echo "ERROR: you must specify a mode on the commandline"
+ echo
+ Usage
+ exit 1
+elif [ "$(type -t $1)" != "function" ]; then
+ echo "ERROR: unknown function '$1'." >&2
+ echo "For help, try:"
+ echo " $0 help"
+ exit 1
+else
+ ChangeDirectory
+ SetEnvironmentVariables "$1"
+ SanityCheck
+ "$@"
+fi
diff --git a/chrome/installer/setup/chrome_frame_ready_mode.cc b/chrome/installer/setup/chrome_frame_ready_mode.cc
index c8a98c46cb..c81e6200f1 100644
--- a/chrome/installer/setup/chrome_frame_ready_mode.cc
+++ b/chrome/installer/setup/chrome_frame_ready_mode.cc
@@ -9,8 +9,8 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/time.h"
-#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
#include "chrome/installer/setup/install.h"
#include "chrome/installer/setup/install_worker.h"
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index b8ebe94fd3..6bff15c5ef 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -19,7 +19,7 @@
#include "base/process_util.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/shortcut.h"
#include "base/win/windows_version.h"
#include "chrome/common/chrome_constants.h"
diff --git a/chrome/installer/setup/install_unittest.cc b/chrome/installer/setup/install_unittest.cc
index 7dfbf0c033..5791bc78e2 100644
--- a/chrome/installer/setup/install_unittest.cc
+++ b/chrome/installer/setup/install_unittest.cc
@@ -13,9 +13,9 @@
#include "base/path_service.h"
#include "base/platform_file.h"
#include "base/string16.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_path_override.h"
#include "base/test/test_shortcut_win.h"
-#include "base/utf_string_conversions.h"
#include "base/version.h"
#include "base/win/shortcut.h"
#include "chrome/installer/setup/install.h"
diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc
index c92219032b..eea5422487 100644
--- a/chrome/installer/setup/install_worker.cc
+++ b/chrome/installer/setup/install_worker.cc
@@ -22,7 +22,7 @@
#include "base/path_service.h"
#include "base/string16.h"
#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/version.h"
#include "base/win/registry.h"
#include "base/win/scoped_comptr.h"
diff --git a/chrome/installer/setup/run_all_unittests.cc b/chrome/installer/setup/run_all_unittests.cc
index 1f55d012ee..a309b11088 100644
--- a/chrome/installer/setup/run_all_unittests.cc
+++ b/chrome/installer/setup/run_all_unittests.cc
@@ -2,12 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/command_line.h"
#include "base/test/test_suite.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/installer/setup/setup_util_unittest.h"
int main(int argc, char** argv) {
TestSuite test_suite(argc, argv);
+ // Handle the --adjust-process-priority switch, which is used to test the
+ // installer::AdjustProcessPriority() function in a subprocess.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(kAdjustProcessPriority))
+ return DoProcessPriorityAdjustment();
+
// Register Chrome Path provider so that we can get test data dir.
chrome::RegisterPathProvider();
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index 70832b641e..306a859630 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -21,7 +21,7 @@
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/strings/string_number_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "base/win/registry.h"
#include "base/win/scoped_com_initializer.h"
@@ -639,6 +639,11 @@ installer::InstallStatus InstallProductsHelper(
const bool system_install = installer_state.system_install();
installer::InstallStatus install_status = installer::UNKNOWN_STATUS;
+ // Drop to background processing mode if the process was started below the
+ // normal process priority class.
+ bool entered_background_mode = installer::AdjustProcessPriority();
+ VLOG_IF(1, entered_background_mode) << "Entered background processing mode.";
+
// For install the default location for chrome.packed.7z is in current
// folder, so get that value first.
base::FilePath archive(cmd_line.GetProgram().DirName().Append(
diff --git a/chrome/installer/setup/setup_util.cc b/chrome/installer/setup/setup_util.cc
index 9f112c01b4..768755a7f2 100644
--- a/chrome/installer/setup/setup_util.cc
+++ b/chrome/installer/setup/setup_util.cc
@@ -10,11 +10,13 @@
#include "base/command_line.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/process_util.h"
#include "base/string_util.h"
#include "base/version.h"
+#include "base/win/windows_version.h"
#include "chrome/installer/util/copy_tree_work_item.h"
#include "chrome/installer/util/installation_state.h"
#include "chrome/installer/util/installer_state.h"
@@ -124,8 +126,8 @@ int ApplyDiffPatch(const base::FilePath& src,
Version* GetMaxVersionFromArchiveDir(const base::FilePath& chrome_path) {
VLOG(1) << "Looking for Chrome version folder under " << chrome_path.value();
Version* version = NULL;
- file_util::FileEnumerator version_enum(chrome_path, false,
- file_util::FileEnumerator::DIRECTORIES);
+ base::FileEnumerator version_enum(chrome_path, false,
+ base::FileEnumerator::DIRECTORIES);
// TODO(tommi): The version directory really should match the version of
// setup.exe. To begin with, we should at least DCHECK that that's true.
@@ -133,12 +135,11 @@ Version* GetMaxVersionFromArchiveDir(const base::FilePath& chrome_path) {
bool version_found = false;
while (!version_enum.Next().empty()) {
- file_util::FileEnumerator::FindInfo find_data = {0};
- version_enum.GetFindInfo(&find_data);
- VLOG(1) << "directory found: " << find_data.cFileName;
+ base::FileEnumerator::FileInfo find_data = version_enum.GetInfo();
+ VLOG(1) << "directory found: " << find_data.GetName().value();
scoped_ptr<Version> found_version(
- new Version(WideToASCII(find_data.cFileName)));
+ new Version(WideToASCII(find_data.GetName().value())));
if (found_version->IsValid() &&
found_version->CompareTo(*max_version.get()) > 0) {
max_version.reset(found_version.release());
@@ -313,6 +314,22 @@ bool WillProductBePresentAfterSetup(
return is_affected ? !is_uninstall : is_present;
}
+bool AdjustProcessPriority() {
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
+ DWORD priority_class = ::GetPriorityClass(::GetCurrentProcess());
+ if (priority_class == 0) {
+ PLOG(WARNING) << "Failed to get the process's priority class.";
+ } else if (priority_class == BELOW_NORMAL_PRIORITY_CLASS ||
+ priority_class == IDLE_PRIORITY_CLASS) {
+ BOOL result = ::SetPriorityClass(::GetCurrentProcess(),
+ PROCESS_MODE_BACKGROUND_BEGIN);
+ PLOG_IF(WARNING, !result) << "Failed to enter background mode.";
+ return !!result;
+ }
+ }
+ return false;
+}
+
ScopedTokenPrivilege::ScopedTokenPrivilege(const wchar_t* privilege_name)
: is_enabled_(false) {
if (!::OpenProcessToken(::GetCurrentProcess(),
diff --git a/chrome/installer/setup/setup_util.h b/chrome/installer/setup/setup_util.h
index cfd993f0d2..780c8832f9 100644
--- a/chrome/installer/setup/setup_util.h
+++ b/chrome/installer/setup/setup_util.h
@@ -81,6 +81,11 @@ bool WillProductBePresentAfterSetup(
const installer::InstallationState& machine_state,
BrowserDistribution::Type type);
+// Drops the process down to background processing mode on supported OSes if it
+// was launched below the normal process priority. Returns true when background
+// procesing mode is entered.
+bool AdjustProcessPriority();
+
// This class will enable the privilege defined by |privilege_name| on the
// current process' token. The privilege will be disabled upon the
// ScopedTokenPrivilege's destruction (unless it was already enabled when the
diff --git a/chrome/installer/setup/setup_util_unittest.cc b/chrome/installer/setup/setup_util_unittest.cc
index 6fccc2c9ec..c699b1b0d0 100644
--- a/chrome/installer/setup/setup_util_unittest.cc
+++ b/chrome/installer/setup/setup_util_unittest.cc
@@ -2,17 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/installer/setup/setup_util_unittest.h"
+
#include <windows.h>
#include <string>
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
+#include "base/process_util.h"
#include "base/threading/platform_thread.h"
#include "base/time.h"
#include "base/win/scoped_handle.h"
+#include "base/win/windows_version.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/installer/setup/setup_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -189,3 +194,86 @@ TEST(SetupUtilTest, ScopedTokenPrivilegeAlreadyEnabled) {
ASSERT_FALSE(CurrentProcessHasPrivilege(kTestedPrivilege));
}
+
+const char kAdjustProcessPriority[] = "adjust-process-priority";
+
+PriorityClassChangeResult DoProcessPriorityAdjustment() {
+ return installer::AdjustProcessPriority() ? PCCR_CHANGED : PCCR_UNCHANGED;
+}
+
+namespace {
+
+// A scoper that sets/resets the current process's priority class.
+class ScopedPriorityClass {
+ public:
+ // Applies |priority_class|, returning an instance if a change was made.
+ // Otherwise, returns an empty scoped_ptr.
+ static scoped_ptr<ScopedPriorityClass> Create(DWORD priority_class);
+ ~ScopedPriorityClass();
+
+ private:
+ explicit ScopedPriorityClass(DWORD original_priority_class);
+ DWORD original_priority_class_;
+ DISALLOW_COPY_AND_ASSIGN(ScopedPriorityClass);
+};
+
+scoped_ptr<ScopedPriorityClass> ScopedPriorityClass::Create(
+ DWORD priority_class) {
+ HANDLE this_process = ::GetCurrentProcess();
+ DWORD original_priority_class = ::GetPriorityClass(this_process);
+ EXPECT_NE(0U, original_priority_class);
+ if (original_priority_class && original_priority_class != priority_class) {
+ BOOL result = ::SetPriorityClass(this_process, priority_class);
+ EXPECT_NE(FALSE, result);
+ if (result) {
+ return scoped_ptr<ScopedPriorityClass>(
+ new ScopedPriorityClass(original_priority_class));
+ }
+ }
+ return scoped_ptr<ScopedPriorityClass>();
+}
+
+ScopedPriorityClass::ScopedPriorityClass(DWORD original_priority_class)
+ : original_priority_class_(original_priority_class) {}
+
+ScopedPriorityClass::~ScopedPriorityClass() {
+ BOOL result = ::SetPriorityClass(::GetCurrentProcess(),
+ original_priority_class_);
+ EXPECT_NE(FALSE, result);
+}
+
+PriorityClassChangeResult RelaunchAndDoProcessPriorityAdjustment() {
+ CommandLine cmd_line(*CommandLine::ForCurrentProcess());
+ cmd_line.AppendSwitch(kAdjustProcessPriority);
+ base::ProcessHandle process_handle = NULL;
+ int exit_code = 0;
+ if (!base::LaunchProcess(cmd_line, base::LaunchOptions(),
+ &process_handle)) {
+ ADD_FAILURE() << " to launch subprocess.";
+ } else if (!base::WaitForExitCode(process_handle, &exit_code)) {
+ ADD_FAILURE() << " to wait for subprocess to exit.";
+ } else {
+ return static_cast<PriorityClassChangeResult>(exit_code);
+ }
+ return PCCR_UNKNOWN;
+}
+
+} // namespace
+
+// Launching a subprocess at normal priority class is a noop.
+TEST(SetupUtilTest, AdjustFromNormalPriority) {
+ ASSERT_EQ(NORMAL_PRIORITY_CLASS, ::GetPriorityClass(::GetCurrentProcess()));
+ EXPECT_EQ(PCCR_UNCHANGED, RelaunchAndDoProcessPriorityAdjustment());
+}
+
+// Launching a subprocess below normal priority class drops it to bg mode for
+// sufficiently recent operating systems.
+TEST(SetupUtilTest, AdjustFromBelowNormalPriority) {
+ scoped_ptr<ScopedPriorityClass> below_normal =
+ ScopedPriorityClass::Create(BELOW_NORMAL_PRIORITY_CLASS);
+ ASSERT_TRUE(below_normal);
+ if (base::win::GetVersion() > base::win::VERSION_SERVER_2003)
+ EXPECT_EQ(PCCR_CHANGED, RelaunchAndDoProcessPriorityAdjustment());
+ else
+ EXPECT_EQ(PCCR_UNCHANGED, RelaunchAndDoProcessPriorityAdjustment());
+}
diff --git a/chrome/installer/setup/setup_util_unittest.h b/chrome/installer/setup/setup_util_unittest.h
new file mode 100644
index 0000000000..a367d664da
--- /dev/null
+++ b/chrome/installer/setup/setup_util_unittest.h
@@ -0,0 +1,24 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_INSTALLER_SETUP_SETUP_UTIL_UNITTEST_H_
+#define CHROME_INSTALLER_SETUP_SETUP_UTIL_UNITTEST_H_
+
+// A command line switch that causes the test harness to exit with the result of
+// DoProcessPriorityAdjustment rather than executing all tests.
+extern const char kAdjustProcessPriority[];
+
+// Process exit codes when the test harness is run with the
+// kAdjustProcessPriority switch.
+enum PriorityClassChangeResult {
+ PCCR_UNKNOWN,
+ PCCR_UNCHANGED,
+ PCCR_CHANGED,
+};
+
+// Calls AdjustProcessPriority() and returns PCCR_CHANGED or PCCR_UNCHANGED
+// based on its true or false result (respectively).
+PriorityClassChangeResult DoProcessPriorityAdjustment();
+
+#endif // CHROME_INSTALLER_SETUP_SETUP_UTIL_UNITTEST_H_
diff --git a/chrome/installer/setup/uninstall.cc b/chrome/installer/setup/uninstall.cc
index 22eb69a7fc..ac558b45a5 100644
--- a/chrome/installer/setup/uninstall.cc
+++ b/chrome/installer/setup/uninstall.cc
@@ -11,12 +11,13 @@
#include <vector>
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/path_service.h"
#include "base/process_util.h"
#include "base/string16.h"
#include "base/string_util.h"
#include "base/strings/string_number_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/registry.h"
#include "base/win/scoped_handle.h"
#include "base/win/shortcut.h"
@@ -253,11 +254,10 @@ void CheckShouldRemoveSetupAndArchive(
// Returns false in case of an error.
bool RemoveInstallerFiles(const base::FilePath& installer_directory,
bool remove_setup) {
- using file_util::FileEnumerator;
- FileEnumerator file_enumerator(
+ base::FileEnumerator file_enumerator(
installer_directory,
false,
- FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
+ base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES);
bool success = true;
base::FilePath setup_exe_base_name(installer::kSetupExe);
@@ -573,9 +573,8 @@ DeleteResult DeleteChromeFilesAndFolders(const InstallerState& installer_state,
// directory. For parents of the installer directory, we will later recurse
// and delete all the children (that are not also parents/children of the
// installer directory).
- using file_util::FileEnumerator;
- FileEnumerator file_enumerator(
- target_path, true, FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
+ base::FileEnumerator file_enumerator(target_path, true,
+ base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES);
while (true) {
base::FilePath to_delete(file_enumerator.Next());
if (to_delete.empty())
@@ -596,9 +595,8 @@ DeleteResult DeleteChromeFilesAndFolders(const InstallerState& installer_state,
// We don't try killing Chrome processes for Chrome Frame builds since
// that is unlikely to help. Instead, schedule files for deletion and
// return a value that will trigger a reboot prompt.
- FileEnumerator::FindInfo find_info;
- file_enumerator.GetFindInfo(&find_info);
- if (FileEnumerator::IsDirectory(find_info))
+ base::FileEnumerator::FileInfo find_info = file_enumerator.GetInfo();
+ if (find_info.IsDirectory())
ScheduleDirectoryForDeletion(to_delete.value().c_str());
else
ScheduleFileSystemEntityForDeletion(to_delete.value().c_str());
diff --git a/chrome/installer/test/alternate_version_generator.cc b/chrome/installer/test/alternate_version_generator.cc
index 7811be4455..8222ba929a 100644
--- a/chrome/installer/test/alternate_version_generator.cc
+++ b/chrome/installer/test/alternate_version_generator.cc
@@ -34,6 +34,7 @@
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/path_service.h"
@@ -432,8 +433,7 @@ bool ApplyAlternateVersion(const base::FilePath& work_dir,
// Modify all .dll and .exe files with the current version.
bool doing_great = true;
- file_util::FileEnumerator all_files(work_dir, true,
- file_util::FileEnumerator::FILES);
+ base::FileEnumerator all_files(work_dir, true, base::FileEnumerator::FILES);
do {
base::FilePath file = all_files.Next();
if (file.empty()) {
diff --git a/chrome/installer/util/auto_launch_util.cc b/chrome/installer/util/auto_launch_util.cc
index 60ef370cb2..1435c08fbb 100644
--- a/chrome/installer/util/auto_launch_util.cc
+++ b/chrome/installer/util/auto_launch_util.cc
@@ -9,7 +9,7 @@
#include "base/logging.h"
#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/win_util.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
diff --git a/chrome/installer/util/delete_after_reboot_helper.cc b/chrome/installer/util/delete_after_reboot_helper.cc
index cc76b0e69a..3fff62065d 100644
--- a/chrome/installer/util/delete_after_reboot_helper.cc
+++ b/chrome/installer/util/delete_after_reboot_helper.cc
@@ -16,6 +16,7 @@
#include <vector>
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/win/registry.h"
#include "base/string_util.h"
@@ -116,8 +117,8 @@ bool ScheduleDirectoryForDeletion(const wchar_t* dir_name) {
// First schedule all the normal files for deletion.
{
bool success = true;
- file_util::FileEnumerator file_enum(base::FilePath(dir_name), false,
- file_util::FileEnumerator::FILES);
+ base::FileEnumerator file_enum(base::FilePath(dir_name), false,
+ base::FileEnumerator::FILES);
for (base::FilePath file = file_enum.Next(); !file.empty();
file = file_enum.Next()) {
success = ScheduleFileSystemEntityForDeletion(file.value().c_str());
@@ -131,8 +132,8 @@ bool ScheduleDirectoryForDeletion(const wchar_t* dir_name) {
// Then recurse to all the subdirectories.
{
bool success = true;
- file_util::FileEnumerator dir_enum(base::FilePath(dir_name), false,
- file_util::FileEnumerator::DIRECTORIES);
+ base::FileEnumerator dir_enum(base::FilePath(dir_name), false,
+ base::FileEnumerator::DIRECTORIES);
for (base::FilePath sub_dir = dir_enum.Next(); !sub_dir.empty();
sub_dir = dir_enum.Next()) {
success = ScheduleDirectoryForDeletion(sub_dir.value().c_str());
diff --git a/chrome/installer/util/duplicate_tree_detector.cc b/chrome/installer/util/duplicate_tree_detector.cc
index ff4df3227e..62d9b51da5 100644
--- a/chrome/installer/util/duplicate_tree_detector.cc
+++ b/chrome/installer/util/duplicate_tree_detector.cc
@@ -6,13 +6,13 @@
#include "chrome/installer/util/duplicate_tree_detector.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/logging.h"
namespace installer {
bool IsIdenticalFileHierarchy(const base::FilePath& src_path,
const base::FilePath& dest_path) {
- using file_util::FileEnumerator;
base::PlatformFileInfo src_info;
base::PlatformFileInfo dest_info;
@@ -35,8 +35,8 @@ bool IsIdenticalFileHierarchy(const base::FilePath& src_path,
// "identical" to all the entries in src_path.
is_identical = true;
- FileEnumerator path_enum(src_path, false /* not recursive */,
- FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
+ base::FileEnumerator path_enum(src_path, false /* not recursive */,
+ base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES);
for (base::FilePath path = path_enum.Next();
is_identical && !path.empty();
path = path_enum.Next()) {
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index 14ce3099cb..8cbd6c6bd2 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -14,7 +14,7 @@
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/registry.h"
#include "base/win/windows_version.h"
#include "chrome/common/net/test_server_locations.h"
diff --git a/chrome/installer/util/google_update_experiment_util.cc b/chrome/installer/util/google_update_experiment_util.cc
index bccc49a975..101dd394d1 100644
--- a/chrome/installer/util/google_update_experiment_util.cc
+++ b/chrome/installer/util/google_update_experiment_util.cc
@@ -7,9 +7,9 @@
#include <vector>
#include "base/logging.h"
-#include "base/stringprintf.h"
+#include "base/strings/stringprintf.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/time.h"
-#include "base/utf_string_conversions.h"
namespace installer {
diff --git a/chrome/installer/util/google_update_experiment_util.h b/chrome/installer/util/google_update_experiment_util.h
index 1db88343ad..33d542f320 100644
--- a/chrome/installer/util/google_update_experiment_util.h
+++ b/chrome/installer/util/google_update_experiment_util.h
@@ -5,7 +5,7 @@
#ifndef CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_EXPERIMENT_UTIL_H_
#define CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_EXPERIMENT_UTIL_H_
-#include "base/string16.h"
+#include "base/strings/string16.h"
namespace installer {
diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc
index 7631e22940..3b985b21dd 100644
--- a/chrome/installer/util/google_update_settings.cc
+++ b/chrome/installer/util/google_update_settings.cc
@@ -8,11 +8,11 @@
#include "base/command_line.h"
#include "base/path_service.h"
-#include "base/string_util.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "base/time.h"
-#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/browser_distribution.h"
diff --git a/chrome/installer/util/google_update_settings.h b/chrome/installer/util/google_update_settings.h
index e220b68952..7ca9f7ca15 100644
--- a/chrome/installer/util/google_update_settings.h
+++ b/chrome/installer/util/google_update_settings.h
@@ -8,7 +8,7 @@
#include <string>
#include "base/basictypes.h"
-#include "base/string16.h"
+#include "base/strings/string16.h"
#include "base/time.h"
#include "base/version.h"
#include "chrome/installer/util/util_constants.h"
diff --git a/chrome/installer/util/google_update_settings_unittest.cc b/chrome/installer/util/google_update_settings_unittest.cc
index bf463dd2fd..4b665b456e 100644
--- a/chrome/installer/util/google_update_settings_unittest.cc
+++ b/chrome/installer/util/google_update_settings_unittest.cc
@@ -6,8 +6,8 @@
#include <shlwapi.h> // For SHDeleteKey.
#include "base/memory/scoped_ptr.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/test/test_reg_util_win.h"
-#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/installer/util/browser_distribution.h"
diff --git a/chrome/installer/util/google_update_util.cc b/chrome/installer/util/google_update_util.cc
index a4df73ba45..8434ab9155 100644
--- a/chrome/installer/util/google_update_util.cc
+++ b/chrome/installer/util/google_update_util.cc
@@ -15,7 +15,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/process_util.h"
-#include "base/string16.h"
+#include "base/strings/string16.h"
#include "base/strings/string_split.h"
#include "base/time.h"
#include "base/win/registry.h"
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index 0c02d71abc..07a2b0cba4 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -19,7 +19,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/process_util.h"
-#include "base/string_util.h"
+#include "base/strings/string_util.h"
#include "base/sys_info.h"
#include "base/values.h"
#include "base/version.h"
diff --git a/chrome/installer/util/install_util.h b/chrome/installer/util/install_util.h
index 0c1a253f52..40e6c85965 100644
--- a/chrome/installer/util/install_util.h
+++ b/chrome/installer/util/install_util.h
@@ -15,7 +15,7 @@
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
-#include "base/string16.h"
+#include "base/strings/string16.h"
#include "base/win/scoped_handle.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/util_constants.h"
diff --git a/chrome/installer/util/install_util_unittest.cc b/chrome/installer/util/install_util_unittest.cc
index e120e7c8d6..769c62dc1b 100644
--- a/chrome/installer/util/install_util_unittest.cc
+++ b/chrome/installer/util/install_util_unittest.cc
@@ -7,7 +7,7 @@
#include "base/command_line.h"
#include "base/file_util.h"
-#include "base/string_util.h"
+#include "base/strings/string_util.h"
#include "base/test/test_reg_util_win.h"
#include "base/win/registry.h"
#include "chrome/installer/util/google_update_constants.h"
diff --git a/chrome/installer/util/installation_state.cc b/chrome/installer/util/installation_state.cc
index 43c73ce5f8..d6d06abc5b 100644
--- a/chrome/installer/util/installation_state.cc
+++ b/chrome/installer/util/installation_state.cc
@@ -5,7 +5,7 @@
#include "chrome/installer/util/installation_state.h"
#include "base/logging.h"
-#include "base/string_util.h"
+#include "base/strings/string_util.h"
#include "base/version.h"
#include "base/win/registry.h"
#include "chrome/installer/util/google_update_constants.h"
diff --git a/chrome/installer/util/installation_validator.cc b/chrome/installer/util/installation_validator.cc
index c49c5875bd..f5fb140cba 100644
--- a/chrome/installer/util/installation_validator.cc
+++ b/chrome/installer/util/installation_validator.cc
@@ -11,7 +11,7 @@
#include <string>
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/version.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/browser_distribution.h"
diff --git a/chrome/installer/util/installation_validator.h b/chrome/installer/util/installation_validator.h
index 384e45b0e6..463230cbde 100644
--- a/chrome/installer/util/installation_validator.h
+++ b/chrome/installer/util/installation_validator.h
@@ -12,7 +12,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "base/string16.h"
+#include "base/strings/string16.h"
#include "chrome/installer/util/browser_distribution.h"
class CommandLine;
diff --git a/chrome/installer/util/installer_state.cc b/chrome/installer/util/installer_state.cc
index 00906292c3..f69d5cd990 100644
--- a/chrome/installer/util/installer_state.cc
+++ b/chrome/installer/util/installer_state.cc
@@ -11,10 +11,11 @@
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/file_version_info.h"
+#include "base/files/file_enumerator.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/registry.h"
#include "base/win/scoped_handle.h"
#include "chrome/installer/util/delete_tree_work_item.h"
@@ -649,8 +650,8 @@ void InstallerState::RemoveOldVersionDirectories(
GetExistingExeVersions(&existing_version_strings);
// Try to delete all directories that are not in the set we care to keep.
- file_util::FileEnumerator version_enum(target_path(), false,
- file_util::FileEnumerator::DIRECTORIES);
+ base::FileEnumerator version_enum(target_path(), false,
+ base::FileEnumerator::DIRECTORIES);
for (base::FilePath next_version = version_enum.Next(); !next_version.empty();
next_version = version_enum.Next()) {
base::FilePath dir_name(next_version.BaseName());
diff --git a/chrome/installer/util/installer_state_unittest.cc b/chrome/installer/util/installer_state_unittest.cc
index 0f985f889c..1d5fbb5089 100644
--- a/chrome/installer/util/installer_state_unittest.cc
+++ b/chrome/installer/util/installer_state_unittest.cc
@@ -9,13 +9,14 @@
#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/path_service.h"
#include "base/process_util.h"
-#include "base/string_util.h"
+#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/test/test_reg_util_win.h"
-#include "base/utf_string_conversions.h"
#include "base/version.h"
#include "base/win/registry.h"
#include "base/win/scoped_handle.h"
@@ -584,8 +585,8 @@ TEST_F(InstallerStateTest, RemoveOldVersionDirs) {
expected_remaining_dirs.insert(kNewChromeExeVersion);
// Enumerate dirs in target_path(), ensure only desired remain.
- file_util::FileEnumerator version_enum(installer_state.target_path(), false,
- file_util::FileEnumerator::DIRECTORIES);
+ base::FileEnumerator version_enum(installer_state.target_path(), false,
+ base::FileEnumerator::DIRECTORIES);
for (base::FilePath next_version = version_enum.Next(); !next_version.empty();
next_version = version_enum.Next()) {
base::FilePath dir_name(next_version.BaseName());
diff --git a/chrome/installer/util/installer_util_test_common.cc b/chrome/installer/util/installer_util_test_common.cc
index 005a160c1e..bc46385214 100644
--- a/chrome/installer/util/installer_util_test_common.cc
+++ b/chrome/installer/util/installer_util_test_common.cc
@@ -8,7 +8,7 @@
#include <shellapi.h>
#include "base/files/file_path.h"
-#include "base/string16.h"
+#include "base/strings/string16.h"
namespace installer {
diff --git a/chrome/installer/util/l10n_string_util.cc b/chrome/installer/util/l10n_string_util.cc
index e4e58c7328..1a844ebbe7 100644
--- a/chrome/installer/util/l10n_string_util.cc
+++ b/chrome/installer/util/l10n_string_util.cc
@@ -12,8 +12,8 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/string_util.h"
-#include "base/stringprintf.h"
+#include "base/strings/string_util.h"
+#include "base/strings/stringprintf.h"
#include "chrome/installer/util/language_selector.h"
namespace {
diff --git a/chrome/installer/util/l10n_string_util.h b/chrome/installer/util/l10n_string_util.h
index 5eae4a150f..199a9b71f1 100644
--- a/chrome/installer/util/l10n_string_util.h
+++ b/chrome/installer/util/l10n_string_util.h
@@ -15,7 +15,7 @@
#include <string>
-#include "base/string16.h"
+#include "base/strings/string16.h"
namespace installer {
diff --git a/chrome/installer/util/language_selector.cc b/chrome/installer/util/language_selector.cc
index dcd78d548d..0dc3f58c5e 100644
--- a/chrome/installer/util/language_selector.cc
+++ b/chrome/installer/util/language_selector.cc
@@ -11,7 +11,7 @@
#include <functional>
#include "base/logging.h"
-#include "base/string_util.h"
+#include "base/strings/string_util.h"
#include "base/win/i18n.h"
#include "chrome/installer/util/google_update_settings.h"
diff --git a/chrome/installer/util/logging_installer.cc b/chrome/installer/util/logging_installer.cc
index adc7801e04..2e47269db8 100644
--- a/chrome/installer/util/logging_installer.cc
+++ b/chrome/installer/util/logging_installer.cc
@@ -13,8 +13,8 @@
#include "base/logging_win.h"
#include "base/path_service.h"
#include "base/platform_file.h"
-#include "base/string_util.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_handle.h"
#include "chrome/installer/util/master_preferences.h"
#include "chrome/installer/util/master_preferences_constants.h"
diff --git a/chrome/installer/util/lzma_util.cc b/chrome/installer/util/lzma_util.cc
index 88bcc39620..543ab4f17f 100644
--- a/chrome/installer/util/lzma_util.cc
+++ b/chrome/installer/util/lzma_util.cc
@@ -6,7 +6,7 @@
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
extern "C" {
#include "third_party/lzma_sdk/7z.h"
diff --git a/chrome/installer/util/master_preferences.cc b/chrome/installer/util/master_preferences.cc
index 27c4ff113e..25df26468d 100644
--- a/chrome/installer/util/master_preferences.cc
+++ b/chrome/installer/util/master_preferences.cc
@@ -10,7 +10,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/path_service.h"
-#include "base/string_util.h"
+#include "base/strings/string_util.h"
#include "chrome/common/env_vars.h"
#include "chrome/common/pref_names.h"
#include "chrome/installer/util/master_preferences_constants.h"
diff --git a/chrome/installer/util/master_preferences_unittest.cc b/chrome/installer/util/master_preferences_unittest.cc
index 276470c19b..c2cabaeb59 100644
--- a/chrome/installer/util/master_preferences_unittest.cc
+++ b/chrome/installer/util/master_preferences_unittest.cc
@@ -7,7 +7,7 @@
#include "base/file_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
-#include "base/stringprintf.h"
+#include "base/strings/stringprintf.h"
#include "base/values.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/installer/util/master_preferences.h"
diff --git a/chrome/installer/util/move_tree_work_item_unittest.cc b/chrome/installer/util/move_tree_work_item_unittest.cc
index 47b2729c7a..11dc26ec04 100644
--- a/chrome/installer/util/move_tree_work_item_unittest.cc
+++ b/chrome/installer/util/move_tree_work_item_unittest.cc
@@ -12,7 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/process_util.h"
-#include "base/string_util.h"
+#include "base/strings/string_util.h"
#include "chrome/installer/util/installer_util_test_common.h"
#include "chrome/installer/util/move_tree_work_item.h"
#include "chrome/installer/util/work_item.h"
diff --git a/chrome/installer/util/product_operations.h b/chrome/installer/util/product_operations.h
index c826c7e2cc..800287c150 100644
--- a/chrome/installer/util/product_operations.h
+++ b/chrome/installer/util/product_operations.h
@@ -10,7 +10,7 @@
#include <vector>
#include "base/files/file_path.h"
-#include "base/string16.h"
+#include "base/strings/string16.h"
#include "chrome/installer/util/shell_util.h"
#include "chrome/installer/util/util_constants.h"
diff --git a/chrome/installer/util/product_state_unittest.cc b/chrome/installer/util/product_state_unittest.cc
index a180bd527c..4946f0a6ba 100644
--- a/chrome/installer/util/product_state_unittest.cc
+++ b/chrome/installer/util/product_state_unittest.cc
@@ -4,7 +4,7 @@
#include <windows.h>
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/test/test_reg_util_win.h"
#include "base/version.h"
#include "base/win/registry.h"
diff --git a/chrome/installer/util/product_unittest.cc b/chrome/installer/util/product_unittest.cc
index 688af718c7..9781fe211f 100644
--- a/chrome/installer/util/product_unittest.cc
+++ b/chrome/installer/util/product_unittest.cc
@@ -5,8 +5,8 @@
#include "chrome/installer/util/product_unittest.h"
#include "base/logging.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/test/test_reg_util_win.h"
-#include "base/utf_string_conversions.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/installer/util/chrome_frame_distribution.h"
#include "chrome/installer/util/google_update_constants.h"
diff --git a/chrome/installer/util/self_cleaning_temp_dir_unittest.cc b/chrome/installer/util/self_cleaning_temp_dir_unittest.cc
index 917ab3cd3e..c9416191c2 100644
--- a/chrome/installer/util/self_cleaning_temp_dir_unittest.cc
+++ b/chrome/installer/util/self_cleaning_temp_dir_unittest.cc
@@ -8,7 +8,7 @@
#include "base/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/strings/string_number_conversions.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "chrome/installer/util/self_cleaning_temp_dir.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/installer/util/self_reg_work_item.cc b/chrome/installer/util/self_reg_work_item.cc
index 70f1853c0d..f07701d76c 100644
--- a/chrome/installer/util/self_reg_work_item.cc
+++ b/chrome/installer/util/self_reg_work_item.cc
@@ -5,8 +5,8 @@
#include "chrome/installer/util/self_reg_work_item.h"
#include "base/logging.h"
-#include "base/string_util.h"
-#include "base/stringprintf.h"
+#include "base/strings/string_util.h"
+#include "base/strings/stringprintf.h"
#include "chrome/installer/util/logging_installer.h"
// Default registration export names.
diff --git a/chrome/installer/util/set_reg_value_work_item.cc b/chrome/installer/util/set_reg_value_work_item.cc
index b9442883f8..b805a5d0af 100644
--- a/chrome/installer/util/set_reg_value_work_item.cc
+++ b/chrome/installer/util/set_reg_value_work_item.cc
@@ -5,7 +5,7 @@
#include "chrome/installer/util/set_reg_value_work_item.h"
#include "base/logging.h"
-#include "base/string_util.h"
+#include "base/strings/string_util.h"
#include "base/win/registry.h"
#include "chrome/installer/util/logging_installer.h"
diff --git a/chrome/installer/util/set_reg_value_work_item_unittest.cc b/chrome/installer/util/set_reg_value_work_item_unittest.cc
index c1a4bce877..27691bb079 100644
--- a/chrome/installer/util/set_reg_value_work_item_unittest.cc
+++ b/chrome/installer/util/set_reg_value_work_item_unittest.cc
@@ -6,7 +6,7 @@
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
-#include "base/string_util.h"
+#include "base/strings/string_util.h"
#include "base/win/registry.h"
#include "chrome/installer/util/set_reg_value_work_item.h"
#include "chrome/installer/util/work_item.h"
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 273c7f0324..19958c66ff 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -18,6 +18,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
@@ -25,11 +26,11 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/path_service.h"
-#include "base/string16.h"
-#include "base/string_util.h"
+#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "base/win/registry.h"
#include "base/win/scoped_co_mem.h"
@@ -1231,8 +1232,8 @@ bool BatchShortcutAction(const FileOperationCallback& shortcut_operation,
bool success = true;
InstallUtil::ProgramCompare target_compare(target_exe);
- file_util::FileEnumerator enumerator(
- shortcut_folder, false, file_util::FileEnumerator::FILES,
+ base::FileEnumerator enumerator(
+ shortcut_folder, false, base::FileEnumerator::FILES,
string16(L"*") + installer::kLnkExt);
base::FilePath target_path;
for (base::FilePath shortcut_path = enumerator.Next();
diff --git a/chrome/installer/util/shell_util.h b/chrome/installer/util/shell_util.h
index 5977023f83..c1d0c32163 100644
--- a/chrome/installer/util/shell_util.h
+++ b/chrome/installer/util/shell_util.h
@@ -17,7 +17,7 @@
#include "base/basictypes.h"
#include "base/files/file_path.h"
#include "base/logging.h"
-#include "base/string16.h"
+#include "base/strings/string16.h"
#include "chrome/installer/util/work_item_list.h"
class BrowserDistribution;
diff --git a/chrome/installer/util/shell_util_unittest.cc b/chrome/installer/util/shell_util_unittest.cc
index aa3d8e9f11..73d2b27bed 100644
--- a/chrome/installer/util/shell_util_unittest.cc
+++ b/chrome/installer/util/shell_util_unittest.cc
@@ -9,11 +9,12 @@
#include "base/base_paths.h"
#include "base/base_paths_win.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/files/scoped_temp_dir.h"
#include "base/md5.h"
#include "base/memory/scoped_ptr.h"
-#include "base/string16.h"
-#include "base/string_util.h"
+#include "base/strings/string16.h"
+#include "base/strings/string_util.h"
#include "base/test/scoped_path_override.h"
#include "base/test/test_shortcut_win.h"
#include "base/win/shortcut.h"
@@ -526,8 +527,8 @@ TEST_F(ShellUtilShortcutTest, CreateMultipleStartMenuShortcutsAndRemoveFolder) {
base::FilePath shortcut_folder(
fake_start_menu_.path().Append(dist_->GetAppShortCutName()));
- file_util::FileEnumerator file_counter(shortcut_folder, false,
- file_util::FileEnumerator::FILES);
+ base::FileEnumerator file_counter(shortcut_folder, false,
+ base::FileEnumerator::FILES);
int count = 0;
while (!file_counter.Next().empty())
++count;
diff --git a/chrome/installer/util/uninstall_metrics.cc b/chrome/installer/util/uninstall_metrics.cc
index 5ca43321b6..94219f6886 100644
--- a/chrome/installer/util/uninstall_metrics.cc
+++ b/chrome/installer/util/uninstall_metrics.cc
@@ -10,7 +10,7 @@
#include "base/json/json_file_value_serializer.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
#include "chrome/common/pref_names.h"
#include "chrome/installer/util/util_constants.h"
diff --git a/chrome/installer/util/uninstall_metrics.h b/chrome/installer/util/uninstall_metrics.h
index eb97909bd8..de53171071 100644
--- a/chrome/installer/util/uninstall_metrics.h
+++ b/chrome/installer/util/uninstall_metrics.h
@@ -5,7 +5,7 @@
#ifndef CHROME_INSTALLER_UTIL_UNINSTALL_METRICS_H_
#define CHROME_INSTALLER_UTIL_UNINSTALL_METRICS_H_
-#include "base/string16.h"
+#include "base/strings/string16.h"
namespace base {
class DictionaryValue;
diff --git a/chrome/installer/util/uninstall_metrics_unittest.cc b/chrome/installer/util/uninstall_metrics_unittest.cc
index b2bf747e44..cfd39c5a6b 100644
--- a/chrome/installer/util/uninstall_metrics_unittest.cc
+++ b/chrome/installer/util/uninstall_metrics_unittest.cc
@@ -8,7 +8,7 @@
#include "base/json/json_string_value_serializer.h"
#include "base/memory/scoped_ptr.h"
-#include "base/string16.h"
+#include "base/strings/string16.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace installer {
diff --git a/chrome/installer/util/user_experiment.cc b/chrome/installer/util/user_experiment.cc
index 6d9ae4ea03..ec28d7f47d 100644
--- a/chrome/installer/util/user_experiment.cc
+++ b/chrome/installer/util/user_experiment.cc
@@ -13,10 +13,10 @@
#include "base/files/file_path.h"
#include "base/process_util.h"
#include "base/rand_util.h"
-#include "base/string_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
-#include "base/utf_string_conversions.h"
+#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_handle.h"
#include "base/win/windows_version.h"
#include "chrome/common/attrition_experiments.h"
diff --git a/chrome/installer/util/user_experiment.h b/chrome/installer/util/user_experiment.h
index 89974b8738..8a57e4e7a4 100644
--- a/chrome/installer/util/user_experiment.h
+++ b/chrome/installer/util/user_experiment.h
@@ -8,7 +8,7 @@
#ifndef CHROME_INSTALLER_UTIL_USER_EXPERIMENT_H_
#define CHROME_INSTALLER_UTIL_USER_EXPERIMENT_H_
-#include "base/string16.h"
+#include "base/strings/string16.h"
#include "chrome/installer/util/util_constants.h"
class CommandLine;
diff --git a/chrome/installer/util/wmi.h b/chrome/installer/util/wmi.h
index 14c8e4348f..b1d391ffbc 100644
--- a/chrome/installer/util/wmi.h
+++ b/chrome/installer/util/wmi.h
@@ -20,9 +20,9 @@
#ifndef CHROME_INSTALLER_UTIL_WMI_H_
#define CHROME_INSTALLER_UTIL_WMI_H_
-#include "base/string16.h"
#include <string>
#include <wbemidl.h>
+#include "base/strings/string16.h"
namespace installer {
diff --git a/chrome/installer/util/work_item_list_unittest.cc b/chrome/installer/util/work_item_list_unittest.cc
index 79e3192502..f6c2322d25 100644
--- a/chrome/installer/util/work_item_list_unittest.cc
+++ b/chrome/installer/util/work_item_list_unittest.cc
@@ -9,7 +9,7 @@
#include "base/files/scoped_temp_dir.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
-#include "base/string_util.h"
+#include "base/strings/string_util.h"
#include "base/win/registry.h"
#include "chrome/installer/util/conditional_work_item_list.h"
#include "chrome/installer/util/work_item.h"