[Scripts][NonACR][KUEP automation- code optimization and comments addition for readab... 49/268549/1
authormanu.tiwari <manu.tiwari@samsung.com>
Fri, 24 Dec 2021 07:12:00 +0000 (12:42 +0530)
committerNibha Sharma <nibha.sharma@samsung.com>
Fri, 24 Dec 2021 10:17:11 +0000 (10:17 +0000)
Change-Id: Icdcf45743c2646781de84746bdfac24d291fbf8f
Signed-off-by: manu.tiwari <manu.tiwari@samsung.com>
(cherry picked from commit 6dadd056147f96fb257c7af7054150d4bdb1cee7)

scripts_tpk/tpk-install.py
scripts_tpk/tpk_create.sh

index 5ed46f4283b5582c2084fedbf1d47037c94b4d6b..279ad315c636488e12babd9cd4e5e930e8e3d465 100755 (executable)
@@ -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)
index 8db6ef3c173be8b29f03768908e5244c5b9fdc57..9f67adab302e309a5cfaad3cbe2a0430dc7165cf 100755 (executable)
@@ -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"