Skip to content

Commit

Permalink
thirdparty: Link curl against el6 workaround openssl
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mpercy authored and adembo committed Jan 5, 2017
1 parent bdd8e48 commit 4412492
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions thirdparty/build-definitions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
}
Expand Down

0 comments on commit 4412492

Please sign in to comment.