aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2019-10-21 16:31:18 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2019-10-21 20:01:23 +0000
commit359d30ae8a1c64704634045f8bc27ef4b348a143 (patch)
tree6df7e21b71931a6630564dd1d8c9067e7f3252d2
parent9e8139a9333ca4fa0b3d42e4854cb4c526a185e6 (diff)
downloadaports-359d30ae8a1c64704634045f8bc27ef4b348a143.tar.gz
aports-359d30ae8a1c64704634045f8bc27ef4b348a143.tar.bz2
aports-359d30ae8a1c64704634045f8bc27ef4b348a143.tar.xz
community/ospd-openvas: new aport, dependency of gvmd
-rw-r--r--community/ospd-openvas/APKBUILD36
-rw-r--r--community/ospd-openvas/ospd-openvas.confd10
-rw-r--r--community/ospd-openvas/ospd-openvas.initd18
-rw-r--r--community/ospd-openvas/ospd.conf10
4 files changed, 74 insertions, 0 deletions
diff --git a/community/ospd-openvas/APKBUILD b/community/ospd-openvas/APKBUILD
new file mode 100644
index 0000000000..cb026124c1
--- /dev/null
+++ b/community/ospd-openvas/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname="ospd-openvas"
+pkgver="1.0.0"
+pkgrel=0
+pkgdesc="ospd-openvas is an OSP server implementation to allow GVM to remotely control an OpenVAS Scanner"
+url="https://github.com/greenbone/ospd-openvas"
+arch="noarch"
+license="GPL-2.0"
+depends="ospd py3-psutil py3-redis"
+subpackages="$pkgname-openrc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/$pkgname/archive/v$pkgver.tar.gz
+ $pkgname.initd
+ $pkgname.confd
+ ospd.conf"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ python3 setup.py build
+}
+
+check() {
+ python3 setup.py check
+}
+
+package() {
+ python3 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
+ install -Dm755 "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
+ install -Dm644 "$srcdir"/ospd.conf "$pkgdir"/etc/openvas/ospd.conf
+}
+
+sha512sums="2b2e4f38843265a018a58b7fbd2fde0449d4f6cf3c5c1b7bec02d8390ab257020304f5be1bf2a77f7d28a04f4d1da611fc9b3066bef370dd686dfb8684fce534 ospd-openvas-1.0.0.tar.gz
+85d69018f447d714363759d488ef378e5e3cedd07c51c675a33728afc73d02c4e3fe7a1aec8a2c20c619619cfeec19d7f636301821f694271c06cd09de585b4a ospd-openvas.initd
+ef07f02c3900ee431785b2c2e53f04f4fd114f502526ec509c869dcd3a95e4284fc65f05f5ec85280cc05a29a46fba9c74ef3b0b0d618b9c9c1e62d9bb3fc6fa ospd-openvas.confd
+12c9aad78ec0244ff1575563f73fbb8e1def08d5fa71bf69a105a491e6cdb47d1868833168b35d903bb2a94e5e81c32601118130ebdfb8c596721a3c9f3ccabd ospd.conf"
diff --git a/community/ospd-openvas/ospd-openvas.confd b/community/ospd-openvas/ospd-openvas.confd
new file mode 100644
index 0000000000..fc776ac49e
--- /dev/null
+++ b/community/ospd-openvas/ospd-openvas.confd
@@ -0,0 +1,10 @@
+# OpenVAS Scanner command args
+
+# e.g --foreground
+OSPD_OPENVAS_OPTIONS=""
+
+# Scanner listen socket
+OSPD_OPENVAS_UNIX_SOCKET="--unix-socket=/tmp/ospd.sock"
+
+# Scanner listen mode
+OSPD_OPENVAS_SOCKET_MODE="--socket-mode=0o777"
diff --git a/community/ospd-openvas/ospd-openvas.initd b/community/ospd-openvas/ospd-openvas.initd
new file mode 100644
index 0000000000..cb38afae10
--- /dev/null
+++ b/community/ospd-openvas/ospd-openvas.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="remotely control an OpenVAS Scanner"
+command="/usr/bin/ospd-openvas"
+command_args="${OSPD_OPENVAS_OPTIONS} \
+ ${OSPD_OPENVAS_UNIX_SOCKET} \
+ ${OSPD_OPENVAS_SOCKET_MODE} \
+ --config /etc/openvas/ospd.conf"
+
+pidfile="/run/ospd-openvas.pid"
+command_background="true"
+
+depend() {
+ after bootmisc
+ need localmount redis
+}
diff --git a/community/ospd-openvas/ospd.conf b/community/ospd-openvas/ospd.conf
new file mode 100644
index 0000000000..26a9bff671
--- /dev/null
+++ b/community/ospd-openvas/ospd.conf
@@ -0,0 +1,10 @@
+[OSPD - openvas]
+
+#required by gvmd
+unix_socket = /tmp/ospd.sock
+
+#socket_mode = 0o770
+#unix_socket = /run/ospd/ospd-openvas.pid
+
+log_level = DEBUG
+log_file = /var/log/gvm/openvas.log