Public bug reported:

[Impact]

The autopkgtest for bpfcc-tools fails with the following error when
multiple linux-tools packages (multiple kernels) are installed:

942s /usr/lib/linux-tools-6.8.0-22/bpftool 
/usr/lib/linux-tools-6.8.0-25/bpftool gen skeleton 
/tmp/autopkgtest.2W4dxr/build.Uhs/src/libbpf-tools/.output/bashreadline.bpf.o > 
/tmp/autopkgtest.2W4dxr/build.Uhs/src/libbpf-tools/.output/bashreadline.skel.h
942s Usage: bpftool [OPTIONS] OBJECT { COMMAND | help }
942s        bpftool batch file FILE
942s        bpftool version
942s 
942s        OBJECT := { prog | map | link | cgroup | perf | net | feature | btf 
| gen | struct_ops | iter }
942s        OPTIONS := { {-j|--json} [{-p|--pretty}] | {-d|--debug} |
942s                     {-V|--version} }
942s make[2]: *** [Makefile:192: 
/tmp/autopkgtest.2W4dxr/build.Uhs/src/libbpf-tools/.output/bashreadline.skel.h] 
Error 255
942s make[2]: *** Deleting file 
'/tmp/autopkgtest.2W4dxr/build.Uhs/src/libbpf-tools/.output/bashreadline.skel.h'
942s make[2]: Leaving directory 
'/tmp/autopkgtest.2W4dxr/build.Uhs/src/libbpf-tools'
942s make[1]: *** [debian/rules:44: override_dh_auto_install] Error 2
942s make[1]: Leaving directory '/tmp/autopkgtest.2W4dxr/build.Uhs/src'

The reason is that in debian/rules we evaluate BPFTOOL assuming that
only one kernel is installed, but we may have multiple kernels
(therefore multiple linux-tools-<version>) installed.

[Test case]

Install multiple linux-tools-<version> and run the bpfcc-tools
autopkgtest.

[Fix]

Evaluate BPFTOOL in debian/rules only taking the last bpftool listed in
/usr/lib/linux-tools-*/bpftool.

[Regression potential]

This change affects only the autopkgtest and it allows to run the test
correctly also when multiple kernels are installed, no regresssion is
expected.

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: bpfcc-tools 0.29.1+ds-1ubuntu6
ProcVersionSignature: User Name 6.8.0-22.22-generic 6.8.1
Uname: Linux 6.8.0-22-generic x86_64
ApportVersion: 2.28.0-0ubuntu1
Architecture: amd64
CasperMD5CheckResult: unknown
CloudArchitecture: x86_64
CloudBuildName: server
CloudID: nocloud
CloudName: unknown
CloudPlatform: nocloud
CloudSerial: 20240413
CloudSubPlatform: config-disk (/dev/vdb)
Date: Tue Apr 16 05:38:06 2024
PackageArchitecture: all
ProcEnviron:
 LANG=C.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: bpfcc
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: bpfcc (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: bpfcc (Ubuntu Noble)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug cloud-image noble

** Also affects: bpfcc (Ubuntu Noble)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2061727

Title:
  bpfcc-tools autotest failure when multiple linux-tools-<version>
  packages are installed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bpfcc/+bug/2061727/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to