public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/greenbone-security-assistant/files/, ...
@ 2019-10-28  4:05 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2019-10-28  4:05 UTC (permalink / raw
  To: gentoo-commits

commit:     b4a09896292f29a452c61a882aab111f2352106c
Author:     Hasan ÇALIŞIR <hasan.calisir <AT> psauxit <DOT> com>
AuthorDate: Mon Aug 12 17:38:49 2019 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Oct 28 04:03:04 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4a09896

net-analyzer/greenbone-security-assistant: bump to 8.0.1.

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Hasan ÇALIŞIR <hasan.calisir <AT> psauxit.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-analyzer/greenbone-security-assistant/Manifest |   2 +
 ...enbone-security-assistant-8.0.1-cmakelist.patch |  30 +++++
 .../greenbone-security-assistant-8.0.1-node.patch  |  34 ++++++
 .../greenbone-security-assistant-8.0.1-pid.patch   |  11 ++
 ...reenbone-security-assistant-8.0.1-reactjs.patch |  20 ++++
 .../greenbone-security-assistant-8.0.1-sbin.patch  |  12 ++
 ...ecurity-assistant-8.0.1-uninstall-snippet.patch |  12 ++
 .../files/gsad-daemon.conf                         |  19 +++
 .../greenbone-security-assistant/files/gsad.init   |  20 ++++
 .../files/gsad.logrotate                           |  13 +++
 .../files/gsad.service                             |  18 +++
 .../greenbone-security-assistant-8.0.1.ebuild      | 127 +++++++++++++++++++++
 .../greenbone-security-assistant/metadata.xml      |   9 ++
 13 files changed, 327 insertions(+)

diff --git a/net-analyzer/greenbone-security-assistant/Manifest b/net-analyzer/greenbone-security-assistant/Manifest
index db30d43db81..4b67fa50814 100644
--- a/net-analyzer/greenbone-security-assistant/Manifest
+++ b/net-analyzer/greenbone-security-assistant/Manifest
@@ -1 +1,3 @@
 DIST greenbone-security-assistant-7.0.3.tar.gz 2918954 BLAKE2B 4a6cd5d8378bcbb0a9df6cb5b8f6560060f15d0b0cb53d2c61692cb2bc2cd86af6e9cdeb5040c4d7020c3b016779a76ec517d54614388c62aaedd596f55fa3c4 SHA512 7e1c1ef939ba08dab3b78baf1aa9c110be2febfbed5d67eefe8110c60f5089a1af44bc26693657226f417c6bd516a4a656eb159dae2a78f878e1a1b6c222b117
+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

diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-cmakelist.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-cmakelist.patch
new file mode 100644
index 00000000000..d0fc7963a50
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-cmakelist.patch
@@ -0,0 +1,30 @@
+--- a/gsad/config/CMakeLists.txt	2019-07-18 20:39:10.331949702 +0300
++++ b/gsad/config/CMakeLists.txt	2019-07-18 20:40:18.946830294 +0300
+@@ -16,27 +16,3 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ 
+-if (NOT SYSTEMD_SERVICE_DIR)
+-  set (SYSTEMD_SERVICE_DIR "${CMAKE_INSTALL_PREFIX}/lib/systemd/system")
+-endif (NOT SYSTEMD_SERVICE_DIR)
+-
+-if (NOT DEFAULT_CONFIG_DIR)
+-  set (DEFAULT_CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/etc/default")
+-endif (NOT DEFAULT_CONFIG_DIR)
+-
+-if (NOT LOGROTATE_DIR)
+-  set (LOGROTATE_DIR "${CMAKE_INSTALL_PREFIX}/etc/logrotate.d")
+-endif (NOT LOGROTATE_DIR)
+-
+-configure_file (gsad.service.in gsad.service)
+-configure_file (gsad.logrotate.in gsad.logrotate)
+-
+-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/gsad.service
+-         DESTINATION ${SYSTEMD_SERVICE_DIR}/)
+-
+-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/gsad.default
+-         DESTINATION ${DEFAULT_CONFIG_DIR}/ RENAME gsad)
+-
+-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/gsad.logrotate
+-         DESTINATION ${LOGROTATE_DIR}/ RENAME gsad)
+-

diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-node.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-node.patch
new file mode 100644
index 00000000000..116bd48264d
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-node.patch
@@ -0,0 +1,34 @@
+--- a/gsa/CMakeLists.txt	2019-07-17 16:45:39.000000000 +0300
++++ b/gsa/CMakeLists.txt	2019-07-17 22:24:49.466906757 +0300
+@@ -1095,28 +1095,17 @@
+      ${GSA_JS_SRC_FILES}
+      PARENT_SCOPE)
+ 
+-
+-add_custom_command (OUTPUT node-modules.stamp
+-                    DEPENDS ${GSA_PKG_FILES}
+-                    COMMAND ${INSTALLER} "${INSTALLER_ARGS}" "install"
+-                    COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/node-modules.stamp
+-                    WORKING_DIRECTORY ${GSA_SRC_DIR}
+-                    COMMENT "Install gsa-ng js dependencies")
+-
+-
+ add_custom_command (OUTPUT bundle.stamp
+-                    COMMAND ${CMAKE_COMMAND} -E env REACT_APP_VERSION=${PROJECT_VERSION_STRING} ${INSTALLER} "${INSTALLER_ARGS}" run build
++                    COMMAND ${CMAKE_COMMAND} -E env REACT_APP_VERSION=${PROJECT_VERSION_STRING} ${INSTALLER} --offline run build
+                     COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/bundle.stamp
+                     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+-                    DEPENDS  ${CMAKE_CURRENT_BINARY_DIR}/node-modules.stamp
+-                             ${GSA_PKG_FILES}
++                    DEPENDS  ${GSA_PKG_FILES}
+                              ${GSA_STATIC_SRC_FILES}
+                              ${GSA_JS_SRC_FILES}
+                     COMMENT "Build gsa-ng install files")
+ 
+ add_custom_target (gsa-ng ALL
+-                   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/node-modules.stamp
+-                           ${CMAKE_CURRENT_BINARY_DIR}/bundle.stamp)
++                   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bundle.stamp)
+ 
+ set (GSA_STATIC_BUILD_FILES
+      ${GSA_BUILD_DIR}/index.html)

diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-pid.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-pid.patch
new file mode 100644
index 00000000000..a318c87225e
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-pid.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -222,7 +222,7 @@ if (NOT DATADIR)
+ endif (NOT DATADIR)
+ 
+ if (NOT GSAD_PID_DIR)
+-  set (GSAD_PID_DIR "${LOCALSTATEDIR}/run")
++  set (GSAD_PID_DIR "/run")
+ endif (NOT GSAD_PID_DIR)
+ 
+ set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas")

diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-reactjs.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-reactjs.patch
new file mode 100644
index 00000000000..19a4731db75
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-reactjs.patch
@@ -0,0 +1,20 @@
+--- a/gsa/package.json	2019-07-17 16:45:39.000000000 +0300
++++ b/gsa/package.json	2019-07-17 22:40:31.371899489 +0300
+@@ -66,12 +66,12 @@
+     "x2js": "^3.2.6"
+   },
+   "scripts": {
+-    "test": "react-scripts test",
+-    "test:coverage": "react-scripts test --coverage --maxWorkers 2",
++    "test": "NODE_ENV=production node_modules/react-scripts/bin/react-scripts.js test",
++    "test:coverage": "NODE_ENV=production node_modules/react-scripts/bin/react-scripts.js test --coverage --maxWorkers 2",
+     "lint": "eslint --max-warnings 0 src",
+-    "start": "react-scripts start",
+-    "build": "react-scripts build",
+-    "eject": "react-scripts eject"
++    "start": "NODE_ENV=production node_modules/react-scripts/bin/react-scripts.js start",
++    "build": "NODE_ENV=production node_modules/react-scripts/bin/react-scripts.js build",
++    "eject": "NODE_ENV=production node_modules/react-scripts/bin/react-scripts.js eject"
+   },
+   "devDependencies": {
+     "@types/jest": "^24.0.12",

diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-sbin.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-sbin.patch
new file mode 100644
index 00000000000..c1825ba3f5d
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-sbin.patch
@@ -0,0 +1,12 @@
+--- a/gsad/src/CMakeLists.txt	2019-07-21 23:07:38.375683800 +0300
++++ a/gsad/src/CMakeLists.txt	2019-07-21 23:08:17.301651451 +0300
+@@ -175,7 +175,7 @@
+ ## Install
+ 
+ install (TARGETS gsad
+-         RUNTIME DESTINATION ${SBINDIR}
++         RUNTIME DESTINATION ${BINDIR}
+          LIBRARY DESTINATION ${LIBDIR}
+          ARCHIVE DESTINATION ${LIBDIR}/static)
+ 
+

diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-uninstall-snippet.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-uninstall-snippet.patch
new file mode 100644
index 00000000000..3b075951aba
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-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
+@@ -1116,9 +1116,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-daemon.conf b/net-analyzer/greenbone-security-assistant/files/gsad-daemon.conf
new file mode 100644
index 00000000000..f7c7ee514e5
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/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/greenbone-security-assistant/files/gsad.init b/net-analyzer/greenbone-security-assistant/files/gsad.init
new file mode 100644
index 00000000000..6d431bd2119
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/gsad.init
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+: ${GSAD_USER:=gvm}
+: ${GSAD_GROUP:=gvm}
+: ${GSAD_TIMEOUT:=30}
+
+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_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/greenbone-security-assistant/files/gsad.logrotate b/net-analyzer/greenbone-security-assistant/files/gsad.logrotate
new file mode 100644
index 00000000000..f80bba881c7
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/gsad.logrotate
@@ -0,0 +1,13 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# Daemon ignore HUP so we use 'copytruncate' instead of 'create' 
+# with safe file size to prevent losing log entries.
+
+/var/log/gvm/gsad.log {
+	compress
+	missingok
+	notifempty
+	sharedscripts
+	copytruncate
+	maxsize 10M
+}

diff --git a/net-analyzer/greenbone-security-assistant/files/gsad.service b/net-analyzer/greenbone-security-assistant/files/gsad.service
new file mode 100644
index 00000000000..91e79187800
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/gsad.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Greenbone Security Assistant
+After=network.target
+After=openvassd.service
+After=gvmd.service
+Wants=gvmd.service
+
+[Service]
+Type=forking
+User=gvm
+Group=gvm
+EnvironmentFile=-/etc/gvm/sysconfig/gsad-daemon.conf
+ExecStart=/usr/bin/gsad $GSAD_OPTIONS $GSAD_LISTEN_ADDRESS $GSAD_LISTEN_PORT $GVMD_LISTEN_ADDRESS $GVMD_LISTEN_PORT $GSAD_GNUTLS_PRIORITIES
+Restart=always
+RestartSec=10
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-8.0.1.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-8.0.1.ebuild
new file mode 100644
index 00000000000..6177f8f1383
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-8.0.1.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+inherit cmake-utils 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/gsa/releases/download/v8.0.1/gsa-node-modules-8.0.1.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/libxslt
+	>=net-analyzer/gvm-libs-10.0.1
+	net-libs/gnutls:=
+	net-libs/libmicrohttpd[messages]"
+
+RDEPEND="
+	${DEPEND}
+	!~net-analyzer/greenbone-security-assistant-7.0.3
+	~net-analyzer/openvas-scanner-6.0.1
+	>=net-analyzer/gvmd-8.0.1"
+
+BDEPEND="
+	>=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
+		  dev-python/polib
+		  sys-devel/gettext
+	)"
+
+BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build"
+S="${WORKDIR}/${MY_PN}-${PV}"
+MY_NODE_DIR="${S}/${MY_PN}/"
+
+PATCHES=(
+	# QA fix for 8.0.0.
+	"${FILESDIR}/${P}-pid.patch"
+	# Disable yarn-fetch during compile.
+	"${FILESDIR}/${P}-node.patch"
+	# Fix react-env path for react.js.
+	"${FILESDIR}/${P}-reactjs.patch"
+	# Remove ugly uninstall-snippet that causes failing re-emerge.
+	"${FILESDIR}/${P}-uninstall-snippet.patch"
+	# Remove unnecessary install paths/files.
+	"${FILESDIR}/${P}-cmakelist.patch"
+	# Install exec. to /usr/bin instead of /usr/sbin
+	"${FILESDIR}/${P}-sbin.patch"
+)
+
+src_prepare() {
+	cmake-utils_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 8.0.1
+	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=(
+		"-DCMAKE_INSTALL_PREFIX=${EPREFIX}/usr"
+		"-DLOCALSTATEDIR=${EPREFIX}/var"
+		"-DSYSCONFDIR=${EPREFIX}/etc"
+	)
+	# Add release hardening flags for 8.0.1
+	append-cflags -D_FORTIFY_SOURCE=2 -fstack-protector
+	append-ldflags -Wl,-z,relro -Wl,-z,now
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+	if use extras; then
+		cmake-utils_src_make -C "${BUILD_DIR}" doc
+		cmake-utils_src_make doc-full -C "${BUILD_DIR}" doc
+		HTML_DOCS=( "${BUILD_DIR}/${MY_DN}/doc/generated/html/." )
+	fi
+	cmake-utils_src_make rebuild_cache
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	insinto /etc/gvm/sysconfig
+	doins "${FILESDIR}/${MY_DN}-daemon.conf"
+
+	dodir /etc/gvm/reverse-proxy
+	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 6a3196eff3b..5a350f963a3 100644
--- a/net-analyzer/greenbone-security-assistant/metadata.xml
+++ b/net-analyzer/greenbone-security-assistant/metadata.xml
@@ -12,4 +12,13 @@
 	<use>
 		<flag name="extras">Pdf results, extra fonts, html docs support</flag>
 	</use>
+	<longdescription lang="en">
+	The Greenbone Security Assistant is the web interface developed for the Greenbone Security Manager appliances.
+	It connects to the Greenbone Vulnerability Manager GVM to provide a full-featured user interface for vulnerability management.
+	Greenbone Security Assistant consists of GSA - The webpage written in React and 
+	GSAD - The HTTP server talking to the GVM daemon.
+	</longdescription>
+	<upstream>
+		<remote-id type="github">greenbone/gsa</remote-id>
+	</upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/greenbone-security-assistant/files/, ...
@ 2019-12-21 15:06 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2019-12-21 15:06 UTC (permalink / raw
  To: gentoo-commits

commit:     10e7b0c0248027ba14e30bbcda8131469e3b672b
Author:     Hasan ÇALIŞIR <hasan.calisir <AT> psauxit <DOT> com>
AuthorDate: Wed Dec 18 20:16:12 2019 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Dec 21 15:06:22 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10e7b0c0

net-analyzer/greenbone-security-assistant: drop old 7.0.3

Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Hasan ÇALIŞIR <hasan.calisir <AT> psauxit.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-analyzer/greenbone-security-assistant/Manifest |   1 -
 .../greenbone-security-assistant-7.0.3-auth.patch  | 107 ---------------------
 ...reenbone-security-assistant-7.0.3-memleak.patch |  42 --------
 .../files/gsa-daemon.conf                          |  31 ------
 .../greenbone-security-assistant/files/gsa.init    |  14 ---
 .../files/gsa.logrotate                            |   9 --
 .../greenbone-security-assistant/files/gsa.service |  19 ----
 .../files/gsa.tmpfiles.d                           |   1 -
 .../greenbone-security-assistant-7.0.3-r1.ebuild   |  92 ------------------
 9 files changed, 316 deletions(-)

diff --git a/net-analyzer/greenbone-security-assistant/Manifest b/net-analyzer/greenbone-security-assistant/Manifest
index 4b67fa50814..ff6ec73e1a9 100644
--- a/net-analyzer/greenbone-security-assistant/Manifest
+++ b/net-analyzer/greenbone-security-assistant/Manifest
@@ -1,3 +1,2 @@
-DIST greenbone-security-assistant-7.0.3.tar.gz 2918954 BLAKE2B 4a6cd5d8378bcbb0a9df6cb5b8f6560060f15d0b0cb53d2c61692cb2bc2cd86af6e9cdeb5040c4d7020c3b016779a76ec517d54614388c62aaedd596f55fa3c4 SHA512 7e1c1ef939ba08dab3b78baf1aa9c110be2febfbed5d67eefe8110c60f5089a1af44bc26693657226f417c6bd516a4a656eb159dae2a78f878e1a1b6c222b117
 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

diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-7.0.3-auth.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-7.0.3-auth.patch
deleted file mode 100644
index cce885e10e0..00000000000
--- a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-7.0.3-auth.patch
+++ /dev/null
@@ -1,107 +0,0 @@
---- gsa-7.0.3/src/gsad_omp.c	2019-02-02 03:22:19.297954361 +0300
-+++ gsa-7.0.3/src/gsad_omp.c	2019-02-02 03:27:57.690214371 +0300
-@@ -1366,7 +1366,8 @@
-           || (strstr (param_name, "_id")
-                 == param_name + strlen (param_name) - strlen ("_id"))
-           || (strcmp (param_name, "name") == 0
--              && strcasecmp (prev_action, "Run Wizard") == 0)
-+              && (strcasecmp (prev_action, "Run Wizard") == 0
-+                  || strcasecmp (next_cmd, "auth_settings") == 0))
-           || (strcmp (param_name, "get_name") == 0
-               && strcasecmp (next_cmd, "wizard_get") == 0))
-         {
-@@ -25984,7 +25976,7 @@
- 
-   html = response_from_entity (connection, credentials, params, entity,
-                                (no_redirect && strcmp (no_redirect, "0")),
--                               NULL, NULL,
-+                               NULL, "auth_settings",
-                                NULL, "modify_auth",
-                                "Save Authentication Configuration",
-                                response_data);
---- gsa-7.0.3/src/html/classic/js/greenbone.js  2018-03-28 16:23:57.000000000 +0300
-+++ gsa-7.0.3/src/html/classic/js/greenbone.js  2019-02-02 03:40:37.162714538 +0300
-@@ -1559,6 +1559,9 @@
-           if (reload === 'next') {
-             reload_next(response);
-           }
-+          else if (reload === 'window') {
-+            location.reload();
-+          }
-         },
-         function(jqXHR) {
-           if (jqXHR.status == 0 && jqXHR.readyState == 0) {
---- gsa-7.0.3/src/html/classic/omp.xsl	2018-03-28 16:23:57.000000000 +0300
-+++ gsa-7.0.3/src/html/classic/omp.xsl	2019-02-02 03:44:28.470599715 +0300
-@@ -36775,7 +36822,8 @@
- <!-- AUTHENTICATION DESCRIPTION -->
- 
- <xsl:template match="group" mode="ldapauth">
--  <div class="section-box" id="ldap-box">
-+  <div class="section-box ajax-post" id="ldap-box"
-+      data-button="form #save_button" data-reload="window">
-     <form action="/omp" method="post" enctype="multipart/form-data">
-       <input type="hidden" name="token" value="{/envelope/token}"/>
-       <input type="hidden" name="cmd" value="save_auth"/>
-@@ -36784,6 +36832,15 @@
-       <input type="hidden" name="filter" value="{gsa:envelope-filter ()}"/>
-       <!-- group name is e.g. of method:ldap -->
-       <input type="hidden" name="group" value="{@name}"/>
-+      <!-- Auth type name for next page -->
-+      <input type="hidden" name="name" value="ldap"/>
-+
-+      <div class="error-dialog">
-+        <div class="text-center">
-+          <xsl:value-of select="gsa:i18n ('LDAP authentication config could not be modified.')"/>
-+        </div>
-+      </div>
-+
-       <table class="gbntable">
-         <tr class="gbntablehead2">
-           <td><xsl:value-of select="gsa:i18n ('Setting')"/></td>
-@@ -36838,7 +36895,8 @@
-         </tr>
-         <tr>
-           <td colspan="2" style="text-align:right;">
--            <input type="submit" name="submit" value="{gsa:i18n ('Save')}"/>
-+            <input type="submit" name="submit" id="save_button"
-+                   value="{gsa:i18n ('Save')}"/>
-           </td>
-         </tr>
-       </table>
-@@ -36847,7 +36905,8 @@
- </xsl:template>
- 
- <xsl:template match="group" mode="radiusauth">
--  <div class="section-box" id="radius-box">
-+  <div class="section-box ajax-post" id="radius-box"
-+      data-button="form #save_button" data-reload="window">
-     <form action="/omp" method="post" enctype="multipart/form-data">
-       <input type="hidden" name="token" value="{/envelope/token}"/>
-       <input type="hidden" name="cmd" value="save_auth"/>
-@@ -36856,6 +36915,15 @@
-       <input type="hidden" name="filter" value="{gsa:envelope-filter ()}"/>
-       <!-- group name is e.g. of method:radius_connect -->
-       <input type="hidden" name="group" value="{@name}"/>
-+      <!-- Auth type name for next page -->
-+      <input type="hidden" name="name" value="radius"/>
-+
-+      <div class="error-dialog">
-+        <div class="text-center">
-+          <xsl:value-of select="gsa:i18n ('Radius authentication config could not be modified.')"/>
-+        </div>
-+      </div>
-+
-       <table class="gbntable">
-         <tr class="gbntablehead2">
-           <td><xsl:value-of select="gsa:i18n ('Setting')"/></td>
-@@ -36890,7 +36958,8 @@
-           </tr>
-         <tr>
-           <td colspan="2" style="text-align:right;">
--            <input type="submit" name="submit" value="{gsa:i18n ('Save')}"/>
-+            <input type="submit" name="submit" id="save_button"
-+                   value="{gsa:i18n ('Save')}"/>
-           </td>
-         </tr>
-       </table>

diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-7.0.3-memleak.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-7.0.3-memleak.patch
deleted file mode 100644
index 5132e344a79..00000000000
--- a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-7.0.3-memleak.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- gsa-7.0.3/src/gsad_omp.c	2018-03-28 16:23:57.000000000 +0300
-+++ gsa-7.0.3/src/gsad_omp.c	2019-02-02 03:12:16.617046562 +0300
-@@ -7737,16 +7738,21 @@
-   g_string_append (xml, command_escaped);
-   g_free (command_escaped);
- 
-+  response = NULL;
-   ret = omp (connection, credentials, &response, &entity, response_data,
-              command->str);
-   g_string_free (command, TRUE);
-+
-+  if (ret)
-+    {
-+      free_entity (entity);
-+      g_string_free (xml, TRUE);
-+    }
-+
-   switch (ret)
-     {
-       case 0:
-         break;
--      case -1:
--        /* 'omp' set response. */
--        return response;
-       case 1:
-         response_data->http_status_code = MHD_HTTP_INTERNAL_SERVER_ERROR;
-         return gsad_message (credentials,
-@@ -7770,10 +7776,14 @@
-                              "/omp?cmd=get_tasks", response_data);
-     }
- 
-+  if (omp_success (entity) == 0)
-+    set_http_status_from_entity (entity, response_data);
-   g_string_append (xml, response);
- 
-   g_string_append (xml, "</get_aggregate>");
- 
-+  free_entity (entity);
-+  g_free (response);
-   return xsl_transform_omp (connection, credentials, params,
-                             g_string_free (xml, FALSE), response_data);
- }

diff --git a/net-analyzer/greenbone-security-assistant/files/gsa-daemon.conf b/net-analyzer/greenbone-security-assistant/files/gsa-daemon.conf
deleted file mode 100644
index 2c9a62eef81..00000000000
--- a/net-analyzer/greenbone-security-assistant/files/gsa-daemon.conf
+++ /dev/null
@@ -1,31 +0,0 @@
-# OpenVAS Security Assistant command args
-# man page --> https://www.mankier.com/8/gsad
-
-# e.g. --foreground | e.g. --no-redirect -- > Don't listen port 80 anymore
-OPENVAS_SECURITY_ASSISTANT_OPTIONS="--no-redirect"
-
-# WebUI adress
-OPENVAS_SECURITY_ASSISTANT_LISTEN_ADDRESS="--listen=127.0.0.1"
-
-# WebUI Port
-OPENVAS_SECURITY_ASSISTANT_LISTEN_PORT="--port=9392"
-
-# WebUI Manager Address
-OPENVAS_SECURITY_ASSISTANT_MANAGER_LISTEN_ADDRESS="--mlisten=127.0.0.1"
-
-# WebUI Manager Port
-OPENVAS_SECURITY_ASSISTANT_MANAGER_LISTEN_PORT="--mport=9390"
-
-# TLS Settings
-OPENVAS_SECURITY_ASSISTANT_GNUTLS_PRIORITIES="--gnutls-priorities=NORMAL"
-
-# If you use reverse proxy you must set OPENVAS_REVERSE_PROXY daemon arg
-# otherwise you will get the below error.
-# --------------------------------------------------------------- 
-# The request contained an unknown or invalid Host header. 
-# If you are trying to access GSA via its hostname or a proxy, 
-# make sure GSA is set up to allow it.
-# ---------------------------------------------------------------
-
-# Reverse Proxy Settings ( e.g. --allow-header-host=subdomain.example.com )
-OPENVAS_REVERSE_PROXY="--allow-header-host="

diff --git a/net-analyzer/greenbone-security-assistant/files/gsa.init b/net-analyzer/greenbone-security-assistant/files/gsa.init
deleted file mode 100644
index 2b463642242..00000000000
--- a/net-analyzer/greenbone-security-assistant/files/gsa.init
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-name="Greenbone Security Assistant Daemon"
-command="/usr/sbin/gsad"
-command_args="${OPENVAS_SECURITY_ASSISTANT_OPTIONS} ${OPENVAS_SECURITY_ASSISTANT_LISTEN_ADDRESS} ${OPENVAS_SECURITY_ASSISTANT_LISTEN_PORT} ${OPENVAS_SECURITY_ASSISTANT_MANAGER_LISTEN_ADDRESS} ${OPENVAS_SECURITY_ASSISTANT_MANAGER_LISTEN_PORT} ${OPENVAS_SECURITY_ASSISTANT_GNUTLS_PRIORITIES} ${OPENVAS_REVERSE_PROXY}"
-pidfile="/var/run/gsad.pid"
-command_background="true"
-
-depend() {
-	after bootmisc
-	need localmount net openvas-scanner gvmd
-}

diff --git a/net-analyzer/greenbone-security-assistant/files/gsa.logrotate b/net-analyzer/greenbone-security-assistant/files/gsa.logrotate
deleted file mode 100644
index 79e54e85431..00000000000
--- a/net-analyzer/greenbone-security-assistant/files/gsa.logrotate
+++ /dev/null
@@ -1,9 +0,0 @@
-# logrotate for openvas security agent
-/var/log/openvas/gsad.log {
-	daily
-	rotate 7
-	compress
-	missingok
-	notifempty
-	sharedscripts
-}

diff --git a/net-analyzer/greenbone-security-assistant/files/gsa.service b/net-analyzer/greenbone-security-assistant/files/gsa.service
deleted file mode 100644
index bc8c1d9e285..00000000000
--- a/net-analyzer/greenbone-security-assistant/files/gsa.service
+++ /dev/null
@@ -1,19 +0,0 @@
-[Unit]
-Description=OpenVAS Manager
-After=network.target
-After=openvas-scanner.service
-After=gvmd.service
-Wants=gvmd.service
-
-[Service]
-Type=forking
-EnvironmentFile=-/etc/openvas/sysconfig/gsa-daemon.conf
-ExecStart=/usr/sbin/gsad $OPENVAS_SECURITY_ASSISTANT_OPTIONS $OPENVAS_SECURITY_ASSISTANT_LISTEN_ADDRESS $OPENVAS_SECURITY_ASSISTANT_LISTEN_PORT $OPENVAS_SECURITY_ASSISTANT_MANAGER_LISTEN_ADDRESS $OPENVAS_SECURITY_ASSISTANT_MANAGER_LISTEN_PORT $OPENVAS_SECURITY_ASSISTANT_GNUTLS_PRIORITIES $OPENVAS_REVERSE_PROXY
-ExecReload=/bin/kill -HUP $MAINPID
-KillMode=mixed
-User=root
-Group=root
-TimeoutSec=1200
-
-[Install]
-WantedBy=multi-user.target

diff --git a/net-analyzer/greenbone-security-assistant/files/gsa.tmpfiles.d b/net-analyzer/greenbone-security-assistant/files/gsa.tmpfiles.d
deleted file mode 100644
index 18e820caec1..00000000000
--- a/net-analyzer/greenbone-security-assistant/files/gsa.tmpfiles.d
+++ /dev/null
@@ -1 +0,0 @@
-d	/var/cache/openvassd 0775

diff --git a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-7.0.3-r1.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-7.0.3-r1.ebuild
deleted file mode 100644
index 6fc3cbaf527..00000000000
--- a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-7.0.3-r1.ebuild
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-CMAKE_MAKEFILE_GENERATOR="emake"
-inherit cmake-utils systemd
-MY_PN="gsa"
-
-DESCRIPTION="Greenbone Security Assistant for OpenVAS"
-HOMEPAGE="http://www.openvas.org/"
-SRC_URI="https://github.com/greenbone/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-SLOT="0"
-LICENSE="GPL-2+ BSD MIT"
-KEYWORDS="~amd64 ~x86"
-IUSE="extras"
-
-DEPEND="
-	dev-libs/libgcrypt:0=
-	dev-libs/libxml2:2
-	dev-libs/libxslt
-	>=net-analyzer/openvas-libraries-9.0.3
-	net-libs/gnutls:=[tools]
-	net-libs/libmicrohttpd[messages]
-	extras? ( dev-python/polib )"
-
-RDEPEND="
-	${DEPEND}
-	~net-analyzer/openvas-scanner-5.1.3
-	>=net-analyzer/openvas-manager-7.0.3
-	extras? ( dev-texlive/texlive-latexextra )"
-
-BDEPEND="
-	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}"
-
-PATCHES=(
-	"${FILESDIR}/${P}-memleak.patch"
-	"${FILESDIR}/${P}-auth.patch"
-)
-
-src_prepare() {
-	cmake-utils_src_prepare
-	if use extras; then
-		doxygen -u "$S"/doc/Doxyfile_full.in || die
-	fi
-}
-
-src_configure() {
-	local mycmakeargs=(
-		"-DCMAKE_INSTALL_PREFIX=${EPREFIX}/usr"
-		"-DLOCALSTATEDIR=${EPREFIX}/var"
-		"-DSYSCONFDIR=${EPREFIX}/etc"
-	)
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-	if use extras; then
-		cmake-utils_src_make -C "${BUILD_DIR}" doc
-		cmake-utils_src_make doc-full -C "${BUILD_DIR}" doc
-		HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. )
-	fi
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	insinto /etc/openvas/sysconfig
-	doins "${FILESDIR}"/${MY_PN}-daemon.conf
-
-	insinto /etc/openvas/reverse-proxy
-	doins "${FILESDIR}"/gsa.nginx.reverse.proxy.example
-
-	newinitd "${FILESDIR}/${MY_PN}.init" ${MY_PN}
-	newconfd "${FILESDIR}/${MY_PN}-daemon.conf" ${MY_PN}
-
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}/${MY_PN}.logrotate" ${MY_PN}
-
-	systemd_newtmpfilesd "${FILESDIR}/${MY_PN}.tmpfiles.d" ${MY_PN}.conf
-	systemd_dounit "${FILESDIR}"/${MY_PN}.service
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/greenbone-security-assistant/files/, ...
@ 2020-03-25 13:46 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2020-03-25 13:46 UTC (permalink / raw
  To: gentoo-commits

commit:     371036381990af1d1ae2f78f3988e02b4acab217
Author:     Jonas Licht <jonas.licht <AT> fem <DOT> tu-ilmenau <DOT> de>
AuthorDate: Tue Mar 10 20:40:35 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Mar 25 13:45:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37103638

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 <AT> fem.tu-ilmenau.de>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-analyzer/greenbone-security-assistant/Manifest |   2 +
 ...ecurity-assistant-9.0.0-uninstall-snippet.patch |  12 ++
 .../greenbone-security-assistant/files/gsad.init   |   4 +-
 .../greenbone-security-assistant-9.0.0.ebuild      | 122 +++++++++++++++++++++
 .../greenbone-security-assistant/metadata.xml      |   9 +-
 5 files changed, 146 insertions(+), 3 deletions(-)

diff --git a/net-analyzer/greenbone-security-assistant/Manifest b/net-analyzer/greenbone-security-assistant/Manifest
index ff6ec73e1a9..df14862f3ba 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 00000000000..8622fd81067
--- /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 6d431bd2119..7dc4b82afa7 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 00000000000..d4ec6d1546f
--- /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 cf14cff0b40..f6df02262b8 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>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/greenbone-security-assistant/files/, ...
@ 2020-07-14 12:57 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2020-07-14 12:57 UTC (permalink / raw
  To: gentoo-commits

commit:     e9684683cd13f534875f5d4a63c6af937632ad96
Author:     Jonas Licht <jonas.licht <AT> fem <DOT> tu-ilmenau <DOT> de>
AuthorDate: Mon Jun 29 15:47:43 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Jul 14 12:57:07 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9684683

net-analyzer/greenbone-security-assistant: Version bump to 9.0.1

Closes: https://bugs.gentoo.org/725904
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Jonas Licht <jonas.licht <AT> fem.tu-ilmenau.de>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-analyzer/greenbone-security-assistant/Manifest |   2 +
 ...ecurity-assistant-9.0.1-uninstall-snippet.patch |  12 ++
 .../greenbone-security-assistant-9.0.1.ebuild      | 122 +++++++++++++++++++++
 3 files changed, 136 insertions(+)

diff --git a/net-analyzer/greenbone-security-assistant/Manifest b/net-analyzer/greenbone-security-assistant/Manifest
index df14862f3ba..6ac17399724 100644
--- a/net-analyzer/greenbone-security-assistant/Manifest
+++ b/net-analyzer/greenbone-security-assistant/Manifest
@@ -2,3 +2,5 @@ DIST greenbone-security-assistant-8.0.1-node_modules.tar.gz 34084175 BLAKE2B 17c
 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
+DIST greenbone-security-assistant-9.0.1-node_modules.tar.gz 44176347 BLAKE2B c8d1195ddc8167ff7a228a4e013c6139524e8527310c65529d37de8fe5e984379ba783e10544caf81ac801ceb1199ad7249c96a0e6032ade8a519068e6cefb42 SHA512 1718f97d330f7868afe34bf172699b8aa8ce795dc2e4a6f20b28135434623a68022c36310e381bd55bacbb621fd9bf5c8595c8030f5d3dc32bb427cc2febd028
+DIST greenbone-security-assistant-9.0.1.tar.gz 1936391 BLAKE2B 22b9020a97e79b31555d66826740ca49d1eba5d55324f0e80349dc571a7b45bcf2c6403ac311e78f742c51900921f3e61ef0740f11fd794069242e2ab21b1c3e SHA512 688bde97722f31416406e43230253c05dc8d05eb9fea6d8fd084ec4e748b67bab238f78cc11534e4fc948d911e468d43b5be0b224f17959db5e59faae7f5d086

diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.1-uninstall-snippet.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.1-uninstall-snippet.patch
new file mode 100644
index 00000000000..8622fd81067
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.1-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/greenbone-security-assistant-9.0.1.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.1.ebuild
new file mode 100644
index 00000000000..552948dc9d4
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.1.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-11.0.1
+	net-libs/gnutls:=
+	net-libs/libmicrohttpd"
+
+RDEPEND="
+	${DEPEND}
+	>=net-analyzer/gvmd-9.0.1
+	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"
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/greenbone-security-assistant/files/, ...
@ 2021-01-21  7:14 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2021-01-21  7:14 UTC (permalink / raw
  To: gentoo-commits

commit:     783b1340e4d8f2f82960e52a1d001c6329612427
Author:     Jonas Licht <jonas.licht <AT> fem <DOT> tu-ilmenau <DOT> de>
AuthorDate: Thu Jan  7 17:08:25 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Jan 21 07:08:30 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=783b1340

net-analyzer/greenbone-security-assistant: add glibc patch in 9.0.1

Bug: https://bugs.gentoo.org/751592
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Jonas Licht <jonas.licht <AT> fem.tu-ilmenau.de>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../greenbone-security-assistant-9.0.1-glibc_siglist.patch | 14 ++++++++++++++
 .../greenbone-security-assistant-9.0.1.ebuild              |  4 +++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.1-glibc_siglist.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.1-glibc_siglist.patch
new file mode 100644
index 00000000000..f9f587c96c8
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.1-glibc_siglist.patch
@@ -0,0 +1,14 @@
+#-------------------------------------------------------------------
+#     compatibility with glibc 2.32 version #751592
+#-------------------------------------------------------------------
+--- ./gsad/src/gsad.c	2020-05-13 09:22:13.000000000 +0200
++++ ./gsad/src/gsad.c	2020-10-28 13:07:25.127222254 +0100
+@@ -3318,7 +3318,7 @@
+     {
+       if (termination_signal)
+         {
+-          g_debug ("Received %s signal.\n", sys_siglist[termination_signal]);
++          g_debug ("Received %s signal.\n", strsignal(termination_signal));
+           gsad_cleanup ();
+           /* Raise signal again, to exit with the correct return value. */
+           signal (termination_signal, SIG_DFL);

diff --git a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.1.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.1.ebuild
index 552948dc9d4..a0621ef2652 100644
--- a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.1.ebuild
+++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -54,6 +54,8 @@ PATCHES=(
 	"${FILESDIR}/${PN}-8.0.1-node.patch"
 	# Remove ugly uninstall-snippet that causes failing re-emerge.
 	"${FILESDIR}/${P}-uninstall-snippet.patch"
+	# Replace deprecated glibc sys_siglist with strsignal
+	"${FILESDIR}/${P}-glibc_siglist.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/greenbone-security-assistant/files/, ...
@ 2021-03-22 13:36 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2021-03-22 13:36 UTC (permalink / raw
  To: gentoo-commits

commit:     5a9952ea7b07f818167215b6522d257851fcc625
Author:     Jonas Licht <jonas.licht <AT> fem <DOT> tu-ilmenau <DOT> de>
AuthorDate: Thu Mar 18 22:11:20 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Mar 22 13:33:55 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a9952ea

net-analyzer/greenbone-security-assistant: version bump to 20.8.1

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Jonas Licht <jonas.licht <AT> fem.tu-ilmenau.de>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-analyzer/greenbone-security-assistant/Manifest |   2 +
 .../greenbone-security-assistant-20.8.1-node.patch |  47 ++++++++
 .../greenbone-security-assistant-20.8.1.ebuild     | 123 +++++++++++++++++++++
 3 files changed, 172 insertions(+)

diff --git a/net-analyzer/greenbone-security-assistant/Manifest b/net-analyzer/greenbone-security-assistant/Manifest
index d46d8a5a635..a58a52bdcbc 100644
--- a/net-analyzer/greenbone-security-assistant/Manifest
+++ b/net-analyzer/greenbone-security-assistant/Manifest
@@ -1,2 +1,4 @@
+DIST greenbone-security-assistant-20.8.1-node_modules.tar.gz 56048261 BLAKE2B feb9c8bc1f6675f9cfe0914acc2afbd8dc69a0445f198f893c4dcd73364404491541fb5c81980b627c741ba58621d26f4a1c4c07d18dc89d9c0050739352e0fc SHA512 2fa731aa0037b1c5e24ae34afa1d1dd1519ca8fac7af9dbd6d00486fa2ecab6fecfebe0864bc7f0ac38bfc0443c7ea05b85b3dbe75d891af4f5544bc80601c46
+DIST greenbone-security-assistant-20.8.1.tar.gz 2136158 BLAKE2B 769b9fc10879f866bc6c17cecf35a33d1a8813fbfacac16f1a97f1f58f1545c4e3997880642e5306b782c74c5515a11f527d31526ae4224d037a6c5e06fb0241 SHA512 85a96d59317bedfbe748b02b71fcf5f931f049d1ca688e3d4e87e701f14cd39ec4320621689f3a9f6b91fc1cf4e25c422df4d9b4675a7bcfed330b431b64d3ef
 DIST greenbone-security-assistant-9.0.1-node_modules.tar.gz 44176347 BLAKE2B c8d1195ddc8167ff7a228a4e013c6139524e8527310c65529d37de8fe5e984379ba783e10544caf81ac801ceb1199ad7249c96a0e6032ade8a519068e6cefb42 SHA512 1718f97d330f7868afe34bf172699b8aa8ce795dc2e4a6f20b28135434623a68022c36310e381bd55bacbb621fd9bf5c8595c8030f5d3dc32bb427cc2febd028
 DIST greenbone-security-assistant-9.0.1.tar.gz 1936391 BLAKE2B 22b9020a97e79b31555d66826740ca49d1eba5d55324f0e80349dc571a7b45bcf2c6403ac311e78f742c51900921f3e61ef0740f11fd794069242e2ab21b1c3e SHA512 688bde97722f31416406e43230253c05dc8d05eb9fea6d8fd084ec4e748b67bab238f78cc11534e4fc948d911e468d43b5be0b224f17959db5e59faae7f5d086

diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-20.8.1-node.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-20.8.1-node.patch
new file mode 100644
index 00000000000..c39a66c5405
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-20.8.1-node.patch
@@ -0,0 +1,47 @@
+diff --git a/gsa/CMakeLists.txt b/gsa/CMakeLists.txt
+index db597d390..d30e33ec1 100644
+--- a/gsa/CMakeLists.txt
++++ b/gsa/CMakeLists.txt
+@@ -1176,29 +1176,17 @@ set (GSA_JS_SRC_FILES
+      ${GSA_SRC_DIR}/src/web/wizard/taskwizard.js
+      )
+ 
+-
+-
+-add_custom_command (OUTPUT node-modules.stamp
+-                    DEPENDS ${GSA_PKG_FILES}
+-                    COMMAND ${INSTALLER} "${INSTALLER_ARGS}" "install"
+-                    COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/node-modules.stamp
+-                    WORKING_DIRECTORY ${GSA_SRC_DIR}
+-                    COMMENT "Install gsa js dependencies")
+-
+-
+ add_custom_command (OUTPUT bundle.stamp
+-                    COMMAND ${CMAKE_COMMAND} -E env REACT_APP_VERSION=${PROJECT_VERSION_STRING} ${INSTALLER} "${INSTALLER_ARGS}" run build
++                    COMMAND ${CMAKE_COMMAND} -E env REACT_APP_VERSION=${PROJECT_VERSION_STRING} ${INSTALLER} --offline run build
+                     COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/bundle.stamp
+                     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+-                    DEPENDS  ${CMAKE_CURRENT_BINARY_DIR}/node-modules.stamp
+-                             ${GSA_PKG_FILES}
++                    DEPENDS  ${GSA_PKG_FILES}
+                              ${GSA_STATIC_SRC_FILES}
+                              ${GSA_JS_SRC_FILES}
+                     COMMENT "Build gsa install files")
+ 
+ add_custom_target (gsa ALL
+-                   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/node-modules.stamp
+-                           ${CMAKE_CURRENT_BINARY_DIR}/bundle.stamp)
++                   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bundle.stamp)
+ 
+ set (GSA_STATIC_BUILD_FILES
+      ${GSA_BUILD_DIR}/index.html)
+@@ -1209,9 +1197,6 @@ install (FILES ${GSA_STATIC_BUILD_FILES}
+ 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/greenbone-security-assistant-20.8.1.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-20.8.1.ebuild
new file mode 100644
index 00000000000..2d64966d2e0
--- /dev/null
+++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-20.8.1.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2021 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/ https://github.com/greenbone/gsa"
+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="
+	acct-group/gvm
+	acct-user/gvm
+	dev-libs/libgcrypt:0=
+	dev-libs/libxml2
+	dev-libs/libxslt
+	>=net-analyzer/gvm-libs-20.8.0
+	net-libs/gnutls:=
+	net-libs/libmicrohttpd"
+
+RDEPEND="
+	${DEPEND}
+	>=net-analyzer/gvmd-20.8.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.
+	# AND Remove ugly uninstall-snippet that causes failing re-emerge.
+	"${FILESDIR}/${P}-node.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"
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-22 13:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-28  4:05 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/greenbone-security-assistant/files/, Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2019-12-21 15:06 Joonas Niilola
2020-03-25 13:46 Joonas Niilola
2020-07-14 12:57 Joonas Niilola
2021-01-21  7:14 Joonas Niilola
2021-03-22 13:36 Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox