diff options
author | Justin Lecher <jlec@gentoo.org> | 2014-10-01 10:58:58 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2014-10-01 10:58:58 +0000 |
commit | 2e60120ac8ae6a5e969fee980303c84b5dffad8e (patch) | |
tree | 5cb2938372f5e8f0d17d52b55dbcba0525df521d /net-analyzer/openvas-manager | |
parent | Stable for HPPA (bug #524058). (diff) | |
download | gentoo-2-2e60120ac8ae6a5e969fee980303c84b5dffad8e.tar.gz gentoo-2-2e60120ac8ae6a5e969fee980303c84b5dffad8e.tar.bz2 gentoo-2-2e60120ac8ae6a5e969fee980303c84b5dffad8e.zip |
net-analyzer/openvas-manager: Enhance init and systemd support; drop installation instructions in favour of meta package
(Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'net-analyzer/openvas-manager')
6 files changed, 96 insertions, 6 deletions
diff --git a/net-analyzer/openvas-manager/ChangeLog b/net-analyzer/openvas-manager/ChangeLog index 2de8e70c3c9a..9ba86c870410 100644 --- a/net-analyzer/openvas-manager/ChangeLog +++ b/net-analyzer/openvas-manager/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-analyzer/openvas-manager # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/openvas-manager/ChangeLog,v 1.11 2014/09/29 19:37:47 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/openvas-manager/ChangeLog,v 1.12 2014/10/01 10:58:58 jlec Exp $ + +*openvas-manager-5.0.4-r1 (01 Oct 2014) + + 01 Oct 2014; Justin Lecher <jlec@gentoo.org> + +openvas-manager-5.0.4-r1.ebuild, +files/openvas-manager-5.0.4-run.patch, + files/openvasmd.init, files/openvasmd.service, files/openvasmd-daemon.conf: + Enhance init and systemd support; drop installation instructions in favour of + meta package *openvas-manager-6.0_beta2 (29 Sep 2014) diff --git a/net-analyzer/openvas-manager/files/openvas-manager-5.0.4-run.patch b/net-analyzer/openvas-manager/files/openvas-manager-5.0.4-run.patch new file mode 100644 index 000000000000..f6ff60a3b1de --- /dev/null +++ b/net-analyzer/openvas-manager/files/openvas-manager-5.0.4-run.patch @@ -0,0 +1,16 @@ + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 80f5bd2..33f0562 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -161,7 +161,7 @@ endif (NOT INCLUDEDIR) + set (OPENVAS_DATA_DIR "${DATADIR}/openvas") + set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas") + set (OPENVAS_LOG_DIR "${LOCALSTATEDIR}/log/openvas") +-set (OPENVAS_PID_DIR "${LOCALSTATEDIR}/run") ++set (OPENVAS_PID_DIR "/run") + set (OPENVAS_SYSCONF_DIR "${SYSCONFDIR}/openvas") + set (OPENVAS_SCAP_RES_DIR "${OPENVAS_DATA_DIR}/scap") + set (OPENVAS_SCAP_DATA_DIR "${OPENVAS_STATE_DIR}/scap-data") diff --git a/net-analyzer/openvas-manager/files/openvasmd-daemon.conf b/net-analyzer/openvas-manager/files/openvasmd-daemon.conf index d294159b017f..d69698eecbb9 100644 --- a/net-analyzer/openvas-manager/files/openvasmd-daemon.conf +++ b/net-analyzer/openvas-manager/files/openvasmd-daemon.conf @@ -4,8 +4,7 @@ #Manager listens on given port - by default 9390 MANAGER_PORT=--port=9390 -#Enable Manager to server OTP too -MANAGER_OTP=--otp +MANAGER_EXTRA_ARGS="" #Contact scanner on given address SCANNER_LISTEN=--slisten=127.0.0.1 diff --git a/net-analyzer/openvas-manager/files/openvasmd.init b/net-analyzer/openvas-manager/files/openvasmd.init index 55c6c375d2ef..26d34acdc084 100644 --- a/net-analyzer/openvas-manager/files/openvasmd.init +++ b/net-analyzer/openvas-manager/files/openvasmd.init @@ -5,8 +5,14 @@ name="OpenVAS Manager" command=/usr/sbin/openvasmd -command_args="${MANAGER_LISTEN} ${MANAGER_PORT} ${SCANNER_LISTEN} ${SCANNER_PORT} ${MANAGER_OTP}" +command_args="${MANAGER_LISTEN} ${MANAGER_PORT} ${SCANNER_LISTEN} ${SCANNER_PORT} ${MANAGER_EXTRA_ARGS}" +pidfile="/run/openvasmd.pid" depend() { - need net openvassd + after bootmisc + need localmount net +} + +start_pre() { + checkpath --directory --mode 0775 --quiet /var/cache/openvas } diff --git a/net-analyzer/openvas-manager/files/openvasmd.service b/net-analyzer/openvas-manager/files/openvasmd.service index f9b160a0d7d5..91edb0087bc4 100644 --- a/net-analyzer/openvas-manager/files/openvasmd.service +++ b/net-analyzer/openvas-manager/files/openvasmd.service @@ -5,7 +5,7 @@ After=openvassd.service [Service] EnvironmentFile=-/etc/openvas/openvasmd.conf -ExecStart=/usr/sbin/openvasmd -f $MANAGER_LISTEN $MANAGER_PORT $SCANNER_LISTEN $SCANNER_PORT $MANAGER_OTP +ExecStart=/usr/sbin/openvasmd -f ${MANAGER_LISTEN} ${MANAGER_PORT} ${SCANNER_LISTEN} ${SCANNER_PORT} ${MANAGER_EXTRA_ARGS} Restart=always RestartSec=1 User=root diff --git a/net-analyzer/openvas-manager/openvas-manager-5.0.4-r1.ebuild b/net-analyzer/openvas-manager/openvas-manager-5.0.4-r1.ebuild new file mode 100644 index 000000000000..962da6cc5d4f --- /dev/null +++ b/net-analyzer/openvas-manager/openvas-manager-5.0.4-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/openvas-manager/openvas-manager-5.0.4-r1.ebuild,v 1.1 2014/10/01 10:58:58 jlec Exp $ + +EAPI=5 + +inherit cmake-utils systemd + +MY_PN=openvasmd + +DESCRIPTION="A remote security scanner for Linux (openvas-manager)" +HOMEPAGE="http://www.openvas.org/" +SRC_URI="http://wald.intevation.org/frs/download.php/1730/${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~ppc ~x86" +IUSE="" + +RDEPEND=" + >=net-analyzer/openvas-libraries-7.0.4 + >=dev-db/sqlite-3 + !net-analyzer/openvas-administrator" +DEPEND="${RDEPEND} + virtual/pkgconfig + dev-util/cmake" + +PATCHES=( + "${FILESDIR}"/${P}-gpgerror.patch + "${FILESDIR}"/${P}-bsdsource.patch + "${FILESDIR}"/${P}-run.patch + ) + +src_prepare() { + sed \ + -e '/^install.*OPENVAS_CACHE_DIR.*/d' \ + -i CMakeLists.txt || die + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DLOCALSTATEDIR="${EPREFIX}/var" + -DSYSCONFDIR="${EPREFIX}/etc" + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + insinto /etc/openvas/ + doins "${FILESDIR}"/${MY_PN}-daemon.conf + dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN} + + insinto /etc/logrotate.d + newins "${FILESDIR}"/${MY_PN}.logrotate ${MY_PN} + + newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN} + systemd_dounit "${FILESDIR}"/${MY_PN}.service +} |