Accepting request 1175869 from Base:System

OBS-URL: https://build.opensuse.org/request/show/1175869
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bpftool?expand=0&rev=12
This commit is contained in:
Ana Guerrero 2024-05-23 13:34:46 +00:00 committed by Git OBS Bridge
commit 65945bf6a3
2 changed files with 32 additions and 9 deletions

View File

@ -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>

View File

@ -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
Version: 7.4.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
Patch0: binutils-2.40.patch
BuildRequires: binutils-devel
%if 0%{?suse_version} && 0%{?suse_version} <= 1500
%if 0%{?sle_version} < 150400
BuildRequires: clang12-devel
%else
BuildRequires: clang13-devel
%endif
%else
BuildRequires: clang-devel
%endif
# Needed for compiling included BPF program (i.e. skeletons)
BuildRequires: clang%{llvm_major_version}
BuildRequires: docutils
BuildRequires: libcap-devel
BuildRequires: libelf-devel
BuildRequires: libzstd-devel
# llvm-strip is needed for the included BPF program (i.e. skeletons)
BuildRequires: llvm%{llvm_major_version}
%description
bpftool allows for inspection and simple modification of BPF objects (programs