This package provides the "perf" tool that can be used to monitor performance
counter events as well as various kernel internal events.
+%package -n linux-kernel-kdbus-tests
+License: Apache-2.0
+Summary: Kdbus tests
+Group: Base/IPC
+BuildRequires: libcap-devel
+
+%description -n linux-kernel-kdbus-tests
+A single binary that tests kdbus operation.
+
%prep
%setup -q
%{?asan:/usr/bin/gcc-unforce-options}
%{?ubsan:/usr/bin/gcc-unforce-options}
+# 0. extract uapi headers
+make headers_check %{?_smp_mflags}
+make headers_install %{?_smp_mflags}
+
# 1-1. Set config file
make %{config_name} %{?_smp_mflags}
if ! grep -q "^CONFIG_LOCALVERSION=\"-%{variant}" .config; then
make -s -C tools/lib/traceevent %{?_smp_mflags} NO_LIBPERL=1
make -s -C tools/perf EXTRA_CFLAGS="-fPIE -rdynamic" %{?_smp_mflags} NO_LIBPERL=1
+# 1-6. Additionally, build kdbus tests
+make -C tools/testing/selftests/kdbus
+
%install
QA_SKIP_BUILD_ROOT="DO_NOT_WANT"; export QA_SKIP_BUILD_ROOT
rm -rf %{buildroot}/usr/lib/perf
rm -rf %{buildroot}/usr/share
+# 2-6. install kdbus tests
+%define _test_runner_dir /usr/lib/dbus-tests/runner
+make -C tools/testing/selftests/kdbus INSTALL_PATH=%{buildroot}%{_test_runner_dir} install
+
+
# 3. Copy files for devel package
mkdir -p %{buildroot}/boot/kernel/devel/kernel-devel-%{variant}
rsync -lr \
--exclude "/*.manifest" \
--exclude "/packaging/" \
--exclude "/.gbs.conf" \
+ --exclude "/usr/include/" \
--exclude ".gitignore" \
--exclude "*\.c" \
--exclude ".tmp_vmlinux*" \
--exclude "*.o" \
--exclude "*.S" \
--exclude "*.HEX" \
+ --exclude "/tools/testing/selftests/kdbus/kdbus-test" \
%{_builddir}/%{name}-%{version}/ %{buildroot}/boot/kernel/devel/kernel-devel-%{variant}
/usr/bin/*
/usr/libexec/*
/usr/lib/traceevent/*
+
+%files -n linux-kernel-kdbus-tests
+%defattr(-,root,root)
+%{_test_runner_dir}/kdbus-test