diff options
author | Justin Lecher <jlec@gentoo.org> | 2014-09-30 16:03:10 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2014-09-30 16:03:10 +0000 |
commit | 1229a4c89037933a65d2d68af4ed90c28b03d4ee (patch) | |
tree | 48cb9ba778932bd9c6d22956861c4010a27ab914 /net-analyzer/openvas-scanner | |
parent | Version bump. (diff) | |
download | gentoo-2-1229a4c89037933a65d2d68af4ed90c28b03d4ee.tar.gz gentoo-2-1229a4c89037933a65d2d68af4ed90c28b03d4ee.tar.bz2 gentoo-2-1229a4c89037933a65d2d68af4ed90c28b03d4ee.zip |
net-analyzer/openvas-scanner: Correct pidfile location
(Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'net-analyzer/openvas-scanner')
7 files changed, 121 insertions, 6 deletions
diff --git a/net-analyzer/openvas-scanner/ChangeLog b/net-analyzer/openvas-scanner/ChangeLog index 594bf1cc3493..8a37a7defbb6 100644 --- a/net-analyzer/openvas-scanner/ChangeLog +++ b/net-analyzer/openvas-scanner/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-analyzer/openvas-scanner # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/openvas-scanner/ChangeLog,v 1.9 2014/09/29 18:39:15 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/openvas-scanner/ChangeLog,v 1.10 2014/09/30 16:03:10 jlec Exp $ + +*openvas-scanner-4.0.3-r2 (30 Sep 2014) + + 30 Sep 2014; Justin Lecher <jlec@gentoo.org> + +openvas-scanner-4.0.3-r2.ebuild, +files/openvas-scanner-4.0.3-run.patch, + files/openvassd.init, files/openvassd.service, files/openvassd.tmpfiles.d, + files/openvassd-daemon.conf: + Correct pidfile location *openvas-scanner-5.0_beta2 (29 Sep 2014) diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-run.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-run.patch new file mode 100644 index 000000000000..2bd7e4deb424 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-run.patch @@ -0,0 +1,30 @@ + CMakeLists.txt | 2 +- + tools/greenbone-nvt-sync | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c691100..d78ffa6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -155,7 +155,7 @@ set (OPENVAS_DATA_DIR "${DATADIR}/openvas") + set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas") + set (OPENVAS_LOG_DIR "${LOCALSTATEDIR}/log/openvas") + set (OPENVAS_CACHE_DIR "${LOCALSTATEDIR}/cache/openvas") +-set (OPENVAS_PID_DIR "${LOCALSTATEDIR}/run") ++set (OPENVAS_PID_DIR "/run") + set (OPENVAS_SYSCONF_DIR "${SYSCONFDIR}/openvas") + + set (OPENVAS_NVT_DIR "${OPENVAS_STATE_DIR}/plugins") +diff --git a/tools/greenbone-nvt-sync b/tools/greenbone-nvt-sync +index 50bce8c..d773e4c 100755 +--- a/tools/greenbone-nvt-sync ++++ b/tools/greenbone-nvt-sync +@@ -78,7 +78,7 @@ SELFTEST_FAIL=0 + PORT=24 + + # Directory where pidfiles are located +-PIDFILEDIR="/var/run" ++PIDFILEDIR="/run" + + # If ENABLED is set to 0, the sync script will not perform a synchronization. + ENABLED=1 diff --git a/net-analyzer/openvas-scanner/files/openvassd-daemon.conf b/net-analyzer/openvas-scanner/files/openvassd-daemon.conf index 7260b0ae8f03..628a223a4198 100644 --- a/net-analyzer/openvas-scanner/files/openvassd-daemon.conf +++ b/net-analyzer/openvas-scanner/files/openvassd-daemon.conf @@ -7,6 +7,9 @@ SCANNER_PORT=--port=9391 #Send the packets with the source IP of IP1,IP2,IP3.... #SCANNER_SRCIP=--src-ip=127.0.0.1,192.168.1.2 +# Extra Arguments +# SCANNER_EXTRA_ARGS="" + # Set to yes if plugins should be automatically updated via a cron job auto_plugin_update=no @@ -21,4 +24,3 @@ notify_openvas_scanner=yes #NVT_DIR where to extract plugins (absolute path) #OV_RSYNC_FEED URL of rsync feed #OV_HTTP_FEED URL of http feed - diff --git a/net-analyzer/openvas-scanner/files/openvassd.init b/net-analyzer/openvas-scanner/files/openvassd.init index b6f4b99f4de9..f84dc3b7aa9c 100644 --- a/net-analyzer/openvas-scanner/files/openvassd.init +++ b/net-analyzer/openvas-scanner/files/openvassd.init @@ -5,8 +5,14 @@ name="OpenVAS Scanner" command="/usr/sbin/openvassd" -command_args="${SCANNER_LISTEN} ${SCANNER_PORT} ${SCANNER_SRCIP}" +command_args="${SCANNER_LISTEN} ${SCANNER_PORT} ${SCANNER_SRCIP} ${SCANNER_EXTRA_ARGS}" +pidfile="/run/openvassd.pid" depend() { - need net + after bootmisc + need localmount net +} + +start_pre() { + checkpath --directory --mode 0775 --quiet /var/cache/openvas } diff --git a/net-analyzer/openvas-scanner/files/openvassd.service b/net-analyzer/openvas-scanner/files/openvassd.service index 8e21571a3694..553b09b5b2fb 100644 --- a/net-analyzer/openvas-scanner/files/openvassd.service +++ b/net-analyzer/openvas-scanner/files/openvassd.service @@ -5,7 +5,7 @@ Before=openvasmd.service [Service] EnvironmentFile=-/etc/openvas/openvassd-daemon.conf -ExecStart=/usr/sbin/openvassd -f $SCANNER_PORT $SCANNER_LISTEN $SCANNER_SRCIP +ExecStart=/usr/sbin/openvassd -f ${SCANNER_PORT} ${SCANNER_LISTEN} ${SCANNER_SRCIP} ${SCANNER_EXTRA_ARGS} Restart=always RestartSec=1 User=root diff --git a/net-analyzer/openvas-scanner/files/openvassd.tmpfiles.d b/net-analyzer/openvas-scanner/files/openvassd.tmpfiles.d index afe58dcbf8f2..18e820caec1b 100644 --- a/net-analyzer/openvas-scanner/files/openvassd.tmpfiles.d +++ b/net-analyzer/openvas-scanner/files/openvassd.tmpfiles.d @@ -1 +1 @@ -d /var/cache/openvassd +d /var/cache/openvassd 0775 diff --git a/net-analyzer/openvas-scanner/openvas-scanner-4.0.3-r2.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-4.0.3-r2.ebuild new file mode 100644 index 000000000000..5b013ba00994 --- /dev/null +++ b/net-analyzer/openvas-scanner/openvas-scanner-4.0.3-r2.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/openvas-scanner/openvas-scanner-4.0.3-r2.ebuild,v 1.1 2014/09/30 16:03:10 jlec Exp $ + +EAPI=5 + +inherit cmake-utils systemd + +MY_PN=openvassd + +DESCRIPTION="A remote security scanner for Linux (OpenVAS-scanner)" +HOMEPAGE="http://www.openvas.org/" +SRC_URI="http://wald.intevation.org/frs/download.php/1726/${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~ppc ~x86" +IUSE="" + +RDEPEND=" + >=net-analyzer/openvas-libraries-7.0.4 + !net-analyzer/openvas-plugins + !net-analyzer/openvas-server" +DEPEND="${RDEPEND} + virtual/pkgconfig + dev-util/cmake" + +PATCHES=( + "${FILESDIR}"/${P}-bsdsource.patch + "${FILESDIR}"/${P}-mkcertclient.patch + "${FILESDIR}"/${P}-rulesdir.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=/var -DSYSCONFDIR=/etc ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN} + + insinto /etc/openvas + doins "${FILESDIR}"/${MY_PN}.conf "${FILESDIR}"/${MY_PN}-daemon.conf + dosym ../openvas/${MY_PN}-daemon.conf /etc/conf.d/${PN} + + insinto /etc/logrotate.d + doins "${FILESDIR}"/${MY_PN}.logrotate + + dodoc "${FILESDIR}"/openvas-nvt-sync-cron + + systemd_newtmpfilesd "${FILESDIR}"/${MY_PN}.tmpfiles.d ${MY_PN}.conf + systemd_dounit "${FILESDIR}"/${MY_PN}.service +} + +pkg_postinst() { + elog "To use ${MY_PN}, you first need to:" + elog "1. Call 'openvas-nvt-sync' to download/update plugins" + elog "2. Call 'openvas-mkcert' to generate a server certificate" +} |