diff options
Diffstat (limited to 'net-analyzer/openvas-scanner')
3 files changed, 233 insertions, 0 deletions
diff --git a/net-analyzer/openvas-scanner/Manifest b/net-analyzer/openvas-scanner/Manifest index e95d58393162..a3e47d93c26b 100644 --- a/net-analyzer/openvas-scanner/Manifest +++ b/net-analyzer/openvas-scanner/Manifest @@ -1,5 +1,6 @@ AUX README.gentoo 130 BLAKE2B 80e91985525fae01255681488368efee7e1c83ed3309815bb4752ee0f51fea4c127a52e99363804dd9b6a3258ff31cb2cbfa746f72e9fe1ff698867c770ef977 SHA512 5797af28a282b480408c7c60a66ca49ce032d911f54048a097bb6092869a91a62577fdb817f634a8a9629a77ef463f913b4721190f6636c344bba104c354d545 AUX openvas-scanner-23.0.1-link-pcap.patch 959 BLAKE2B db54d427cbdf080546c14a2becd79b9adb1ae2c99489be628467404236dd71965654213d60eb3b118544eb341a88d3b0c9aaa539473212ce31ee5a55dfc7acc8 SHA512 dc255b1ce8b49e73daa6274e049249b6c7941f6f5a2a3bc0402b538de3e7879f3b65e2428048d4eb36ce72a4e2768458646973c54e7ad2085b9ee3216cb41822 +AUX openvas-scanner-23.3.0-link-curl.patch 3119 BLAKE2B 795abc3d147780c20560b6b3d45168866438316eb9e5ddf55080312c61d5053efe40df47911008cd425b1f7929580a1e694b58612f48707cc5e51af206d0a63a SHA512 97b01e6ae16aa37463fef2e77947f1c25b2e547484b0a66e575f0f6f7274cb0e37a6422d98b221a14ba8b137490918097ae885a18a5cc74f472381b99da05c75 AUX openvas.conf-22 43 BLAKE2B 6796e4898eacde996fe22b8921ed6a8f4f7e7d1da06caaeca7888138614a53c2d83a7fc639c8f38245c86c1c96272aa7503f8faa42994b47c6ef6a3481c7ba28 SHA512 56254f0d7f39728e5d65efff4070d935b897793000251229b1aba20afdd9602302b77ac0252846a3586e4103b5ec7a4b72d3a653cecaa26b7cdd9128ef53605b AUX openvas.logrotate 328 BLAKE2B 596d30efa17aabb91270255a0f5b93796d4ed6a388db9e6525f1060dcfe54f389aa53e244e959e0aa22f99ef575c9882d4934140238c8a3d133cb1a1ec7a735c SHA512 a459bd61a549f1ae7ae079ffbca2b4290d3beafd0952a380429b152b04ebc25aea003c349a8859015345db48cfa0a2b7a887acde6d0484afb5141265a66dbee6 AUX redis-openvas.confd 527 BLAKE2B 84bc4461630b19b02c724f72d22b0b4d04dd63a2257589c591d752c743aefea74fa4a918327826c77b32a47d372d3029981177674647589eabdf9d97037ac56d SHA512 85d24f64ef6b05c53ee2cf4f3ac33ac66e2a7e990c650249a2a6f3faf85276b9a4454cb5c17e51b747aef360c2648cfba352f04f75f3b3f88fc21b1339a04b5d @@ -8,6 +9,8 @@ AUX redis-openvas.service 280 BLAKE2B 9a11408cec88a57ae71fc4a4fced63dc3d35157c97 AUX redis-openvas.tmpfiles 63 BLAKE2B 8e3d29cef1ae0f815f7ef4da76b14168168675be4174ed1435521c26633a1f76088ab3cba5283e0c03d9f1e03abb085fdcfdb83d741f9132096df317f7f19c11 SHA512 936613951d7249c5536b4b20128bc4aef66fc05de95bece6cf2436117ed95d5dfba81cc7e16db9f765708b618a74ad83fcc52c7ccb8ccf480dd3cb4ce64cc986 DIST openvas-scanner-22.7.9.tar.gz 1069904 BLAKE2B 908810997880d1267f41df59905acc2ac2d491ab8453001ae8e2cc6881958150e8866b07b4e335888e8e574b5a347b33880bd24c9b8d140edd6c384e498e5dc9 SHA512 279a781fe698496fb88efd28c0ee6ede66a0180237b60c4d7b083fe10c7b7ac054ec04b08c9b33e6dd142f60529faedfef4441421cc04e95eaa08865e47b58dd DIST openvas-scanner-23.0.1.tar.gz 1387550 BLAKE2B 22f0b7f10fbb8be7d0897ce1895035ec9e330adee2a56d7c724e9e9fd54808ed10de5f05b3bb02918e44e45a7f85035e7d63fdd89345dcdb09d5180740823c74 SHA512 e2107ca762abcbb20d4506d2cc4479d5fbf5efd744a598ec63ea3c66ae6a6f1743deeb4b7aa9863b78c186c8a4d4b5f2212d241cef51b91c6c5bcd0879c45dc7 +DIST openvas-scanner-23.3.0.tar.gz 1416508 BLAKE2B de5864183b19df7b825bb74a5c38493b484494c5ef0f871f83e77efd6f6ce9934fd0a2365c5e7fe2b53e0c3f0c6a0eccd57528571dcd8586cbe5ef575aa5ec4f SHA512 cebe73f376a0b7731ffcb3eb9eb6e223ad490d8c0b708f07f508c562f2cfea956fa61e2bfb9141d2bf826c727be901ef2f455b74c055032f72cd52b7591bd171 EBUILD openvas-scanner-22.7.9.ebuild 3657 BLAKE2B 38af296726719db9d3c3727aa271475ae255296ac8a36151022cb25dcb8c8066e34c2dff6bdc00e8c8777163f4262dd38fda3b4887a08de3ad8113eb4777e7c8 SHA512 55a156026a45e02d50e4684c93d9284de88cbd1da725f6b1a17453f472c6dcc19e99dffc6b2780a23804a26db3743331c3e486e3290073e267a389620fdb3d04 EBUILD openvas-scanner-23.0.1.ebuild 3780 BLAKE2B bfefffbd95c2be01ae02aabc773ebc231ce372543199ff90d3baf2e0df6002692e5e4e99db38b0a2d5f2b3226e9756f1551a947e0c28f78f79c2124a3d94a7e2 SHA512 932807fc8f505db39f376dd9897c895bd9ccdc18870ca94a84036a30714a919e366da06f20bc24eb9b67ca7562f4075b287d8c70177e7524a403d9ad937b52ad +EBUILD openvas-scanner-23.3.0.ebuild 3779 BLAKE2B 72df699aeb35d24116a4393ea9859800f2cd254a2056f95cf4424d6c9c0b87a311104f03e48ef4c9687217113d09c2165e8e144dc465f7af1151c73b03272e93 SHA512 63feacfddbcb042f57960457fc390fea1892564a0cd2111746fb2869e15dad818655b7e663849673faaeaa6128c2efffc2b7336a488e10afc4d17b501034747c MISC metadata.xml 1082 BLAKE2B a428b18c1fba3380a42e1120fc58c8c950900723f5cb11febdff5d86cd16bce0a17fcdb4c48867435a7c39243a7fa7e5c15ebb3fb0d6d44fc23ef56197530b6a SHA512 e41f348b1ae728e27efb71e5ebb9e468ac5d0b31526a4db922f1bc2d3f3029a5b75be2db6cbac14754107326c4af570e6673b2e66f44317677e319116daadaf6 diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-23.3.0-link-curl.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-23.3.0-link-curl.patch new file mode 100644 index 000000000000..7fc9972a04b7 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvas-scanner-23.3.0-link-curl.patch @@ -0,0 +1,69 @@ +Fixes underlinking curl lib in nasl/CMakeLists.txt +Upstream PR: https://github.com/greenbone/openvas-scanner/pull/1647 + +From d070e15547bf8377b90ed660c099c82fb30e2d32 Mon Sep 17 00:00:00 2001 +From: Giuseppe Foti <foti.giuseppe@gmail.com> +Date: Sat, 18 May 2024 18:53:19 +0200 +Subject: [PATCH 1/2] link curl + +Signed-off-by: Giuseppe Foti <foti.giuseppe@gmail.com> +--- a/nasl/CMakeLists.txt ++++ b/nasl/CMakeLists.txt +@@ -188,7 +188,7 @@ set_target_properties (openvas_nasl_shared PROPERTIES CLEAN_DIRECT_OUTPUT 1) + set_target_properties (openvas_nasl_shared PROPERTIES SOVERSION "${PROJECT_VERSION_MAJOR}") + set_target_properties (openvas_nasl_shared PROPERTIES VERSION "${PROJECT_VERSION_STRING}") + # line below is needed so it also works with no-undefined which is e.g. used by Mandriva +-target_link_libraries (openvas_nasl_shared openvas_misc_shared pcap ${GLIB_LDFLAGS} ++target_link_libraries (openvas_nasl_shared openvas_misc_shared curl pcap ${GLIB_LDFLAGS} + ${LIBOPENVAS_MISC_LDFLAGS} + ${GLIB_JSON_LDFLAGS} + ${GCRYPT_LDFLAGS} ${GPGME_LDFLAGS} m +-- +2.43.2 + + +From 17475b6e7e3b0bf4ccc56915b1ea69adadfda0a5 Mon Sep 17 00:00:00 2001 +From: Giuseppe Foti <foti.giuseppe@gmail.com> +Date: Sat, 18 May 2024 18:54:04 +0200 +Subject: [PATCH 2/2] Remove redundant whitespaces + +Signed-off-by: Giuseppe Foti <foti.giuseppe@gmail.com> +--- a/nasl/CMakeLists.txt ++++ b/nasl/CMakeLists.txt +@@ -172,7 +172,7 @@ add_definitions (-DOPENVAS_GPG_BASE_DIR="${OPENVAS_GPG_BASE_DIR}") + + include_directories (${GLIB_INCLUDE_DIRS} + ${LIBOPENVAS_MISC_INCLUDE_DIRS} +- ${GLIB_JSON_INCLUDE_DIRS} ++ ${GLIB_JSON_INCLUDE_DIRS} + ${GPGME_INCLUDE_DIRS} + ${LIBSSH_INCLUDE_DIRS} + ${LIBGVM_BASE_INCLUDE_DIRS} +@@ -181,7 +181,7 @@ include_directories (${GLIB_INCLUDE_DIRS} + ${GCRYPT_INCLUDE_DIRS}) + + +-# Build shared ++# Build shared + add_library (openvas_nasl_shared SHARED ${FILES}) + set_target_properties (openvas_nasl_shared PROPERTIES OUTPUT_NAME "openvas_nasl") + set_target_properties (openvas_nasl_shared PROPERTIES CLEAN_DIRECT_OUTPUT 1) +@@ -190,7 +190,7 @@ set_target_properties (openvas_nasl_shared PROPERTIES VERSION "${PROJECT_VERSION + # line below is needed so it also works with no-undefined which is e.g. used by Mandriva + target_link_libraries (openvas_nasl_shared openvas_misc_shared curl pcap ${GLIB_LDFLAGS} + ${LIBOPENVAS_MISC_LDFLAGS} +- ${GLIB_JSON_LDFLAGS} ++ ${GLIB_JSON_LDFLAGS} + ${GCRYPT_LDFLAGS} ${GPGME_LDFLAGS} m + ${LIBGVM_BASE_LDFLAGS} + ${LIBGVM_UTIL_LDFLAGS} +@@ -219,5 +219,5 @@ install (FILES ${CMAKE_SOURCE_DIR}/doc/man/openvas-nasl.1 + DESTINATION ${DATADIR}/man/man1 ) + + install (FILES ${CMAKE_SOURCE_DIR}/doc/man/openvas-nasl-lint.1 +- DESTINATION ${DATADIR}/man/man1 ) ++ DESTINATION ${DATADIR}/man/man1 ) + ## End +-- +2.43.2 + diff --git a/net-analyzer/openvas-scanner/openvas-scanner-23.3.0.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-23.3.0.ebuild new file mode 100644 index 000000000000..b26024cee8d1 --- /dev/null +++ b/net-analyzer/openvas-scanner/openvas-scanner-23.3.0.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2024 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 ~x86" +IUSE="doc snmp test" +RESTRICT="!test? ( test )" + +DEPEND=" + acct-user/gvm + app-crypt/gpgme:= + >=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 + dev-perl/CGI + dev-perl/SQL-Translator + virtual/pandoc + ) + test? ( dev-libs/cgreen ) +" +PATCHES=( + # See https://github.com/greenbone/openvas-scanner/pull/1647 + "${FILESDIR}"/openvas-scanner-23.3.0-link-curl.patch +) +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 +} |