testing/bpftop: new aport

This commit is contained in:
fossdd 2024-05-20 17:51:46 +02:00 committed by Kevin Daudt
parent 3d872aad4f
commit 5f9df1bdda
2 changed files with 62 additions and 0 deletions

47
testing/bpftop/APKBUILD Normal file
View File

@ -0,0 +1,47 @@
# Contributor: fossdd <fossdd@pwned.life>
# Maintainer: fossdd <fossdd@pwned.life>
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
"

View File

@ -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()?;