X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=kernel-tools.spec;h=4891c0c0d8a0ae48b75264ddf87568a93d3d0275;hb=da263bb05e0e739d3e2895e59fcb1b0a2c763228;hp=2fad1998adb4aaeeb8ec329b76cf897fe192bd42;hpb=ba3b9a67f13edfa6f22cc734513bf736949ba57f;p=packages%2Fkernel-tools.git diff --git a/kernel-tools.spec b/kernel-tools.spec index 2fad199..4891c0c 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -3,7 +3,8 @@ # - add -n python-perf? # - add bcond to disable building docs (perf docs) # - install of perf links perf binary again - +# - build runqslower (needs vmlinux with BPF section) +# # Conditional build: %bcond_without verbose # verbose build (V=1) %bcond_without cpupower # cpupower tools @@ -11,14 +12,15 @@ %bcond_without gtk # GTK+ 2.x perf support %bcond_without libunwind # libunwind perf support %bcond_without multilib # multilib perf support +%bcond_with runqslower # runqslower bpf tool %bcond_without usbip # usbip utils %ifnarch %{x8664} %undefine with_multilib %endif -%define basever 5.3 -%define postver .1 +%define basever 5.7 +%define postver .0 Summary: Assortment of tools for the Linux kernel Summary(pl.UTF-8): Zestaw narzędzi dla jądra Linuksa Name: kernel-tools @@ -27,17 +29,19 @@ Release: 1 License: GPL v2 Group: Applications/System Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{basever}.tar.xz -# Source0-md5: c99feaade8047339528fb066ec5f8a49 +# Source0-md5: f63ed18935914e1ee3e04c2a0ce1ba3b Source1: cpupower.service Source2: cpupower.config %if "%{postver}" != ".0" Patch0: https://www.kernel.org/pub/linux/kernel/v5.x/patch-%{version}.xz -# Patch0-md5: 476673d3ab1470fd9bac0da60774f3fd +# Patch0-md5: 7055ff82e7e6a557c04831a191ed14b3 %endif Patch1: x32.patch Patch2: regex.patch Patch3: %{name}-perf-update.patch Patch4: %{name}-perf-gtk2.patch +Patch5: %{name}-bpf-hashmap.patch +Patch6: %{name}-usbip-nocommon.patch URL: https://www.kernel.org/ BuildRequires: bison BuildRequires: docutils @@ -65,6 +69,8 @@ BuildRequires: elfutils-devel >= 0.158 BuildRequires: gcc-multilib-32 BuildRequires: gcc-multilib-x32 %endif +# for `btftool btf dump file ... format c` - requires vmlinux with BPF section +%{?with_runqslower:BuildRequires: kernel-vmlinux >= 5.?} %{?with_libunwind:BuildRequires: libunwind-devel >= 0.99} BuildRequires: numactl-devel BuildRequires: openssl-devel @@ -400,6 +406,8 @@ cd linux-%{basever} %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 %{__sed} -i -e '/^CFLAGS = /s/ -g / $(OPTFLAGS) /' tools/hv/Makefile %{__sed} -i -e '/^CFLAGS+=/s/ -O1 / $(OPTFLAGS) /' tools/thermal/tmon/Makefile @@ -408,6 +416,12 @@ cd linux-%{basever} # don't rebuild on make install %{__sed} -i -e '/^\$(LIBBPF): FORCE/ s/FORCE$//' tools/bpf/bpftool/Makefile +%if %{without runqslower} +%{__sed} -i -e '/^all: / s/ runqslower//' \ + -e '/^install: / s/ runqslower_install//' \ + tools/bpf/Makefile +%endif + %build Wstringop="" Waddressof="" @@ -460,6 +474,7 @@ CFLAGS="%{rpmcflags}" \ %{__make} -C tools/bpf \ CC="%{__cc}" \ EXTRA_CFLAGS="%{rpmcflags}" \ + %{?with_runqslower:VMLINUX_BTF=$(rpm -ql kernel-vmlinux | head -n 1)} \ %{?with_verbose:V=1} # perf