forked from pool/bpftool
Accepting request 1175868 from home:shunghsiyu:branches:bpf
Update LLVM version selection logic to align with bcc and bpftrace and narrow down the dependency to clang and llvm. OBS-URL: https://build.opensuse.org/request/show/1175868 OBS-URL: https://build.opensuse.org/package/show/Base:System/bpftool?expand=0&rev=22
This commit is contained in:
parent
b8d7335973
commit
f95edf7b5b
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 22 09:43:32 UTC 2024 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||||
|
|
||||||
|
- Update LLVM version selection logic to align with bcc and bpftrace
|
||||||
|
* narrow down the dependency to clang and llvm
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Apr 11 07:02:33 UTC 2024 - Fredrik Lönnegren <fredrik.lonnegren@suse.com>
|
Thu Apr 11 07:02:33 UTC 2024 - Fredrik Lönnegren <fredrik.lonnegren@suse.com>
|
||||||
|
|
||||||
|
35
bpftool.spec
35
bpftool.spec
@ -16,6 +16,28 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# Use default LLVM on openSUSE unless it is not yet supported
|
||||||
|
%if 0%{?suse_version} >= 1600 || 0%{?is_opensuse}
|
||||||
|
%if 0%{?product_libs_llvm_ver} > 17
|
||||||
|
%define llvm_major_version 17
|
||||||
|
%else
|
||||||
|
%define llvm_major_version %{nil}
|
||||||
|
%endif
|
||||||
|
%else
|
||||||
|
# Hard-code latest LLVM for SLES, the default version is too old
|
||||||
|
%if 0%{?sle_version} == 150600
|
||||||
|
%define llvm_major_version 17
|
||||||
|
%else
|
||||||
|
%if 0%{?sle_version} == 150500
|
||||||
|
%define llvm_major_version 15
|
||||||
|
%else
|
||||||
|
%if 0%{?sle_version} == 150400
|
||||||
|
%define llvm_major_version 11
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: bpftool
|
Name: bpftool
|
||||||
Version: 7.4.0
|
Version: 7.4.0
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -26,19 +48,14 @@ URL: https://www.kernel.org/
|
|||||||
Source0: https://github.com/libbpf/bpftool/releases/download/v%{version}/bpftool-libbpf-v%{version}-sources.tar.gz
|
Source0: https://github.com/libbpf/bpftool/releases/download/v%{version}/bpftool-libbpf-v%{version}-sources.tar.gz
|
||||||
Patch0: binutils-2.40.patch
|
Patch0: binutils-2.40.patch
|
||||||
BuildRequires: binutils-devel
|
BuildRequires: binutils-devel
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1500
|
# Needed for compiling included BPF program (i.e. skeletons)
|
||||||
%if 0%{?sle_version} < 150400
|
BuildRequires: clang%{llvm_major_version}
|
||||||
BuildRequires: clang12-devel
|
|
||||||
%else
|
|
||||||
BuildRequires: clang13-devel
|
|
||||||
%endif
|
|
||||||
%else
|
|
||||||
BuildRequires: clang-devel
|
|
||||||
%endif
|
|
||||||
BuildRequires: docutils
|
BuildRequires: docutils
|
||||||
BuildRequires: libcap-devel
|
BuildRequires: libcap-devel
|
||||||
BuildRequires: libelf-devel
|
BuildRequires: libelf-devel
|
||||||
BuildRequires: libzstd-devel
|
BuildRequires: libzstd-devel
|
||||||
|
# llvm-strip is needed for the included BPF program (i.e. skeletons)
|
||||||
|
BuildRequires: llvm%{llvm_major_version}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
bpftool allows for inspection and simple modification of BPF objects (programs
|
bpftool allows for inspection and simple modification of BPF objects (programs
|
||||||
|
Loading…
Reference in New Issue
Block a user