diff -Nru xdp-tools-1.3.0/debian/changelog xdp-tools-1.3.0/debian/changelog --- xdp-tools-1.3.0/debian/changelog 2023-02-12 14:47:23.000000000 +0100 +++ xdp-tools-1.3.0/debian/changelog 2023-02-22 08:42:46.000000000 +0100 @@ -1,3 +1,10 @@ +xdp-tools (1.3.0-2ubuntu1) lunar; urgency=medium + + * d/control: Change build dep for bpftool on Ubuntu. + * d/rules: Conditionally set BPFTOOL variable for build. + + -- Frode Nordahl Wed, 22 Feb 2023 08:42:46 +0100 + xdp-tools (1.3.0-2) unstable; urgency=medium * Add patch to fix build on arm/mips diff -Nru xdp-tools-1.3.0/debian/control xdp-tools-1.3.0/debian/control --- xdp-tools-1.3.0/debian/control 2023-02-12 14:47:17.000000000 +0100 +++ xdp-tools-1.3.0/debian/control 2023-02-22 08:42:46.000000000 +0100 @@ -1,9 +1,10 @@ Source: xdp-tools Section: devel Priority: optional -Maintainer: Luca Boccassi +Maintainer: Ubuntu Developers +Original-Maintainer: Luca Boccassi Rules-Requires-Root: no -Build-Depends: bpftool, +Build-Depends: linux-tools-generic, clang, debhelper-compat (= 13), libbpf-dev, diff -Nru xdp-tools-1.3.0/debian/rules xdp-tools-1.3.0/debian/rules --- xdp-tools-1.3.0/debian/rules 2023-02-12 14:47:17.000000000 +0100 +++ xdp-tools-1.3.0/debian/rules 2023-02-22 08:42:46.000000000 +0100 @@ -23,3 +23,17 @@ # Tests require root and break the testbed override_dh_auto_test: + +execute_before_dh_auto_build: + # On Ubuntu, the `bpftool` in path is a shell wrapper pointing at + # the binary corresponding to runtime kernel version. + # + # We do not know the kernel version being used on the system building + # this package, and for the build we only need the tool to generate + # skeleton code. + # + # If /usr/lib/linux-tools-*/bpftool exists, locate the most recent + # version and point to that, otherwise `bpftool` from PATH will be + # used. + for _bpftool in $(ls /usr/lib/linux-tools-*/bpftool); do true;done + if [ -x "$_bpftool" ]; then export BPFTOOL=$_bpftool; fi