bpftool/bpftool.spec
bitcoffee 4f4996a6e6 bpftool: init package
init package

Signed-off-by: bitcoffee <liuxin350@huawei.com>
2023-11-24 12:07:47 +08:00

59 lines
1.9 KiB
RPMSpec

Name: bpftool
Version: 6.8.0
Release: 1
Summary: Tool for inspection and manipulation of BPF programs and maps
License: GPL-2.0-only
URL: https://www.kernel.org/
BuildRequires: elfutils-devel libcap-devel binutils-devel clang python3-docutils llvm
Source0: https://github.com/libbpf/bpftool/archive/refs/tags/%{name}-libbpf-v%{version}.tar.gz
Patch0: bpftool-use-a-local-copy-of-perf_event-to-fix-access.patch
Patch1: bpftool-define-a-local-bpf_perf_link-to-fix-accessin.patch
Patch2: bpftool-use-a-local-copy-of-bpf_link_type_perf_event.patch
Patch3: bpftool-use-a-local-bpf_perf_event_value-to-fix-acce.patch
Patch4: bpftool-recognize-scheduler-programs.patch
Patch5: bpftool-Fix-a-wrong-type-cast-in-btf_dumper_int.patch
Patch6: bpftool-Clear-errno-after-libcaps-checks.patch
Patch7: bpftool-Fix-NULL-pointer-dereference-when-pin-PROG-M.patch
Patch8: bpftool-profile-online-CPUs-instead-of-possible.patch
Patch9: tools-bpftool-Remove-invalid-json-escape.patch
Patch10: bpftool-Fix-bug-for-long-instructions-in-program-CFG.patch
%description
bpftool allows for inspection and simple modification of BPF objects (programs
and maps) on the system.
%package bash-completion
Summary: Bash completion for bpftool
Requires: %{name}
Requires: bash-completion
Supplements: (%{name} and bash-completion)
%description bash-completion
bash command line completion support for bpftool.
%prep
%autosetup -p1 -n %{name}-%{version}
%build
%make_build -C src V=1
%make_build -C docs V=1 man
%install
make -C src V=1 install DESTDIR=%{buildroot} prefix=%{_prefix} mandir=%{_mandir}
make -C docs V=1 install DESTDIR=%{buildroot} prefix=%{_prefix} mandir=%{_mandir}
%files
%license LICENSE LICENSE.BSD-2-Clause LICENSE.GPL-2.0
%doc README.md
%{_sbindir}/bpftool
%{_mandir}/man?/*.gz
%files bash-completion
%{_datadir}/bash-completion/completions/bpftool
%changelog
* Tue Nov 21 2023 liuxin <liuxin350@huawei.com> - 6.8.0-1
- Init package