From 63792f088e835b037c8e3cf7255283117f372567 Mon Sep 17 00:00:00 2001 From: KongQun Yang Date: Thu, 12 Mar 2015 09:29:53 -0700 Subject: [PATCH] Move find curl_ca_bundle script out of gyp and zlib DEPS change Find curl_ca_bundle script is used by linux only. Move it out of gyp and make sure it runs only in linux. Also make zlib deps generic for all systems, not for linux only. This is the first step of getting edash_packager builds on Windows and Mac. Change-Id: I82d3e5872fd0dd6f57127890bc062490332a1b69 --- DEPS | 8 +++--- packager/third_party/curl/README.packager | 3 +++ .../curl/config/linux/find_curl_ca_bundle.sh | 27 +++++++++++++++++++ packager/third_party/curl/curl.gyp | 19 +------------ 4 files changed, 35 insertions(+), 22 deletions(-) create mode 100755 packager/third_party/curl/config/linux/find_curl_ca_bundle.sh diff --git a/DEPS b/DEPS index 38c9712c8a..6179dbed7a 100644 --- a/DEPS +++ b/DEPS @@ -82,6 +82,10 @@ deps = { "src/packager/third_party/protobuf": Var("chromium_svn") + "/src/third_party/protobuf@" + Var("chromium_rev"), + # Required by build/linux/system.gyp and third_party/curl/curl.gyp. + "src/packager/third_party/zlib": + Var("chromium_svn") + "/src/third_party/zlib@" + Var("chromium_rev"), + "src/packager/tools/clang": Var("chromium_svn") + "/src/tools/clang@" + Var("chromium_rev"), @@ -100,10 +104,6 @@ deps_os = { # Linux gold build to build faster. "src/packager/third_party/gold": Var("chromium_svn") + "/deps/third_party/gold@" + Var("chromium_rev"), - - # Required by /src/build/linux/system.gyp. - "src/packager/third_party/zlib": - Var("chromium_svn") + "/src/third_party/zlib@" + Var("chromium_rev"), }, } diff --git a/packager/third_party/curl/README.packager b/packager/third_party/curl/README.packager index 0d808b6139..d40de2a9b0 100644 --- a/packager/third_party/curl/README.packager +++ b/packager/third_party/curl/README.packager @@ -30,6 +30,9 @@ Description of source tree. linux platform, with a few features disabled to build correctly on a fresh linux box. + config/linux/find_curl_ca_bundle.sh + A script used to find the path to curl_ca_bundle in the target system. + 2) curl.gyp A gyp build file for the library. Manually maintained. diff --git a/packager/third_party/curl/config/linux/find_curl_ca_bundle.sh b/packager/third_party/curl/config/linux/find_curl_ca_bundle.sh new file mode 100755 index 0000000000..af0d4a74a4 --- /dev/null +++ b/packager/third_party/curl/config/linux/find_curl_ca_bundle.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# Copyright 2015 Google Inc. All rights reserved. +# +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file or at +# https://developers.google.com/open-source/licenses/bsd + +# Scan ca bundle in its common appearing locations. +paths=('/etc/pki/tls/certs/ca-bundle.crt' + '/etc/ssl/cert.pem' + '/etc/ssl/certs/ca-bundle.crt' + '/etc/ssl/certs/ca-certificates.crt' + '/usr/local/share/certs/ca-root.crt' + '/usr/share/ssl/certs/ca-bundle.crt') + +for path in "${paths[@]}" +do + if test -f "$path" + then + echo "$path" + exit 0 + fi +done + +echo 'Failed to locate SSL CA cert.' +exit 1 diff --git a/packager/third_party/curl/curl.gyp b/packager/third_party/curl/curl.gyp index 240389e9ed..be458f4d26 100644 --- a/packager/third_party/curl/curl.gyp +++ b/packager/third_party/curl/curl.gyp @@ -5,23 +5,6 @@ # https://developers.google.com/open-source/licenses/bsd { - 'variables': { - # Scan ca bundle in its common appearing locations. - 'curl_ca_bundle%': - '