diff options
author | Michael Moss <mmoss@google.com> | 2015-04-08 17:30:06 -0700 |
---|---|---|
committer | Michael Moss <mmoss@google.com> | 2015-04-09 00:31:37 +0000 |
commit | 456af675767f676be785dfaa29a61665bc855459 (patch) | |
tree | ca27dfb2da8263e9a21f88d394a36b8f0c5d4183 | |
parent | cf0c3c3522ed57d4922b0eb6e9d57ef4cf0cbeb8 (diff) | |
download | chromium_src-456af675767f676be785dfaa29a61665bc855459.zip chromium_src-456af675767f676be785dfaa29a61665bc855459.tar.gz chromium_src-456af675767f676be785dfaa29a61665bc855459.tar.bz2 |
Add support for SSL-based DEB repo.
This doesn't force use of the SSL repo, but prevents overwriting the
repo config if a user manually changes it to use HTTPS.
R=thestig@chromium.org, thestig@google.com
BUG=433450,474100
Review URL: https://codereview.chromium.org/1068323002
Cr-Commit-Position: refs/heads/master@{#324317}
-rw-r--r-- | chrome/installer/linux/common/apt.include | 6 | ||||
-rw-r--r-- | chrome/installer/linux/common/installer.include | 1 | ||||
-rw-r--r-- | chrome/installer/linux/common/variables.include | 1 | ||||
-rwxr-xr-x | chrome/installer/linux/debian/build.sh | 1 | ||||
-rwxr-xr-x | chrome/installer/linux/rpm/build.sh | 1 |
5 files changed, 7 insertions, 3 deletions
diff --git a/chrome/installer/linux/common/apt.include b/chrome/installer/linux/common/apt.include index 25fd054..77d418c 100644 --- a/chrome/installer/linux/common/apt.include +++ b/chrome/installer/linux/common/apt.include @@ -87,7 +87,7 @@ update_bad_sources() { ACTIVECONFIGS=$(grep -v "^[[:space:]]*\(#.*\)\?$" "$SOURCELIST" 2>/dev/null) # Check if the correct repository configuration is in there. - REPOMATCH=$(grep "^[[:space:]#]*\b$REPOCONFIG\b" "$SOURCELIST" \ + REPOMATCH=$(grep -E "^[[:space:]#]*\b($REPOCONFIG|$SSLREPOCONFIG)\b" "$SOURCELIST" \ 2>/dev/null) # Check if the correct repository is disabled. @@ -174,9 +174,9 @@ handle_distro_upgrade() { find_apt_sources SOURCELIST="$APT_SOURCESDIR/@@PACKAGE@@.list" if [ -r "$SOURCELIST" ]; then - REPOLINE=$(grep -E "^[[:space:]]*#[[:space:]]*$REPOCONFIG[[:space:]]*# disabled on upgrade to .*" "$SOURCELIST") + REPOLINE=$(grep -E "^[[:space:]]*#[[:space:]]*($REPOCONFIG|$SSLREPOCONFIG)[[:space:]]*# disabled on upgrade to .*" "$SOURCELIST") if [ $? -eq 0 ]; then - sed -i -e "s,^[[:space:]]*#[[:space:]]*\($REPOCONFIG\)[[:space:]]*# disabled on upgrade to .*,\1," \ + sed -i -e "s,^[[:space:]]*#[[:space:]]*\($REPOCONFIG\|$SSLREPOCONFIG\)[[:space:]]*# disabled on upgrade to .*,\1," \ "$SOURCELIST" LOGGER=$(which logger 2> /dev/null) if [ "$LOGGER" ]; then diff --git a/chrome/installer/linux/common/installer.include b/chrome/installer/linux/common/installer.include index 1296ca8..14171f7 100644 --- a/chrome/installer/linux/common/installer.include +++ b/chrome/installer/linux/common/installer.include @@ -73,6 +73,7 @@ process_template() ( -e "s#@@MAINTNAME@@#${MAINTNAME}#g" \ -e "s#@@MAINTMAIL@@#${MAINTMAIL}#g" \ -e "s#@@REPOCONFIG@@#${REPOCONFIG}#g" \ + -e "s#@@SSLREPOCONFIG@@#${SSLREPOCONFIG}#g" \ -e "s#@@SHORTDESC@@#${SHORTDESC}#g" \ -e "s#@@FULLDESC@@#${FULLDESC}#g" \ -e "s#@@DEFAULT_FLAGS@@#${DEFAULT_FLAGS:-}#g" \ diff --git a/chrome/installer/linux/common/variables.include b/chrome/installer/linux/common/variables.include index f3a17cd..79340cd 100644 --- a/chrome/installer/linux/common/variables.include +++ b/chrome/installer/linux/common/variables.include @@ -3,3 +3,4 @@ DEFAULTS_FILE="/etc/default/@@PACKAGE@@" # sources.list setting for @@PACKAGE@@ updates. REPOCONFIG="@@REPOCONFIG@@" +SSLREPOCONFIG="@@SSLREPOCONFIG@@" diff --git a/chrome/installer/linux/debian/build.sh b/chrome/installer/linux/debian/build.sh index 533e986..c7f75a2 100755 --- a/chrome/installer/linux/debian/build.sh +++ b/chrome/installer/linux/debian/build.sh @@ -233,6 +233,7 @@ eval $(sed -e "s/^\([^=]\+\)=\(.*\)$/export \1='\2'/" \ "${BUILDDIR}/installer/theme/BRANDING") REPOCONFIG="deb http://dl.google.com/linux/chrome/deb/ stable main" +SSLREPOCONFIG="deb https://dl.google.com/linux/chrome/deb/ stable main" verify_channel # Some Debian packaging tools want these set. diff --git a/chrome/installer/linux/rpm/build.sh b/chrome/installer/linux/rpm/build.sh index c3626a6..6110905 100755 --- a/chrome/installer/linux/rpm/build.sh +++ b/chrome/installer/linux/rpm/build.sh @@ -281,6 +281,7 @@ eval $(sed -e "s/^\([^=]\+\)=\(.*\)$/export \1='\2'/" \ "${BUILDDIR}/installer/theme/BRANDING") REPOCONFIG="http://dl.google.com/linux/${PACKAGE#google-}/rpm/stable" +SSLREPOCONFIG="https://dl.google.com/linux/${PACKAGE#google-}/rpm/stable" verify_channel export USR_BIN_SYMLINK_NAME="${PACKAGE}-${CHANNEL}" |