mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
net-analyzer/openvas-scanner: add 23.17.0
Signed-off-by: Giuseppe Foti <foti.giuseppe@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/41763 Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
committed by
Florian Schmaus
parent
5ef6ba2470
commit
9836c3c65d
@@ -1,2 +1,3 @@
|
||||
DIST openvas-scanner-23.13.1.tar.gz 1474941 BLAKE2B 18f7afbdc6f6d0f800e2fc41a70cd9bf372289d1fb91291dc6f57e60f71e6da9b021c20baf34daec160d19770908cae1d37be3dc9b1e3fdc162784de2b2d04b9 SHA512 63d8ff8fbe3dc86c3753ae08dfb9e17dba16198b82d8bc8637cfd25f587f9797f3de7fae8cf7f9404aa8f56194017b1cfd7ffdb0cdd86609c9db1aca9de743fd
|
||||
DIST openvas-scanner-23.17.0.tar.gz 1576340 BLAKE2B 58bb9f8b17ac1005155bd97502dc56e5242814c4d5ae8e868afe211bb3e04c02a1004e3a7ff05bdf58551b5ba503dbfdb085eb40a2169ae69577303fecae7777 SHA512 e594bc9ef98c15359f408b784dcbac1ee9ac454c80a771e0f64ef5df27bcefbae19a8bb63332ff269e2f7da09265d373cc56b6c92652b81e96961fdaa8d46658
|
||||
DIST openvas-scanner-23.9.0.tar.gz 1462868 BLAKE2B 2214dfaeac0d9b900379816c6c984ab762249d5a6cc571635b9ac690eb63c1835cab91e076296a60ca6fe43a0b9d8c3bf4d7399f784f65eb09dd08a78da264e0 SHA512 820510e7ae7c738796809d010ef5d177f002cd6dfe2c36354e47e1bda8f32ecd1c4bdc1779d4ff3bdc5d9ab31fe4e8330b0142206b54132c84dfc5f8b37bd87e
|
||||
|
||||
157
net-analyzer/openvas-scanner/openvas-scanner-23.17.0.ebuild
Normal file
157
net-analyzer/openvas-scanner/openvas-scanner-23.17.0.ebuild
Normal file
@@ -0,0 +1,157 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake systemd tmpfiles toolchain-funcs readme.gentoo-r1 optfeature
|
||||
|
||||
MY_DN="openvas"
|
||||
|
||||
DESCRIPTION="Open Vulnerability Assessment Scanner"
|
||||
HOMEPAGE="https://www.greenbone.net https://github.com/greenbone/openvas-scanner/"
|
||||
SRC_URI="
|
||||
https://github.com/greenbone/openvas-scanner/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
"
|
||||
|
||||
LICENSE="GPL-2 GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="doc snmp test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="
|
||||
acct-user/gvm
|
||||
app-crypt/gpgme:=
|
||||
app-crypt/mit-krb5:=
|
||||
>=dev-db/redis-5.0.3
|
||||
>=dev-libs/glib-2.42:2
|
||||
>=dev-libs/libgcrypt-1.6:=
|
||||
dev-libs/libgpg-error
|
||||
>=dev-libs/libksba-1.0.7
|
||||
dev-libs/libbsd
|
||||
>=net-libs/libssh-0.6.0:=
|
||||
>=dev-libs/json-glib-1.4.4
|
||||
>=net-analyzer/gvm-libs-22.4
|
||||
>=net-libs/gnutls-3.6.4:=
|
||||
net-libs/libpcap
|
||||
>=net-misc/curl-7.74.0[ssl]
|
||||
snmp? ( net-analyzer/net-snmp:= )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="
|
||||
>=sys-devel/bison-2.5
|
||||
app-alternatives/lex
|
||||
virtual/pkgconfig
|
||||
doc? (
|
||||
app-text/doxygen[dot]
|
||||
app-text/xmltoman
|
||||
app-text/htmldoc
|
||||
virtual/pandoc
|
||||
)
|
||||
test? ( dev-libs/cgreen )
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
# QA-Fix | Remove -Werror compiler flag
|
||||
sed -i -e "s/-Werror//" "${S}"/CMakeLists.txt || die #909560
|
||||
# QA-Fix | Remove !CLANG doxygen warnings for 7.0.0
|
||||
if use doc; 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
|
||||
|
||||
#Remove tests that doesn't work in the network sandbox
|
||||
if use test; then
|
||||
sed -i 's/add_test (pcap-test pcap-test)/ /g' misc/CMakeLists.txt || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
"-DLOCALSTATEDIR=${EPREFIX}/var"
|
||||
"-DSYSCONFDIR=${EPREFIX}/etc"
|
||||
"-DSBINDIR=${EPREFIX}/usr/bin"
|
||||
"-DOPENVAS_FEED_LOCK_PATH=${EPREFIX}/var/lib/openvas/feed-update.lock"
|
||||
"-DOPENVAS_RUN_DIR=/run/ospd"
|
||||
"-DBUILD_WITH_NETSNMP=$(usex snmp)"
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
if use doc; then
|
||||
cmake_build -C "${BUILD_DIR}" doxygen-full manual
|
||||
fi
|
||||
cmake_build rebuild_cache
|
||||
if use test; then
|
||||
cmake_build tests
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use doc; then
|
||||
mv "${BUILD_DIR}"/doc/html "${BUILD_DIR}"/doc/html-manual || die
|
||||
local HTML_DOCS=(
|
||||
"${BUILD_DIR}"/doc/generated/html/.
|
||||
"${BUILD_DIR}"/doc/html-manual
|
||||
)
|
||||
fi
|
||||
cmake_src_install
|
||||
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/${MY_DN}.logrotate" "${MY_DN}"
|
||||
|
||||
# Set proper permissions on required files/directories
|
||||
keepdir /var/log/gvm
|
||||
if ! use prefix; then
|
||||
fowners gvm:gvm /var/log/gvm
|
||||
fi
|
||||
|
||||
keepdir /var/lib/openvas/{gnupg,plugins}
|
||||
if ! use prefix; then
|
||||
fowners -R gvm:gvm /var/lib/openvas
|
||||
fi
|
||||
|
||||
insinto /etc/openvas
|
||||
newins "${FILESDIR}/openvas.conf-22" openvas.conf
|
||||
|
||||
systemd_newunit "${FILESDIR}/redis-openvas.service" redis-openvas.service
|
||||
newtmpfiles "${FILESDIR}/redis-openvas.tmpfiles" redis-openvas.conf
|
||||
|
||||
insinto /etc/gvm
|
||||
doins config/redis-openvas.conf
|
||||
if ! use prefix; then
|
||||
fowners -R gvm:gvm /etc/gvm /etc/gvm/redis-openvas.conf
|
||||
fi
|
||||
|
||||
fperms 0750 /etc/gvm
|
||||
fperms 0640 /etc/gvm/redis-openvas.conf
|
||||
|
||||
newconfd "${FILESDIR}/redis-openvas.confd" redis-openvas
|
||||
newinitd "${FILESDIR}/redis-openvas.initd" redis-openvas
|
||||
|
||||
if use prefix; then
|
||||
diropts -m0750
|
||||
else
|
||||
diropts -m0750 -o gvm -g gvm
|
||||
fi
|
||||
keepdir /var/lib/openvas/redis
|
||||
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process redis-openvas.conf
|
||||
optfeature "port scanner" net-analyzer/nmap
|
||||
readme.gentoo_print_elog
|
||||
}
|
||||
Reference in New Issue
Block a user