NAK: [SRU][BIONIC][PATCH v2 0/2] add bpftool to linux-tools-common
seth.forshee at canonical.com
Fri Sep 27 12:38:37 UTC 2019
On Mon, Sep 09, 2019 at 12:39:21PM +0100, Quentin Monnet wrote:
> BugLink: https://bugs.launchpad.net/bugs/1774815
> bpftool is a debugging and introspection tool for BPF elements,
> developed by the BPF kernel community. It is essential to list and dump
> BPF programs and maps loaded on the system. Its sources are located in
> the kernel repository, and because it is not packaged, administrators
> willing to use bpftool must download the whole kernel sources, compile
> and install the utility.
> Adding bpftool to linux-tools and linux-tools-common packages makes it
> easily accessible. These packages are already used to provide other
> tools located in the kernel repository, such as perf.
> Because the bpftool version provided with kernel 4.15 does not build
> properly (API changed at some point in bfd.h from binutils-dev),
> backport a patch from 4.16 to fix the calls to libbfd's disassembler.
What should be done instead is to remove binutils-dev from the package
build-depends, as binary packages should not have dependencies on
libbinutils. It causes linux-tools to be locked to a specific binutils
version, causing issues if binutils needs to be updated.
We've gone through this before with perf, where we disabled use of libfd
in perf but seemingly forgot to remove the binutils-dev build-depends
(I've looked through our history to confirm that the dependency was only
added for perf). I've already removed the dependency in eoan, and we
should do the same when bringing bpftool to older releases.
> A test linux package was successfully built, at:
> (Built with:
> Packages linux-tools-$(uname -r) and linux-tools-common can be built
> with "debian/rules binary", and contain bpftool's binary and related
> files (redirection script, bpftool manual pages, bash completion),
> [Regression Potential]
> Low, as far as I can tell:
> - The backported patch touches only bpftool and one feature in
> tools/build/feature (only used with bpftool), all of it user space
> tools not used for anything other than bpftool itself.
> - bpftool packaging does not change the way other tools are packaged
> (apart from creating $(toolsman)/man8 a few lines earlier), and should
> have no impact on the packaging of other tools. One dependency is
> added to Build-Depends-Indep, none is removed.
> First version of this set was posted for bionic, but before the patch
> for packaging bpftool had been submitted and accepted to the development
> branch (currently eoan) . That same patch is now upstream in
> eoan/master-next as commit 8579afd20b0c.
>  https://lists.ubuntu.com/archives/kernel-team/2019-July/102462.html
> Changes in v2:
> - Patch has been applied to eoan.
> - Switch from python-docutils to python3-docutils for the dependency
> providing rst2man for manual pages.
> - Set CROSS_COMPILE when building bpftool.
> Quentin Monnet (2):
> tools/bpftool: fix bpftool build with bintutils >= 2.9
> UBUNTU: [Debian] package bpftool in linux-tools-common
> debian.master/control.stub.in | 1 +
> debian.master/rules.d/amd64.mk | 1 +
> debian.master/rules.d/arm64.mk | 1 +
> debian.master/rules.d/armhf.mk | 1 +
> debian.master/rules.d/i386.mk | 1 +
> debian.master/rules.d/ppc64el.mk | 1 +
> debian.master/rules.d/s390x.mk | 1 +
> debian/rules | 2 +-
> debian/rules.d/1-maintainer.mk | 1 +
> debian/rules.d/2-binary-arch.mk | 9 ++++++
> debian/rules.d/3-binary-indep.mk | 12 +++++++-
> tools/bpf/Makefile | 29 +++++++++++++++++++
> tools/bpf/bpf_jit_disasm.c | 7 +++++
> tools/bpf/bpftool/Makefile | 24 +++++++++++++++
> tools/bpf/bpftool/jit_disasm.c | 7 +++++
> tools/build/feature/Makefile | 4 +++
> .../feature/test-disassembler-four-args.c | 15 ++++++++++
> 17 files changed, 115 insertions(+), 2 deletions(-)
> create mode 100644 tools/build/feature/test-disassembler-four-args.c
More information about the kernel-team