From 6ffe958d31b462766074dc3418f06dc8dea5b253 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 9 May 2022 15:47:05 +0200 Subject: net-analyzer/ospd-openvas: LICENSE, DISTUTILS_USE_PEP517, sudoers Signed-off-by: Florian Schmaus --- .../ospd-openvas/ospd-openvas-21.4.4-r3.ebuild | 70 -------------------- .../ospd-openvas/ospd-openvas-21.4.4-r4.ebuild | 76 ++++++++++++++++++++++ 2 files changed, 76 insertions(+), 70 deletions(-) delete mode 100644 net-analyzer/ospd-openvas/ospd-openvas-21.4.4-r3.ebuild create mode 100644 net-analyzer/ospd-openvas/ospd-openvas-21.4.4-r4.ebuild diff --git a/net-analyzer/ospd-openvas/ospd-openvas-21.4.4-r3.ebuild b/net-analyzer/ospd-openvas/ospd-openvas-21.4.4-r3.ebuild deleted file mode 100644 index e6e08ba90a4d..000000000000 --- a/net-analyzer/ospd-openvas/ospd-openvas-21.4.4-r3.ebuild +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 2020-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{8..10} ) -DISTUTILS_USE_SETUPTOOLS=pyproject.toml -inherit distutils-r1 systemd - -DESCRIPTION="This is an OSP server implementation to allow GVM to remotely control OpenVAS" -HOMEPAGE="https://github.com/greenbone/ospd-openvas" -SRC_URI="https://github.com/greenbone/ospd-openvas/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="doc" - -DEPEND=" - acct-user/gvm - dev-python/defusedxml[${PYTHON_USEDEP}] - dev-python/deprecated[${PYTHON_USEDEP}] - dev-python/lxml[${PYTHON_USEDEP}] - >=dev-python/packaging-20.4[${PYTHON_USEDEP}] - dev-python/paramiko[${PYTHON_USEDEP}] - >=dev-python/psutil-5.7.0[${PYTHON_USEDEP}] - >=dev-python/redis-py-3.5.3[${PYTHON_USEDEP}] - !net-analyzer/ospd[${PYTHON_USEDEP}] -" -RDEPEND=" - ${DEPEND} - >=net-analyzer/openvas-scanner-${PV} -" - -distutils_enable_tests unittest - -src_prepare() { - default - - # https://github.com/greenbone/ospd-openvas/pull/649 - sed -i '/^Group=gvm/d' config/ospd-openvas.service || die - - # https://github.com/greenbone/ospd-openvas/pull/653 - sed -i 's;/usr/local/bin/;/usr/bin/;' config/ospd-openvas.service || die -} - -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 - - dodoc "${FILESDIR}"/redis.conf.example - - insinto /etc/gvm - doins config/${PN}.conf - if ! use prefix; then - fowners -R gvm:gvm /etc/gvm - fi - - newinitd "${FILESDIR}/${PN}.initd" "${PN}" - newconfd "${FILESDIR}/${PN}.confd" "${PN}" - - systemd_dounit config/${PN}.service -} diff --git a/net-analyzer/ospd-openvas/ospd-openvas-21.4.4-r4.ebuild b/net-analyzer/ospd-openvas/ospd-openvas-21.4.4-r4.ebuild new file mode 100644 index 000000000000..a7791ba4ba27 --- /dev/null +++ b/net-analyzer/ospd-openvas/ospd-openvas-21.4.4-r4.ebuild @@ -0,0 +1,76 @@ +# Copyright 2020-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +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" + +DEPEND=" + acct-user/gvm + dev-python/defusedxml[${PYTHON_USEDEP}] + dev-python/deprecated[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + >=dev-python/packaging-20.4[${PYTHON_USEDEP}] + dev-python/paramiko[${PYTHON_USEDEP}] + >=dev-python/psutil-5.7.0[${PYTHON_USEDEP}] + >=dev-python/redis-py-3.5.3[${PYTHON_USEDEP}] + !net-analyzer/ospd[${PYTHON_USEDEP}] +" +RDEPEND=" + ${DEPEND} + app-admin/sudo + >=net-analyzer/openvas-scanner-${PV} +" + +distutils_enable_tests unittest + +src_prepare() { + default + + # https://github.com/greenbone/ospd-openvas/pull/649 + sed -i '/^Group=gvm/d' config/ospd-openvas.service || die + + # https://github.com/greenbone/ospd-openvas/pull/653 + sed -i 's;/usr/local/bin/;/usr/bin/;' config/ospd-openvas.service || die +} + +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}.initd" "${PN}" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + + systemd_dounit config/${PN}.service + + # 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 +} -- cgit v1.2.3-65-gdbad