You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/LChrome64-10305060114/data/cron/google-chrome

389 lines
17 KiB

#!/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 google-chrome 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".
# System-wide package configuration.
DEFAULTS_FILE="/etc/default/google-chrome"
# sources.list setting for google-chrome updates.
REPOCONFIG="deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main"
REPOCONFIGREGEX="deb (\[arch=[^]]*\bamd64\b[^]]*\][[:space:]]*) https?://dl.google.com/linux/chrome/deb/ stable main"
APT_GET="`command -v apt-get 2> /dev/null`"
APT_CONFIG="`command -v 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"
# Set variables for the locations of the apt trusted keyrings.
find_apt_trusted() {
eval $("$APT_CONFIG" shell APT_TRUSTEDDIR 'Dir::Etc::trustedparts/d')
}
# Install the repository/package signing keys.
# (see also: https://www.google.com/linuxrepositories/)
install_key() {
find_apt_trusted
# ASCII-armored keyrings are only supported in apt 1.4 and later, but we must
# continue supporting Trusty and Xenial which have older versions of apt, so
# the keyring is installed as a binary blob. base64 is used to decode the
# ASCII keyring, which should always be available since it comes from the
# coreutils.
(base64 -d > "$APT_TRUSTEDDIR/google-chrome.gpg") <<KEYDATA
mQINBFcMjNMBEAC6Wr5QuLIFgz1V1EFPlg8ty2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LQL8dlDnFChymldxm/J/UFdJGSWRldEDsPrzH
QESKvsV9EjnJQR5p5zkQK6jx0zqSlDgiNG2GT3/CSvwIdCih6Cl9HThHtYNm3ZYN
0bU9W2jeoLh3AINNTcrp0tAHZuQLFxukbj56O5eB+nfk67/X2iNii46ZdJQNwbT9
YN6CstQz+Cnqg7YP/3G6Y6NHIQggXnlYIi3iwN72hEgEqz6vIRK87lBGW2r3eQ0c
DZuE3+5Q4FYciw+B2RKeDhjdmPHypA5o+RiAyI7JOZwJalqHO3nwJG5sr0rRzcJs
bGvpbzso2JuTyTURv4tBNq45b9y0Qdzt5PpNrPJbQADJWn+HWsbVJB5gWBTdoQYg
pyTr84nQyscWAUFTRbmHvtjCCfLdvU8wM7ubAQ5Dwi1pABRttRAMuPA94HzaBF5y
XkghxHpnW0IcXGiwgch9LQyaO9VSRhiPH6r5Zuk7KvGhHph7SC5JgUn9vJmmp1zc
d0mXQ2Zh8M81J3Ri3iGPHM2CqplAxXNbIrnztbEJhN2I+77m73Z4d+K1ivg6xQht
eSZhwhx7/Z3Tl+U2jYOEFIn/UFmV3UxRSJa/jQRcjvMKprSp4tAZ2yJI3babjRbi
xgUEtlK105/JepxcAdw9vosxO/rR7VqCzu0copdxC0GAH8og+A9/3LPhlRGy3Qhf
zjy9JHWHj4EIsol02BS8+dWvAoYerkve9O9+h6/B5wM/Yng9BjT+OrNvkfmqK2cs
pBXwYedOrC4uWcUmueEVrv5P4FF36wJ+ejvPS6vdTxVTdLXjouUHwTQQZVlNjWY3
cIyj03nZ19c+b30+2FzG/uSnb/ePWsRLY7Iyz4ygr8etweBPnEIvjwpAZxOu
KEYDATA
}
uninstall_key() {
find_apt_trusted
rm -f "$APT_TRUSTEDDIR/google-chrome.gpg"
}
# Set variables for the locations of the apt sources lists.
find_apt_sources() {
eval $("$APT_CONFIG" shell APT_SOURCESDIR 'Dir::Etc::sourceparts/d')
}
# 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/google-chrome.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 -E "^[[:space:]#]*\b$REPOCONFIGREGEX\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/google-chrome.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/google-chrome.list" \
"$APT_SOURCESDIR/google-chrome-stable.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/google-chrome.list"
if [ -r "$SOURCELIST" ]; then
REPOLINE=$(grep -E "^[[:space:]]*#[[:space:]]*$REPOCONFIGREGEX[[:space:]]*# disabled on upgrade to .*" "$SOURCELIST")
if [ $? -eq 0 ]; then
sed -i -e "s,^[[:space:]]*#[[:space:]]*\(.*\)[[:space:]]*# disabled on upgrade to .*,\1," \
"$SOURCELIST"
LOGGER=$(command -v logger 2> /dev/null)
if [ "$LOGGER" ]; then
"$LOGGER" -t "$0" "Reverted repository modification: $REPOLINE."
fi
fi
fi
}
DEFAULT_ARCH="amd64"
get_lib_dir() {
if [ "$DEFAULT_ARCH" = "i386" ]; then
LIBDIR=lib/i386-linux-gnu
elif [ "$DEFAULT_ARCH" = "amd64" ]; then
LIBDIR=lib/x86_64-linux-gnu
elif [ "$DEFAULT_ARCH" = "armhf" ]; then
LIBDIR=lib/arm-linux-gnueabihf
elif [ "$DEFAULT_ARCH" = "arm64" ]; then
LIBDIR=lib/aarch64-linux-gnu
elif [ "$DEFAULT_ARCH" = "mipsel" ]; then
LIBDIR=lib/mipsel-linux-gnu
elif [ "$DEFAULT_ARCH" = "mips64el" ]; then
LIBDIR=lib/mips64el-linux-gnuabi64
else
echo Unknown CPU Architecture: "$DEFAULT_ARCH"
exit 1
fi
}
## MAIN ##
if [ -r "$DEFAULTS_FILE" ]; then
. "$DEFAULTS_FILE"
fi
install_key
if [ "$repo_add_once" = "true" ]; then
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