diff --git a/common/shlibs b/common/shlibs index f4f5acece3fa3d..349c183cdb3842 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4219,3 +4219,4 @@ libvosk.so vosk-api-0.3.43_1 libdspy-1.so.1 d-spy-1.4.0_1 libpanel-1.so.1 libpanel-1.0.1_1 libqrtr.so.1 qrtr-ns-1.0_1 +libbpf.so.1 libbpf-1.0.0_1 diff --git a/srcpkgs/bpftrace/template b/srcpkgs/bpftrace/template index 190cebb8e3bc76..857815d29eef5f 100644 --- a/srcpkgs/bpftrace/template +++ b/srcpkgs/bpftrace/template @@ -1,20 +1,24 @@ # Template file for 'bpftrace' pkgname=bpftrace -version=0.15.0 +version=0.16.0 revision=1 archs="x86_64* aarch64* ppc64*" build_style=cmake configure_args="-DBUILD_TESTING=OFF" # needs root to run hostmakedepends="flex pkg-config ruby-asciidoctor" -makedepends="bcc-devel cereal clang clang-tools-extra elfutils-devel llvm" +makedepends="bcc-devel cereal clang clang-tools-extra elfutils-devel libbpf-devel libxml2-devel llvm" short_desc="High-level tracing language for Linux enhanced Berkeley Packet Filter" maintainer="Leah Neukirchen " license="Apache-2.0" homepage="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/iovisor/bpftrace/" distfiles="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/iovisor/bpftrace/archive/v${version}.tar.gz" -checksum=64f67e615998d8150f5ee28614bea9ed303f20f6887bc4cdffa5f9c9477ef52a +checksum=89456dee3a20ec6c21ece345d4bf9a16a06af0f63cc5dffa9f5c7eea7916e21d nostrip=yes # needs to read own symbol table +post_extract() { + vsed -i -e 's:::g' src/btf.cpp +} + post_install() { # clashes with bcc-tools rm -rf ${DESTDIR}/usr/share/man diff --git a/srcpkgs/libbpf-devel b/srcpkgs/libbpf-devel new file mode 120000 index 00000000000000..ad979046de863b --- /dev/null +++ b/srcpkgs/libbpf-devel @@ -0,0 +1 @@ +libbpf \ No newline at end of file diff --git a/srcpkgs/libbpf/template b/srcpkgs/libbpf/template new file mode 100644 index 00000000000000..8ae0851d2d9860 --- /dev/null +++ b/srcpkgs/libbpf/template @@ -0,0 +1,34 @@ +# Template file for 'libbpf' +pkgname=libbpf +version=1.1.0 +revision=1 +build_wrksrc="src" +build_style=gnu-makefile +hostmakedepends="pkg-config" +makedepends="elfutils-devel" +short_desc="Library for working with (e)BPF" +maintainer="Leah Neukirchen " +license="LGPL-2.1-only, BSD-2-Clause" +homepage="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/libbpf/libbpf" +distfiles="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/libbpf/libbpf/archive/refs/tags/v${version}.tar.gz" +checksum=5da826c968fdb8a2f714701cfef7a4b7078be030cf58b56143b245816301cbb8 + +post_install() { + vlicense ../LICENSE + vlicense ../LICENSE.BSD-2-Clause + + # ugly hack until kernel-libc-headers is at version 6.1 :/ + vsed -i -e 's:::g' ${DESTDIR}/usr/include/bpf/btf.h + vinstall ../include/uapi/linux/btf.h 0644 usr/include/bpf/linux +} + +libbpf-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove usr/lib/*.a + vmove usr/lib/*.so + vmove usr/lib/pkgconfig + } +}