Sisyphus repositório
Última atualização: 7 dezembro 2021 | SRPMs: 17432 | Visitas: 22473469
en ru br
ALT Linux repositórios

Group :: Development/Debug
RPM: trace-cmd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

# SPDX-License-Identifier: GPL-2.0-only
%define _unpackaged_files_terminate_build 1
%define _stripped_files_terminate_build 1

Name:     trace-cmd
Version:  2.9.1
Release:  alt5

Summary:  A front-end for Ftrace Linux kernel internal tracer
License:  GPL-2.0 and LGPL-2.1
Group:    Development/Debug
# List:
# List:
# Bugs:
# Poorly documented.
# Presentation: (2010)
# Article:

Source:   %name-%version.tar
BuildRequires(pre): rpm-build-python3
BuildRequires: asciidoc
BuildRequires: banner
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: libfreeglut-devel
BuildRequires: libjson-c-devel
BuildRequires: libXi-devel
BuildRequires: libxml2-devel
BuildRequires: libXmu-devel
BuildRequires: polkit
BuildRequires: python-devel
BuildRequires: qt5-base-devel
BuildRequires: swig
BuildRequires: xmlto
%{?!_without_check:%{?!_disable_check:BuildRequires: CUnit-devel rpm-build-vm}}

The trace-cmd(1) command interacts with the Ftrace tracer that is built inside
the Linux kernel. It interfaces with the Ftrace specific files found in the
debugfs file system under the tracing directory.

%package libs
Summary: trace-cmd libraries
Group: System/Libraries

%description libs

%package devel
Summary: Development headers of trace-cmd-libs
Group: Development/C
Requires: %name-libs = %EVR

%description devel

%package python3
Summary: Python plugin support for trace-cmd
Group: Development/Python3
Requires: %name = %EVR
Provides: python3(tracecmd)

%description python3

%package -n kernelshark
Summary: Graphical reader for trace-cmd(1) output
Group: Development/Debug
Requires: trace-cmd = %EVR

%description -n kernelshark
KernelShark is a front end reader of trace-cmd(1) output. It reads a
trace-cmd.dat(5) formatted file and produces a graph and list view of
the data.

sed -i s/not-a-git-repo/%version-%release/ scripts/
sed -i 's/import gtk/from gi.repository import Gtk as gtk/' python/*.py
sed -i 's/python2/python3/' python/

export CFLAGS="%optflags -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-check"
%make_build \
all doc plugins
%make_build PYTHON_VERS=python3 python

# Following two cannot be built with make -j:

make libs
%{?!_without_check:%{?!_disable_check:make test}}

# Kernelshark shall have trace-cmd already built, or compilation will fail.

banner gui
%make_build \
prefix=%_prefix \
libdir=%_libdir \

banner install
%makeinstall \
etcdir=%buildroot%_sysconfdir \
install install_doc install_libs
%makeinstall \
PYTHON_VERS=python3 install_python
%makeinstall \
prefix=%_prefix \
libdir=%_libdir \
DESTDIR=%buildroot/ \

# Misinstalled by install_gui.

rm -rf %buildroot/usr/etc %buildroot/usr/src/tmp

# error: value "1.1.0" for key "Version" in group "Desktop Entry" is not a known version

sed -i '/Version/d' %buildroot/%_datadir/applications/kernelshark.desktop

desktop-file-validate %buildroot/%_datadir/applications/kernelshark.desktop

# Basic tests

%buildroot%_bindir/trace-cmd | grep version
%buildroot%_bindir/trace-cmd options

# Internal unit tests

export LD_LIBRARY_PATH=$PWD/lib/tracefs:$PWD/lib/traceevent:$PWD/lib/trace-cmd
vm-run --cpu=2 '
 set -xe
 trace-cmd record -p function -l exit'*' true
 trace-cmd report'


%files libs
%exclude %_libdir/trace-cmd/python

%files devel

%files python3
%doc Documentation/README.PythonPlugin

%files -n kernelshark


Todas as alterações você pod ver aqui

projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009