diff options
Diffstat (limited to 'net-analyzer/openvas-scanner')
9 files changed, 231 insertions, 1 deletions
diff --git a/net-analyzer/openvas-scanner/Manifest b/net-analyzer/openvas-scanner/Manifest index a1218ebb47e3..50ac612e724a 100644 --- a/net-analyzer/openvas-scanner/Manifest +++ b/net-analyzer/openvas-scanner/Manifest @@ -1,8 +1,16 @@ +AUX README.gentoo 130 BLAKE2B 80e91985525fae01255681488368efee7e1c83ed3309815bb4752ee0f51fea4c127a52e99363804dd9b6a3258ff31cb2cbfa746f72e9fe1ff698867c770ef977 SHA512 5797af28a282b480408c7c60a66ca49ce032d911f54048a097bb6092869a91a62577fdb817f634a8a9629a77ef463f913b4721190f6636c344bba104c354d545 AUX openvas-scanner-20.8.1-rpath-qa-fix.patch 350 BLAKE2B f4179757f30a43da6fbff329f776a8173c95848f749052429804a4680d26740c6727f918b23517b2dea68a08a55294c9455bbc437f4bb44d0f06dcd056dd82bd SHA512 f873bed2df048fb60dc21665817f99cea6fa1e377f0a7d5c5163831dddbebd2b0ca4e5c94f1ca22ab54f3079ebd230882fc8a269ead21550780aea81b9c01476 AUX openvas-scanner-7.0.1-disable-automagic-dep.patch 1100 BLAKE2B e5fe847c43636b883af91b34386a7d94bb1b088cddc3c95d8314c03dec25c1d071ed7562019abb5d31a75bb2c4fded63644552b411091889612ef6c5c1a837f4 SHA512 b6d678413ca2a4771dcd6833e19d754745f3a7530f227befdad745d30bf23862120cb18359c1088552db18fb13bf491ed4a47523f7326e628101c5ade4156c58 AUX openvas-scanner-7.0.1-fix-linking-with-lld.patch 1074 BLAKE2B de151d837cf188e398ff2c193e8df056377c2fbd2597b0a98991f38fc48802e323d6f617ceacaa82845ab385335a722416a30723878bfc700a45b44de779cc62 SHA512 7ed1bf3560a5c5cca0acc22845fdc370d677c773477f5006a3223225b63c2cf41709dcb883c38e152d97419733e62731598560a6b4aed2e4ab12a6cdb51446b7 AUX openvas.conf 29 BLAKE2B 0cb02f4b349d996b07ca19a531b64a35692ce5afb0d1fd4b58b6c80ccce3caf82055b396b23fa14f561eb9b732afba0fdfccade4c33c5e300fa1aca41b3995b7 SHA512 7ae3c5eff9a63a5eaadee5886c80baa46ff123695a55e92f21178421bd69322b4c1c06615fd81ea461b61da12ff0e03f523ea3110105a58e709900a0e2d4eebc +AUX openvas.conf-22 43 BLAKE2B 6796e4898eacde996fe22b8921ed6a8f4f7e7d1da06caaeca7888138614a53c2d83a7fc639c8f38245c86c1c96272aa7503f8faa42994b47c6ef6a3481c7ba28 SHA512 56254f0d7f39728e5d65efff4070d935b897793000251229b1aba20afdd9602302b77ac0252846a3586e4103b5ec7a4b72d3a653cecaa26b7cdd9128ef53605b AUX openvassd.logrotate 330 BLAKE2B faf900a6882bb23c29859080d0c140c9dde8dcab42f31c31bfd43342beedab0bfe711f4e918aba5c7f8e5bb91430e251e270d0bc2e6f49e84ce98cdbbfe6d023 SHA512 397c9fd0d63ab66b463f65b6d235ec3e4e6ca52a3c811ddd4efcaeffc05fed8f9cd97605f439a628c144ecc1cfcfd31290d2a9dc6e57e8197d063b4aee63d73b +AUX redis-openvas.confd 523 BLAKE2B ad183d69731693602f73128af57b81c5ae90bbf82042f8ef1b2803fe0a6d1c6fac6e158b3f080d6b993354657c0dacd1048265934446c897709618f33bff0d85 SHA512 3535e302534f220f9756ed2ddb2b429dd96828c00e8b9858561e478ac943d9c40ecfacc917fdadf652ba15753008e23642fc0c934942aa2fa2180dee5b61569a +AUX redis-openvas.initd 720 BLAKE2B bb14cdcc693c0fbb9da1ea14332e93bc56e883cbd0e8459cfffc279bd8dce2cb93aef3ec00885b97743b046eb6c6a79f0f75c4d20881ac6115a5980ebd5ce060 SHA512 870bffa5f3e898f912283b4bc40cec63579ed56dbda0cf1991a440bdf993bb22b18178575cab03efb05774bf39690eba32b9d9920987b716ff9277a834637f04 +AUX redis-openvas.service 280 BLAKE2B 9a11408cec88a57ae71fc4a4fced63dc3d35157c979409f4db5037a9cca1c386b0521d30064a741fe5d6e8891c84bf561fcf609ef35082c6ca34ce98f4a1ee31 SHA512 3afd6b57efcbc9bd90fc88a9021094a0fc7f27bd0805077e71df1ba94de8d1687a209ac730f0014f9c3af5ddbd8a77b85ac07dd09bd98551a24f10a0791b24d1 +AUX redis-openvas.tmpfiles 63 BLAKE2B 8e3d29cef1ae0f815f7ef4da76b14168168675be4174ed1435521c26633a1f76088ab3cba5283e0c03d9f1e03abb085fdcfdb83d741f9132096df317f7f19c11 SHA512 936613951d7249c5536b4b20128bc4aef66fc05de95bece6cf2436117ed95d5dfba81cc7e16db9f765708b618a74ad83fcc52c7ccb8ccf480dd3cb4ce64cc986 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 EBUILD openvas-scanner-21.4.4-r2.ebuild 2780 BLAKE2B ad007b59d5f9337adadfadff50648d67b741fcd35d14dcd731ab6b7301c7ac7141487081103c1f7a54d89a2d077eca2c94a391d4b95bae855d35c5975ec00164 SHA512 2f59c429409fd5eec2163c8eef9d0e97f8a5f555ae764fb51b3591e4630fa9462d6a393f28605453eea3b7c54736da01351f1ce67565787fabbbae74e136e251 -MISC metadata.xml 955 BLAKE2B 89bbb8f84989c99ac00776d06921e3430e7865f1276139dbc87676a28133e157bca29f5c7bc077fc17ad6b8408d8aa2b967bf1a78569a516c83ff670698fccae SHA512 98c8d4c18d138b8bde6787394fe42fa4107205f8e6a262997c37e80364d7c0fea6caaeb331d3c918ac1a38f750273cf060360a5f7dd4a342cb834fc53d24d51f +EBUILD openvas-scanner-22.7.2.ebuild 3672 BLAKE2B 2398823dae5c40f2680ab0c8419a3b9846cff6f41938d16bc25c3a3281220f455a2751568f1345d43e363dd9e5a6a30ff5037e41f6f47f3b39b9a31696b57434 SHA512 3c5fd3cd44fc17599e91e861315220e72f16519af94cc627c03904ee1ab67b37d8c8cecba4fb6efb7c2c494d3ae1fff25fc2382b3dbcef946aab445245b864bb +MISC metadata.xml 1082 BLAKE2B a428b18c1fba3380a42e1120fc58c8c950900723f5cb11febdff5d86cd16bce0a17fcdb4c48867435a7c39243a7fa7e5c15ebb3fb0d6d44fc23ef56197530b6a SHA512 e41f348b1ae728e27efb71e5ebb9e468ac5d0b31526a4db922f1bc2d3f3029a5b75be2db6cbac14754107326c4af570e6673b2e66f44317677e319116daadaf6 diff --git a/net-analyzer/openvas-scanner/files/README.gentoo b/net-analyzer/openvas-scanner/files/README.gentoo new file mode 100644 index 000000000000..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 000000000000..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 000000000000..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 000000000000..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 000000000000..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] +WantedBy=multi-user.target diff --git a/net-analyzer/openvas-scanner/files/redis-openvas.tmpfiles b/net-analyzer/openvas-scanner/files/redis-openvas.tmpfiles new file mode 100644 index 000000000000..6dea2932cc0b --- /dev/null +++ b/net-analyzer/openvas-scanner/files/redis-openvas.tmpfiles @@ -0,0 +1,2 @@ +# redis runtime directory +d /run/redis-openvas 0755 gvm root - diff --git a/net-analyzer/openvas-scanner/metadata.xml b/net-analyzer/openvas-scanner/metadata.xml index 20db261053a1..8b98cc0ee111 100644 --- a/net-analyzer/openvas-scanner/metadata.xml +++ b/net-analyzer/openvas-scanner/metadata.xml @@ -2,6 +2,10 @@ <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person" proxied="yes"> + <email>foti.giuseppe@gmail.com</email> + <name>Giuseppe Foti</name> + </maintainer> + <maintainer type="person" proxied="yes"> <email>jonas.licht@gmail.com</email> <name>Jonas Licht</name> </maintainer> diff --git a/net-analyzer/openvas-scanner/openvas-scanner-22.7.2.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-22.7.2.ebuild new file mode 100644 index 000000000000..fec03e1535be --- /dev/null +++ b/net-analyzer/openvas-scanner/openvas-scanner-22.7.2.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2023 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_PN="openvas" +MY_DN="openvassd" + +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" + +SLOT="0" +LICENSE="GPL-2 GPL-2+" +KEYWORDS="~amd64 ~x86" +IUSE="doc snmp test" +RESTRICT="!test? ( test )" + +DEPEND=" + acct-user/gvm + dev-db/redis + dev-libs/glib:2 + >=dev-libs/json-glib-1.4.4 + >=net-libs/gnutls-3.2.15 + >=net-analyzer/gvm-libs-22.4 + net-libs/libpcap + app-crypt/gpgme:= + dev-libs/libgcrypt:= + dev-libs/libgpg-error + >=dev-libs/libksba-1.0.7 + >=net-libs/libssh-0.6.0 + dev-libs/libbsd + snmp? ( net-analyzer/net-snmp:= ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + >=sys-devel/bison-2.5 + sys-devel/flex + virtual/pkgconfig + doc? ( + app-doc/doxygen[dot] + app-doc/xmltoman + app-text/htmldoc + dev-perl/CGI + dev-perl/SQL-Translator + virtual/pandoc + ) + test? ( dev-libs/cgreen ) +" + +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 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" + "-DBUILD_WITH_SNMP=$(usex snmp)" + "-DPENVAS_RUN_DIR=/run/ospd" + "-DINSTALL_OLD_SYNC_SCRIPT=OFF" + ) + 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 + use prefix || fowners -R gvm:gvm /etc/gvm /etc/gvm/redis-openvas.conf + fperms 0750 /etc/gvm + fperms 0644 /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 +} |