BuildRequires: boost-devel
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(libgum) >= 1.0.5
+BuildRequires: pkgconfig(security-privilege-manager)
Requires: perf
Requires: gdb
+Requires: diffutils
+Requires: iproute2
+Requires: toybox-symlinks-ping
%global ckm_test_dir %{?TZ_SYS_SHARE:%TZ_SYS_SHARE/ckm-test/}%{!?TZ_SYS_SHARE:/usr/share/ckm-test/}
%global ckm_rw_data_dir %{?TZ_SYS_DATA:%TZ_SYS_DATA/ckm/}%{!?TZ_SYS_DATA:/opt/data/ckm/}
-DCYNARA_DB_DIR=%{_localstatedir}/cynara/db \
-DAPP_USER="security_test_user" \
-DCKM_TEST_DIR=%{ckm_test_dir} \
- -DCKM_RW_DATA_DIR=%{ckm_rw_data_dir}
+ -DCKM_RW_DATA_DIR=%{ckm_rw_data_dir} \
+ -DGLOBAL_APP_DIR=%{TZ_SYS_RW_APP} \
+ -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 || \
- useradd -r -g users -s /sbin/nologin -c "for tests only" security_test_user
-
# Reload dbus daemon to apply newly installed configuration
systemctl reload dbus
/usr/bin/security-tests.sh
/usr/bin/security-tests-all.sh
/usr/bin/test-performance-check.sh
+/usr/bin/setup-nether-tests-nns.sh
+/usr/bin/teardown-nether-tests-nns.sh
+/usr/bin/setup-nether-tests-dns.sh
+/usr/bin/teardown-nether-tests-dns.sh
/etc/dbus-1/system.d/security-tests.conf
/usr/bin/security-manager-tests
/etc/smack/test_smack_rules
/etc/smack/test_smack_rules_lnk
-/usr/apps/*
+%{TZ_SYS_RW_APP}*
+%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-integration-tests
/usr/bin/yaca-test
+/usr/bin/nether-tests
%{ckm_test_dir}/*
/etc/security-tests
/usr/lib/security-tests/cynara-tests/plugins/single-policy/*
/usr/lib/security-tests/cynara-tests/plugins/multiple-policy/*
/usr/lib/security-tests/cynara-tests/plugins/test-agent/*
/usr/bin/security-tests-inner-test
+/usr/bin/security-tests-cleanup-test
+/usr/bin/cleanup_test.sh
/usr/bin/libwebappenc-tests
%{_prefix}/share/yaca-test
+%dir %{_prefix}/share/security-tests-cleanup-test
+%{_prefix}/share/security-tests-cleanup-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`