diff options
Diffstat (limited to 'net-analyzer/gsad')
-rw-r--r-- | net-analyzer/gsad/Manifest | 5 | ||||
-rw-r--r-- | net-analyzer/gsad/files/gsad-daemon.conf | 19 | ||||
-rw-r--r-- | net-analyzer/gsad/files/gsad.init | 20 | ||||
-rw-r--r-- | net-analyzer/gsad/gsad-21.4.4.ebuild | 101 | ||||
-rw-r--r-- | net-analyzer/gsad/metadata.xml | 15 |
5 files changed, 160 insertions, 0 deletions
diff --git a/net-analyzer/gsad/Manifest b/net-analyzer/gsad/Manifest new file mode 100644 index 000000000000..b427d0046904 --- /dev/null +++ b/net-analyzer/gsad/Manifest @@ -0,0 +1,5 @@ +AUX gsad-daemon.conf 416 BLAKE2B 7c6dff183ceb8afdbe7abb75333fb8aa570be406ecb18641e96d8045d793b6ef81b46acbfd243c4bb9a4bcb98cb6c039ebd0793c13855b7f5404e552a6088ef5 SHA512 7e696a3bb61310d7e8c553ed3744adb5fd60a75c83c0b9f99c76c092f78b4cf25d8b9c72b10d4a79ed501da16a27b8beddcda36f48acb550dfa01dbc19379f68 +AUX gsad.init 601 BLAKE2B 79b76f512904c55f235cc6ac1b3513f920dee9cbaaa06c115c93f7abb215302f544a8e021fe0e7a66f0d646807da75a3fc4ed68cf01e00eaaa003b1ff39c1c9e SHA512 610db173cf45de0ff907dacfabba0b6e03c6a83fda97f3b76d253a80e2353961f9ac61bfd9131561e34339075556d4930273dadef94d8f9e2f8f30f50266e44d +DIST gsad-21.4.4.tar.gz 220618 BLAKE2B 276164ce1e03a6ed211d3bdf24c7f9b5ac832c07891b34b467f61ec02c5670d5368ea3219b3cc445e4ef83fef0aee7375c89ce8008746ea7e08abf50da8fb9fd SHA512 092c8187754b3f0503e4ae6fd9c41dbd6917264668a5f8f831d40e88c7b8db6772acd354db62ac66b4af13b7c27e78516d4975f5bfede0d28001007a46c39f75 +EBUILD gsad-21.4.4.ebuild 2329 BLAKE2B 35f607bb6ca44b9a42ad60bcda84c825251453a77ef146147b0f551f6b04968cc4a38c9a3f566bd0539436761ce6ed072b5b925e98f9db74faa0698c80ff1094 SHA512 4084d98b9893a037512fc0233a908ee1ec7afbe43f1e700a45627f40291da44b17f627ea731623ab1500e4f72ab31b4b5f846d84751185dbfde82c8f946fdcea +MISC metadata.xml 475 BLAKE2B ceecec65052a8fb73f81718cd6ee3e9fbbc476abb5e2264d14b354aa7d1225921522d081e76760f78f82b626ae6b860a14cf3594cf7c35e2c2fad3eec1be450b SHA512 e1a52a2958d265c0738d0026e6791a9b928caab2e535853c127f28dccc8b2ea74de578bd216577576683b507d27ab9661262d6a56cd06cc2761caac70fed7413 diff --git a/net-analyzer/gsad/files/gsad-daemon.conf b/net-analyzer/gsad/files/gsad-daemon.conf new file mode 100644 index 000000000000..f7c7ee514e50 --- /dev/null +++ b/net-analyzer/gsad/files/gsad-daemon.conf @@ -0,0 +1,19 @@ +# Greenbone Security Assistant command args + +# e.g. --foreground | e.g. --no-redirect +GSAD_OPTIONS="--no-redirect" + +# GSAD listen adress +GSAD_LISTEN_ADDRESS="--listen=127.0.0.1" + +# GSAD listen port +GSAD_LISTEN_PORT="--port=9392" + +# GVMD listen address +GVMD_LISTEN_ADDRESS="--mlisten=127.0.0.1" + +# GVMD listen port +GVMD_LISTEN_PORT="--mport=9390" + +# TLS Settings +GSAD_GNUTLS_PRIORITIES="--gnutls-priorities=NORMAL" diff --git a/net-analyzer/gsad/files/gsad.init b/net-analyzer/gsad/files/gsad.init new file mode 100644 index 000000000000..79004c8481c5 --- /dev/null +++ b/net-analyzer/gsad/files/gsad.init @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +: ${GSAD_USER:=gvm} +: ${GSAD_GROUP:=$(id -ng ${GSAD_USER})} +: ${GSAD_TIMEOUT:=30} + +name="Greenbone Security Assistant (GSA)" +command="/usr/bin/gsad" +command_args="--foreground ${GSAD_OPTIONS} ${GSAD_LISTEN_ADDRESS} ${GSAD_LISTEN_PORT} ${GVMD_LISTEN_ADDRESS} ${GVMD_LISTEN_PORT} ${GSAD_GNUTLS_PRIORITIES}" +command_background="true" +command_user="${GSAD_USER}:${GSAD_GROUP}" +pidfile="/run/gsad.pid" +retry="${GSAD_TIMEOUT}" + +depend() { + after bootmisc + need localmount net gvmd +} diff --git a/net-analyzer/gsad/gsad-21.4.4.ebuild b/net-analyzer/gsad/gsad-21.4.4.ebuild new file mode 100644 index 000000000000..24f235b07056 --- /dev/null +++ b/net-analyzer/gsad/gsad-21.4.4.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake systemd toolchain-funcs + +DESCRIPTION="Greenbone Security Assistant" +HOMEPAGE="https://www.greenbone.net https://github.com/greenbone/gsad" +SRC_URI="https://github.com/greenbone/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="AGPL-3+" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +DEPEND=" + acct-user/gvm + dev-libs/glib:2 + dev-libs/libgcrypt:0= + dev-libs/libxml2 + dev-libs/libxslt + >=net-analyzer/gvm-libs-${PV} + net-libs/gnutls:= + net-libs/libmicrohttpd:= +" +RDEPEND=" + ${DEPEND} + >=net-analyzer/gvmd-${PV} + >=net-analyzer/gsa-${PV} + net-analyzer/ospd-openvas +" +BDEPEND=" + dev-python/polib + virtual/pkgconfig + doc? ( + app-doc/doxygen[dot] + app-doc/xmltoman + app-text/htmldoc + sys-devel/gettext + ) +" + +src_prepare() { + cmake_src_prepare + + # 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 + + # Do not install the empty /run/gsad run dir. https://github.com/greenbone/gsad/pull/54 + sed -i "/^install.*GSAD_RUN_DIR/d" CMakeLists.txt || die + + # Drop Group= directive. https://github.com/greenbone/gsad/pull/55 + sed -i "/^Group=/d" config/gsad.service.in || die +} + +src_configure() { + local mycmakeargs=( + "-DLOCALSTATEDIR=${EPREFIX}/var" + "-DSYSCONFDIR=${EPREFIX}/etc" + "-DSBINDIR=${EPREFIX}/usr/bin" + "-DGSAD_PID_DIR=/run/gsad" + "-DSYSTEMD_SERVICE_DIR=$(systemd_get_systemunitdir)" + "-DLOGROTATE_DIR=${EPREFIX}/etc/logrotate.d" + ) + cmake_src_configure +} + +src_compile() { + # setting correct PATH for finding react-js + NODE_ENV=production PATH="$PATH:${S}/gsa/node_modules/.bin/" 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 +} + +src_install() { + if use doc; then + local HTML_DOCS=( "${BUILD_DIR}/doc/generated/html/." ) + fi + cmake_src_install + + insinto /etc/gvm/sysconfig + doins "${FILESDIR}/${PN}-daemon.conf" + + newinitd "${FILESDIR}/${PN}.init" "${PN}" + newconfd "${FILESDIR}/${PN}-daemon.conf" "${PN}" +} diff --git a/net-analyzer/gsad/metadata.xml b/net-analyzer/gsad/metadata.xml new file mode 100644 index 000000000000..c68ff94a68fa --- /dev/null +++ b/net-analyzer/gsad/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>jonas.licht@gmail.com</email> + <name>Jonas Licht</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="github">greenbone/gsad</remote-id> + </upstream> +</pkgmetadata> |