From 719efd0ac4b8ba8e40108fcffa2dd49ed520f56a Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sun, 18 Jan 2015 17:57:21 +0000 Subject: [PATCH] eliminate dependency on 'curl' on host ...by bundling it in the weavetools image Closes #351. --- tools/build.sh | 12 ++++++++++++ weave | 7 +------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tools/build.sh b/tools/build.sh index e4f66961..ab951e92 100644 --- a/tools/build.sh +++ b/tools/build.sh @@ -37,4 +37,16 @@ fetch $CONNTRACK (cd $CONNTRACK; ./configure && make LDFLAGS=-static && rm -f src/conntrack && make LDFLAGS=-all-static) cp $CONNTRACK/src/conntrack "$BASEDIR"/bin/ +# curl + +CURL=curl-7.40.0 + +rm -rf $CURL + +curl -s -S http://curl.haxx.se/download/$CURL.tar.gz | tar xvz +(cd $CURL; ./configure --without-ssl --disable-shared && make && rm src/curl && make LDFLAGS=-all-static) +cp $CURL/src/curl "$BASEDIR"/bin/ + +# + touch "$BASEDIR"/bin diff --git a/weave b/weave index 06665c6d..2909587c 100755 --- a/weave +++ b/weave @@ -322,12 +322,7 @@ http_call_ip() { http_verb="$3" url="$4" shift 4 - if command_exists curl ; then - curl -s -X $http_verb "$@" http://$ip:$port$url - else - echo "Cannot find curl, which is required for this operation." >&2 - exit 1 - fi + run_tool host curl -s -X $http_verb "$@" http://$ip:$port$url } # Perform operation $1 on container ID $2 to local DNS database at address $3