[gentoo-commits] repo/gentoo:master commit in: net-analyzer/openvas-scanner/, net-analyzer/openvas-scanner/files/
commit: afc85202ab1b002e5a235b13d7a130d3e2ed7bca Author: Giuseppe Foti gmail com> AuthorDate: Sat May 20 17:25:01 2023 + Commit: Florian Schmaus gentoo org> CommitDate: Mon Jul 3 08:15:23 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afc85202 net-analyzer/openvas-scanner: add 22.7.2 Signed-off-by: Giuseppe Foti gmail.com> Signed-off-by: Florian Schmaus gentoo.org> net-analyzer/openvas-scanner/Manifest | 1 + net-analyzer/openvas-scanner/files/README.gentoo | 3 + net-analyzer/openvas-scanner/files/openvas.conf-22 | 1 + .../openvas-scanner/files/redis-openvas.confd | 20 +++ .../openvas-scanner/files/redis-openvas.initd | 25 .../openvas-scanner/files/redis-openvas.service| 13 ++ .../openvas-scanner/files/redis-openvas.tmpfiles | 2 + net-analyzer/openvas-scanner/metadata.xml | 4 + .../openvas-scanner/openvas-scanner-22.7.2.ebuild | 154 + 9 files changed, 223 insertions(+) diff --git a/net-analyzer/openvas-scanner/Manifest b/net-analyzer/openvas-scanner/Manifest index f305491728b5..ccffb76d4e52 100644 --- a/net-analyzer/openvas-scanner/Manifest +++ b/net-analyzer/openvas-scanner/Manifest @@ -1 +1,2 @@ DIST openvas-scanner-21.4.4.tar.gz 460601 BLAKE2B 66d627e76912735539399aed637fdc07a7d13c9e4eb142498dcf181b8ea952dd93107bcc1f2ef577126178ff3dad1e5f6e50d67840692cd49f7352e3a726ce8f SHA512 f2fe1f802b14fc41ee0d7657d031d318b651c3ec9ef554b33379a7459d40c17b44525c8f666ccb9670868576c101766936dd0c700778e46683bf43f0683834b6 +DIST openvas-scanner-22.7.2.tar.gz 924274 BLAKE2B 71b954c717f0be1634cf3561aa82c3b66af160c81b2b403b2be0d1247cad4cdfbd6779677c7d23d35c0f0e4e45b5ab30b4e1687a6b5c1b460cb034a87592b09c SHA512 cced0b3dd56cc85aa69ca7de7229c9e1a1103afd38fbf15776d29a6558c04b3e361acc3fb872f77f7f23c69339ffa25ef5ecd217ef7dafa42534547d039d8f9b diff --git a/net-analyzer/openvas-scanner/files/README.gentoo b/net-analyzer/openvas-scanner/files/README.gentoo new file mode 100644 index ..16547c23c7b4 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/README.gentoo @@ -0,0 +1,3 @@ +The redis configuration file is located in: +/etc/gvm/redis-openvas.conf +Please apply your changes to the new configuration files. diff --git a/net-analyzer/openvas-scanner/files/openvas.conf-22 b/net-analyzer/openvas-scanner/files/openvas.conf-22 new file mode 100644 index ..b2d964ff4b53 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvas.conf-22 @@ -0,0 +1 @@ +db_address = /run/redis-openvas/redis.sock diff --git a/net-analyzer/openvas-scanner/files/redis-openvas.confd b/net-analyzer/openvas-scanner/files/redis-openvas.confd new file mode 100644 index ..2e9ec5cfbf16 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/redis-openvas.confd @@ -0,0 +1,20 @@ +# Redis user. +REDIS_USER="gvm" + +# Redis group. +REDIS_GROUP="gvm" + +# Redis configuration file. +REDIS_CONF="/etc/gvm/redis-openvas.conf" + +# Redis dump directory. +REDIS_DIR="/var/lib/gvm/redis" + +# Redis options. +# (Redis expects the first argument to be the configuration file.) +REDIS_OPTS="${REDIS_CONF}" + +# Specify the network service that corresponds to the "bind" setting +# in your redis.conf. For example, if you bind to 127.0.0.1, this should +# be set to "net.lo" which provides the loopback interface. +rc_need="net.lo" diff --git a/net-analyzer/openvas-scanner/files/redis-openvas.initd b/net-analyzer/openvas-scanner/files/redis-openvas.initd new file mode 100644 index ..5c50d29dae6a --- /dev/null +++ b/net-analyzer/openvas-scanner/files/redis-openvas.initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +: ${REDIS_DIR:=/var/lib/gvm/redis} +: ${REDIS_CONF:=/etc/gvm/redis-openvas.conf} +: ${REDIS_OPTS:="${REDIS_CONF}"} +: ${REDIS_USER:=gvm} +: ${REDIS_GROUP:=gvm} +: ${REDIS_TIMEOUT:=30} + +# https://bugs.gentoo.org/631002#c10 +# Force '--daemonize no' to override the config file +command="/usr/sbin/redis-server" +command_args="${REDIS_OPTS} --daemonize no" +command_background="true" +command_user="${REDIS_USER}:${REDIS_GROUP}" +pidfile="/run/${RC_SVCNAME}/redis-server.pid" +retry="${REDIS_TIMEOUT}" +start_stop_daemon_args="--chdir \"${REDIS_DIR}\"" + +depend() { + use localmount logger + after keepalived +} diff --git a/net-analyzer/openvas-scanner/files/redis-openvas.service b/net-analyzer/openvas-scanner/files/redis-openvas.service new file mode 100644 index ..5eb8dd29e287 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/redis-openvas.service @@ -0,0 +1,13 @@ +[Unit] +Description=A persistent key-value database +After=syslog.target network.target +PartOf=gvm.target + +[Service] +Type=forking +PIDFile=/run/redis-openvas/redis-server.pid +ExecStart=/usr/sbin/redis-server /etc/gvm/redis-openvas.conf +User=gvm + +[Install]
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/openvas-scanner/, net-analyzer/openvas-scanner/files/
commit: c0c542fa48334cdbc3be019d30cb7b26927fe356 Author: Jonas Licht fem tu-ilmenau de> AuthorDate: Fri Mar 26 11:29:06 2021 + Commit: Joonas Niilola gentoo org> CommitDate: Wed Mar 31 06:28:56 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0c542fa net-analyzer/openvas-scanner: fix build with lld Closes: https://bugs.gentoo.org/740560 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Jonas Licht fem.tu-ilmenau.de> Closes: https://github.com/gentoo/gentoo/pull/20124 Signed-off-by: Joonas Niilola gentoo.org> ...penvas-scanner-7.0.1-fix-linking-with-lld.patch | 33 ++ .../openvas-scanner/openvas-scanner-20.8.1.ebuild | 1 + .../openvas-scanner/openvas-scanner-7.0.1.ebuild | 1 + 3 files changed, 35 insertions(+) diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-7.0.1-fix-linking-with-lld.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-7.0.1-fix-linking-with-lld.patch new file mode 100644 index 000..2b31a7c7d22 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvas-scanner-7.0.1-fix-linking-with-lld.patch @@ -0,0 +1,33 @@ +diff --git a/nasl/CMakeLists.txt b/nasl/CMakeLists.txt +index b594679c..adf9a221 100644 +--- a/nasl/CMakeLists.txt b/nasl/CMakeLists.txt +@@ -87,6 +87,28 @@ endif (NOT KSBA) + message (STATUS "Looking for pcap...") + find_library (PCAP pcap) + ++message (STATUS "Looking for pcap... ${PCAP}") ++if (NOT PCAP) ++ message (SEND_ERROR "The pcap library is required.") ++endif (NOT PCAP) ++ ++message (STATUS "Looking for pcap-config...") ++find_program (PCAP_CONFIG pcap-config) ++ ++if (PCAP_CONFIG) ++ message (STATUS "Looking for pcap-config... ${PCAP_CONFIG}") ++ execute_process (COMMAND pcap-config --libs ++OUTPUT_VARIABLE PCAP_LDFLAGS ++OUTPUT_STRIP_TRAILING_WHITESPACE) ++ execute_process (COMMAND pcap-config --cflags ++OUTPUT_VARIABLE PCAP_CFLAGS ++OUTPUT_STRIP_TRAILING_WHITESPACE) ++else (PCAP_CONFIG) ++ message (STATUS "pcap-config not found, using defaults...") ++ set (PCAP_LDFLAGS "-L/usr/lib -lpcap") ++ set (PCAP_CFLAGS "-I/usr/include") ++endif (PCAP_CONFIG) ++ + find_library (GPGME gpgme) + message (STATUS "Looking for gpgme... ${GPGME}") + if (NOT GPGME) diff --git a/net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild index 22bdb9fec93..5d4642e49c5 100644 --- a/net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild +++ b/net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild @@ -51,6 +51,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-7.0.1-disable-automagic-dep.patch + "${FILESDIR}"/${PN}-7.0.1-fix-linking-with-lld.patch #qa fix for rpath "${FILESDIR}"/${P}-rpath-qa-fix.patch ) diff --git a/net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild index 1fc5a911179..6b20b2711f2 100644 --- a/net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild +++ b/net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild @@ -50,6 +50,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${P}-disable-automagic-dep.patch + "${FILESDIR}"/${P}-fix-linking-with-lld.patch ) BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build"
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/openvas-scanner/, net-analyzer/openvas-scanner/files/
commit: 6b0c3a7ab8e7ff7946f51b36fd2b8972785fd78f Author: Jonas Licht fem tu-ilmenau de> AuthorDate: Mon Mar 22 14:51:34 2021 + Commit: Joonas Niilola gentoo org> CommitDate: Mon Mar 22 17:25:43 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b0c3a7a net-analyzer/openvas-scanner: add qa fix for rpath Closes: https://bugs.gentoo.org/23 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Jonas Licht fem.tu-ilmenau.de> Closes: https://github.com/gentoo/gentoo/pull/20060 Signed-off-by: Joonas Niilola gentoo.org> .../files/openvas-scanner-20.8.1-rpath-qa-fix.patch| 14 ++ net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild | 2 ++ 2 files changed, 16 insertions(+) diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-20.8.1-rpath-qa-fix.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-20.8.1-rpath-qa-fix.patch new file mode 100644 index 000..79e8692f4d6 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvas-scanner-20.8.1-rpath-qa-fix.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 69c68375..5bc000c0 100644 +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -37,6 +37,8 @@ endif (NOT CMAKE_BUILD_TYPE) + + OPTION (ENABLE_COVERAGE "Enable support for coverage analysis" OFF) + ++set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) ++ + ## Retrieve git revision (at configure time) + include (GetGit) + + diff --git a/net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild index 55309940528..22bdb9fec93 100644 --- a/net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild +++ b/net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild @@ -51,6 +51,8 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-7.0.1-disable-automagic-dep.patch + #qa fix for rpath + "${FILESDIR}"/${P}-rpath-qa-fix.patch ) src_prepare() {
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/openvas-scanner/, net-analyzer/openvas-scanner/files/
commit: 1a2bfc6229dc6bfb181c7e580ff9746f3890ffd2 Author: Jonas Licht fem tu-ilmenau de> AuthorDate: Thu Mar 18 22:00:38 2021 + Commit: Joonas Niilola gentoo org> CommitDate: Mon Mar 22 13:33:54 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a2bfc62 net-analyzer/openvas-scanner: version bump to 20.8.1 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Jonas Licht fem.tu-ilmenau.de> Signed-off-by: Joonas Niilola gentoo.org> net-analyzer/openvas-scanner/Manifest | 1 + .../openvas-scanner/files/gvm-feed-sync-20.8.1.sh | 45 +++ .../openvas-scanner/openvas-scanner-20.8.1.ebuild | 129 + 3 files changed, 175 insertions(+) diff --git a/net-analyzer/openvas-scanner/Manifest b/net-analyzer/openvas-scanner/Manifest index 45b50efee46..44d0ded741f 100644 --- a/net-analyzer/openvas-scanner/Manifest +++ b/net-analyzer/openvas-scanner/Manifest @@ -1,2 +1,3 @@ +DIST openvas-scanner-20.8.1.tar.gz 431985 BLAKE2B 60b328dc261bf48f37aa2727f4b63904c898467f989abef8f05e29329a24d0d98c13690005c5c7a8c93f899db709771ea60832927f169f6779707a1fac602368 SHA512 6114f37a91a3dd42c3693f10548a7727fb88fbe535ce511b164a440d5ace1c736d4c8a45db9a7e83b9abbd376c4d6b13afd3d23a995a5d089329a2bb8bd71cec DIST openvas-scanner-6.0.1.tar.gz 522100 BLAKE2B af82b41736329bd90ba1ea73a0ace36d4115375f81a7aaff5d3bd50f21cfa3195cdf4012aa952da52c4103a31475de5c5790ef3e2e36180aa06737371fa0e5a0 SHA512 db4087fffe1d50e232fa1e51325cf7f142237e2bd3cc5dcaa1e7058a4871300f352f2c0e700eae72ea9412c347b072e9d1f2eca508b27cb30f36c6895ec95147 DIST openvas-scanner-7.0.1.tar.gz 429012 BLAKE2B 13fd0fef2ce88f6789da9f00e8f35329e915ebc74a29b3bd52af93c6b70292d055fa1159aec4041d79a785971a583eb514e8700d1d38a76775446e40af9b2fac SHA512 201ea02b25bf247320437ae5c82bdc95db981cc6bd99fdece9403573434db122cdc8db7b82a08cba34b6d67d5794b2364f798847c79b421495666adc95a02571 diff --git a/net-analyzer/openvas-scanner/files/gvm-feed-sync-20.8.1.sh b/net-analyzer/openvas-scanner/files/gvm-feed-sync-20.8.1.sh new file mode 100644 index 000..178f49eb049 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/gvm-feed-sync-20.8.1.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# GVM cron script that updates feed. + +# Start to update FEED & First NVT. +try=0 +until [ $try -ge 5 ]; do + greenbone-feed-sync --type GVMD_DATA --curl &>/dev/null && break + try=$[$try+1] + sleep 30 +done + +# Check status +if [ $? -eq 0 ]; then + # Avoid your IP temporary banned because of multiple connection + sleep 5 + # Try to update scapdata. + try=0 + until [ $try -ge 5 ]; do + greenbone-feed-sync --type SCAP &>/dev/null && break + try=$[$try+1] + sleep 30 + done + + # Check status + if [ $? -eq 0 ]; then + # Avoid your IP temporary banned because of multiple connection + sleep 5 + # Try to update certdata + try=0 + until [ $try -ge 5 ]; do +greenbone-feed-sync --type CERT &>/dev/null && break +try=$[$try+1] +sleep 30 + done + + # Check status + if [ $? -eq 0 ]; then + exit 0 + else + exit 1 + fi + fi +fi diff --git a/net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild new file mode 100644 index 000..55309940528 --- /dev/null +++ b/net-analyzer/openvas-scanner/openvas-scanner-20.8.1.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2021 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/ https://github.com/greenbone/openvas-scanner/; +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 snmp test" +RESTRICT="!test? ( test )" + +DEPEND=" + acct-group/gvm + acct-user/gvm + app-crypt/gpgme:= + dev-db/redis + dev-libs/glib + dev-libs/libgcrypt:= + dev-libs/libksba + >=net-analyzer/gvm-libs-20.8.0 + snmp? ( 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 + ) + test? ( dev-libs/cgreen )" + +PATCHES=( + "${FILESDIR}"/${PN}-7.0.1-disable-automagic-dep.patch +) + +src_prepare() { +
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/openvas-scanner/, net-analyzer/openvas-scanner/files/
commit: b3055e30a568592223aef4ec728eda6da806eafe Author: Jonas Licht fem tu-ilmenau de> AuthorDate: Sun Mar 21 19:47:16 2021 + Commit: Joonas Niilola gentoo org> CommitDate: Mon Mar 22 13:33:47 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3055e30 net-analyzer/openvas-scanner: add patch to disable cmake automagic dep Closes: https://bugs.gentoo.org/733894 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Jonas Licht fem.tu-ilmenau.de> Signed-off-by: Joonas Niilola gentoo.org> ...envas-scanner-7.0.1-disable-automagic-dep.patch | 33 ++ net-analyzer/openvas-scanner/metadata.xml | 1 + .../openvas-scanner/openvas-scanner-7.0.1.ebuild | 11 ++-- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-7.0.1-disable-automagic-dep.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-7.0.1-disable-automagic-dep.patch new file mode 100644 index 000..fd3e4610f8a --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvas-scanner-7.0.1-disable-automagic-dep.patch @@ -0,0 +1,33 @@ +diff --git a/nasl/CMakeLists.txt b/nasl/CMakeLists.txt +index b594679c..81c5e4a9 100644 +--- a/nasl/CMakeLists.txt b/nasl/CMakeLists.txt +@@ -100,14 +100,20 @@ execute_process (COMMAND gpgme-config --cflags + OUTPUT_VARIABLE GPGME_CFLAGS + OUTPUT_STRIP_TRAILING_WHITESPACE) + +-message (STATUS "Looking for netsnmp...") +-find_library (SNMP netsnmp) +-message (STATUS "Looking for netsnmp... ${SNMP}") +-if (SNMP) +- execute_process (COMMAND net-snmp-config --libs +-OUTPUT_VARIABLE SNMP_LDFLAGS +-OUTPUT_STRIP_TRAILING_WHITESPACE) +-endif (SNMP) ++option(BUILD_WITH_SNMP "Build with SNMP Support" ON) ++if (BUILD_WITH_SNMP) ++ message (STATUS "Looking for netsnmp...") ++ find_library (SNMP netsnmp) ++ message (STATUS "Looking for netsnmp... ${SNMP}") ++ if (SNMP) ++execute_process (COMMAND net-snmp-config --libs ++ OUTPUT_VARIABLE SNMP_LDFLAGS ++ OUTPUT_STRIP_TRAILING_WHITESPACE) ++ endif (SNMP) ++ if (NOT SNMP) ++message (SEND_ERROR " netsnmp not found") ++ endif(NOT SNMP) ++endif (BUILD_WITH_SNMP) + + message (STATUS "Looking for libgcrypt...") + find_library (GCRYPT gcrypt) diff --git a/net-analyzer/openvas-scanner/metadata.xml b/net-analyzer/openvas-scanner/metadata.xml index 7e35c8db968..35596363964 100644 --- a/net-analyzer/openvas-scanner/metadata.xml +++ b/net-analyzer/openvas-scanner/metadata.xml @@ -12,6 +12,7 @@ Install a cron job to update GVM's feed daily. Html docs support + Build againts net-analyzer/net-snmp for "improved SNMP support" Open Vulnerability Assessment System (OpenVAS) Scanner is the Greenbone Vulnerability Management (GVM) Solution. diff --git a/net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild index 812b342a1ca..1fc5a911179 100644 --- a/net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild +++ b/net-analyzer/openvas-scanner/openvas-scanner-7.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -16,7 +16,7 @@ SRC_URI="https://github.com/greenbone/openvas-scanner/archive/v${PV}.tar.gz -> $ SLOT="0" LICENSE="GPL-2 GPL-2+" KEYWORDS="~amd64 ~x86" -IUSE="cron extras test" +IUSE="cron extras snmp test" RESTRICT="!test? ( test )" DEPEND=" @@ -27,7 +27,7 @@ DEPEND=" dev-libs/libgcrypt:= dev-libs/libksba >=net-analyzer/gvm-libs-11.0.1 - net-analyzer/net-snmp + snmp? ( net-analyzer/net-snmp:= ) net-libs/gnutls:= net-libs/libpcap net-libs/libssh:=" @@ -48,6 +48,10 @@ BDEPEND=" ) test? ( dev-libs/cgreen )" +PATCHES=( + "${FILESDIR}"/${P}-disable-automagic-dep.patch +) + BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build" S="${WORKDIR}/${MY_PN}-${PV}" @@ -75,6 +79,7 @@ src_configure() { "-DLOCALSTATEDIR=${EPREFIX}/var" "-DSYSCONFDIR=${EPREFIX}/etc" "-DSBINDIR=${EPREFIX}/usr/bin" + "-DBUILD_WITH_SNMP=$(usex snmp)" ) cmake_src_configure }
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/openvas-scanner/, net-analyzer/openvas-scanner/files/
commit: 128cbddef56f70454be4e187613843de1c847dc6 Author: Hasan ÇALIŞIR psauxit com> AuthorDate: Wed Dec 18 20:33:42 2019 + Commit: Joonas Niilola gentoo org> CommitDate: Sat Dec 21 15:06:23 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=128cbdde net-analyzer/openvas-scanner: drop old 5.1.3 Package-Manager: Portage-2.3.79, Repoman-2.3.16 Signed-off-by: Hasan ÇALIŞIR psauxit.com> Signed-off-by: Joonas Niilola gentoo.org> net-analyzer/openvas-scanner/Manifest | 1 - .../files/openvas-scanner-5.1.3-cachedir.patch | 42 -- .../files/openvas-scanner-5.1.3-gcc8.patch | 42 -- .../files/openvas-scanner-5.1.3-nvt.patch | 93 -- .../files/openvas-scanner-daemon.conf | 9 --- .../openvas-scanner/files/openvas-scanner.init | 25 -- .../files/openvas-scanner.logrotate| 11 --- .../openvas-scanner/files/openvas-scanner.service | 21 - .../files/openvas-scanner.tmpfiles.d | 1 - net-analyzer/openvas-scanner/files/openvassd.conf | 53 .../openvas-scanner/openvas-scanner-5.1.3.ebuild | 93 -- 11 files changed, 391 deletions(-) diff --git a/net-analyzer/openvas-scanner/Manifest b/net-analyzer/openvas-scanner/Manifest index 7d55d149a97..e9387af7ba6 100644 --- a/net-analyzer/openvas-scanner/Manifest +++ b/net-analyzer/openvas-scanner/Manifest @@ -1,2 +1 @@ -DIST openvas-scanner-5.1.3.tar.gz 254159 BLAKE2B d90fa15e143ead53abce66f933a3a4cac327176cca0f23bd88fe771ed7726b1891784ae980644c8335e560d348753115e43cfae83af9704e2d1d02827163563f SHA512 5712ab275058877cfd656e268ed09c81db6617ae247c17092f1fcd037f692f2018daf21b09b82401f99a7361bb485f0e0f7d63f8ff2387839cfdd5a3aaf8424e DIST openvas-scanner-6.0.1.tar.gz 522100 BLAKE2B af82b41736329bd90ba1ea73a0ace36d4115375f81a7aaff5d3bd50f21cfa3195cdf4012aa952da52c4103a31475de5c5790ef3e2e36180aa06737371fa0e5a0 SHA512 db4087fffe1d50e232fa1e51325cf7f142237e2bd3cc5dcaa1e7058a4871300f352f2c0e700eae72ea9412c347b072e9d1f2eca508b27cb30f36c6895ec95147 diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-cachedir.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-cachedir.patch deleted file mode 100644 index 98c65725019..000 --- a/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-cachedir.patch +++ /dev/null @@ -1,42 +0,0 @@ openvas-scanner-5.1.3/src/openvassd.c 2018-08-29 19:27:26.0 +0300 -+++ openvas-scanner-5.1.3/src/openvassd.c 2019-02-04 03:28:24.635539266 +0300 -@@ -103,7 +103,6 @@ - */ - static openvassd_option openvassd_defaults[] = { - {"plugins_folder", OPENVAS_NVT_DIR}, -- {"cache_folder", OPENVAS_CACHE_DIR}, - {"include_folders", OPENVAS_NVT_DIR}, - {"max_hosts", "30"}, - {"max_checks", "10"}, openvas-scanner-5.1.3/src/CMakeLists.txt2018-08-29 19:27:26.0 +0300 -+++ openvas-scanner-5.1.3/src/CMakeLists.txt2019-02-04 03:22:20.078824664 +0300 -@@ -68,10 +68,6 @@ - add_definitions (-DOPENVAS_NVT_DIR=\\\"${OPENVAS_NVT_DIR}\\\") - endif (OPENVAS_NVT_DIR) - --if (OPENVAS_CACHE_DIR) -- add_definitions (-DOPENVAS_CACHE_DIR=\\\"${OPENVAS_CACHE_DIR}\\\") --endif (OPENVAS_CACHE_DIR) -- - if (OPENVAS_LOG_DIR) - add_definitions (-DOPENVAS_LOG_DIR=\\\"${OPENVAS_LOG_DIR}\\\") - endif (OPENVAS_LOG_DIR) openvas-scanner-5.1.3/CMakeLists.txt 2018-08-29 19:27:26.0 +0300 -+++ openvas-scanner-5.1.3/CMakeLists.txt 2019-02-04 03:18:37.88639 +0300 -@@ -166,7 +166,6 @@ - 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_SYSCONF_DIR "${SYSCONFDIR}/openvas") - - if (NOT OPENVAS_NVT_DIR) -@@ -265,7 +264,6 @@ - DESTINATION ${DATADIR}/doc/openvas-scanner/ ) - - install (DIRECTORY DESTINATION ${OPENVAS_NVT_DIR}) --install (DIRECTORY DESTINATION ${OPENVAS_CACHE_DIR}) - - ## Tests - - diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-gcc8.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-gcc8.patch deleted file mode 100644 index 4ec2e786e12..000 --- a/net-analyzer/openvas-scanner/files/openvas-scanner-5.1.3-gcc8.patch +++ /dev/null @@ -1,42 +0,0 @@ openvas-scanner-5.1.3/src/ntp.c2018-08-29 19:27:26.0 +0300 -+++ openvas-scanner-5.1.3/src/ntp.c2019-02-02 00:57:56.832878754 +0300 -@@ -361,9 +361,7 @@ - } - - /*-- -- -Communication protocol: timestamps -- - --*/ - - -@@ -391,7 +389,7 @@ - static int - __ntp_timestamp_scan_host (int soc, char *msg, char *host) - { -- char timestr[1024]; -+ char timestr[64]; - char *tmp; - time_t t; - int len;
[gentoo-commits] repo/gentoo:master commit in: net-analyzer/openvas-scanner/, net-analyzer/openvas-scanner/files/
commit: 0a333bcfaacbad0dad5757cb0de488b952d694cc Author: Hasan ÇALIŞIR psauxit com> AuthorDate: Mon Aug 12 15:01:24 2019 + Commit: Joonas Niilola gentoo org> CommitDate: Mon Oct 28 04:01:56 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a333bcf net-analyzer/openvas-scanner: bump to 6.0.1 & update metadata. Bump to 6.0.1. Update metadata. This also fixes bug 684220 and introduces the new USE flag 'cron'. Closes: https://bugs.gentoo.org/684220 Reported-by: aleck stachelkaktus.net> Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Hasan ÇALIŞIR psauxit.com> Signed-off-by: Joonas Niilola gentoo.org> net-analyzer/openvas-scanner/Manifest | 1 + .../openvas-scanner/files/gvm-feed-sync.cron | 1 + .../openvas-scanner/files/gvm-feed-sync.sh | 45 +++ .../files/openvas-scanner-6.0.1-sbin.patch | 21 .../openvas-scanner/files/openvassd-daemon.conf| 17 +++ .../openvas-scanner/files/openvassd.gvm.conf | 124 ++ net-analyzer/openvas-scanner/files/openvassd.init | 14 +++ .../openvas-scanner/files/openvassd.logrotate | 13 ++ .../openvas-scanner/files/openvassd.service| 16 +++ net-analyzer/openvas-scanner/metadata.xml | 9 ++ .../openvas-scanner/openvas-scanner-6.0.1.ebuild | 138 + 11 files changed, 399 insertions(+) diff --git a/net-analyzer/openvas-scanner/Manifest b/net-analyzer/openvas-scanner/Manifest index 12763409b46..7d55d149a97 100644 --- a/net-analyzer/openvas-scanner/Manifest +++ b/net-analyzer/openvas-scanner/Manifest @@ -1 +1,2 @@ DIST openvas-scanner-5.1.3.tar.gz 254159 BLAKE2B d90fa15e143ead53abce66f933a3a4cac327176cca0f23bd88fe771ed7726b1891784ae980644c8335e560d348753115e43cfae83af9704e2d1d02827163563f SHA512 5712ab275058877cfd656e268ed09c81db6617ae247c17092f1fcd037f692f2018daf21b09b82401f99a7361bb485f0e0f7d63f8ff2387839cfdd5a3aaf8424e +DIST openvas-scanner-6.0.1.tar.gz 522100 BLAKE2B af82b41736329bd90ba1ea73a0ace36d4115375f81a7aaff5d3bd50f21cfa3195cdf4012aa952da52c4103a31475de5c5790ef3e2e36180aa06737371fa0e5a0 SHA512 db4087fffe1d50e232fa1e51325cf7f142237e2bd3cc5dcaa1e7058a4871300f352f2c0e700eae72ea9412c347b072e9d1f2eca508b27cb30f36c6895ec95147 diff --git a/net-analyzer/openvas-scanner/files/gvm-feed-sync.cron b/net-analyzer/openvas-scanner/files/gvm-feed-sync.cron new file mode 100644 index 000..5563b92929b --- /dev/null +++ b/net-analyzer/openvas-scanner/files/gvm-feed-sync.cron @@ -0,0 +1 @@ +0 2 * * * gvm [ -x /etc/gvm/gvm-feed-sync.sh ] && /bin/bash /etc/gvm/gvm-feed-sync.sh > /dev/null diff --git a/net-analyzer/openvas-scanner/files/gvm-feed-sync.sh b/net-analyzer/openvas-scanner/files/gvm-feed-sync.sh new file mode 100644 index 000..ba21632a4d6 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/gvm-feed-sync.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# GVM cron script that updates feed. + +# Start to update FEED & First NVT. +try=0 +until [ $try -ge 5 ]; do + greenbone-nvt-sync --curl &>/dev/null && break + try=$[$try+1] + sleep 30 +done + +# Check status +if [ $? -eq 0 ]; then + # Avoid your IP temporary banned because of multiple connection + sleep 5 + # Try to update scapdata. + try=0 + until [ $try -ge 5 ]; do + greenbone-scapdata-sync &>/dev/null && break + try=$[$try+1] + sleep 30 + done + + # Check status + if [ $? -eq 0 ]; then + # Avoid your IP temporary banned because of multiple connection + sleep 5 + # Try to update certdata + try=0 + until [ $try -ge 5 ]; do +greenbone-certdata-sync &>/dev/null && break +try=$[$try+1] +sleep 30 + done + + # Check status + if [ $? -eq 0 ]; then + exit 0 + else + exit 1 + fi + fi +fi diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-6.0.1-sbin.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-6.0.1-sbin.patch new file mode 100644 index 000..d5b8a2a6b62 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvas-scanner-6.0.1-sbin.patch @@ -0,0 +1,21 @@ +--- a/src/CMakeLists.txt 2019-07-21 23:16:18.608251465 +0300 b/src/CMakeLists.txt 2019-07-21 23:17:08.434210058 +0300 +@@ -175,7 +175,7 @@ + ## Install + + install (TARGETS openvassd +- RUNTIME DESTINATION ${SBINDIR} ++ RUNTIME DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE + GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + +@@ -183,7 +183,7 @@ + DESTINATION ${OPENVAS_SYSCONF_DIR}) + + install (FILES ${CMAKE_BINARY_DIR}/tools/greenbone-nvt-sync +- DESTINATION ${SBINDIR} ++ DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE +