%undefine with_multilib
%endif
-%define basever 4.14
-%define postver .15
+%define basever 4.15
+%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
License: GPL v2
Group: Applications/System
Source0: https://www.kernel.org/pub/linux/kernel/v4.x/linux-%{basever}.tar.xz
-# Source0-md5: bacdb9ffdcd922aa069a5e1520160e24
+# Source0-md5: 0d701ac1e2a67d47ce7127432df2c32b
Source1: cpupower.service
Source2: cpupower.config
%if "%{postver}" != ".0"
BuildRequires: ncurses-devel
BuildRequires: pciutils-devel
BuildRequires: pkgconfig
-BuildRequires: rpmbuild(macros) >= 1.647
+BuildRequires: rpmbuild(macros) >= 1.673
BuildRequires: tar >= 1:1.22
BuildRequires: xz
%if %{with perf}
Summary: Bash completion for perf command
Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia perf
Group: Applications/Shells
-Requires: %{name}-perf
+Requires: %{name}-perf = %{version}-%{release}
Requires: bash-completion
%if "%{_rpmversion}" >= "5"
BuildArch: noarch
%description -n bash-completion-perf -l pl.UTF-8
Bashowe uzupełnianie parametrów dla polecenia perf.
+%package -n bash-completion-kernel-tools
+Summary: Bash completion for kernel-tools commands
+Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla poleceń kernel-tools
+Group: Applications/Shells
+Requires: %{name} = %{version}-%{release}
+Requires: bash-completion >= 2.0
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
+
+%description -n bash-completion-kernel-tools
+Bash completion for kernel-tools commands (currently bpftool).
+
+%description -n bash-completion-kernel-tools -l pl.UTF-8
+Bashowe uzupełnianie parametrów dla poleceń kernel-tools (obecnie
+bpftool).
+
%package -n usbip
Summary: USB device sharing system over IP network
Summary(pl.UTF-8): System współdzielenia urządzeń USB po sieci IP
%{__sed} -i -e '/^CFLAGS = /s/ -g / $(OPTFLAGS) /' tools/hv/Makefile
%{__sed} -i -e '/^CFLAGS+=/s/ -O1 / $(OPTFLAGS) /' tools/thermal/tmon/Makefile
-%{__sed} -i -e 's#libexec/perf-core#%{_datadir}/perf-core#g' tools/perf/Makefile.config
+%{__sed} -i -e 's#libexec/perf-core#share/perf-core#g' tools/perf/Makefile.config
%build
cd linux-%{basever}
CFLAGS="%{rpmcflags}"
CFLAGS="%{rpmcflags}" \
-%{__make} -C tools/net \
+%{__make} -C tools/bpf \
CC="%{__cc}"
# perf
install -p tools/laptop/freefall/freefall $RPM_BUILD_ROOT%{_sbindir}
-install -p tools/net/{bpf_asm,bpf_dbg,bpf_jit_disasm} $RPM_BUILD_ROOT%{_bindir}
+%{__make} -C tools/bpf install \
+ prefix=$RPM_BUILD_ROOT%{_prefix} \
+ bash_compdir=$RPM_BUILD_ROOT%{bash_compdir}
+%{__make} -C tools/bpf/bpftool doc-install \
+ prefix=$RPM_BUILD_ROOT%{_prefix}
install -p tools/thermal/tmon/tmon $RPM_BUILD_ROOT%{_bindir}
cp -p tools/thermal/tmon/tmon.8 $RPM_BUILD_ROOT%{_mandir}/man8
%attr(755,root,root) %{_bindir}/lsiio
%attr(755,root,root) %{_bindir}/slabinfo
%attr(755,root,root) %{_bindir}/tmon
+%attr(755,root,root) %{_sbindir}/bpftool
%attr(755,root,root) %{_sbindir}/dslm
%attr(755,root,root) %{_sbindir}/freefall
%attr(755,root,root) %{_sbindir}/page-types
+%{_mandir}/man8/bpftool*.8*
%{_mandir}/man8/tmon.8*
%ifarch %{ix86} %{x8664} x32
%attr(755,root,root) %{_bindir}/centrino-decode
%attr(755,root,root) %{_bindir}/perf
%attr(755,root,root) %{_bindir}/trace
%{_mandir}/man1/perf*.1*
+%{_docdir}/perf-tip
%dir %{_datadir}/perf-core
%attr(755,root,root) %{_datadir}/perf-core/perf-archive
%attr(755,root,root) %{_datadir}/perf-core/perf-with-kcore
+%{_datadir}/perf-core/strace
%dir %{_datadir}/perf-core/scripts
/etc/bash_completion.d/perf
%endif
+%files -n bash-completion-kernel-tools
+%defattr(644,root,root,755)
+%{bash_compdir}/bpftool
+
%if %{with usbip}
%files -n usbip
%defattr(644,root,root,755)