diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-05-22 00:06:25 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-05-22 00:06:25 +0100 |
commit | 236e75597883501f8700d9ba1a5c8276f578a17f (patch) | |
tree | 6b441a1dfa3a82840e3aa74678cc90c5294a4bca /net-analyzer | |
parent | bfd63d5b0e96ad32e0d0a8fe15512b6a9ac6fc9e (diff) |
gentoo auto-resync : 22:05:2024 - 00:06:25
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/Manifest.gz | bin | 43591 -> 43597 bytes | |||
-rw-r--r-- | net-analyzer/gvm-libs/Manifest | 2 | ||||
-rw-r--r-- | net-analyzer/gvm-libs/gvm-libs-22.9.1.ebuild | 112 | ||||
-rw-r--r-- | net-analyzer/openvas-scanner/Manifest | 3 | ||||
-rw-r--r-- | net-analyzer/openvas-scanner/files/openvas-scanner-23.3.0-link-curl.patch | 69 | ||||
-rw-r--r-- | net-analyzer/openvas-scanner/openvas-scanner-23.3.0.ebuild | 161 |
6 files changed, 347 insertions, 0 deletions
diff --git a/net-analyzer/Manifest.gz b/net-analyzer/Manifest.gz Binary files differindex 8c642d7806f0..cecb5a11b81e 100644 --- a/net-analyzer/Manifest.gz +++ b/net-analyzer/Manifest.gz diff --git a/net-analyzer/gvm-libs/Manifest b/net-analyzer/gvm-libs/Manifest index 067cf1155e28..8ccabee11145 100644 --- a/net-analyzer/gvm-libs/Manifest +++ b/net-analyzer/gvm-libs/Manifest @@ -1,7 +1,9 @@ AUX gvm-libs-22.8.0-linking-math-library.patch 1171 BLAKE2B a061156df500eb851424f27d83f8ada161e93431efaa6ecb168b387d2bbd4548e42b6ec0bf6db84588f86fef98e56befea0eed1b7c848412bfdb4f58229a8591 SHA512 976496000fc39a81047fbfc66165d8b6541d024a28d7408b490bbac725b152ba94b9d29b09245d731183f0929dbcd897c63749e959baab65b4ddb77636624f64 DIST gvm-libs-22.8.0.tar.gz 310304 BLAKE2B ed880ca924d5f9c6d376c1b6b0711adecb095b0b79c565da6d62bf53d71ef0f49892263dc7e28e08841d33db0c480d691f4d4d95b3883d4f0751088fcf0b1d90 SHA512 5daa9157399fc8cf52cdfbdfeffe5e10a282cbe2f7b8eb6a3fefb202984f9df3bca91ef80d1d9d1bf37307cc475bd41d4b64b4f1ad0644975b295b6f32b294a6 DIST gvm-libs-22.9.0.tar.gz 314119 BLAKE2B 481ca7a977647a53ef21079b054ed1294c0ce081693abe373dc9bb241725a141c11ab54a4eb2716b7543c678400ca933f9611d9a6615c4d39a9877a8cb40406a SHA512 39049d0eea3cca632ed25f3a807d03568213cf0daac4e7ab8d088458212e76db881644421dd44a2b34f6490eab35c171339e52e6b4ba4204ff2d9b7422578876 +DIST gvm-libs-22.9.1.tar.gz 314228 BLAKE2B 117ddf5824f0a1f5788695074fa5044b21b5dcfb8d6235a9f423174fa76d9262f361371d1f6807e88979ce49cafab64f5aa9fd1d2e855395bfa103bf6b121ec8 SHA512 b06c21ced89dc9f14dd19b256b57af910f4d7e585bf9c90fb7e3c3497bb429294e3ffb64dc6ee710e8b3beeb4ca9ac6aecb9d5e4b25f0f9761fa0c9f18a8dfd1 EBUILD gvm-libs-22.8.0-r1.ebuild 2782 BLAKE2B dd8b80eba08a0019ea70f20137a5c7a02af9eea1095b0c884f3dbd9fbe9794b8020aa2a4be3a22f4ca104010cb5c8b8bc6d0cb5613968c346f84865d36cb5b35 SHA512 cabf0fd5297ae345ca7a2d44e2cd9a06eeb2a93ac50a6444e7f66a22aab0aef8494dea377028967a8b15e94244775445d2f2bb537a53a4467d890e92cb408ff1 EBUILD gvm-libs-22.8.0.ebuild 2638 BLAKE2B 38fb3a46c216e4340fd308cec7092846c1557d565df2fd2385037f897e70effdd2602973024ab17c8efd998fc56d8006763eeb2576442620fd81d87985091d4c SHA512 abe39d17d95095e0008cbe6519982a8acf9912996fef85a18b9002ca410fe6744fa72e5cf69a9dfd688b12bc85e6149efed63e8b0ece7c04d03c170cd05771fe EBUILD gvm-libs-22.9.0.ebuild 2782 BLAKE2B dd8b80eba08a0019ea70f20137a5c7a02af9eea1095b0c884f3dbd9fbe9794b8020aa2a4be3a22f4ca104010cb5c8b8bc6d0cb5613968c346f84865d36cb5b35 SHA512 cabf0fd5297ae345ca7a2d44e2cd9a06eeb2a93ac50a6444e7f66a22aab0aef8494dea377028967a8b15e94244775445d2f2bb537a53a4467d890e92cb408ff1 +EBUILD gvm-libs-22.9.1.ebuild 2639 BLAKE2B 80f16ca14e7eaa0cea10de307704a6499fcbc0c81645dc927367eb46583c056b2c0ff84d9af6f7bc5ba23b7de829c52467090d7efe377639acc3b92e74f45ea2 SHA512 1fd7a0c0e83ea1a4d4cee7f2b85b9f58efb01994acfb87cc3ceb6b45e0ba4e03cd8a05e22ebd09d2fde0ccd5957f7e815c5ea44b8145a64afaff96b3df493a6c MISC metadata.xml 877 BLAKE2B c60f3e763d17fabfe0260b1b7e9fe9fa738fb04fdac9b115f2263bae2d7407389cb6869e997947ec1e78644ebd92fe3be1d2ab446d46e4bbd80a39246235a4ad SHA512 74cc7cd53433c09c046241ba5a21795836bbd9b87556f1a2b4fa1cdc4a66238a6b224a948896c396fa68c6331b13037b8985e0ce3dff90886d24fb3bdf0cdfca diff --git a/net-analyzer/gvm-libs/gvm-libs-22.9.1.ebuild b/net-analyzer/gvm-libs/gvm-libs-22.9.1.ebuild new file mode 100644 index 000000000000..445a62fcabeb --- /dev/null +++ b/net-analyzer/gvm-libs/gvm-libs-22.9.1.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake toolchain-funcs + +DESCRIPTION="Greenbone Vulnerability Management (GVM) libraries" +HOMEPAGE="https://www.greenbone.net https://github.com/greenbone/gvm-libs/" +SRC_URI="https://github.com/greenbone/gvm-libs/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc ldap test radius" +RESTRICT="!test? ( test )" + +DEPEND=" + acct-user/gvm + >=app-crypt/gpgme-1.7.0:= + >=dev-libs/glib-2.42:2 + >=dev-libs/hiredis-0.10.1:= + dev-libs/libgcrypt:= + dev-libs/libgpg-error + >=dev-libs/libxml2-2.0:2 + >=net-libs/gnutls-3.2.15:= + net-libs/libnet:1.1 + net-libs/libpcap + >=net-libs/libssh-0.6.0:= + >=sys-apps/util-linux-2.25.0 + sys-libs/libxcrypt:= + >=sys-libs/zlib-1.2.8 + net-libs/paho-mqtt-c:1.3 + ldap? ( net-nds/openldap:= ) + radius? ( net-dialup/freeradius-client ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + dev-vcs/git + app-alternatives/yacc + app-alternatives/lex + virtual/pkgconfig + doc? ( + app-text/doxygen[dot] + app-text/xmltoman + app-text/htmldoc + dev-perl/CGI + dev-perl/SQL-Translator + ) + test? ( dev-libs/cgreen ) +" + +src_prepare() { + cmake_src_prepare + # QA-Fix | Remove -Werror compiler flag | Bug: #909558 + sed -i -e "s/-Werror//" "${S}"/CMakeLists.txt || die + # QA-Fix | Remove doxygen warnings for !CLANG + 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 (networking-test networking-test)/ /g' base/CMakeLists.txt || die + sed -i 's/add_test (util-test util-test)/ /g' boreas/CMakeLists.txt || die + fi +} + +src_configure() { + local mycmakeargs=( + "-DLOCALSTATEDIR=${EPREFIX}/var" + "-DSYSCONFDIR=${EPREFIX}/etc" + "-DGVM_RUN_DIR=${EPREFIX}/var/lib/gvm" + "-DBUILD_TESTS=$(usex test)" + "-DBUILD_WITH_RADIUS=$(usex radius)" + "-DBUILD_WITH_LDAP=$(usex ldap)" + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + if use doc; then + cmake_build -C "${BUILD_DIR}" doc + cmake_build doc-full -C "${BUILD_DIR}" doc + fi + cmake_build rebuild_cache + if use test; then + cmake_build tests + fi +} + +src_install() { + if use doc; then + local HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. ) + fi + cmake_src_install + + # Set proper permissions on required files/directories + keepdir /var/lib/gvm + if ! use prefix; then + fowners -R gvm:gvm /var/lib/gvm + fi +} 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 +} |