From 08f5d2adadd29bd6c25beb5fead707184da28810 Mon Sep 17 00:00:00 2001 From: Michael Petlan Date: Apr 14 2020 20:12:14 +0000 Subject: Add libperf subpackage Adding libperf subpackage, that generates following rpms: # rpm -ql libperf /usr/lib/.build-id /usr/lib/.build-id/4d /usr/lib/.build-id/4d/a5a1484b783b31b0a4a58e0d28846fc05d947d /usr/lib64/libperf.so.0 /usr/lib64/libperf.so.0.0.1 /usr/share/licenses/libperf /usr/share/licenses/libperf/COPYING # rpm -ql libperf-devel /usr/include/perf/core.h /usr/include/perf/cpumap.h /usr/include/perf/event.h /usr/include/perf/evlist.h /usr/include/perf/evsel.h /usr/include/perf/mmap.h /usr/include/perf/threadmap.h /usr/lib64/libperf.a /usr/lib64/libperf.so /usr/lib64/pkgconfig/libperf.pc /usr/share/doc/libperf/examples/sampling.c /usr/share/doc/libperf/html/libperf-counting.html /usr/share/doc/libperf/html/libperf-sampling.html /usr/share/doc/libperf/html/libperf.html /usr/share/licenses/libperf-devel /usr/share/licenses/libperf-devel/COPYING /usr/share/man/man3/libperf.3.gz /usr/share/man/man7/libperf-counting.7.gz /usr/share/man/man7/libperf-sampling.7.gz # rpm -ql libperf-debuginfo /usr/lib/debug /usr/lib/debug/.build-id /usr/lib/debug/.build-id/4d /usr/lib/debug/.build-id/4d/a5a1484b783b31b0a4a58e0d28846fc05d947d /usr/lib/debug/.build-id/4d/a5a1484b783b31b0a4a58e0d28846fc05d947d.debug /usr/lib/debug/usr /usr/lib/debug/usr/lib64 /usr/lib/debug/usr/lib64/libperf.so.0.0.1-5.6.4-400.fc32.x86_64.debug koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=43395164 Signed-off-by: Michael Petlan Signed-off-by: Jiri Olsa --- diff --git a/kernel-tools.spec b/kernel-tools.spec index 5dda185..5735a2f 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -8,7 +8,7 @@ # and/or a kernel built from an rc or git snapshot, released_kernel should # be 0. %global released_kernel 0 -%global baserelease 1 +%global baserelease 2 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -188,6 +188,19 @@ License: GPLv2 This package includes libraries and header files needed for development of applications which use bpf library from kernel source. +%package -n libperf +Summary: The perf library from kernel source +License: GPLv2 +%description -n libperf +This package contains the kernel source perf library. + +%package -n libperf-devel +Summary: Developement files for the perf library from kernel source +License: GPLv2 +%description -n libperf-devel +This package includes libraries and header files needed for development +of applications which use perf library from kernel source. + %prep %setup -q -n kernel-%{kversion}%{?dist} -c @@ -273,6 +286,9 @@ popd pushd tools/lib/bpf %{tools_make} V=1 popd +pushd tools/lib/perf +make V=1 +popd # Build the docs pushd tools/kvm/kvm_stat/ @@ -361,6 +377,9 @@ popd pushd tools/lib/bpf %{tools_make} DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir} V=1 install install_headers popd +pushd tools/lib/perf +make DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir} V=1 install install_headers +popd ### ### scripts @@ -469,7 +488,36 @@ popd %{_includedir}/bpf/xsk.h %license linux-%{kversion}/COPYING +%files -n libperf +%{_libdir}/libperf.so.0 +%{_libdir}/libperf.so.0.0.1 +%license linux-%{kversion}/COPYING + +%files -n libperf-devel +%{_libdir}/libperf.a +%{_libdir}/libperf.so +%{_libdir}/pkgconfig/libperf.pc +%{_includedir}/perf/core.h +%{_includedir}/perf/cpumap.h +%{_includedir}/perf/event.h +%{_includedir}/perf/evlist.h +%{_includedir}/perf/evsel.h +%{_includedir}/perf/mmap.h +%{_includedir}/perf/threadmap.h +%{_mandir}/man3/libperf.3.gz +%{_mandir}/man7/libperf-counting.7.gz +%{_mandir}/man7/libperf-sampling.7.gz +%{_docdir}/libperf/examples/sampling.c +%{_docdir}/libperf/examples/counting.c +%{_docdir}/libperf/html/libperf.html +%{_docdir}/libperf/html/libperf-counting.html +%{_docdir}/libperf/html/libperf-sampling.html +%license linux-%{kversion}/COPYING + %changelog +* Tue Apr 14 2020 Michael Petlan - 5.6.0-0.rc7.git0.2 +- Add libperf, libperf-devel and libperf-debuginfo packages + * Wed Apr 08 2020 Justin Forbes - Remove manual perf-debuginfo left from kernel (rhbz 1822110)