mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-06 12:39:54 +03:00
bpftools: 5.19.12 -> 6.2; sync with linuxHeaders
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.
This commit is contained in:
parent
25610316d9
commit
916dba8790
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl
|
||||
{ lib, stdenv, linuxHeaders
|
||||
, libopcodes, libopcodes_2_38
|
||||
, libbfd, libbfd_2_38
|
||||
, elfutils, readline
|
||||
@ -8,15 +8,10 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bpftools";
|
||||
version = "5.19.12";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
|
||||
sha256 = "sha256-xDalSMcxLOb8WjRyy+rYle749ShB++fHH9jki9/isLo=";
|
||||
};
|
||||
inherit (linuxHeaders) version src;
|
||||
|
||||
patches = [
|
||||
./strip-binary-name.patch
|
||||
# fix unknown type name '__vector128' on ppc64le
|
||||
./include-asm-types-for-ppc64le.patch
|
||||
];
|
||||
|
@ -1,15 +0,0 @@
|
||||
Strip path to the binary from prints.
|
||||
|
||||
I see no sense in including the full path in outputs like bpftool --version
|
||||
Especially as argv[0] may not include it, based on calling via $PATH or not.
|
||||
--- a/tools/bpf/bpftool/main.c
|
||||
+++ b/tools/bpf/bpftool/main.c
|
||||
@@ -443 +443,7 @@
|
||||
- bin_name = argv[0];
|
||||
+ /* Strip the path if any. */
|
||||
+ const char *bin_name_slash = strrchr(argv[0], '/');
|
||||
+ if (bin_name_slash) {
|
||||
+ bin_name = bin_name_slash + 1;
|
||||
+ } else {
|
||||
+ bin_name = argv[0];
|
||||
+ }
|
Loading…
Reference in New Issue
Block a user