-#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"
-DDPL_LOG="ON" \
-DVERSION=%{version} \
-DCMAKE_BUILD_TYPE=%{?build_type:%build_type}%{!?build_type:DEBUG} \
- -DCMAKE_VERBOSE_MAKEFILE=ON
+ -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 {} +
+find /usr/apps/test_DIR/ -type f -name exec -exec chmod 0755 {} +
# Load permissions templates
api_feature_loader --verbose
-wrt-installer --install /usr/bin/TestMisiuPysiu123.wgt
-wrt-installer --install /usr/bin/MisiuPysiu123Partner.wgt
-wrt-installer --install /usr/bin/MisiuPysiu123Platform.wgt
-osp-installer -i /usr/bin/uqNfgEjqc7-1.0.0-arm.tpk
-osp-installer -i /usr/bin/j4RuPsZrNt-1.0.0-arm.tpk
-osp-installer -i /usr/bin/V5LKqDFBXm-1.0.0-arm.tpk
-
echo "security-tests postinst done ..."
%postun
-wrt-installer --uninstall-name QwCqJ0ttyS
-wrt-installer --uninstall-name 7btsV1Y0sX
-wrt-installer --uninstall-name G4DE3U2vmW
-osp-installer -u uqNfgEjqc7
-osp-installer -u j4RuPsZrNt
-osp-installer -u V5LKqDFBXm
+%{_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-server
/usr/bin/security-server-tests-password
+/usr/bin/security-server-tests-privilege
/usr/bin/security-server-tests-stress
-/usr/bin/security-server-tests-dbus
-/usr/bin/security-client
/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/*
/etc/smack/test_privilege_control_DIR/*
-/usr/bin/TestMisiuPysiu123.wgt
-/usr/bin/MisiuPysiu123Partner.wgt
-/usr/bin/MisiuPysiu123Platform.wgt
-/usr/bin/uqNfgEjqc7-1.0.0-arm.tpk
-/usr/bin/j4RuPsZrNt-1.0.0-arm.tpk
-/usr/bin/V5LKqDFBXm-1.0.0-arm.tpk
+/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/*