From: YounghyunJoo Date: Tue, 11 Oct 2016 11:08:35 +0000 (+0900) Subject: [IOT-1438] Solve Build issue on Tizen secured build through gbsbuild script X-Git-Tag: 1.3.0~1055^2~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64cca476d61db9023e9c589bcc196f68645d4ca1;p=platform%2Fupstream%2Fiotivity.git [IOT-1438] Solve Build issue on Tizen secured build through gbsbuild script - add secured check logic into gbsbuild.sh file - using this logic, check mbedtls file & apply the patch Change-Id: I6d458ea599562216444582b78724a1b61023d6de Signed-off-by: YounghyunJoo Reviewed-on: https://gerrit.iotivity.org/gerrit/13099 Tested-by: jenkins-iotivity Reviewed-by: dongik Lee Reviewed-by: Uze Choi Tested-by: Uze Choi (cherry picked from commit 3f7b46b56356b3d8997fc56d5904a1e0e12d9c87) Reviewed-on: https://gerrit.iotivity.org/gerrit/13263 --- diff --git a/gbsbuild.sh b/gbsbuild.sh index 58c2cdf..e514e6a 100755 --- a/gbsbuild.sh +++ b/gbsbuild.sh @@ -55,21 +55,11 @@ cp -R $sourcedir/iotivity.pc.in $sourcedir/tmp cd $sourcedir/tmp -rm -rf ./extlibs/tinycbor/tinycbor/.git* - -# Initialize Git repositoryㅣ -if [ ! -d .git ]; then - git init ./ - git config user.email "you@example.com" - git config user.name "Your Name" - git add ./ - git commit -m "Initial commit" -fi - withtcp=0 withcloud=0 withproxy=0 withmq=OFF +secured=0 for ARGUMENT_VALUE in $* do echo $ARGUMENT_VALUE @@ -88,10 +78,44 @@ do if [ "WITH_MQ" = $ARGUMENT_VALUE ];then withmq=PUB,SUB,BROKER fi + + if [ "SECURED" = $ARGUMENT_VALUE ];then + secured=1 + fi done +if [ $secured -eq 1 ];then + echo `pwd` + if [ -d ./extlibs/mbedtls/mbedtls ];then + cd ./extlibs/mbedtls/mbedtls + git reset --hard ad249f509fd62a3bbea7ccd1fef605dbd482a7bd ; git apply ../ocf.patch + cd - + rm -rf ./extlibs/mbedtls/mbedtls/.git* + + else + echo "" + echo "*********************************** Error: ****************************************" + echo "* Please download mbedtls using the following command: *" + echo "* $ git clone https://github.com/ARMmbed/mbedtls.git extlibs/mbedtls/mbedtls *" + echo "***********************************************************************************" + echo "" + exit + fi +fi + +rm -rf ./extlibs/tinycbor/tinycbor/.git* + +# Initialize Git repositoryㅣ +if [ ! -d .git ]; then + git init ./ + git config user.email "you@example.com" + git config user.name "Your Name" + git add ./ + git commit -m "Initial commit" +fi + echo "Calling core gbs build command" -gbscommand="gbs build -A armv7l --define 'WITH_TCP $withtcp' --define 'WITH_CLOUD $withcloud' --define 'WITH_PROXY $withproxy' --define 'WITH_MQ $withmq' -B ~/GBS-ROOT-OIC --include-all --repository ./" +gbscommand="gbs build -A armv7l --define 'WITH_TCP $withtcp' --define 'WITH_CLOUD $withcloud' --define 'WITH_PROXY $withproxy' --define 'WITH_MQ $withmq' --define 'SECURED $secured' -B ~/GBS-ROOT-OIC --include-all --repository ./" echo $gbscommand if eval $gbscommand; then echo "Build is successful"