bpftools used to use the same version and sources as linux_latest, but
this was changed in f12d2f016b ("bpftools: decouple version from
linux_latest"), because it caused too many rebuilds.
Since then, it has languished. It came to my attention because
bpftool btf dump seems to be completely broken on recent kernels.
So, since it's a package that really needs to be kept up to date to be
compatible with the latest kernels, let's couple it to linuxHeaders
instead. linuxHeaders updates already have to go through staging, so
we won't suffer from extra rebuilds like we did when it was coupled to
the latest kernel directly, which goes straight to master.
Otherwise meson's find_program() can get confused by the output;
now in case of systemd build:
meson.build:1059:16: ERROR: Invalid version of program, need 'bpftool' ['>= 5.6.0'] found '01'.
bpftools causes way too many rebuilds nowadays,
so its updates are not suitable for merging directly to nixpkgs master.
We want to update linux_latest faster than that.
Without the change bpftools build fails on binutils-2.39 due to API change:
jit_disasm.c:105:17: error: too few arguments to function 'init_disassemble_info'
105 | init_disassemble_info(&info, stdout,
| ^~~~~~~~~~~~~~~~~~~~~
I needed some other bpf-related tools located in the kernel source tree,
so I hijacked the bpftool package, renamed it to bpftools and added
those programs.