Diff greenbone-security-assistant-8.0.1-r1 with a greenbone-security-assistant-9.0.0

/usr/portage/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.0.ebuild 2020-03-25 17:09:00.000000000 +0300
13 13
DESCRIPTION="Greenbone Security Assistant"
14 14
HOMEPAGE="https://www.greenbone.net/en/"
15 15
SRC_URI="https://github.com/greenbone/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
16
	 https://github.com/greenbone/gsa/releases/download/v8.0.1/gsa-node-modules-8.0.1.tar.gz -> ${P}-${MY_NODE_N}.tar.gz"
16
https://github.com/greenbone/${MY_PN}/releases/download/v${PV}/gsa-node-modules-${PV}.tar.gz -> ${P}-${MY_NODE_N}.tar.gz"
17 17

  
18 18
SLOT="0"
19 19
LICENSE="GPL-2+"
......
22 22

  
23 23
DEPEND="
24 24
	dev-libs/libgcrypt:0=
25
	dev-libs/libxml2
25 26
	dev-libs/libxslt
26 27
	>=net-analyzer/gvm-libs-10.0.1
27 28
	net-libs/gnutls:=
......
29 30

  
30 31
RDEPEND="
31 32
	${DEPEND}
32
	~net-analyzer/openvas-scanner-6.0.1
33
	>=net-analyzer/gvmd-8.0.1"
33
	>=net-analyzer/gvmd-9.0.0
34
	net-analyzer/ospd-openvas"
34 35

  
35 36
BDEPEND="
37
	dev-python/polib
36 38
	>=net-libs/nodejs-8.12.0
37 39
	>=sys-apps/yarn-1.15.2
38 40
	virtual/pkgconfig
39
	extras? ( app-doc/doxygen[dot]
40
		  app-doc/xmltoman
41
		  app-text/htmldoc
42
		  dev-python/polib
43
		  sys-devel/gettext
41
	extras? (
42
		app-doc/doxygen[dot]
43
		app-doc/xmltoman
44
		app-text/htmldoc
45
		sys-devel/gettext
44 46
	)"
45 47

  
46 48
BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build"
......
48 50
MY_NODE_DIR="${S}/${MY_PN}/"
49 51

  
50 52
PATCHES=(
51
	# QA fix for 8.0.0.
52
	"${FILESDIR}/${P}-pid.patch"
53 53
	# Disable yarn-fetch during compile.
54
	"${FILESDIR}/${P}-node.patch"
55
	# Fix react-env path for react.js.
56
	"${FILESDIR}/${P}-reactjs.patch"
54
	"${FILESDIR}/${PN}-8.0.1-node.patch"
57 55
	# Remove ugly uninstall-snippet that causes failing re-emerge.
58 56
	"${FILESDIR}/${P}-uninstall-snippet.patch"
59
	# Remove unnecessary install paths/files.
60
	"${FILESDIR}/${P}-cmakelist.patch"
61
	# Install exec. to /usr/bin instead of /usr/sbin
62
	"${FILESDIR}/${P}-sbin.patch"
63 57
)
64 58

  
65 59
src_prepare() {
......
68 62
	mv "${WORKDIR}/${MY_NODE_N}" "${MY_NODE_DIR}" || die "couldn't move node_modules"
69 63
	# Update .yarnrc accordingly.
70 64
	echo "--modules-folder ${MY_NODE_DIR}" >> "${S}/${MY_PN}/.yarnrc" || die "echo failed"
71
	# QA-Fix | Remove !CLANG doxygen warnings for 8.0.1
65
	# QA-Fix | Remove !CLANG doxygen warnings for 9.0.0
72 66
	if use extras; then
73 67
		if ! tc-is-clang; then
74 68
		   local f
......
87 81
	local mycmakeargs=(
88 82
		"-DLOCALSTATEDIR=${EPREFIX}/var"
89 83
		"-DSYSCONFDIR=${EPREFIX}/etc"
84
		"-DSBINDIR=${EPREFIX}/usr/bin"
85
		"-DGSAD_PID_DIR=${EPREFIX}/run/"
86
		"-DDEFAULT_CONFIG_DIR=${EPREFIX}/etc/default"
87
		"-DLOGROTATE_DIR=${EPREFIX}/etc/logrotate.d"
90 88
	)
91
	# Add release hardening flags for 8.0.1
92
	append-cflags -D_FORTIFY_SOURCE=2 -fstack-protector
93
	append-ldflags -Wl,-z,relro -Wl,-z,now
94 89
	cmake_src_configure
95 90
}
96 91

  
97 92
src_compile() {
98
	cmake_src_compile
93
	# setting correct PATH for finding react-js
94
	NODE_ENV=production PATH="$PATH:${S}/gsa/node_modules/.bin/" cmake_src_compile
99 95
	if use extras; then
100 96
		cmake_build -C "${BUILD_DIR}" doc
101 97
		cmake_build doc-full -C "${BUILD_DIR}" doc
102
		HTML_DOCS=( "${BUILD_DIR}/${MY_DN}/doc/generated/html/." )
103 98
	fi
104 99
	cmake_build rebuild_cache
105 100
}
106 101

  
107 102
src_install() {
103
	if use extras; then
104
		local HTML_DOCS=( "${BUILD_DIR}/${MY_DN}/doc/generated/html/." )
105
	fi
108 106
	cmake_src_install
109 107

  
110 108
	insinto /etc/gvm/sysconfig
111 109
	doins "${FILESDIR}/${MY_DN}-daemon.conf"
112 110

  
113
	dodir /etc/gvm/reverse-proxy
114 111
	insinto /etc/gvm/reverse-proxy
115 112
	doins "${FILESDIR}/${MY_PN}.nginx.reverse.proxy.example"
116 113
	fowners -R gvm:gvm /etc/gvm
Thank you!