summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/ospd-openvas/Manifest1
-rw-r--r--net-analyzer/ospd-openvas/ospd-openvas-22.7.0.ebuild87
2 files changed, 88 insertions, 0 deletions
diff --git a/net-analyzer/ospd-openvas/Manifest b/net-analyzer/ospd-openvas/Manifest
index bdac8e5c24e7..0bcfc7d786d4 100644
--- a/net-analyzer/ospd-openvas/Manifest
+++ b/net-analyzer/ospd-openvas/Manifest
@@ -1 +1,2 @@
DIST ospd-openvas-22.6.2.tar.gz 246360 BLAKE2B 22c95cafdc6c223465805f30b522d357c28b9da3df74743cdee3cc608215d730da9101c37d2498e9680f506ed1301e12d9af3c8bab1c2a1847c034c7d6c10ca8 SHA512 a405779b9ea89b1300122c39553f8f9bf079b8610dc61ec6244affa9c9273725234a4a556df05e3013045681678646226cf12af66f051def8b042b84bb639ffe
+DIST ospd-openvas-22.7.0.tar.gz 246142 BLAKE2B bb5ea9bdc82929958466d2002ce28e63e5ff8c72561758f328c05f0d8c6431f7e305772707027f764fd881334d3c0b993d7f1727f8d7d16da83cc34b9a608895 SHA512 5a2c533589dc7a27a1be1b834243054eaf1bdb250fc41a98b0b35e6e60b8a2793e0e1d7dcd8bbf638bf23da1636efb5a80310df75727990768035743300ca8b1
diff --git a/net-analyzer/ospd-openvas/ospd-openvas-22.7.0.ebuild b/net-analyzer/ospd-openvas/ospd-openvas-22.7.0.ebuild
new file mode 100644
index 000000000000..99c6e7b40fe7
--- /dev/null
+++ b/net-analyzer/ospd-openvas/ospd-openvas-22.7.0.ebuild
@@ -0,0 +1,87 @@
+# Copyright 2020-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_USE_PEP517=poetry
+inherit distutils-r1 systemd
+
+DESCRIPTION="This is an OSP server implementation to allow GVM to remotely control OpenVAS"
+HOMEPAGE="https://www.greenbone.net https://github.com/greenbone/ospd-openvas"
+SRC_URI="https://github.com/greenbone/ospd-openvas/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3+ GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc +notus"
+
+DEPEND="
+ acct-user/gvm
+ >=dev-python/defusedxml-0.6[${PYTHON_USEDEP}]
+ <dev-python/defusedxml-0.8[${PYTHON_USEDEP}]
+ >=dev-python/deprecated-1.2.10[${PYTHON_USEDEP}]
+ >=dev-python/lxml-4.5.2[${PYTHON_USEDEP}]
+ <dev-python/lxml-6.0.0[${PYTHON_USEDEP}]
+ >=dev-python/packaging-20.4[${PYTHON_USEDEP}]
+ <dev-python/packaging-25.0[${PYTHON_USEDEP}]
+ >=dev-python/psutil-5.5.1[${PYTHON_USEDEP}]
+ >=dev-python/redis-4.5.0[${PYTHON_USEDEP}]
+ >=dev-python/python-gnupg-0.4.8[${PYTHON_USEDEP}]
+ <dev-python/python-gnupg-0.6.0[${PYTHON_USEDEP}]
+ >=dev-python/paho-mqtt-1.5.1[${PYTHON_USEDEP}]
+ >=dev-python/python-gnupg-0.4.8[${PYTHON_USEDEP}]
+ net-libs/paho-mqtt-c
+ app-misc/mosquitto
+"
+RDEPEND="
+ ${DEPEND}
+ app-admin/sudo
+ >=net-analyzer/openvas-scanner-22.4
+ notus? ( >=net-analyzer/notus-scanner-22.4 )
+"
+
+distutils_enable_tests unittest
+
+python_compile() {
+ if use doc; then
+ bash "${S}"/docs/generate || die
+ HTML_DOCS=( "${S}"/docs/. )
+ fi
+ distutils-r1_python_compile
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ insinto /etc/gvm
+ doins config/${PN}.conf
+ if ! use prefix; then
+ fowners -R gvm:gvm /etc/gvm
+ fi
+
+ newinitd "${FILESDIR}/${PN}-22.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}-22.confd" "${PN}"
+
+ systemd_dounit config/${PN}.service
+
+ if use notus; then
+ systemd_install_serviced "${FILESDIR}/ospd-openvas.service_notus.conf" \
+ ${PN}.service
+ else
+ systemd_install_serviced "${FILESDIR}/ospd-openvas.service.conf" \
+ ${PN}.service
+ fi
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/ospd-openvas.logrotate" ospd-openvas
+
+ # OSPD OpenVAS attempts to call openvas via sudo as network security
+ # scanning often requires priviliged operations.
+ insinto /etc/sudoers.d
+ newins - openvas <<-EOF
+ gvm ALL = NOPASSWD: /usr/bin/openvas
+EOF
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/openvas
+}