build: Suggest to download supported mbedtls
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Thu, 24 Nov 2016 16:47:25 +0000 (17:47 +0100)
committerKevin Kane <kkane@microsoft.com>
Tue, 24 Jan 2017 17:20:54 +0000 (17:20 +0000)
Note this patch is appropriate for release versions (or branches)
 while master or development branches can follow upstream's master branch
 and eventually synched when needed.

Change-Id: Iae857f9d5bab9a5d1174d38823faff25666299cb
Bug: https://jira.iotivity.org/browse/IOT-1600
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14765
Reviewed-by: Habib Virji <habib.virji@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
(cherry picked from commit 8cb98d358a94a06e3b18ca6131c3c6b58fc32e76)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15357
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
extlibs/mbedtls/SConscript
extlibs/mbedtls/prep.sh

index 7321670..2170618 100644 (file)
@@ -38,9 +38,9 @@ if not os.path.exists(mbedtls_dir):
     print '''
 *********************************** Error: ****************************************
 * Please download mbedtls using the following command:                            *
-*     $ git clone https://github.com/ARMmbed/mbedtls.git extlibs/mbedtls/mbedtls  *
+* $ git clone https://github.com/ARMmbed/mbedtls.git extlibs/mbedtls/mbedtls -b %s
 ***********************************************************************************
- '''
+ ''' % mbedtls_revision
     Exit(1)
 #cd extlib/mbedtls/mbedtls
 os.chdir(mbedtls_dir)
index 8fde51b..acc660a 100755 (executable)
@@ -5,13 +5,16 @@ set -e
 # Keep mbedtls_revision in sync with extlibs/mbedtls/SConscript's setting. Right now this script
 # assumes mbedtls_revision is a tag; comment out the second clause if mbedtls_revision becomes
 # a branch or a specific commit.
+mbedtls_url="https://github.com/ARMmbed/mbedtls"
 mbedtls_dir=`dirname -- "$(readlink -f "$0")"`/mbedtls
+mbedtls_reldir="extlibs/mbedtls/mbedtls"
+
 mbedtls_revision="mbedtls-2.4.0"
 if [ ! -d ${mbedtls_dir} ]; then
     echo ""
     echo "*********************************** Error: ****************************************"
     echo "* Please download mbedTLS using the following command:                            *"
-    echo "*     $ git clone https://github.com/ARMmbed/mbedtls.git extlibs/mbedtls/mbedtls  *"
+    echo "*     $ git clone ${mbedtls_url} ${mbedtls_reldir} -b ${mbedtls_revision}"
     echo "***********************************************************************************"
     echo ""
     exit