diff --git a/kernel-tools.spec b/kernel-tools.spec index 454ba14..1b1a14f 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -70,6 +70,7 @@ BuildRequires: zlib-devel binutils-devel newt-devel python3-docutils perl(ExtUti BuildRequires: audit-libs-devel glibc-devel glibc-headers glibc-static python3-devel java-devel BuildRequires: asciidoc xmlto libcap-devel BuildRequires: openssl-devel libbabeltrace-devel +BuildRequires: libtracefs-devel libtraceevent-devel BuildRequires: libbpf-devel BuildRequires: clang llvm # Used to mangle unversioned shebangs to be Python 3 @@ -190,6 +191,16 @@ License: GPLv2 This package includes libraries and header files needed for development of applications which use perf library from kernel source. +%package -n rtla +Summary: RTLA: Real-Time Linux Analysis tools +License: GPLv2 +%description -n rtla +The rtla tool is a meta-tool that includes a set of commands that +aims to analyze the real-time properties of Linux. But, instead of +testing Linux as a black box, rtla leverages kernel tracing +capabilities to provide precise information about the properties +and root causes of unexpected results. + %prep %setup -q -n kernel-%{kversion}%{?dist} -c @@ -231,15 +242,14 @@ cd linux-%{kversion} %endif %global perf_make \ - make EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 %{?perf_build_extra_opts} prefix=%{_prefix} -%global perf_python3 -C tools/perf PYTHON=%{__python3} + make %{?make_opts} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 LIBBPF_DYNAMIC=1 LIBTRACEEVENT_DYNAMIC=1 %{?perf_build_extra_opts} prefix=%{_prefix} PYTHON=%{__python3} # perf # make sure check-headers.sh is executable chmod +x tools/perf/check-headers.sh -%{perf_make} %{perf_python3} all +%{perf_make} DESTDIR=$RPM_BUILD_ROOT all %global tools_make \ - make CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}" V=1 + CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" make %{?make_opts} # cpupower # make sure version-gen.sh is executable. @@ -263,10 +273,10 @@ chmod +x tools/power/cpupower/utils/version-gen.sh %{tools_make} popd pushd tools/power/x86/intel-speed-select - %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" + %{tools_make} popd pushd tools/arch/x86/intel_sdsi - %{tools_make} + %{tools_make} CFLAGS="${RPM_OPT_FLAGS}" popd %endif pushd tools/thermal/tmon/ @@ -278,6 +288,9 @@ popd pushd tools/gpio/ %{tools_make} popd +pushd tools/tracing/rtla +%{tools_make} +popd %global bpftool_make \ make EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT V=1 @@ -304,9 +317,9 @@ popd %install cd linux-%{kversion} - +pwd # perf tool binary and supporting scripts/binaries -%{perf_make} %{perf_python3} DESTDIR=%{buildroot} lib=%{_lib} install-bin +%{perf_make} DESTDIR=$RPM_BUILD_ROOT lib=%{_lib} install-bin # remove the 'trace' symlink. rm -f %{buildroot}%{_bindir}/trace @@ -320,7 +333,7 @@ rm -rf %{buildroot}/usr/lib/perf/examples rm -rf %{buildroot}/usr/lib/perf/include/bpf/ # python-perf extension -%{perf_make} %{perf_python3} DESTDIR=%{buildroot} install-python_ext +%{perf_make} DESTDIR=%{buildroot} install-python_ext # perf man pages (note: implicit rpm magic compresses them later) install -d %{buildroot}/%{_mandir}/man1 @@ -371,6 +384,16 @@ popd pushd tools/gpio %{tools_make} DESTDIR=%{buildroot} install popd +pushd tools/tracing/rtla/ +%{tools_make} DESTDIR=%{buildroot} install +rm -f %{buildroot}%{_bindir}/osnoise +rm -f %{buildroot}%{_bindir}/timerlat +(cd %{buildroot} + + ln -sf rtla ./%{_bindir}/osnoise + ln -sf rtla ./%{_bindir}/timerlat +) +popd pushd tools/kvm/kvm_stat %{tools_make} INSTALL_ROOT=%{buildroot} install-tools popd @@ -496,7 +519,23 @@ popd %{_docdir}/libperf/html/libperf-sampling.html %license linux-%{kversion}/COPYING +%files -n rtla +%{_bindir}/rtla +%{_bindir}/osnoise +%{_bindir}/timerlat +%{_mandir}/man1/rtla-osnoise-hist.1.gz +%{_mandir}/man1/rtla-osnoise-top.1.gz +%{_mandir}/man1/rtla-osnoise.1.gz +%{_mandir}/man1/rtla-timerlat-hist.1.gz +%{_mandir}/man1/rtla-timerlat-top.1.gz +%{_mandir}/man1/rtla-timerlat.1.gz +%{_mandir}/man1/rtla.1.gz + %changelog +* Tue Jun 14 2022 Justin M. Forbes +- Some spec cleanups +- Build rtla as a subpackage + * Tue Jun 14 2022 Python Maint - 5.19.0-0.rc2.git0.2 - Rebuilt for Python 3.11