aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
Diffstat (limited to 'community')
-rw-r--r--community/sniffglue/APKBUILD48
-rw-r--r--community/sniffglue/sniffglue.conf3
-rw-r--r--community/sniffglue/sniffglue.pre-install5
3 files changed, 56 insertions, 0 deletions
diff --git a/community/sniffglue/APKBUILD b/community/sniffglue/APKBUILD
new file mode 100644
index 0000000000..67bc8ec430
--- /dev/null
+++ b/community/sniffglue/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: kpcyrd <git@rxv.cc>
+# Maintainer: kpcyrd <git@rxv.cc>
+pkgname=sniffglue
+pkgver=0.10.1
+pkgrel=0
+pkgdesc="Secure multithreaded packet sniffer"
+url="https://github.com/kpcyrd/sniffglue"
+# !aarch64: https://cloud.drone.io/alpinelinux/aports/10687/3/1
+# !x86: fails to compile even when -fno-stack-protector is passed
+# !ppc64le: fails to build ring
+arch="x86_64 armhf armv7" # limited by cargo
+license="GPL-3.0-or-later"
+makedepends="
+ cargo
+ libpcap-dev
+ libseccomp-dev
+ "
+install="$pkgname.pre-install"
+subpackages="$pkgname-doc"
+source="
+ sniffglue.conf
+ $pkgname-$pkgver.tar.gz::https://github.com/kpcyrd/$pkgname/archive/v$pkgver.tar.gz
+ "
+
+# libring fails to compile otherwise
+case "$CARCH" in
+ x86)
+ export CFLAGS="$CFLAGS -fno-stack-protector"
+ ;;
+esac
+
+build() {
+ cargo build --release --locked
+}
+
+check() {
+ cargo test --release --locked
+}
+
+package() {
+ install -Dm755 "$builddir/target/release/sniffglue" "$pkgdir/usr/bin/sniffglue"
+ install -Dm644 "$builddir/docs/sniffglue.1" \
+ "$pkgdir/usr/share/man/man1/sniffglue.1"
+ install -Dm644 "$srcdir/$pkgname.conf" "$pkgdir/etc/$pkgname.conf"
+}
+
+sha512sums="66e6b87e832ba8424334d24e3457a214e60e67c731471098329d0ca54c574518f7856ba780bb6bffde53bdefe2c8f789a242138ae67e2fef3e562fa083b362b1 sniffglue.conf
+8009e80550a9386422669d6782f6b0a2647b7f9c69d3846c7d0852308904187cf817352db0696bae8913b69a37498b600c1c4d7a34647c022392d63d579fe7c3 sniffglue-0.10.1.tar.gz"
diff --git a/community/sniffglue/sniffglue.conf b/community/sniffglue/sniffglue.conf
new file mode 100644
index 0000000000..426f1199df
--- /dev/null
+++ b/community/sniffglue/sniffglue.conf
@@ -0,0 +1,3 @@
+[sandbox]
+user = "sniffglue"
+chroot = "/var/empty/"
diff --git a/community/sniffglue/sniffglue.pre-install b/community/sniffglue/sniffglue.pre-install
new file mode 100644
index 0000000000..df1b248e13
--- /dev/null
+++ b/community/sniffglue/sniffglue.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+adduser -S -D -H -h /dev/null -s /sbin/nologin -g 'sandbox user' sniffglue 2>/dev/null
+
+exit 0