From: manu.tiwari Date: Fri, 24 Dec 2021 07:12:00 +0000 (+0530) Subject: [Scripts][NonACR][KUEP automation- code optimization and comments addition for readab... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F268549%2F1;p=test%2Ftct%2Fnative%2Fapi.git [Scripts][NonACR][KUEP automation- code optimization and comments addition for readability] Change-Id: Icdcf45743c2646781de84746bdfac24d291fbf8f Signed-off-by: manu.tiwari (cherry picked from commit 6dadd056147f96fb257c7af7054150d4bdb1cee7) --- diff --git a/scripts_tpk/tpk-install.py b/scripts_tpk/tpk-install.py index 5ed46f428..279ad315c 100755 --- a/scripts_tpk/tpk-install.py +++ b/scripts_tpk/tpk-install.py @@ -214,7 +214,9 @@ def zipper(zip_dir, zip_file, include_root, sep): fullpath = os.path.join(root, f) archive_name = os.path.join(archive_root, f) if(profile == "tv"): + #If profile is tv final zip file will be signed by kuep certificate as it contains .sh and .tpk if f.endswith('.sh'): + print('signing of ' + fullpath + ' is started') os.system('./scripts_tpk/kuep_net_signer.sh -s -tizen_major_ver 6 ' + fullpath) print('signing of ' + fullpath + ' successfully done') zf.write(fullpath, archive_name, zipfile.ZIP_DEFLATED) diff --git a/scripts_tpk/tpk_create.sh b/scripts_tpk/tpk_create.sh index 8db6ef3c1..9f67adab3 100755 --- a/scripts_tpk/tpk_create.sh +++ b/scripts_tpk/tpk_create.sh @@ -213,13 +213,14 @@ deploySourceFile() { # copying data and shared data WORKDIR=`pwd` cd $2 - fileCount="$(git status -s | grep -c "post-install/post-inst.sh" )" if [ "$3" == "tv" ]; then + fileCount="$(git status -s | grep -c "post-install/post-inst.sh" )" if [ $fileCount -gt 0 ] ; then - echo -e "${reset}Signing of post-inst.sh started" + #post-inst.sh file signed by kuep certificate if there is any new change in file for tv profile + echo -e $green"Signing of post-inst.sh started"$reset sed -i '/##UEP*/d' post-install/post-inst.sh ./../../../scripts_tpk/kuep_net_signer.sh -s -tizen_major_ver 6 post-install/post-inst.sh - echo -e "${reset}Signing of post-inst.sh done" + echo -e $green"Signing of post-inst.sh done"$reset fi fi find . -type f ! -iname "*.c" ! -iname "*.cpp" ! -iname "*.h" ! -iname "CMakeLists.txt" -exec cp -p --parents {} $1/shared/res/. ";" @@ -250,9 +251,10 @@ deploySourceFile() { fi cd $WORKDIR fi - fileCount="$(git status -s | grep -c "scripts_tpk/spec.sh" )" if [ "$3" == "tv" ]; then + fileCount="$(git status -s | grep -c "scripts_tpk/spec.sh" )" if [ $fileCount -gt 0 ] ; then + #spec.sh file signed by kuep certificate if there is any new change in file for tv profile echo -e "${reset}Signing of spec.sh started" sed -i '/##UEP*/d' scripts_tpk/spec.sh ./scripts_tpk/kuep_net_signer.sh -s -tizen_major_ver 6 scripts_tpk/spec.sh @@ -753,7 +755,10 @@ else fi if [ $PROFILE_TYPE == "tv" ]; then + #If profile is tv then kuep signing for tpk is required + echo $green"kuep signing of tpk has been started"$reset RunCommand "./kuep_net_signer.sh -s -tizen_major_ver 6 $WORKSPACE_PATH/$PROJECT_NAME/$BUILD_TYPE/$PROJECT_NAME" + echo $green"kuep signing of tpk has been completed successfully"$reset fi RunCommand "tizen package --type tpk --sign test -- $WORKSPACE_PATH/$PROJECT_NAME/$BUILD_TYPE" "packaging of $PROJECT_NAME"