diff --git a/testing/bpftop/APKBUILD b/testing/bpftop/APKBUILD new file mode 100644 index 00000000000..018ca99f07a --- /dev/null +++ b/testing/bpftop/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: fossdd +# Maintainer: fossdd +pkgname=bpftop +pkgver=0.5.1 +pkgrel=0 +pkgdesc="Dynamic real-time view of running eBPF programs" +url="https://github.com/Netflix/bpftop" +arch="all !s390x" +# s390x: fails to compile +license="Apache-2.0" +depends=" + libgcc + zlib + " +makedepends=" + cargo-auditable + git + linux-headers + elfutils-dev + clang + " +source="$pkgname-$pkgver.tar.gz::https://github.com/Netflix/bpftop/archive/refs/tags/v$pkgver.tar.gz + no-journald.patch + " + +prepare() { + default_prepare + + cargo fetch --target="$CTARGET" --locked +} + +build() { + cargo auditable build --frozen --release +} + +check() { + cargo test --frozen --release +} + +package() { + install -Dm755 target/release/bpftop -t "$pkgdir"/usr/bin/ +} + +sha512sums=" +9c6bb8e1ab08e2ca0575eb22f976ecec9bcfe2481274d0e9188519719cd75718f99197076beff131403f2ea780cb1569c6edb2235d0b0c5b391a5dd7edf24ee2 bpftop-0.5.1.tar.gz +fb32ec4f0f91091a5b36610f12c1d31d3ea8e6a36d9e0792715831b46c9c9f606a20d7156d93c09d17930dd2cdae2fa3ba063dd37438e6f1fafaf64d19215432 no-journald.patch +" diff --git a/testing/bpftop/no-journald.patch b/testing/bpftop/no-journald.patch new file mode 100644 index 00000000000..92994ec09dc --- /dev/null +++ b/testing/bpftop/no-journald.patch @@ -0,0 +1,15 @@ +diff --git a/src/main.rs b/src/main.rs +index 00fc067..d54fda4 100755 +--- a/src/main.rs ++++ b/src/main.rs +@@ -119,9 +119,8 @@ fn main() -> Result<()> { + } + + // Initialize the tracing subscriber with the journald layer +- let registry = tracing_subscriber::registry() +- .with(tracing_journald::layer()?) +- .with(tracing_subscriber::filter::LevelFilter::INFO); ++ let registry = ++ tracing_subscriber::registry().with(tracing_subscriber::filter::LevelFilter::INFO); + // Try to set this subscriber as the global default + registry.try_init()?;