forked from pool/rtla

84 lines
2.6 KiB

# spec file for package rtla
# Copyright (c) 2023 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via
%define version %(rpm -q --qf '%%{VERSION}' kernel-source)
Name: rtla
Version: %{version}
Release: 0
Summary: Real-Time Linux Analysis tools
License: GPL-2.0-only
BuildRequires: kernel-source
BuildRequires: libtraceevent-devel
BuildRequires: libtracefs-devel
BuildRequires: procps-devel
BuildRequires: python3-docutils
The rtla 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.
%package rebuild
Summary: Empty package to ensure rebuilding rtla in OBS
%requires_eq kernel-source
%description rebuild
This is an empty package that ensures rtla is rebuilt every time
kernel-default is rebuilt in OBS.
There is no reason to install this package.
(cd %{_prefix}/src/linux ; tar -cf - COPYING CREDITS README tools include scripts Kbuild Makefile arch/*/{include,lib,Makefile} lib Documentation/tools/rtla) | tar -xf -
# Workaround for missing lib dependency
sed -i 's/--libs libtracefs/--libs libtracefs libtraceevent/' tools/tracing/rtla/Makefile
cd tools/tracing/rtla
make %{?_smp_mflags}
cd tools/tracing/rtla
make install DESTDIR=%{buildroot} STRIP=true
# Fixup symlinks as they are pointing to DESTDIR instead prefix
rm %{buildroot}%{_bindir}/osnoise
rm %{buildroot}%{_bindir}/timerlat
rm -f %{buildroot}%{_bindir}/hwnoise
ln -sf %{_bindir}/rtla %{buildroot}%{_bindir}/osnoise
ln -sf %{_bindir}/rtla %{buildroot}%{_bindir}/timerlat
ln -sf %{_bindir}/rtla %{buildroot}%{_bindir}/hwnoise
%license COPYING
%files rebuild
%license COPYING