2 Summary: Security repository for holding tests.
5 Group: Security/Testing
6 License: Apache License, Version 2.0
8 Source0: %{name}-%{version}.tar.gz
9 Source1: %{name}.manifest
11 BuildRequires: libattr-devel
12 BuildRequires: pkgconfig(libcap)
13 BuildRequires: pkgconfig(libsmack)
14 BuildRequires: pkgconfig(libprivilege-control)
15 BuildRequires: pkgconfig(security-manager)
16 BuildRequires: pkgconfig(key-manager)
17 BuildRequires: pkgconfig(dlog)
18 BuildRequires: pkgconfig(glib-2.0)
19 BuildRequires: pkgconfig(dbus-1)
20 BuildRequires: pkgconfig(libpcrecpp)
21 BuildRequires: pkgconfig(libxml-2.0)
22 BuildRequires: pkgconfig(libiri)
23 BuildRequires: pkgconfig(sqlite3)
24 BuildRequires: pkgconfig(libwebappenc)
25 BuildRequires: cynara-devel
26 BuildRequires: pkgconfig(libtzplatform-config)
27 BuildRequires: boost-devel
28 BuildRequires: pkgconfig(vconf)
29 BuildRequires: pkgconfig(libgum) >= 1.0.5
32 Requires: key-manager-listener
35 Security tests repository - for tests that can't be kept together with code.
42 export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib"
44 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
46 -DVERSION=%{version} \
47 -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:DEBUG} \
48 %if "%{sec_product_feature_security_mdfpp_enable}" == "1"
49 -DSECURITY_MDFPP_STATE_ENABLE=1 \
51 -DCMAKE_VERBOSE_MAKEFILE=ON \
52 -DCYNARA_DB_DIR=%{_localstatedir}/cynara/db \
53 -DAPP_USER="security_test_user"
58 ln -sf /etc/smack/test_smack_rules %{buildroot}/etc/smack/test_smack_rules_lnk
61 find /etc/smack/test_privilege_control_DIR/ -type f -name exec -exec chmod 0755 {} +
63 # Load permissions templates
64 api_feature_loader --verbose
66 # Set vconf key for cc-mode testing if vconf key isn't there.
67 %if "%{sec_product_feature_security_mdfpp_enable}" != "1"
68 echo "Install vconf key (file/security_mdpp/security_mdpp_state) for testing key-manager"
69 vconftool set -t string file/security_mdpp/security_mdpp_state "Unset"
72 id -u security_test_user 1>/dev/null 2>&1 || \
73 useradd -r -g users -s /sbin/nologin -c "for tests only" security_test_user
75 echo "security-tests postinst done ..."
78 %manifest %{name}.manifest
79 %defattr(-, root, root, -)
80 /usr/bin/security-tests.sh
81 /usr/bin/security-tests-all.sh
82 /usr/bin/test-performance-check.sh
84 /etc/dbus-1/system.d/security-tests.conf
86 /usr/bin/libsmack-test
87 /usr/bin/smack-dbus-tests
88 /usr/bin/libprivilege-control-test
89 /etc/smack/test_smack_rules_full
90 /etc/smack/test_smack_rules2
91 /etc/smack/test_smack_rules3
92 /etc/smack/test_smack_rules4
93 /usr/bin/security-manager-tests
94 /etc/smack/test_smack_rules
95 /etc/smack/test_smack_rules_lnk
96 /usr/share/privilege-control/*
97 /etc/smack/test_privilege_control_DIR/*
100 /usr/bin/test-app-osp
101 /usr/bin/test-app-wgt
104 /usr/bin/ckm-integration-tests
105 /usr/share/ckm-test/*
107 /usr/lib/security-tests/cynara-tests/plugins/single-policy/*
108 /usr/lib/security-tests/cynara-tests/plugins/multiple-policy/*
109 /usr/lib/security-tests/cynara-tests/plugins/test-agent/*
110 /usr/bin/security-tests-inner-test
111 /usr/bin/libwebappenc-tests
114 id -u security_test_user 1>/dev/null 2>&1 && userdel security_test_user