summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/openvas-scanner
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/openvas-scanner')
-rw-r--r--net-analyzer/openvas-scanner/Manifest4
-rw-r--r--net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron39
-rw-r--r--net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-bsdsource.patch12
-rw-r--r--net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-mkcertclient.patch29
-rw-r--r--net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-rulesdir.patch15
-rw-r--r--net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-run.patch17
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd23
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd-daemon.conf26
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd.conf118
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd.init26
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd.logrotate11
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd.service16
-rw-r--r--net-analyzer/openvas-scanner/files/openvassd.tmpfiles.d1
-rw-r--r--net-analyzer/openvas-scanner/metadata.xml10
-rw-r--r--net-analyzer/openvas-scanner/openvas-scanner-4.0.6.ebuild67
-rw-r--r--net-analyzer/openvas-scanner/openvas-scanner-4.0.7.ebuild67
-rw-r--r--net-analyzer/openvas-scanner/openvas-scanner-5.0.3.ebuild71
-rw-r--r--net-analyzer/openvas-scanner/openvas-scanner-5.0.4.ebuild71
18 files changed, 623 insertions, 0 deletions
diff --git a/net-analyzer/openvas-scanner/Manifest b/net-analyzer/openvas-scanner/Manifest
new file mode 100644
index 000000000000..fce47ad5cddf
--- /dev/null
+++ b/net-analyzer/openvas-scanner/Manifest
@@ -0,0 +1,4 @@
+DIST openvas-scanner-4.0.6.tar.gz 215715 SHA256 2e851f3766eed9ca19e06258ceca1b1e9d7a8d88c017dab69707697baca6bf17 SHA512 609cd1d423b233b40233e3292d17ce6839a07739a39015e1bd7fbc688ecce6d8dbec414999010c11b6dd4a7313c7dd307e4d91d0eb89ede8fe25659080dab20c WHIRLPOOL ab246e81141de722a5a301817ba52b3b02da84c9261d5e75b241fdf3f8a9e8102180a40b6b708d0c71692165302f56ff5de54afe847d43adf3db2f72fe1711f1
+DIST openvas-scanner-4.0.7.tar.gz 216116 SHA256 be450e1e1094d6f56edf2fd06efba6d882bf3a1ec369c30d50c81056009ebc64 SHA512 3b7387e207be72437866e2ef883257123ab5eaa6290dcd4efb60e49a536d6527a0854058777e5b397554baa8c82e09e5a3b521358cb11cec78396b25e6b156dd WHIRLPOOL a4b57cec6380c27cbf3caa4e3edaf288d24d24beff1e97756fc4c2168e4356c95a60624ee84f5badb456d91bdb4521ad38d771816dd57a8038b5f5afd6b9d15b
+DIST openvas-scanner-5.0.3.tar.gz 235795 SHA256 e5d3bfcfdc8955195b60ae643d81484dc2a800179392dbd71cb8d0f7d183356b SHA512 bfa76b328aec663fe13cf9e65412d7cbc729b66bcae76b34a295125d6f8586bb7873c3c1eebd897c82a549191baa8c6b9cf08f0a8aa148f70097eb76e944ef5b WHIRLPOOL d4dabd73faf96d353809763f4896ea6991fa5e2a05be5734ad8f64a6080c7346c96ab6db76d15046d2c29ea6b34fc50dd92a694748e7bfa60c67c080fce7e675
+DIST openvas-scanner-5.0.4.tar.gz 236282 SHA256 f35bc66fe8590e3875e224a123dc110b7d32093a96887288d9e4fd18c547b14c SHA512 51267f832a104897a497b5dc71d1b804de4db77742e2234d111a00b1e0e01536613b16ff48d23a37013178b016b39408a25d18a694980c7e6fc600824e05e149 WHIRLPOOL eda77d5b6adc25c5ee8828bb82ca6e736885ea13b52c9484763967738ad01d1c9181a65ff07dc4aa5c6206c020ece177ccecdbf795a55aad6884d42b4c9692c1
diff --git a/net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron b/net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron
new file mode 100644
index 000000000000..e6a83867f3d9
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvas-nvt-sync-cron
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+if [ -f /etc/openvas/openvassd.conf ]; then
+ . /etc/openvas/openvassd.conf
+fi
+
+if [ "$auto_plugin_update" != "yes" ]; then
+ exit 0
+fi
+
+opts=""
+case "$update_method" in
+ rsync)
+ opts = "$opts --rsync"
+ ;;
+ wget)
+ opts = "$opts --wget"
+ ;;
+ curl)
+ opts = "$opts --curl"
+ ;;
+esac
+
+# Export openvas-nvt-sync's environment variables if they are defined
+[ \! -z "$NVT_DIR" ] && export NVT_DIR
+[ \! -z "$OV_RSYNC_FEED" ] && export OV_RSYNC_FEED
+[ \! -z "$OV_HTTP_FEED" ] && export OV_HTTP_FEED
+
+/usr/sbin/openvas-nvt-sync $opts >& /dev/null
+
+if [ $? -ne 0 ]; then
+ echo "Error updating OpenVAS plugins. Please run openvas-nvt-sync manually."
+ exit 1
+fi
+
+if [ "$notify_openvas_scanner" == "yes" ]; then
+ /etc/init.d/openvas-scanner reloadplugins
+fi
+
diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-bsdsource.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-bsdsource.patch
new file mode 100644
index 000000000000..f90b35ed7ec0
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-bsdsource.patch
@@ -0,0 +1,12 @@
+diff -ru openvas-scanner-4.0.1/CMakeLists.txt openvas-scanner-4.0.1.bsdsource/CMakeLists.txt
+--- openvas-scanner-4.0.1/CMakeLists.txt 2014-04-23 16:00:47.000000000 +0200
++++ openvas-scanner-4.0.1.bsdsource/CMakeLists.txt 2014-05-26 16:11:23.018940789 +0200
+@@ -235,7 +235,7 @@
+ set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -Wl,-z,relro -Wl,-z,now")
+
+ set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror")
+-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -D_BSD_SOURCE -D_ISOC99_SOURCE -D_SVID_SOURCE")
++set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -D_DEFAULT_SOURCE -D_ISOC99_SOURCE")
+
+ add_subdirectory (src)
+
diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-mkcertclient.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-mkcertclient.patch
new file mode 100644
index 000000000000..05e92728f182
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-mkcertclient.patch
@@ -0,0 +1,29 @@
+diff -ru openvas-scanner-4.0.1/CMakeLists.txt openvas-scanner-4.0.1.mkcert/CMakeLists.txt
+--- openvas-scanner-4.0.1/CMakeLists.txt 2014-04-23 16:00:47.000000000 +0200
++++ openvas-scanner-4.0.1.mkcert/CMakeLists.txt 2014-05-26 16:04:23.093548608 +0200
+@@ -258,7 +258,6 @@
+ # DESTINATION ${OPENVAS_SYSCONF_DIR})
+
+ install (FILES ${CMAKE_BINARY_DIR}/tools/openvas-mkcert
+- ${CMAKE_BINARY_DIR}/tools/openvas-mkcert-client
+ ${CMAKE_BINARY_DIR}/tools/openvas-nvt-sync
+ DESTINATION ${SBINDIR}
+ PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE
+@@ -269,7 +268,15 @@
+ PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE
+ GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+
+-install (FILES ${CMAKE_BINARY_DIR}/doc/openvassd.8
++install (FILES ${CMAKE_BINARY_DIR}/tools/openvas-mkcert-client
++ DESTINATION ${BINDIR}
++ PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE
++ GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
++
++install (FILES ${CMAKE_SOURCE_DIR}/doc/openvas-mkcert-client.1
++ DESTINATION ${DATADIR}/man/man1 )
++
++install (FILES ${CMAKE_BINARY_DIR}/doc/openvassd.8
+ DESTINATION ${DATADIR}/man/man8 )
+
+ install (FILES ${CMAKE_SOURCE_DIR}/doc/openvas-mkcert.8
+Only in openvas-scanner-4.0.1.mkcert/: CMakeLists.txt~
diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-rulesdir.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-rulesdir.patch
new file mode 100644
index 000000000000..90f998ffd40c
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-rulesdir.patch
@@ -0,0 +1,15 @@
+diff -ru openvas-scanner-4.0.1/CMakeLists.txt openvas-scanner-4.0.1.rules/CMakeLists.txt
+--- openvas-scanner-4.0.1/CMakeLists.txt 2014-04-23 16:00:47.000000000 +0200
++++ openvas-scanner-4.0.1.rules/CMakeLists.txt 2014-05-26 16:07:37.454116277 +0200
+@@ -171,6 +171,10 @@
+ set (OPENVASSD_DEBUGMSG "${OPENVAS_LOG_DIR}/openvassd.dump")
+ set (OPENVASSD_CONF "${OPENVAS_SYSCONF_DIR}/openvassd.conf")
+
++if (NOT OPENVASSD_RULES)
++ set (OPENVASSD_RULES "${OPENVAS_DATA_DIR}/openvassd.rules")
++endif (NOT OPENVASSD_RULES)
++
+ set (NVT_TIMEOUT "320")
+
+ message ("-- Install prefix: ${CMAKE_INSTALL_PREFIX}")
+
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..51dd8389c5f5
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvas-scanner-4.0.3-run.patch
@@ -0,0 +1,17 @@
+ 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/net-analyzer/openvas-scanner/files/openvassd b/net-analyzer/openvas-scanner/files/openvassd
new file mode 100644
index 000000000000..5f69eb113db7
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting openvassd (scanner)"
+ start-stop-daemon --start --name openvassd \
+ --exec /usr/sbin/openvassd \
+ --pidfile /var/run/openvassd.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stop openvassd (scanner)"
+ start-stop-daemon --stop --name openvassd \
+ --pidfile /var/run/openvassd.pid
+ eend $?
+}
diff --git a/net-analyzer/openvas-scanner/files/openvassd-daemon.conf b/net-analyzer/openvas-scanner/files/openvassd-daemon.conf
new file mode 100644
index 000000000000..628a223a4198
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd-daemon.conf
@@ -0,0 +1,26 @@
+#Listen on given address - by default scanner listens on all addresses
+#SCANNER_LISTEN=--listen=127.0.0.1
+
+#Listen on given port - by default 9391
+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
+
+# Notify OpenVAS scanner after update by seding it SIGHUP?
+notify_openvas_scanner=yes
+
+# Method to use to get updates. The default is via rsync
+# Note that only wget and curl support retrieval via proxy
+# update_method=rsync|wget|curl
+
+# Additionaly, you can specify the following variables
+#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.conf b/net-analyzer/openvas-scanner/files/openvassd.conf
new file mode 100644
index 000000000000..88f83f4bed97
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd.conf
@@ -0,0 +1,118 @@
+# Configuration file of the OpenVAS Security Scanner
+
+# Every line starting with a '#' is a comment
+
+[Misc]
+
+# Path to the security checks folder:
+plugins_folder = /var/lib/openvas/plugins
+
+# Path to OpenVAS caching folder:
+cache_folder = /var/cache/openvas
+
+# Path to OpenVAS include directories:
+# (multiple entries are separated with colon ':')
+include_folders = /var/lib/openvas/plugins
+
+# Maximum number of simultaneous hosts tested :
+max_hosts = 30
+
+# Maximum number of simultaneous checks against each host tested :
+max_checks = 10
+
+# Niceness. If set to 'yes', openvassd will renice itself to 10.
+be_nice = no
+
+# Log file (or 'syslog') :
+logfile = /var/log/openvas/openvassd.log
+
+# Shall we log every details of the attack ? (disk intensive)
+log_whole_attack = no
+
+# Log the name of the plugins that are loaded by the server ?
+log_plugins_name_at_load = no
+
+# Dump file for debugging output, use `-' for stdout
+dumpfile = /var/log/openvas/openvassd.dump
+
+# Rules file :
+rules = /etc/openvas/openvassd.rules
+
+# CGI paths to check for (cgi-bin:/cgi-aws:/ can do)
+cgi_path = /cgi-bin:/scripts
+
+# Range of the ports the port scanners will scan :
+# 'default' means that OpenVAS will scan ports found in its
+# services file.
+port_range = default
+
+# Optimize the test (recommended) :
+optimize_test = yes
+
+# Optimization :
+# Read timeout for the sockets of the tests :
+checks_read_timeout = 5
+
+# Ports against which two plugins should not be run simultaneously :
+# non_simult_ports = Services/www, 139, Services/finger
+non_simult_ports = 139, 445
+
+# Maximum lifetime of a plugin (in seconds) :
+plugins_timeout = 320
+
+# Safe checks rely on banner grabbing :
+safe_checks = yes
+
+# Automatically activate the plugins that are depended on
+auto_enable_dependencies = yes
+
+# Do not echo data from plugins which have been automatically enabled
+silent_dependencies = no
+
+# Designate hosts by MAC address, not IP address (useful for DHCP networks)
+use_mac_addr = no
+
+
+#--- Knowledge base saving (can be configured by the client) :
+# Save the knowledge base on disk :
+save_knowledge_base = no
+
+# Restore the KB for each test :
+kb_restore = no
+
+# Only test hosts whose KB we do not have :
+only_test_hosts_whose_kb_we_dont_have = no
+
+# Only test hosts whose KB we already have :
+only_test_hosts_whose_kb_we_have = no
+
+# KB test replay :
+kb_dont_replay_scanners = no
+kb_dont_replay_info_gathering = no
+kb_dont_replay_attacks = no
+kb_dont_replay_denials = no
+kb_max_age = 864000
+#--- end of the KB section
+
+
+# If this option is set, OpenVAS will not scan a network incrementally
+# (10.0.0.1, then 10.0.0.2, 10.0.0.3 and so on..) but will attempt to
+# slice the workload throughout the whole network (ie: it will scan
+# 10.0.0.1, then 10.0.0.127, then 10.0.0.2, then 10.0.0.128 and so on...
+slice_network_addresses = no
+
+# Should consider all the NASL scripts as being signed ? (unsafe if set to 'yes')
+nasl_no_signature_check = yes
+
+#Certificates
+cert_file=/var/lib/openvas/CA/servercert.pem
+key_file=/var/lib/openvas/private/CA/serverkey.pem
+ca_file=/var/lib/openvas/CA/cacert.pem
+
+# If you decide to protect your private key with a password,
+# uncomment and change next line
+# pem_password=password
+# If you want to force the use of a client certificate, uncomment next line
+# force_pubkey_auth = yes
+
+#end.
diff --git a/net-analyzer/openvas-scanner/files/openvassd.init b/net-analyzer/openvas-scanner/files/openvassd.init
new file mode 100644
index 000000000000..66133a9ec734
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd.init
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ need localmount net
+}
+
+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/files/openvassd.logrotate b/net-analyzer/openvas-scanner/files/openvassd.logrotate
new file mode 100644
index 000000000000..9316ba8d9629
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd.logrotate
@@ -0,0 +1,11 @@
+# logrotate for openvas
+/var/log/openvas/openvassd.log {
+ rotate 4
+ weekly
+ compress
+ delaycompress
+ missingok
+ postrotate
+ /bin/kill -HUP `pidof openvassd`
+ endscript
+}
diff --git a/net-analyzer/openvas-scanner/files/openvassd.service b/net-analyzer/openvas-scanner/files/openvassd.service
new file mode 100644
index 000000000000..553b09b5b2fb
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OpenVAS Scanner
+After=network.target
+Before=openvasmd.service
+
+[Service]
+EnvironmentFile=-/etc/openvas/openvassd-daemon.conf
+ExecStart=/usr/sbin/openvassd -f ${SCANNER_PORT} ${SCANNER_LISTEN} ${SCANNER_SRCIP} ${SCANNER_EXTRA_ARGS}
+Restart=always
+RestartSec=1
+User=root
+Group=root
+TimeoutSec=1200
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-analyzer/openvas-scanner/files/openvassd.tmpfiles.d b/net-analyzer/openvas-scanner/files/openvassd.tmpfiles.d
new file mode 100644
index 000000000000..18e820caec1b
--- /dev/null
+++ b/net-analyzer/openvas-scanner/files/openvassd.tmpfiles.d
@@ -0,0 +1 @@
+d /var/cache/openvassd 0775
diff --git a/net-analyzer/openvas-scanner/metadata.xml b/net-analyzer/openvas-scanner/metadata.xml
new file mode 100644
index 000000000000..10fd5970fc9b
--- /dev/null
+++ b/net-analyzer/openvas-scanner/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/openvas-scanner/openvas-scanner-4.0.6.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-4.0.6.ebuild
new file mode 100644
index 000000000000..14d6dd752373
--- /dev/null
+++ b/net-analyzer/openvas-scanner/openvas-scanner-4.0.6.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvassd
+
+DL_ID=1959
+
+DESCRIPTION="A remote security scanner for Linux (OpenVAS-scanner)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-7.0.9
+ !net-analyzer/openvas-plugins
+ !net-analyzer/openvas-server"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0.3-bsdsource.patch
+ "${FILESDIR}"/${PN}-4.0.3-mkcertclient.patch
+ "${FILESDIR}"/${PN}-4.0.3-rulesdir.patch
+ "${FILESDIR}"/${PN}-4.0.3-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
+}
diff --git a/net-analyzer/openvas-scanner/openvas-scanner-4.0.7.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-4.0.7.ebuild
new file mode 100644
index 000000000000..8c67f1a757b2
--- /dev/null
+++ b/net-analyzer/openvas-scanner/openvas-scanner-4.0.7.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvassd
+
+DL_ID=2101
+
+DESCRIPTION="A remote security scanner for Linux (OpenVAS-scanner)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=net-analyzer/openvas-libraries-7.0.9
+ !net-analyzer/openvas-plugins
+ !net-analyzer/openvas-server"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0.3-bsdsource.patch
+ "${FILESDIR}"/${PN}-4.0.3-mkcertclient.patch
+ "${FILESDIR}"/${PN}-4.0.3-rulesdir.patch
+ "${FILESDIR}"/${PN}-4.0.3-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
+}
diff --git a/net-analyzer/openvas-scanner/openvas-scanner-5.0.3.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-5.0.3.ebuild
new file mode 100644
index 000000000000..1530808e45e0
--- /dev/null
+++ b/net-analyzer/openvas-scanner/openvas-scanner-5.0.3.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvassd
+
+DL_ID=2071
+
+DESCRIPTION="A remote security scanner for Linux (OpenVAS-scanner)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P/_beta/+beta}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=" ~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ app-crypt/gpgme
+ >=dev-libs/glib-2.16:2
+ dev-libs/libgcrypt:0
+ >=net-analyzer/openvas-libraries-8.0.2
+ !net-analyzer/openvas-plugins
+ !net-analyzer/openvas-server"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/_beta/+beta}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0.3-mkcertclient.patch
+ "${FILESDIR}"/${PN}-4.0.3-rulesdir.patch
+ "${FILESDIR}"/${PN}-4.0.3-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
+}
diff --git a/net-analyzer/openvas-scanner/openvas-scanner-5.0.4.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-5.0.4.ebuild
new file mode 100644
index 000000000000..d1ca7b5902e7
--- /dev/null
+++ b/net-analyzer/openvas-scanner/openvas-scanner-5.0.4.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+MY_PN=openvassd
+
+DL_ID=2129
+
+DESCRIPTION="A remote security scanner for Linux (OpenVAS-scanner)"
+HOMEPAGE="http://www.openvas.org/"
+SRC_URI="http://wald.intevation.org/frs/download.php/${DL_ID}/${P/_beta/+beta}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=" ~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ app-crypt/gpgme
+ >=dev-libs/glib-2.16:2
+ dev-libs/libgcrypt:0
+ >=net-analyzer/openvas-libraries-8.0.2
+ !net-analyzer/openvas-plugins
+ !net-analyzer/openvas-server"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/_beta/+beta}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.0.3-mkcertclient.patch
+ "${FILESDIR}"/${PN}-4.0.3-rulesdir.patch
+ "${FILESDIR}"/${PN}-4.0.3-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
+}