You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2017/01/05 19:22:28 UTC

[3/3] kudu git commit: thirdparty: Link curl against el6 workaround openssl

thirdparty: Link curl against el6 workaround openssl

This patch enables HTTPS support for thirdparty libcurl as well as links
thirdparty libcurl against the el6 workaround openssl when applicable.

Part of this patch pulled out of Todd's https://gerrit.cloudera.org/5015

This patch restores the capability to use HTTPS from libcurl for tests
while also maintaining support for posting to the dist_test cluster from
CentOS 6.

We considered (and attempted) depending on the system libcurl instead of
including it in thirdparty, however the system libcurl links against the
system openssl libraries. On CentOS 6, we build and test against the
CentOS 6.4 version of openssl, which does not provide the symbols needed
by the system version of libcurl. So, we are required to provide, as
part of thirdparty, any library needing to be linked against openssl,
and ensure that we build it against the el6-workaround openssl version.

Change-Id: I19e6be946853a80dad0f496839212887e76db06f
Reviewed-on: http://gerrit.cloudera.org:8080/5603
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/4412492c
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/4412492c
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/4412492c

Branch: refs/heads/master
Commit: 4412492c9b553a3300aa16996537b9ec225791fa
Parents: bdd8e48
Author: Mike Percy <mp...@apache.org>
Authored: Wed Jan 4 16:55:34 2017 -0800
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Thu Jan 5 19:21:48 2017 +0000

----------------------------------------------------------------------
 thirdparty/build-definitions.sh | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/4412492c/thirdparty/build-definitions.sh
----------------------------------------------------------------------
diff --git a/thirdparty/build-definitions.sh b/thirdparty/build-definitions.sh
index 109d715..4460e2e 100644
--- a/thirdparty/build-definitions.sh
+++ b/thirdparty/build-definitions.sh
@@ -486,12 +486,29 @@ build_squeasel() {
 }
 
 build_curl() {
-  # Configure for a very minimal install - basically only HTTP, since we only
-  # use this for testing our own HTTP endpoints at this point in time.
+  # Configure for a very minimal install - basically only HTTP(S), since we only
+  # use this for testing our own HTTP/HTTPS endpoints at this point in time.
   CURL_BDIR=$TP_BUILD_DIR/$CURL_NAME$MODE_SUFFIX
   mkdir -p $CURL_BDIR
   pushd $CURL_BDIR
-  $CURL_SOURCE/configure \
+
+  # If the el6 workaround openssl is present, we must build curl against that
+  # version of openssl, not the system version, because at test runtime we use
+  # the workaround openssl.
+  local CURL_EXTRA_CPPFLAGS=""
+  local CURL_EXTRA_LDFLAGS=""
+  if [ -d "$OPENSSL_WORKAROUND_DIR" ]; then
+    CURL_EXTRA_CPPFLAGS="-I$OPENSSL_WORKAROUND_DIR/usr/include"
+    CURL_EXTRA_LDFLAGS="-L$OPENSSL_WORKAROUND_DIR/usr/lib64 -Wl,-rpath,$OPENSSL_WORKAROUND_DIR/usr/lib64"
+  fi
+
+  # Note: curl shows a message asking for CPPFLAGS to be used for include
+  # directories, not CFLAGS.
+  CFLAGS="$EXTRA_CFLAGS" \
+    CPPFLAGS="$CURL_EXTRA_CPPFLAGS" \
+    LDFLAGS="$EXTRA_LDFLAGS $CURL_EXTRA_LDFLAGS" \
+    LIBS="$EXTRA_LIBS" \
+    $CURL_SOURCE/configure \
     --prefix=$PREFIX \
     --disable-dict \
     --disable-file \
@@ -507,8 +524,7 @@ build_curl() {
     --disable-smtp \
     --disable-telnet \
     --disable-tftp \
-    --without-librtmp \
-    --without-ssl
+    --without-librtmp
   make -j$PARALLEL $EXTRA_MAKEFLAGS install
   popd
 }