[TCT][mediavision][Non-ACR] Fix smack issue 12/301812/1
authorKwanghoon Son <k.son@samsung.com>
Thu, 23 Nov 2023 10:06:39 +0000 (19:06 +0900)
committerKwanghoon Son <k.son@samsung.com>
Thu, 23 Nov 2023 10:06:39 +0000 (19:06 +0900)
/opt/usr/globalapps/mediavision.face.recognition directory was shell
smack rule. So changed to "User::App::Shared".
Also clean up script.

Change-Id: I22d8c57bd26351b9c3e4dbfde634f77b890e89e6
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
scripts_tpk/spec.sh

index bd5463141be5a21bffbf01ee186943505f799bce..5795feb4fc9bea1c28f811f2bc1e7858cfd2a1ff 100755 (executable)
@@ -713,53 +713,24 @@ case "$1" in
                        ;;
        "org.tizen.media-vision-dl-native-itc")
                        echo "Installing pre-requisites for the package $1"
-                       mkdir -p $APP_DATA_DIR
-                       mkdir -p $APP_DATA_DIR/tmp
-                       mkdir -p $APP_DATA_DIR/P1
-                       cp 09.jpg  $APP_DATA_DIR/P1
-                       cp test_rec_model $APP_DATA_DIR/test_rec_model
-                       cp test_trk_model $APP_DATA_DIR/test_trk_model
-                       cp 00.jpg $APP_DATA_DIR/tmp/00.jpg
-                       cp 09.jpg $APP_DATA_DIR/tmp/09.jpg
-                       cp 04.jpg $APP_DATA_DIR/tmp/04.jpg
-                       cp 01.jpg $APP_DATA_DIR/tmp/01.jpg
-                       cp 05.jpg $APP_DATA_DIR/tmp/05.jpg
-                       cp scene.jpg $APP_DATA_DIR/tmp/scene.jpg
-                       cp target.jpg $APP_DATA_DIR/tmp/target.jpg
-                       cp neutral.jpg $APP_DATA_DIR/tmp/neutral.jpg
+                       RPK_DIR="/opt/usr/globalapps/mediavision.face.recognition"
+                       DL_MODEL_DIR="$RPK_DIR/models/tflite"
 
-                       mkdir -p $DEVICE_PHYSICAL_STORAGE_30
                        mkdir -p $DEVICE_PHYSICAL_STORAGE_30/P1
                        mkdir -p $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/training/
-                       mkdir -p /opt/usr/globalapps/mediavision.face.recognition/models/tflite/
+                       mkdir -p $DL_MODEL_DIR
                        mkdir -p $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/images/P1
                        mkdir -p $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/images/P2
 
-                       cp $APP_DATA_DIR/tmp/09.jpg $DEVICE_PHYSICAL_STORAGE_30/P1
-                       cp track/sequence/*.* $DEVICE_PHYSICAL_STORAGE_30/res/track/sequence/
-                       chmod -R 777 $APP_DATA_DIR
                        chmod -R 777 $DEVICE_PHYSICAL_STORAGE_30/res
-                       chown -R 5000:5000 $APP_DATA_DIR
                        chown -R 5001:100 $DEVICE_PHYSICAL_STORAGE_30/res
-                       chsmack -a "User::App::Shared" $APP_DATA_DIR/*
-                       chsmack -e "User::App::Shared" $APP_DATA_DIR/*
-                       chsmack -a "User::App::Shared" $APP_DATA_DIR/tmp/*
-                       chsmack -a "User::App::Shared" $APP_DATA_DIR/tmp/*
-                       chsmack -a "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition
-                       chsmack -e "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition
-                       chsmack -a "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/*
-                       chsmack -e "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/*
-                       chsmack -a "User::App::Shared" /opt/usr/globalapps/mediavision.face.recognition/models/tflite
-                       chsmack -e "User::App::Shared" /opt/usr/globalapps/mediavision.face.recognition/models/tflite
-                       cp res/face_recognition/models/* /opt/usr/globalapps/mediavision.face.recognition/models/tflite/
+                       cp res/face_recognition/models/* $DL_MODEL_DIR
                        cp res/face_recognition/images/P1/* $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/images/P1/
                        cp res/face_recognition/images/P2/* $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/images/P2/
-                       chsmack -a "User::App::Shared" /opt/usr/globalapps/mediavision.face.recognition/models/tflite/*
-                       chsmack -e "User::App::Shared" /opt/usr/globalapps/mediavision.face.recognition/models/tflite/*
-                       chsmack -a "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/images/P1/*
-                       chsmack -e "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/images/P1/*
-                       chsmack -a "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/images/P2/*
-                       chsmack -e "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/images/P2/*
+                       chsmack -a "User::App::Shared" -r $RPK_DIR
+                       chsmack -e "User::App::Shared" -r $RPK_DIR
+                       chsmack -a "User::App::Shared" -r $DEVICE_PHYSICAL_STORAGE_30/res
+                       chsmack -e "User::App::Shared" -r $DEVICE_PHYSICAL_STORAGE_30/res
                        ;;
        "org.tizen.streamrecorder-native-utc")
                        echo "Installing pre-requisites for the package $1"