summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Licht <jonas.licht@fem.tu-ilmenau.de>2020-03-10 21:40:35 +0100
committerJoonas Niilola <juippis@gentoo.org>2020-03-25 15:45:25 +0200
commit371036381990af1d1ae2f78f3988e02b4acab217 (patch)
tree54c2923e58c4aa7cef34d0c08eb9e7de8cda2301
parentnet-analyzer/gvmd: Version Bump to 9.0.0 (diff)
downloadgentoo-371036381990af1d1ae2f78f3988e02b4acab217.tar.gz
gentoo-371036381990af1d1ae2f78f3988e02b4acab217.tar.bz2
gentoo-371036381990af1d1ae2f78f3988e02b4acab217.zip
net-analyzer/greenbone-security-assistant: Version Bump to 9.0.0
Bug: https://bugs.gentoo.org/712086 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Jonas Licht <jonas.licht@fem.tu-ilmenau.de> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--net-analyzer/greenbone-security-assistant/Manifest2
-rw-r--r--net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.0-uninstall-snippet.patch12
-rw-r--r--net-analyzer/greenbone-security-assistant/files/gsad.init4
-rw-r--r--net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.0.ebuild122
-rw-r--r--net-analyzer/greenbone-security-assistant/metadata.xml9
5 files changed, 146 insertions, 3 deletions
diff --git a/net-analyzer/greenbone-security-assistant/Manifest b/net-analyzer/greenbone-security-assistant/Manifest
index ff6ec73e1a93..df14862f3ba3 100644
--- a/net-analyzer/greenbone-security-assistant/Manifest
+++ b/net-analyzer/greenbone-security-assistant/Manifest
@@ -1,2 +1,4 @@
DIST greenbone-security-assistant-8.0.1-node_modules.tar.gz 34084175 BLAKE2B 17c9e24961b63b957f932e4c5970113499ad65655b42e624284fb22a495d50c12e5f8289da4e17db717885b65909a6e18213fa312052c9c06c9bdc37816204f1 SHA512 552ea55fe218ae2345fa45b43af349825f255ccd86137dd245679efe6abc805d16c4ced3599f644d9b9f2686047b486d5e0c8aa4eaa0cbbf13157b9e2dbc8cc2
DIST greenbone-security-assistant-8.0.1.tar.gz 1558918 BLAKE2B 75287784ed215300cfb30101d39b06b134092ca2d4311bcca976be23cc289529c6a8d661b99cb28e890c68f27e93a9259681add067749a772b7e3aea28761f3b SHA512 b91c1c4b8073c3ad3d3d636abbaa7881393f1448eae7366636ff618391c199c240e6bc4c848740a4267b4142aa872fb91c0798b8034d152d16016e650fbda2b8
+DIST greenbone-security-assistant-9.0.0-node_modules.tar.gz 52811832 BLAKE2B e4d0f77722158b2fddfea55e8238abcc46de6aa821b81ca59087a0fc0a0c1383b9ce876a31d8f133cca53d9a81962a80925d5b26e036b09b3c3e7ef64edc3a29 SHA512 1bb3b338ac71c16375be6518fe371c1d8037de34067be9ecf1b423e5ac649825b2cbd36a29c43a3cc0b2b622a9b64ca356c4d073bbdf74b07c74953457f0b268
+DIST greenbone-security-assistant-9.0.0.tar.gz 1807537 BLAKE2B 00690e4f6dd1078a79c9309e19c751a6f31b856a2de762e0f1d0e8ce8601c82351b059a8995a9051a6fc1061d3ae9bf27c49fcaef6e76d3837f308eef06bf79f SHA512 5f2b955408e0231b96f4b2415df0c76e9003079acd65b9e1c771082999540121ff92a8c17d9529362be8f7fc632d91bd3f48854a5a2d9632efe10fb354361d8e
diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.0-uninstall-snippet.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.0-uninstall-snippet.patch
new file mode 100644
index 000000000000..8622fd810674
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.0-uninstall-snippet.patch
@@ -0,0 +1,12 @@
+--- a/gsa/CMakeLists.txt 2019-07-18 23:14:04.639202986 +0300
++++ b/gsa/CMakeLists.txt 2019-07-18 23:21:54.568052589 +0300
+@@ -1164,9 +1164,6 @@
+ install (FILES public/robots.txt
+ DESTINATION ${GSA_DEST_DIR})
+
+-# remove old generated files
+-install (CODE "file(REMOVE_RECURSE ${GSA_DEST_DIR}/static)")
+-
+ install (DIRECTORY
+ ${GSA_BUILD_DIR}/static
+ ${GSA_BUILD_DIR}/img
diff --git a/net-analyzer/greenbone-security-assistant/files/gsad.init b/net-analyzer/greenbone-security-assistant/files/gsad.init
index 6d431bd21196..7dc4b82afa78 100644
--- a/net-analyzer/greenbone-security-assistant/files/gsad.init
+++ b/net-analyzer/greenbone-security-assistant/files/gsad.init
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
: ${GSAD_USER:=gvm}
@@ -8,7 +8,7 @@
name="Greenbone Security Assistant (GSA)"
command="/usr/bin/gsad"
-command_args="${GSAD_OPTIONS} ${GSAD_LISTEN_ADDRESS} ${GSAD_LISTEN_PORT} ${GVMD_LISTEN_ADDRESS} ${GVMD_LISTEN_PORT} ${GSAD_GNUTLS_PRIORITIES}"
+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"
diff --git a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.0.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.0.ebuild
new file mode 100644
index 000000000000..d4ec6d1546fd
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.0.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+inherit cmake flag-o-matic systemd toolchain-funcs
+
+MY_PN="gsa"
+MY_DN="gsad"
+MY_NODE_N="node_modules"
+
+DESCRIPTION="Greenbone Security Assistant"
+HOMEPAGE="https://www.greenbone.net/en/"
+SRC_URI="https://github.com/greenbone/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+https://github.com/greenbone/${MY_PN}/releases/download/v${PV}/gsa-node-modules-${PV}.tar.gz -> ${P}-${MY_NODE_N}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2+"
+KEYWORDS="~amd64 ~x86"
+IUSE="extras"
+
+DEPEND="
+ dev-libs/libgcrypt:0=
+ dev-libs/libxml2
+ dev-libs/libxslt
+ >=net-analyzer/gvm-libs-10.0.1
+ net-libs/gnutls:=
+ net-libs/libmicrohttpd"
+
+RDEPEND="
+ ${DEPEND}
+ >=net-analyzer/gvmd-9.0.0
+ net-analyzer/ospd-openvas"
+
+BDEPEND="
+ dev-python/polib
+ >=net-libs/nodejs-8.12.0
+ >=sys-apps/yarn-1.15.2
+ virtual/pkgconfig
+ extras? (
+ app-doc/doxygen[dot]
+ app-doc/xmltoman
+ app-text/htmldoc
+ sys-devel/gettext
+ )"
+
+BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build"
+S="${WORKDIR}/${MY_PN}-${PV}"
+MY_NODE_DIR="${S}/${MY_PN}/"
+
+PATCHES=(
+ # Disable yarn-fetch during compile.
+ "${FILESDIR}/${PN}-8.0.1-node.patch"
+ # Remove ugly uninstall-snippet that causes failing re-emerge.
+ "${FILESDIR}/${P}-uninstall-snippet.patch"
+)
+
+src_prepare() {
+ cmake_src_prepare
+ # We will use pre-generated npm stuff.
+ mv "${WORKDIR}/${MY_NODE_N}" "${MY_NODE_DIR}" || die "couldn't move node_modules"
+ # Update .yarnrc accordingly.
+ echo "--modules-folder ${MY_NODE_DIR}" >> "${S}/${MY_PN}/.yarnrc" || die "echo failed"
+ # QA-Fix | Remove !CLANG doxygen warnings for 9.0.0
+ if use extras; then
+ if ! tc-is-clang; then
+ local f
+ for f in gsad/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"
+ "-DSBINDIR=${EPREFIX}/usr/bin"
+ "-DGSAD_PID_DIR=${EPREFIX}/run/"
+ "-DDEFAULT_CONFIG_DIR=${EPREFIX}/etc/default"
+ "-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 extras; then
+ cmake_build -C "${BUILD_DIR}" doc
+ cmake_build doc-full -C "${BUILD_DIR}" doc
+ fi
+ cmake_build rebuild_cache
+}
+
+src_install() {
+ if use extras; then
+ local HTML_DOCS=( "${BUILD_DIR}/${MY_DN}/doc/generated/html/." )
+ fi
+ cmake_src_install
+
+ insinto /etc/gvm/sysconfig
+ doins "${FILESDIR}/${MY_DN}-daemon.conf"
+
+ insinto /etc/gvm/reverse-proxy
+ doins "${FILESDIR}/${MY_PN}.nginx.reverse.proxy.example"
+ fowners -R gvm:gvm /etc/gvm
+
+ newinitd "${FILESDIR}/${MY_DN}.init" "${MY_DN}"
+ newconfd "${FILESDIR}/${MY_DN}-daemon.conf" "${MY_DN}"
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${MY_DN}.logrotate" "${MY_DN}"
+
+ systemd_dounit "${FILESDIR}/${MY_DN}.service"
+}
diff --git a/net-analyzer/greenbone-security-assistant/metadata.xml b/net-analyzer/greenbone-security-assistant/metadata.xml
index cf14cff0b404..f6df02262b86 100644
--- a/net-analyzer/greenbone-security-assistant/metadata.xml
+++ b/net-analyzer/greenbone-security-assistant/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person">
+ <email>jonas.licht@gmail.com</email>
+ <name>Jonas Licht</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<use>
<flag name="extras">Pdf results, extra fonts, html docs support</flag>
</use>