Commit 2f97200d authored by Mark Pashmfouroush's avatar Mark Pashmfouroush Committed by Leo

testing/conntracct: new aport

parent 1988e554
# Contributor: Mark Pashmfouroush <mark@markpash.me>
# Maintainer: Mark Pashmfouroush <mark@markpash.me>
pkgname=conntracct
pkgver=0.2.7
pkgrel=0
pkgdesc="Tool for extracting network flow information from Linux hosts"
url="https://github.com/ti-mo/conntracct"
arch="all"
license="Apache-2.0"
options="net !check" # can't load and test BPF probes in CI
makedepends="go sudo libcap mage"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="
$pkgname-$pkgver.tar.gz::https://github.com/ti-mo/conntracct/archive/$pkgver.tar.gz
conntracct.confd
conntracct.initd
"
build() {
mage build
}
check() {
go test -v \
-coverprofile=test/output/integration.cover \
-covermode=atomic \
-tags=integration ./... \
-exec=sudo
}
package() {
install -Dm644 "$srcdir"/conntracct.confd "$pkgdir"/etc/conf.d/conntracct
install -Dm755 "$srcdir"/conntracct.initd "$pkgdir"/etc/init.d/conntracct
install -Dm755 "$builddir"/build/conntracct "$pkgdir"/usr/bin/conntracct
install -d "$pkgdir"/etc/conntracct
setcap cap_sys_admin,cap_net_admin,cap_dac_override,cap_sys_resource+eip "$pkgdir"/usr/bin/conntracct
}
sha512sums="f018116dbeb937a5e308fa05dcbe9633ee1227a3bdce6c946cca1c5d73bb463c0085835c042becc62f7ad597b243c470c06e9712a1dffb844c4c858615da09af conntracct-0.2.7.tar.gz
e2474f6a0fd86014ec87c662cbb3f51a906e3d5905ad7d77e557a3c42c1efaeace40dd0e3811c75536bb6b031be68453e7e945786ef1af158398424fba5213a8 conntracct.confd
5b1c44b43be54674e9d17d64677db700820144264dfd40a77389776f56fa8b8672f13c6b1d1dfc426037cc98298053e1364faaf9293c15c45c4acb24a653f78b conntracct.initd"
# /etc/conf.d/conntracct
# Uncomment and fill to specify custom arguments
# ARGS=""
#!/sbin/openrc-run
name=conntracct
description="Conntracct is a tool for extracting network flow information from Linux hosts"
command=/usr/bin/conntracct
command_args="$ARGS"
command_user="conntracct:conntracct"
supervisor="supervise-daemon"
depend() {
need net
}
#!/bin/sh
addgroup -S conntracct 2>/dev/null
adduser -S -D -H -s /bin/nologin -G conntracct -g conntracct conntracct 2>/dev/null
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment