Use gum-utils instead of shadow-utils for making security_test_user
[platform/core/test/security-tests.git] / packaging / security-tests.spec
index d9626c2..d9319fa 100644 (file)
@@ -22,6 +22,8 @@ BuildRequires: pkgconfig(libxml-2.0)
 BuildRequires: pkgconfig(sqlite3)
 BuildRequires: pkgconfig(libwebappenc)
 BuildRequires: cynara-devel
+BuildRequires: libcynara-creds-dbus-devel
+BuildRequires: libcynara-creds-gdbus-devel
 BuildRequires: pkgconfig(libtzplatform-config)
 BuildRequires: boost-devel
 BuildRequires: pkgconfig(vconf)
@@ -63,7 +65,10 @@ 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 || \
-    useradd -r -g users -s /sbin/nologin -c "for tests only" security_test_user
+    gum-utils -o -a --username=security_test_user --usertype=normal
+
+# Reload dbus daemon to apply newly installed configuration
+systemctl reload dbus
 
 echo "security-tests postinst done ..."
 
@@ -99,4 +104,4 @@ echo "security-tests postinst done ..."
 %{_prefix}/share/yaca-test
 
 %postun
-id -u security_test_user  1>/dev/null 2>&1 && userdel security_test_user
+id -u security_test_user 1>/dev/null 2>&1 && gum-utils -o -d --uid=`id -u security_test_user`