Merge branch 'ckm' into tizen
[platform/core/test/security-tests.git] / packaging / security-tests.spec
index 66680e6..f96f79b 100644 (file)
@@ -64,14 +64,15 @@ cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
         -DLOCAL_APP_DIR="%{TZ_SYS_HOME}/security_test_user/apps_rw"
 make %{?jobs:-j%jobs}
 
+%pre
+id -u  security_test_user 1>/dev/null 2>&1 || \
+    gum-utils -o -a --username=security_test_user --usertype=normal
+
 %install
 %make_install
 ln -sf /etc/smack/test_smack_rules %{buildroot}/etc/smack/test_smack_rules_lnk
 
 %post
-id -u  security_test_user 1>/dev/null 2>&1 || \
-    gum-utils -o -a --username=security_test_user --usertype=normal
-
 # Reload dbus daemon to apply newly installed configuration
 systemctl reload dbus
 
@@ -95,7 +96,7 @@ echo "security-tests postinst done ..."
 /etc/smack/test_smack_rules
 /etc/smack/test_smack_rules_lnk
 %{TZ_SYS_RW_APP}*
-%{TZ_SYS_HOME}/security_test_user/apps_rw/*
+%attr(755, security_test_user,users) %{TZ_SYS_HOME}/security_test_user/apps_rw/*
 /usr/bin/cynara-test
 /usr/bin/ckm-tests
 /usr/bin/ckm-privileged-tests