bpftool/bpftool.spec
bitcoffee 8fcda2e1b2 bpftool:Combine main package and subpackage. Keep consistent with the previous version.
ISSUE:#I8O3I7

Signed-off-by: bitcoffee <liuxin350@huawei.com>
(cherry picked from commit f951fed3d8d963a091594b819e587c137bf33d9a)
2024-01-08 14:58:26 +08:00

53 lines
1.9 KiB
RPMSpec

Name: bpftool
Version: 6.8.0
Release: 2
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.
%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}
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
mv %{buildroot}%{_datadir}/bash-completion/completions/bpftool %{buildroot}%{_sysconfdir}/bash_completion.d/bpftool
%files
%license LICENSE LICENSE.BSD-2-Clause LICENSE.GPL-2.0
%doc README.md
%{_sbindir}/bpftool
%{_mandir}/man?/*.gz
%{_sysconfdir}/bash_completion.d/bpftool
%changelog
* Wed Dec 13 2023 liuxin <liuxin350@huawei.com> - 6.8.0-2
- Combine main package and subpackage. Keep consistent with the previous version.
* Tue Nov 21 2023 liuxin <liuxin350@huawei.com> - 6.8.0-1
- Init package