net-analyzer/openvas-scanner: Version Bump to 7.0.0
authorJonas Licht <jonas.licht@fem.tu-ilmenau.de>
Tue, 10 Mar 2020 20:28:08 +0000 (21:28 +0100)
committerJoonas Niilola <juippis@gentoo.org>
Wed, 25 Mar 2020 13:45:25 +0000 (15:45 +0200)
Bug: https://bugs.gentoo.org/708194
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Jonas Licht <jonas.licht@fem.tu-ilmenau.de>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
net-analyzer/openvas-scanner/Manifest
net-analyzer/openvas-scanner/files/openvas.conf [new file with mode: 0644]
net-analyzer/openvas-scanner/metadata.xml
net-analyzer/openvas-scanner/openvas-scanner-7.0.0.ebuild [new file with mode: 0644]

index e9387af7ba6e36f8f7ecbc5f95b7bdec3c54f28d..d7b9bcd11fab0cb76e77e034a7d3b2b7b4aa9e95 100644 (file)
@@ -1 +1,2 @@
 DIST openvas-scanner-6.0.1.tar.gz 522100 BLAKE2B af82b41736329bd90ba1ea73a0ace36d4115375f81a7aaff5d3bd50f21cfa3195cdf4012aa952da52c4103a31475de5c5790ef3e2e36180aa06737371fa0e5a0 SHA512 db4087fffe1d50e232fa1e51325cf7f142237e2bd3cc5dcaa1e7058a4871300f352f2c0e700eae72ea9412c347b072e9d1f2eca508b27cb30f36c6895ec95147
+DIST openvas-scanner-7.0.0.tar.gz 428304 BLAKE2B fa0a21127edd2223dbbf533b6c188729a1b6de4977e5667fbc1a45b2c426045cdc73eb58d05df24b8b39d0e47fb445fa704bd1b827bb5ea6403fdb83c6b01fd9 SHA512 ce3e78ce5e1575c5c37b6c2aa77ec8955754029832bafb3fcedd75b48dff309906a97bac052d206f6e93e9e72b8461a131558e849f70b3afce6280a7b06924d1
diff --git a/net-analyzer/openvas-scanner/files/openvas.conf b/net-analyzer/openvas-scanner/files/openvas.conf
new file mode 100644 (file)
index 0000000..487e643
--- /dev/null
@@ -0,0 +1 @@
+db_address = /tmp/redis.sock
index b3cbf9d7d2ea34bd44d415a400261d5841ac747e..932077da95e5964b03837d82e800005dcf1562e6 100644 (file)
@@ -1,7 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-       <!-- maintainer-needed -->
+       <maintainer type="person">
+               <email>jonas.licht@gmail.com</email>
+               <name>Jonas Licht</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>proxy-maint@gentoo.org</email>
+               <name>Proxy Maintainers</name>
+       </maintainer>
        <use>
                <flag name="cron">Install a cron job to update GVM's feed daily.</flag>
                <flag name="extras">Html docs support</flag>
diff --git a/net-analyzer/openvas-scanner/openvas-scanner-7.0.0.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-7.0.0.ebuild
new file mode 100644 (file)
index 0000000..eeee5c6
--- /dev/null
@@ -0,0 +1,116 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+inherit cmake flag-o-matic toolchain-funcs
+
+MY_PN="openvas"
+MY_DN="openvassd"
+
+DESCRIPTION="Open Vulnerability Assessment Scanner"
+HOMEPAGE="https://www.greenbone.net/en/"
+SRC_URI="https://github.com/greenbone/openvas-scanner/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2 GPL-2+"
+KEYWORDS="~amd64 ~x86"
+IUSE="cron extras"
+
+DEPEND="
+       acct-user/gvm
+       app-crypt/gpgme:=
+       dev-db/redis
+       dev-libs/glib
+       dev-libs/libgcrypt:=
+       dev-libs/libksba
+       >=net-analyzer/gvm-libs-11.0.0
+       net-analyzer/net-snmp
+       net-libs/gnutls:=
+       net-libs/libpcap
+       net-libs/libssh:="
+
+RDEPEND="
+       ${DEPEND}"
+
+BDEPEND="
+       sys-devel/bison
+       sys-devel/flex
+       virtual/pkgconfig
+       extras? (
+               app-doc/doxygen[dot]
+               app-doc/xmltoman
+               app-text/htmldoc
+               dev-perl/CGI
+               dev-perl/SQL-Translator
+       )"
+
+BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+       cmake_src_prepare
+       # QA-Fix | Correct FHS/Gentoo policy paths for 7.0.0
+       sed -i -e "s*/doc/openvas-scanner/*/doc/openvas-scanner-${PV}/*g" "$S"/src/CMakeLists.txt || die
+       # QA-Fix | Remove !CLANG doxygen warnings for 7.0.0
+       if use extras; then
+               if ! tc-is-clang; then
+                  local f
+                  for f in doc/*.in
+                  do
+                       sed -i \
+                               -e "s*CLANG_ASSISTED_PARSING = NO*#CLANG_ASSISTED_PARSING = NO*g" \
+                               -e "s*CLANG_OPTIONS*#CLANG_OPTIONS*g" \
+                               "${f}" || die "couldn't disable CLANG parsing"
+                  done
+               fi
+       fi
+}
+
+src_configure() {
+       local mycmakeargs=(
+               "-DLOCALSTATEDIR=${EPREFIX}/var"
+               "-DSYSCONFDIR=${EPREFIX}/etc"
+               "-DSBINDIR=${EPREFIX}/usr/bin"
+       )
+       cmake_src_configure
+}
+
+src_compile() {
+       cmake_src_compile
+       if use extras; then
+               cmake_build -C "${BUILD_DIR}" doc
+               cmake_build doc-full -C "${BUILD_DIR}" doc
+       fi
+       cmake_build rebuild_cache
+}
+
+src_install() {
+       if use extras; then
+               local HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. )
+       fi
+       cmake_src_install
+
+       if use cron; then
+               # Install the cron job if they want it.
+               exeinto /etc/gvm
+               doexe "${FILESDIR}/gvm-feed-sync.sh"
+               fowners gvm:gvm /etc/gvm/gvm-feed-sync.sh
+
+               insinto /etc/cron.d
+               newins "${FILESDIR}"/gvm-feed-sync.cron gvm
+       fi
+
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}/${MY_DN}.logrotate" "${MY_DN}"
+
+       # Set proper permissions on required files/directories
+       keepdir /var/log/gvm
+       fowners gvm:gvm /var/log/gvm
+       keepdir /var/lib/openvas/{gnupg,plugins}
+       fowners -R gvm:gvm /var/lib/openvas
+
+       insinto /etc/openvas
+       doins "${FILESDIR}/openvas.conf"
+}