-#sbs-git:slp/pkgs/w/wrt-security wrt-security 0.0.43
Name: security-tests
Summary: Security repository for holding tests.
Version: 0.0.45
Release: 1
-Group: Development/Libraries
+Group: Security/Testing
License: Apache License, Version 2.0
URL: N/A
Source0: %{name}-%{version}.tar.gz
+Source1: %{name}.manifest
BuildRequires: cmake
+BuildRequires: libattr-devel
+BuildRequires: pkgconfig(libcap)
BuildRequires: pkgconfig(libsmack)
BuildRequires: pkgconfig(libprivilege-control)
BuildRequires: pkgconfig(security-server)
-BuildRequires: pkgconfig(dpl-test-efl)
+BuildRequires: pkgconfig(security-manager)
+BuildRequires: pkgconfig(key-manager)
BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(dbus-1)
+BuildRequires: pkgconfig(dbus-glib-1)
+BuildRequires: pkgconfig(libpcrecpp)
+BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(libiri)
+BuildRequires: pkgconfig(sqlite3)
+BuildRequires: cynara-devel
+BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: boost-devel
Requires: smack
Requires: libprivilege-control
+Requires(post): gum-utils
+Requires(postun): gum-utils
+Requires(postun): %{_bindir}/id
%description
Security tests repository - for tests that can't be kept together with code.
%prep
%setup -q
+cp %{SOURCE1} .
%build
export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib"
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DDPL_LOG="ON" \
- -DVERSION=%{version}
+ -DVERSION=%{version} \
+ -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:DEBUG} \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DCYNARA_DB_DIR=%{_localstatedir}/cynara/db \
+ -DAPP_USER=security-tests-app
make %{?jobs:-j%jobs}
%install
-rm -rf %{buildroot}
%make_install
ln -sf /etc/smack/test_smack_rules %{buildroot}/etc/smack/test_smack_rules_lnk
-%clean
-rm -rf %{buildroot}
-
%post
+%{_bindir}/gum-utils --add-user --username=security-tests-app --usertype=4 --offline
+
find /etc/smack/test_privilege_control_DIR/ -type f -name exec -exec chmod 0755 {} +
-# add test binaries to mw-list if it's not already there
-BINARIES[0]="/usr/bin/security-server-tests-client-smack"
-BINARIES[1]="/usr/bin/security-server-tests-label"
-BINARIES[2]="/usr/bin/security-server-tests-server"
-for BINARY in "${BINARIES[@]}"
-do
- grep -q $BINARY /usr/share/security-server/mw-list\
- || echo $BINARY >> /usr/share/security-server/mw-list
-done
+find /usr/apps/test_DIR/ -type f -name exec -exec chmod 0755 {} +
+
+# Load permissions templates
+api_feature_loader --verbose
+
echo "security-tests postinst done ..."
%postun
+%{_bindir}/gum-utils --delete-user --uid=`%{_bindir}/id -u security-tests-app` --offline
%files
+%manifest %{name}.manifest
%defattr(-, root, root, -)
/usr/bin/security-tests.sh
/usr/bin/security-tests-all.sh
+/usr/bin/tests-summary.sh
+/usr/bin/test-performance-check.sh
+/usr/bin/perf
+
+/etc/dbus-1/system.d/security-tests.conf
+
/usr/bin/libsmack-test
+/usr/bin/smack-dbus-tests
/usr/bin/libprivilege-control-test
/usr/bin/security-server-tests-client-smack
-/usr/bin/security-server-tests-label
-/usr/bin/security-server-tests-pid-reuser
/usr/bin/security-server-tests-server
/usr/bin/security-server-tests-password
+/usr/bin/security-server-tests-privilege
+/usr/bin/security-server-tests-stress
+/etc/smack/test_smack_rules_full
+/etc/smack/test_smack_rules2
+/etc/smack/test_smack_rules3
+/etc/smack/test_smack_rules4
+/usr/bin/security-server-tests-mt
+/usr/bin/security-server-tests-api-speed
+/usr/bin/security-manager-tests
/etc/smack/test_smack_rules
/etc/smack/test_smack_rules_lnk
-/usr/share/privilege-control/test_privilege_control_rules.smack
+/usr/share/privilege-control/*
/etc/smack/test_privilege_control_DIR/*
+/usr/apps/test_DIR/*
+/home/security-tests-app/test_DIR
+/usr/bin/test-app-efl
+/usr/bin/test-app-osp
+/usr/bin/test-app-wgt
+/usr/bin/cynara-test
+/usr/bin/ckm-tests
+/usr/share/ckm-test/*
+