diff --git a/bcc-0.15.0-Reinstate-bpf_detach_kfunc.patch b/bcc-0.15.0-Reinstate-bpf_detach_kfunc.patch new file mode 100644 index 0000000..bc995c6 --- /dev/null +++ b/bcc-0.15.0-Reinstate-bpf_detach_kfunc.patch @@ -0,0 +1,46 @@ +From 0b9a7f0de847d945bc5dd83961136e04d6c890ec Mon Sep 17 00:00:00 2001 +From: Jerome Marchand +Date: Wed, 1 Jul 2020 17:52:51 +0200 +Subject: [PATCH] Reinstate bpf_detach_kfunc + +It doesn't do anything, but bpftrace still calls it. + +--- + src/cc/libbpf.c | 7 +++++++ + src/cc/libbpf.h | 2 ++ + 2 files changed, 9 insertions(+) + +diff --git a/src/cc/libbpf.c b/src/cc/libbpf.c +index 010d1222..4c43218f 100644 +--- a/src/cc/libbpf.c ++++ b/src/cc/libbpf.c +@@ -1186,6 +1186,13 @@ bool bpf_has_kernel_btf(void) + return libbpf_find_vmlinux_btf_id("bpf_prog_put", 0) > 0; + } + ++int bpf_detach_kfunc(int prog_fd, char *func) ++{ ++ UNUSED(prog_fd); ++ UNUSED(func); ++ return 0; ++} ++ + int bpf_attach_kfunc(int prog_fd) + { + int ret; +diff --git a/src/cc/libbpf.h b/src/cc/libbpf.h +index 61471b5b..bcae5c99 100644 +--- a/src/cc/libbpf.h ++++ b/src/cc/libbpf.h +@@ -94,6 +94,8 @@ int bpf_detach_tracepoint(const char *tp_category, const char *tp_name); + + int bpf_attach_raw_tracepoint(int progfd, const char *tp_name); + ++ int bpf_detach_kfunc(int prog_fd, char *func); ++ + int bpf_attach_kfunc(int prog_fd); + + int bpf_attach_lsm(int prog_fd); +-- +2.25.4 + diff --git a/bcc.spec b/bcc.spec index bf4b5e2..1e0c427 100644 --- a/bcc.spec +++ b/bcc.spec @@ -9,7 +9,7 @@ Name: bcc Version: 0.15.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: BPF Compiler Collection (BCC) License: ASL 2.0 URL: https://github.com/iovisor/bcc @@ -17,6 +17,8 @@ URL: https://github.com/iovisor/bcc Source0: %{url}/releases/download/v%{version}/%{name}-src-with-submodule.tar.gz #Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +Patch0: %{name}-%{version}-Reinstate-bpf_detach_kfunc.patch + # Arches will be included as upstream support is added and dependencies are # satisfied in the respective arches ExclusiveArch: x86_64 %{power64} aarch64 s390x @@ -179,6 +181,9 @@ rm -rf %{buildroot}%{_datadir}/%{name}/tools/old/ %changelog +* Thu Jul 02 2020 Rafael dos Santos - 0.15.0-2 +- Reinstate a function needed by bpftrace + * Tue Jun 23 2020 Rafael dos Santos - 0.15.0-1 - Rebase to latest upstream version (#1849239)