[packages/kernel-tools] - updated perf packaging: GTK+ interface is now module, so merged -core and -slang; perf-gtk is addo
qboosh
qboosh at pld-linux.org
Fri Aug 29 18:18:51 CEST 2014
commit ae4c1fd4977ca3e45937ab614ed8e2fe1110b361
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Aug 29 18:19:09 2014 +0200
- updated perf packaging: GTK+ interface is now module, so merged -core and -slang; perf-gtk is addon now
kernel-tools.spec | 81 +++++++++++++++----------------------------------------
perf.sh | 18 -------------
2 files changed, 21 insertions(+), 78 deletions(-)
---
diff --git a/kernel-tools.spec b/kernel-tools.spec
index 02666f3..194c255 100644
--- a/kernel-tools.spec
+++ b/kernel-tools.spec
@@ -8,7 +8,7 @@
# Conditional build:
%bcond_without verbose # verbose build (V=1)
%bcond_without perf # perf tools
-%bcond_without gtk # gtk perf version
+%bcond_without gtk # GTK+ 2.x perf support
%define basever 3.16
%define postver .1
@@ -27,7 +27,6 @@ Patch0: https://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
%endif
Source1: cpupower.service
Source2: cpupower.config
-Source3: perf.sh
URL: http://www.kernel.org/
BuildRequires: gettext-tools
BuildRequires: pciutils-devel
@@ -43,6 +42,7 @@ BuildRequires: docbook-dtd45-xml
BuildRequires: docbook-style-xsl
BuildRequires: elfutils-devel
BuildRequires: flex
+BuildRequires: libnuma-devel
BuildRequires: libunwind-devel >= 0.99
BuildRequires: perl-devel >= 5.1
BuildRequires: python-devel
@@ -120,32 +120,35 @@ Development files for the cpupower library.
%description cpupower-libs-devel -l pl.UTF-8
Pliki programistyczne biblioteki cpupower.
-%package perf-core
-Summary: perf profiler tool (core package)
-Summary(pl.UTF-8): Narzędzie profilujące perf (podstawowe narzędzia)
+%package perf
+Summary: perf profiler tool
+Summary(pl.UTF-8): Narzędzie profilujące perf
Group: Applications/System
Suggests: binutils
+Obsoletes: perf-core
+Obsoletes: perf-slang
-%description perf-core
+%description perf
Perf is a profiler tool for Linux 2.6+ based systems that abstracts
away CPU hardware differences in Linux performance measurements and
presents a simple commandline interface. Perf is based on the
perf_events interface exported by recent versions of the Linux kernel.
-This package contains core files and scripts.
+This package contains core files, scripts and text interface (TUI).
-%description perf-core -l pl.UTF-8
+%description perf -l pl.UTF-8
Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
odseparowujące od różnic sprzętowych między pomiarami wydajności w
zależności od procesora oraz udostępniające prosty interfejs linii
poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
przez nowe wersje jądra Linuksa.
-Ten pakiet zawiera podstawowe pliki i skrypty.
+Ten pakiet zawiera podstawowe pliki, skrypty oraz interfejs tekstowy
+(TUI).
%package perf-gtk
-Summary: perf profiler tool (GTK+ GUI)
-Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+)
+Summary: perf profiler tool (GTK+ 2 GUI)
+Summary(pl.UTF-8): Narzędzie profilujące perf (interfejs graficzny GTK+ 2)
Group: X11/Applications
Requires: %{name}-perf-core = %{version}-%{release}
Provides: %{name}-perf = %{version}-%{release}
@@ -156,7 +159,7 @@ away CPU hardware differences in Linux performance measurements and
presents a simple commandline interface. Perf is based on the
perf_events interface exported by recent versions of the Linux kernel.
-This package contains GTK+ based GUI.
+This package contains GTK+ 2 based GUI.
%description perf-gtk -l pl.UTF-8
Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
@@ -165,7 +168,7 @@ zależności od procesora oraz udostępniające prosty interfejs linii
poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
przez nowe wersje jądra Linuksa.
-Ten pakiet zawiera graficzny interfejs oparty na GTK+.
+Ten pakiet zawiera graficzny interfejs oparty na GTK+ 2.
%package perf-slang
Summary: perf profiler tool (Slang TUI)
@@ -257,30 +260,14 @@ CFLAGS="%{rpmcflags}" \
CFLAGS="%{rpmcflags} -Wall -Wextra -I../lib"
%if %{with perf}
-# perf slang version
-PWD=${PWD:-$(pwd)}
-install -d $PWD/perf-{slang,gtk}
%{__make} -C tools/perf all man \
- O=$PWD/perf-slang \
- NO_GTK2=1 \
+ %{!?with_gtk:NO_GTK2=1} \
%{makeopts} \
CFLAGS_OPTIMIZE="%{rpmcflags}" \
WERROR=0 \
prefix=%{_prefix} \
perfexecdir=%{_datadir}/perf-core \
template_dir=%{_datadir}/perf-core/templates
-
-%if %{with gtk}
-# perf gtk version
-%{__make} -C tools/perf all man \
- O=$PWD/perf-gtk \
- %{makeopts} \
- CFLAGS_OPTIMIZE="%{rpmcflags}" \
- WERROR=0 \
- prefix=%{_prefix} \
- perfexecdir=%{_datadir}/perf-core \
- template_dir=%{_datadir}/perf-core/templates
-%endif
%endif
# gen_init_cpio
@@ -346,28 +333,9 @@ install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
%endif
%if %{with perf}
-# perf slang
-PWD=${PWD:-$(pwd)}
-# perf slang version
-%{__make} -j1 install install-man \
- -C tools/perf \
- O=$PWD/perf-slang \
- NO_GTK2=1 \
- CC="%{__cc}" \
- CFLAGS_OPTIMIZE="%{rpmcflags}" \
- WERROR=0 \
- %{?with_verbose:V=1} \
- prefix=%{_prefix} \
- perfexecdir=%{_datadir}/perf-core \
- template_dir=%{_datadir}/perf-core/templates \
- DESTDIR=$RPM_BUILD_ROOT
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_slang}
-
-%if %{with gtk}
-# perf gtk
%{__make} -j1 install install-man \
-C tools/perf \
- O=$PWD/perf-gtk \
+ %{!?with_gtk:NO_GTK2=1} \
CC="%{__cc}" \
CFLAGS_OPTIMIZE="%{rpmcflags}" \
WERROR=0 \
@@ -376,15 +344,11 @@ PWD=${PWD:-$(pwd)}
perfexecdir=%{_datadir}/perf-core \
template_dir=%{_datadir}/perf-core/templates \
DESTDIR=$RPM_BUILD_ROOT
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_gtk}
-%endif
%py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
%py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
-
-install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/perf
%endif
# gen_init_cpio
@@ -440,9 +404,10 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/cpufreq.h
%if %{with perf}
-%files perf-core
+%files perf
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/perf
+%attr(755,root,root) %{_bindir}/trace
%{_mandir}/man1/perf*.1*
%dir %{_datadir}/perf-core
%attr(755,root,root) %{_datadir}/perf-core/perf-archive
@@ -476,13 +441,9 @@ rm -rf $RPM_BUILD_ROOT
%if %{with gtk}
%files perf-gtk
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/perf_gtk
+%attr(755,root,root) %{_libdir}/libperf-gtk.so
%endif
-%files perf-slang
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/perf_slang
-
%files -n bash-completion-perf
%defattr(644,root,root,755)
/etc/bash_completion.d/perf
diff --git a/perf.sh b/perf.sh
deleted file mode 100755
index 5c9c61e..0000000
--- a/perf.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-if [ -x /usr/bin/perf_gtk -a -n "$DISPLAY" ]; then
- # prefer GTK version under X11
- exec /usr/bin/perf_gtk "$@"
-fi
-if [ -x /usr/bin/perf_slang ]; then
- # use text version if perf_gtk or $DISPLAY is not available
- exec /usr/bin/perf_slang "$@"
-fi
-if [ -x /usr/bin/perf_gtk ]; then
- # fall-back to perf_gtk if no perf_slang (it can work in a terminal
- # too)
- exec /usr/bin/perf_gtk "$@"
-fi
-
-echo >&2 "You need 'kernel-tools-perf-gtk' or 'kernel-tools-perf-slang' package installed!"
-exit 1
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kernel-tools.git/commitdiff/ae4c1fd4977ca3e45937ab614ed8e2fe1110b361
More information about the pld-cvs-commit
mailing list