Skip to content

Commit

Permalink
SPECS/bcc.spec: add dependencies to libdebuginfod
Browse files Browse the repository at this point in the history
On Fedora builds we can check the version number and add
build and runtime dependencies to debuginfod for all
currently supported releases (>= 32). Note that the buildbot
only has Fedora 25-28 so it will not try to build libbcc
with debuginfod support as the required packages are not
available on these releases.

For .deb packages there is no easy way to add dependencies
dynamically, so we do not add dependencies to libdebuginfod
there for now. For documentation purposes, however, let's
add a comment indicating which changes are required for
libdebuginfod support for downstream maintainers.

Signed-off-by: Andreas Ziegler <[email protected]>
  • Loading branch information
rupran authored and yonghong-song committed May 9, 2021
1 parent 8ddbf3b commit 823321c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions SPECS/bcc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
%bcond_with python3
%endif

# Build with debuginfod support for Fedora >= 32
%if 0%{?fedora} >= 32
%bcond_without libdebuginfod
%else
%bcond_with libdebuginfod
%endif

%if %{with python3}
%global __python %{__python3}
%global python_bcc python3-bcc
Expand All @@ -45,6 +52,9 @@ Source0: bcc.tar.gz
ExclusiveArch: x86_64 ppc64 aarch64 ppc64le
BuildRequires: bison cmake >= 2.8.7 flex make
BuildRequires: gcc gcc-c++ python2-devel elfutils-libelf-devel-static
%if %{with libdebuginfod}
BuildRequires: elfutils-debuginfod-client-devel
%endif
%if %{with python3}
BuildRequires: python3-devel
%endif
Expand Down Expand Up @@ -96,6 +106,9 @@ find %{buildroot}/usr/share/bcc/{tools,examples} -type f -exec \
%package -n libbcc
Summary: Shared Library for BPF Compiler Collection (BCC)
Requires: elfutils-libelf
%if %{with libdebuginfod}
Requires: elfutils-debuginfod-client
%endif
%description -n libbcc
Shared Library for BPF Compiler Collection (BCC)

Expand Down
2 changes: 2 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ Build-Depends: debhelper (>= 9), cmake,
python (>= 2.7), python-netaddr, python-pyroute2 | python3-pyroute2, luajit,
libluajit-5.1-dev, arping, inetutils-ping | iputils-ping, iperf, netperf,
ethtool, devscripts, python3, dh-python
# add 'libdebuginfod-dev' to Build-Depends for libdebuginfod support
Homepage: https://github.com/iovisor/bcc

Package: libbcc
Architecture: any
Provides: libbpfcc, libbpfcc-dev
Conflicts: libbpfcc, libbpfcc-dev
Depends: libc6, libstdc++6, libelf1
# add 'libdebuginfod1' to Depends if built with libdebuginfod support
Description: Shared Library for BPF Compiler Collection (BCC)
Shared Library for BPF Compiler Collection to control BPF programs
from userspace.
Expand Down

0 comments on commit 823321c

Please sign in to comment.