build: Suggest to download supported mbedtls
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Thu, 24 Nov 2016 16:47:25 +0000 (17:47 +0100)
committerPhil Coval <philippe.coval@osg.samsung.com>
Thu, 24 Nov 2016 18:06:04 +0000 (18:06 +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>
extlibs/mbedtls/SConscript
extlibs/mbedtls/prep.sh

index b8b9cca27a260c2175a00e403cef8f8cc4364ade..5794a44ab0856cecb52cab5352986d6a08ec2148 100644 (file)
@@ -37,9 +37,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 %s
 ***********************************************************************************
- '''
+ ''' % mbedtls_revision
     Exit(1)
 #cd extlib/mbedtls/mbedtls
 os.chdir(mbedtls_dir)
index 8fde51bbdba7d85b5c5059347030352c4b2f95fe..acc660ad1bc213f9bb6a62292928a2e8fc751060 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