summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Foti <foti.giuseppe@gmail.com>2023-07-28 17:06:34 +0200
committerFlorian Schmaus <flow@gentoo.org>2023-07-31 11:12:44 +0200
commit6e7e3bcafe09eba31c00c9dca3c65cb30ff9ff46 (patch)
tree47cc793d5a6d4d7f556bf32a20b9620cdb5eef1b /net-analyzer
parentdev-python/qiskit-terra: Bump to 0.25.0 (diff)
downloadgentoo-6e7e3bcafe09eba31c00c9dca3c65cb30ff9ff46.tar.gz
gentoo-6e7e3bcafe09eba31c00c9dca3c65cb30ff9ff46.tar.bz2
gentoo-6e7e3bcafe09eba31c00c9dca3c65cb30ff9ff46.zip
net-analyzer/gvmd: add 22.6.0
Signed-off-by: Giuseppe Foti <foti.giuseppe@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/32084 Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/gvmd/Manifest1
-rw-r--r--net-analyzer/gvmd/gvmd-22.6.0.ebuild129
2 files changed, 130 insertions, 0 deletions
diff --git a/net-analyzer/gvmd/Manifest b/net-analyzer/gvmd/Manifest
index 160ca61dd5ae..3cccf7e33ac5 100644
--- a/net-analyzer/gvmd/Manifest
+++ b/net-analyzer/gvmd/Manifest
@@ -1,2 +1,3 @@
DIST gvmd-21.4.5.tar.gz 1041186 BLAKE2B 18edc375084a6c6445f12779935e34d20826d2390481cbcdc06cab8dea81ea9c6bddeda437b081137f858e860f725431d33d5654eae231e303e0dc5618a89c8a SHA512 5b22b9bfd58ae73fb973941c7a96027599ccc5b78d822eac9c840460cb75bf60a398519569daa04d5c4d935dbe3974335f87e2c1c5fa751b4cec1ea6e5f064ec
DIST gvmd-22.5.5.tar.gz 1034891 BLAKE2B 86382768133d18be08d5536ad02e501affa9c3c70ed592bffa85d0d043b1dfdb6201efcf6cbe7561a987aa7975a17236e8cd6c9382a0ffe9e123d18b221932c2 SHA512 65813ff623e62c9c8b46870617cfeaed7bc4ccc54ce5b4423e0eb93b3e91fbdcf47fc47f71a182d0aa3305267e0bde4d06975d40691ec1199780c10e6d815cf0
+DIST gvmd-22.6.0.tar.gz 1039082 BLAKE2B 0e6e53ce990090e212e035f2224bfa84c906f130dd5a33f5e57a53b3a5b82afac725db4412c5d0f3de0abc2fada5120845eaf3b93db18aa1137c948a14964594 SHA512 de6688dfd19b9bb779a963b3f8607818dad13da4024b7e0a0e80649cb11bbcf0a65bf1b72eaf5408ead2dabff2e806a0f7dd8472c6f314774b82fcd01fb37b37
diff --git a/net-analyzer/gvmd/gvmd-22.6.0.ebuild b/net-analyzer/gvmd/gvmd-22.6.0.ebuild
new file mode 100644
index 000000000000..22ce3ef705d4
--- /dev/null
+++ b/net-analyzer/gvmd/gvmd-22.6.0.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake systemd toolchain-funcs
+
+DESCRIPTION="Greenbone vulnerability manager, previously named openvas-manager"
+HOMEPAGE="https://www.greenbone.net https://github.com/greenbone/gvmd/"
+SRC_URI="https://github.com/greenbone/gvmd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="AGPL-3+"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ acct-user/gvm
+ app-crypt/gpgme:1=
+ >=dev-db/postgresql-9.6:=[uuid]
+ >=dev-libs/glib-2.42:2
+ >=dev-libs/libical-1.0.0
+ >=net-analyzer/gvm-libs-20.08.0
+ >=net-libs/gnutls-3.2.15[tools]
+"
+# gvmd (optionally) uses xml_split from XML-Twig at runtime. And texlive
+# and xmlstartlet are used for (PDF) report generator at runtime.
+RDEPEND="
+ ${DEPEND}
+ app-text/xmlstarlet
+ dev-perl/XML-Twig
+ dev-texlive/texlive-latexextra
+ >=net-analyzer/ospd-openvas-22.4
+ >=dev-db/pg-gvm-22.4
+"
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen[dot]
+ app-doc/xmltoman
+ app-text/htmldoc
+ dev-libs/libxslt
+ )
+ test? ( dev-libs/cgreen )
+"
+
+src_prepare() {
+ cmake_src_prepare
+ # QA-Fix | Use correct FHS/Gentoo policy paths for 9.0.0
+ sed -i -e "s*share/doc/gvm/html/*share/doc/${PF}/html/*g" doc/CMakeLists.txt || die
+ sed -i -e "s*/doc/gvm/*/doc/${PF}/*g" CMakeLists.txt || die
+ # QA-Fix | Remove !CLANG Doxygen warnings for 9.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
+}
+
+src_configure() {
+ local mycmakeargs=(
+ "-DLOCALSTATEDIR=${EPREFIX}/var"
+ "-DSYSCONFDIR=${EPREFIX}/etc"
+ "-DLIBDIR=${EPREFIX}/usr/$(get_libdir)"
+ "-DSBINDIR=${EPREFIX}/usr/bin"
+ "-DSYSTEMD_SERVICE_DIR=$(systemd_get_systemunitdir)"
+ "-DGVM_DEFAULT_DROP_USER=gvm"
+ )
+ 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
+ if use test; then
+ cmake_build tests
+ fi
+ cmake_build rebuild_cache
+}
+
+src_install() {
+ if use doc; then
+ local HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. )
+ fi
+ cmake_src_install
+
+ insinto /etc/gvm/sysconfig
+ newins "${FILESDIR}/${PN}-daemon-22.conf" "${PN}-daemon.conf"
+ if ! use prefix; then
+ fowners -R gvm:gvm /etc/gvm
+ fi
+
+ newinitd "${FILESDIR}/${PN}-22.init" "${PN}"
+ newconfd "${FILESDIR}/${PN}-daemon-22.conf" "${PN}"
+
+ # Set proper permissions on required files/directories
+ keepdir /var/lib/gvm/gvmd
+ if ! use prefix; then
+ fowners -R gvm:gvm /var/lib/gvm
+ fi
+
+ dosbin "${FILESDIR}"/gvm-sync-all
+ systemd_dounit "${FILESDIR}"/gvm-sync-all.{service,timer}
+
+ systemd_install_serviced "${FILESDIR}/gvmd.service.conf" \
+ ${PN}.service
+}
+
+pkg_postinst() {
+ elog "If you are upgrading from a previous version, you need to update the database version."
+ elog "Please, create the running directory and give write permission to the database user"
+ elog "then run gvmd as the gvm user with --migrate option:"
+ elog "~# mkdir /run/gvmd"
+ elog "~# setfacl -m u:gvm:rwx /run/gvmd/"
+ elog "~# sudo -u gvm gvmd --migrate"
+}