Initial commit on c10s
Resolves: RHEL-69496 Signed-off-by: Viktor Malik <vmalik@redhat.com>
This commit is contained in:
parent
0180981bb4
commit
90bd09a815
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
|||||||
|
/linux-6.12.0-31.el10.tar.xz
|
59
bpftool.spec
Normal file
59
bpftool.spec
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# We build bpftool from RHEL kernel sources, that's why we use
|
||||||
|
# directly kernel tar for RHEL kernel build.
|
||||||
|
# We update bpftool's 'sources' file with proper hash that's
|
||||||
|
# used as kernel tar.
|
||||||
|
|
||||||
|
# RHEL kernel version-release
|
||||||
|
%define kver 6.12.0-31
|
||||||
|
%define source linux-%{kver}%{?dist}
|
||||||
|
|
||||||
|
Name: bpftool
|
||||||
|
Version: 7.5.0
|
||||||
|
# Currently, bpftool built from kernel uses kernel's release version.
|
||||||
|
# In order to do the transition smoothly, raise it to a sufficiently big number.
|
||||||
|
# Once bpftool moves to 7.6.0, reset the release to 1.
|
||||||
|
Release: 800%{?dist}
|
||||||
|
Summary: Inspection and simple manipulation of eBPF programs and maps
|
||||||
|
|
||||||
|
%global libname libbpf
|
||||||
|
%global sources %{name}-%{libname}-v%{version}-sources
|
||||||
|
|
||||||
|
License: GPL-2.0-only OR BSD-2-Clause
|
||||||
|
Source: %{source}.tar.xz
|
||||||
|
|
||||||
|
ExcludeArch: %{ix86}
|
||||||
|
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: binutils-devel
|
||||||
|
BuildRequires: elfutils-libelf-devel
|
||||||
|
BuildRequires: libcap-devel
|
||||||
|
BuildRequires: llvm-devel
|
||||||
|
BuildRequires: clang
|
||||||
|
BuildRequires: python3-docutils
|
||||||
|
BuildRequires: kernel-devel
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package contains the bpftool, which allows inspection and simple
|
||||||
|
manipulation of eBPF programs and maps.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n %{source}
|
||||||
|
|
||||||
|
%build
|
||||||
|
# We need to use vmlinux.h from kernel-devel rather than the one from the running system
|
||||||
|
%define kernel_version %(rpm -q --qf "%%{VERSION}-%%{RELEASE}.%%{ARCH}" kernel-devel)
|
||||||
|
pushd tools/bpf/bpftool
|
||||||
|
%make_build EXTRA_CFLAGS="%{build_cflags}" EXTRA_LDFLAGS="%{build_ldflags}" VMLINUX_H="/usr/src/kernels/%{kernel_version}/vmlinux.h"
|
||||||
|
|
||||||
|
%install
|
||||||
|
pushd tools/bpf/bpftool
|
||||||
|
%make_install prefix=%{_prefix} bash_compdir=%{_sysconfdir}/bash_completion.d/ mandir=%{_mandir} doc-install
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{_sbindir}/bpftool
|
||||||
|
%{_sysconfdir}/bash_completion.d/bpftool
|
||||||
|
%{_mandir}/man8/bpftool*.8*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
%autochangelog
|
Loading…
Reference in New Issue
Block a user