Merge branch 'tizen' into security-manager
[platform/core/test/security-tests.git] / packaging / security-tests.spec
index c4de72e..a3d222e 100644 (file)
@@ -25,11 +25,11 @@ BuildRequires: pkgconfig(sqlite3)
 BuildRequires: cynara-devel
 BuildRequires: pkgconfig(libtzplatform-config)
 BuildRequires: boost-devel
-Requires(post): gum-utils
-Requires(postun): gum-utils
-Requires(postun): %{_bindir}/id
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(libgum) >= 1.0.5
 Requires: perf
 Requires: gdb
+Requires: key-manager-listener
 
 %description
 Security tests repository - for tests that can't be kept together with code.
@@ -45,9 +45,11 @@ cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
         -DDPL_LOG="ON"                    \
         -DVERSION=%{version}              \
         -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:DEBUG} \
+%if "%{sec_product_feature_security_mdfpp_enable}" == "1"
+        -DSECURITY_MDFPP_STATE_ENABLE=1 \
+%endif
         -DCMAKE_VERBOSE_MAKEFILE=ON       \
-        -DCYNARA_DB_DIR=%{_localstatedir}/cynara/db \
-        -DAPP_USER=security-tests-app
+        -DCYNARA_DB_DIR=%{_localstatedir}/cynara/db
 make %{?jobs:-j%jobs}
 
 %install
@@ -55,18 +57,19 @@ make %{?jobs:-j%jobs}
 ln -sf /etc/smack/test_smack_rules %{buildroot}/etc/smack/test_smack_rules_lnk
 
 %post
-%{_bindir}/gum-utils --add-user --username=security-tests-app --usertype=normal --offline
-
 find /etc/smack/test_privilege_control_DIR/ -type f -name exec -exec chmod 0755 {} +
-find /usr/apps/test_DIR/ -type f -name exec -exec chmod 0755 {} +
+find /usr/apps/ -type f -name exec -exec chmod 0755 {} +
 
 # Load permissions templates
 api_feature_loader --verbose
 
-echo "security-tests postinst done ..."
+# Set vconf key for cc-mode testing if vconf key isn't there.
+%if "%{sec_product_feature_security_mdfpp_enable}" != "1"
+    echo "Install vconf key (file/security_mdpp/security_mdpp_state) for testing key-manager"
+    vconftool set -t string file/security_mdpp/security_mdpp_state "Unset"
+%endif
 
-%postun
-%{_bindir}/gum-utils --delete-user --uid=`%{_bindir}/id -u security-tests-app` --offline
+echo "security-tests postinst done ..."
 
 %files
 %manifest %{name}.manifest
@@ -96,8 +99,7 @@ echo "security-tests postinst done ..."
 /etc/smack/test_smack_rules_lnk
 /usr/share/privilege-control/*
 /etc/smack/test_privilege_control_DIR/*
-/usr/apps/test_DIR/*
-/home/security-tests-app/test_DIR
+/usr/apps/*
 /usr/bin/test-app-efl
 /usr/bin/test-app-osp
 /usr/bin/test-app-wgt