summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2014-10-01 13:03:13 +0000
committerJustin Lecher <jlec@gentoo.org>2014-10-01 13:03:13 +0000
commite807cd2f9b855f75918ad3a5716930c87d593b1d (patch)
tree38f7d7bfc3cde9e08bf0dc02c4a3923e630bf9ed /net-analyzer
parentia64 stable wrt bug #519736 (diff)
downloadgentoo-2-e807cd2f9b855f75918ad3a5716930c87d593b1d.tar.gz
gentoo-2-e807cd2f9b855f75918ad3a5716930c87d593b1d.tar.bz2
gentoo-2-e807cd2f9b855f75918ad3a5716930c87d593b1d.zip
net-analyzer/openvas-scanner: Add initial cache generation to init-script
(Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/openvas-scanner/ChangeLog8
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd.init8
-rw-r--r--net-analyzer/openvas-scanner/openvas-scanner-4.0.3-r3.ebuild71
3 files changed, 86 insertions, 1 deletions
diff --git a/net-analyzer/openvas-scanner/ChangeLog b/net-analyzer/openvas-scanner/ChangeLog
index 86fbcfdf7dda..9c6ade4e166d 100644
--- a/net-analyzer/openvas-scanner/ChangeLog
+++ b/net-analyzer/openvas-scanner/ChangeLog
@@ -1,6 +1,12 @@
# 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.11 2014/10/01 11:02:39 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/openvas-scanner/ChangeLog,v 1.12 2014/10/01 13:03:13 jlec Exp $
+
+*openvas-scanner-4.0.3-r3 (01 Oct 2014)
+
+ 01 Oct 2014; Justin Lecher <jlec@gentoo.org>
+ +openvas-scanner-4.0.3-r3.ebuild, files/openvassd.init:
+ Add initial cache generation to init-script
01 Oct 2014; Justin Lecher <jlec@gentoo.org> openvas-scanner-4.0.3-r2.ebuild:
Drop unneeded dep on cmake; prefix love
diff --git a/net-analyzer/openvas-scanner/files/openvassd.init b/net-analyzer/openvas-scanner/files/openvassd.init
index f84dc3b7aa9c..54ebb4820343 100644
--- a/net-analyzer/openvas-scanner/files/openvassd.init
+++ b/net-analyzer/openvas-scanner/files/openvassd.init
@@ -7,6 +7,7 @@ name="OpenVAS Scanner"
command="/usr/sbin/openvassd"
command_args="${SCANNER_LISTEN} ${SCANNER_PORT} ${SCANNER_SRCIP} ${SCANNER_EXTRA_ARGS}"
pidfile="/run/openvassd.pid"
+extra_stopped_commands="create_cache"
depend() {
after bootmisc
@@ -16,3 +17,10 @@ depend() {
start_pre() {
checkpath --directory --mode 0775 --quiet /var/cache/openvas
}
+
+create_cache() {
+ checkpath --directory --mode 0775 --quiet /var/cache/openvas
+ ebegin "Generating initial Cache"
+ /usr/sbin/openvassd --foreground --only-cache
+ eend $?
+}
diff --git a/net-analyzer/openvas-scanner/openvas-scanner-4.0.3-r3.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-4.0.3-r3.ebuild
new file mode 100644
index 000000000000..d8a5dd3263af
--- /dev/null
+++ b/net-analyzer/openvas-scanner/openvas-scanner-4.0.3-r3.ebuild
@@ -0,0 +1,71 @@
+# 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-r3.ebuild,v 1.1 2014/10/01 13:03:13 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"
+
+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=${EPREFIX}/var"
+ "-DSYSCONFDIR=${EPREFIX}/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"
+}