From: "Florian Schmaus" <flow@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/gvmd/files/, net-analyzer/gvmd/
Date: Mon, 3 Jul 2023 08:15:46 +0000 (UTC) [thread overview]
Message-ID: <1688372121.43b636fbcabce31bdee124d2851bf4ac8d4356ec.flow@gentoo> (raw)
commit: 43b636fbcabce31bdee124d2851bf4ac8d4356ec
Author: Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com>
AuthorDate: Sat May 20 16:58:36 2023 +0000
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Jul 3 08:15:21 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43b636fb
net-analyzer/gvmd: add 22.5.1
Signed-off-by: Giuseppe Foti <foti.giuseppe <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
net-analyzer/gvmd/Manifest | 1 +
net-analyzer/gvmd/files/gvmd-22.init | 30 +++++++
net-analyzer/gvmd/files/gvmd-daemon-22.conf | 29 +++++++
net-analyzer/gvmd/files/gvmd.service.conf | 21 +++++
net-analyzer/gvmd/gvmd-22.5.1.ebuild | 129 ++++++++++++++++++++++++++++
net-analyzer/gvmd/metadata.xml | 4 +
6 files changed, 214 insertions(+)
diff --git a/net-analyzer/gvmd/Manifest b/net-analyzer/gvmd/Manifest
index afe9b2d63f60..39e788d9caa4 100644
--- a/net-analyzer/gvmd/Manifest
+++ b/net-analyzer/gvmd/Manifest
@@ -1 +1,2 @@
DIST gvmd-21.4.5.tar.gz 1041186 BLAKE2B 18edc375084a6c6445f12779935e34d20826d2390481cbcdc06cab8dea81ea9c6bddeda437b081137f858e860f725431d33d5654eae231e303e0dc5618a89c8a SHA512 5b22b9bfd58ae73fb973941c7a96027599ccc5b78d822eac9c840460cb75bf60a398519569daa04d5c4d935dbe3974335f87e2c1c5fa751b4cec1ea6e5f064ec
+DIST gvmd-22.5.1.tar.gz 1031083 BLAKE2B 8c999b86e049828aadbdafcf14aad98772f05f5be3bcd7bed2176fbfddf83042d8092e6cc56325db1b5edc1ba6e33a4b508e8de593b7c4962096911e3f464ade SHA512 483bda9d05b77db2047fe4ba8e37ac062baade55234573665ed46441ff3ea220a2485829a1357f5a60ea27e304c8906ff12db7a1d41917b09d9243b4a9e763d6
diff --git a/net-analyzer/gvmd/files/gvmd-22.init b/net-analyzer/gvmd/files/gvmd-22.init
new file mode 100644
index 000000000000..f1ac6ddbac72
--- /dev/null
+++ b/net-analyzer/gvmd/files/gvmd-22.init
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+: ${GVMD_USER:=gvm}
+: ${GVMD_GROUP:=gvm}
+: ${GVMD_TIMEOUT:=30}
+
+name="Greenbone Vulnerability Manager"
+command=/usr/bin/gvmd
+command_args="${GVMD_OPTIONS} ${GVMD_LISTEN_ADDRESS_TCP} ${GVMD_PORT} ${GVMD_SCANNER_HOST} ${GVMD_GNUTLS_PRIORITIES}"
+command_user="${GVMD_USER}:${GVMD_GROUP}"
+pidfile="/run/gvmd/gvmd.pid"
+retry="${GVMD_TIMEOUT}"
+
+depend() {
+ after bootmisc postgresql postgresql-9.6 postgresql-10 postgresql-11 postgresql-12 postgresql-13 postgresql-14 postgresql-15
+ need localmount net ospd-openvas
+}
+
+start_pre() {
+ mkdir /run/gvmd
+ for p in gvm-checking gvm-create-functions gvm-helping gvm-migrating gvm-serving; do
+ touch /run/gvmd/${p}
+ done
+ chown -R gvm:gvm /run/gvmd/
+
+ touch /run/feed-update.lock
+ chown gvm:gvm /run/feed-update.lock
+}
diff --git a/net-analyzer/gvmd/files/gvmd-daemon-22.conf b/net-analyzer/gvmd/files/gvmd-daemon-22.conf
new file mode 100644
index 000000000000..e1a5482747fc
--- /dev/null
+++ b/net-analyzer/gvmd/files/gvmd-daemon-22.conf
@@ -0,0 +1,29 @@
+# GVMD command args
+
+# e.g --foreground
+GVMD_OPTIONS=""
+
+# Manager listen address unix socket
+# Failing under non-root user (looking for solution)
+GVMD_LISTEN_ADDRESS_UNIX="--unix-socket=/run/gvmd/gvmd.sock"
+
+# Manager listen address TCP
+GVMD_LISTEN_ADDRESS_TCP="--listen=127.0.0.1"
+
+# Manager listen port
+GVMD_PORT="--port=9390"
+
+# Manager unix socket listen owner
+GVMD_LISTEN_OWNER="--listen-owner=gvm"
+
+# Manager unix socket listen group
+GVMD_LISTEN_GROUP="--listen-group=gvm"
+
+# Manager unix socket listen mode
+GVMD_LISTEN_MODE="--listen-mode=755"
+
+# Scanner listen address unix socket
+GVMD_SCANNER_HOST="--scanner-host=/run/ospd/ospd-openvas.sock"
+
+# TLS settings
+GVMD_GNUTLS_PRIORITIES="--gnutls-priorities=SECURE256:+SUITEB192:+SECURE192:+SECURE128:+SUITEB128:-MD5:-SHA1:-VERS-TLS1.0:-VERS-TLS1.1:-VERS-SSL3.0"
diff --git a/net-analyzer/gvmd/files/gvmd.service.conf b/net-analyzer/gvmd/files/gvmd.service.conf
new file mode 100644
index 000000000000..5aa19bf2efd4
--- /dev/null
+++ b/net-analyzer/gvmd/files/gvmd.service.conf
@@ -0,0 +1,21 @@
+[Unit]
+After=postgresql-9.6.service
+After=postgresql-10.service
+After=postgresql-11.service
+After=postgresql-12.service
+After=postgresql-13.service
+After=postgresql-14.service
+After=postgresql-15.service
+Wants=postgresql-9.6.service
+Wants=postgresql-10.service
+Wants=postgresql-11.service
+Wants=postgresql-12.service
+Wants=postgresql-13.service
+Wants=postgresql-14.service
+Wants=postgresql-15.service
+PartOf=gvm.target
+
+[Service]
+Type=exec
+ExecStart=
+ExecStart=/usr/bin/gvmd --foreground --osp-vt-update=/run/ospd/ospd-openvas.sock --listen-group=gvm
diff --git a/net-analyzer/gvmd/gvmd-22.5.1.ebuild b/net-analyzer/gvmd/gvmd-22.5.1.ebuild
new file mode 100644
index 000000000000..22ce3ef705d4
--- /dev/null
+++ b/net-analyzer/gvmd/gvmd-22.5.1.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"
+}
diff --git a/net-analyzer/gvmd/metadata.xml b/net-analyzer/gvmd/metadata.xml
index f0294aac8dd0..362c0017dc23 100644
--- a/net-analyzer/gvmd/metadata.xml
+++ b/net-analyzer/gvmd/metadata.xml
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!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>
next reply other threads:[~2023-07-03 8:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 8:15 Florian Schmaus [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-09-13 15:03 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/gvmd/files/, net-analyzer/gvmd/ Florian Schmaus
2024-12-07 21:33 Florian Schmaus
2023-11-21 8:01 Florian Schmaus
2022-05-04 9:29 Florian Schmaus
2021-03-22 13:36 Joonas Niilola
2019-10-28 4:05 Joonas Niilola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1688372121.43b636fbcabce31bdee124d2851bf4ac8d4356ec.flow@gentoo \
--to=flow@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox