Diff openvas-scanner-21.4.4-r2 with a openvas-scanner-22.7.3-r1

/usr/portage/net-analyzer/openvas-scanner/openvas-scanner-22.7.3-r1.ebuild 2023-10-09 14:52:33.332368447 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5 5

  
6
inherit cmake toolchain-funcs
6
inherit cmake systemd tmpfiles toolchain-funcs readme.gentoo-r1 optfeature
7 7

  
8
MY_PN="openvas"
9
MY_DN="openvassd"
8
MY_DN="openvas"
10 9

  
11 10
DESCRIPTION="Open Vulnerability Assessment Scanner"
12 11
HOMEPAGE="https://www.greenbone.net https://github.com/greenbone/openvas-scanner/"
13
SRC_URI="https://github.com/greenbone/openvas-scanner/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12
SRC_URI="
13
	https://github.com/greenbone/openvas-scanner/archive/v${PV}.tar.gz -> ${P}.tar.gz
14
	https://github.com/greenbone/openvas-scanner/commit/c9ba348e1a7fa99a0b41a0e53f251309f2768187.patch
15
		-> ${PN}-22.7.3-fix-automagic-dep-on-snmp.patch
16
"
14 17

  
15 18
SLOT="0"
16 19
LICENSE="GPL-2 GPL-2+"
......
20 23

  
21 24
DEPEND="
22 25
	acct-user/gvm
23
	app-crypt/gpgme:=
24 26
	dev-db/redis
25 27
	dev-libs/glib:2
28
	>=dev-libs/json-glib-1.4.4
29
	>=net-libs/gnutls-3.2.15
30
	>=net-analyzer/gvm-libs-22.4
31
	net-libs/libpcap
32
	app-crypt/gpgme:=
26 33
	dev-libs/libgcrypt:=
27 34
	dev-libs/libgpg-error
28
	dev-libs/libksba
29
	>=net-analyzer/gvm-libs-${PV}
35
	>=dev-libs/libksba-1.0.7
36
	>=net-libs/libssh-0.6.0
37
	dev-libs/libbsd
30 38
	snmp? ( net-analyzer/net-snmp:= )
31
	net-libs/gnutls:=
32
	net-libs/libpcap
33
	net-libs/libssh:=
34 39
"
35 40
RDEPEND="${DEPEND}"
36 41
BDEPEND="
37
	sys-devel/bison
42
	>=sys-devel/bison-2.5
38 43
	sys-devel/flex
39 44
	virtual/pkgconfig
40 45
	doc? (
......
43 48
		app-text/htmldoc
44 49
		dev-perl/CGI
45 50
		dev-perl/SQL-Translator
51
		virtual/pandoc
46 52
	)
47 53
	test? ( dev-libs/cgreen )
48 54
"
49 55

  
50 56
PATCHES=(
51
	"${FILESDIR}"/${PN}-7.0.1-disable-automagic-dep.patch
52
	"${FILESDIR}"/${PN}-7.0.1-fix-linking-with-lld.patch
53
	#qa fix for rpath
54
	"${FILESDIR}"/${PN}-20.8.1-rpath-qa-fix.patch
57
	# Fix https://bugs.gentoo.org/911114
58
	"${DISTDIR}"/${PN}-22.7.3-fix-automagic-dep-on-snmp.patch
55 59
)
56 60

  
57 61
src_prepare() {
58 62
	cmake_src_prepare
59 63
	# QA-Fix | Correct FHS/Gentoo policy paths for 7.0.0
60 64
	sed -i -e "s*/doc/openvas-scanner/*/doc/openvas-scanner-${PV}/*g" "${S}"/src/CMakeLists.txt || die
65
	# QA-Fix | Remove -Werror compiler flag
66
	sed -i -e "s/-Werror//" "${S}"/CMakeLists.txt || die #909560
61 67
	# QA-Fix | Remove !CLANG doxygen warnings for 7.0.0
62 68
	if use doc; then
63 69
		if ! tc-is-clang; then
......
83 89
		"-DLOCALSTATEDIR=${EPREFIX}/var"
84 90
		"-DSYSCONFDIR=${EPREFIX}/etc"
85 91
		"-DSBINDIR=${EPREFIX}/usr/bin"
86
		"-DBUILD_WITH_SNMP=$(usex snmp)"
92
		"-DOPENVAS_FEED_LOCK_PATH=${EPREFIX}/var/lib/openvas/feed-update.lock"
93
		"-DOPENVAS_RUN_DIR=/run/ospd"
94
		"-DINSTALL_OLD_SYNC_SCRIPT=OFF"
95
		"-DBUILD_WITH_NETSNMP=$(usex snmp)"
87 96
	)
88 97
	cmake_src_configure
89 98
}
......
91 100
src_compile() {
92 101
	cmake_src_compile
93 102
	if use doc; then
94
		cmake_build -C "${BUILD_DIR}" doc
95
		cmake_build doc-full -C "${BUILD_DIR}" doc
103
		cmake_build -C "${BUILD_DIR}" doxygen-full manual
96 104
	fi
97 105
	cmake_build rebuild_cache
98 106
	if use test; then
......
102 110

  
103 111
src_install() {
104 112
	if use doc; then
105
		local HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. )
113
		mv "${BUILD_DIR}"/doc/html "${BUILD_DIR}"/doc/html-manual || die
114
		local HTML_DOCS=(
115
			"${BUILD_DIR}"/doc/generated/html/.
116
			"${BUILD_DIR}"/doc/html-manual
117
		)
106 118
	fi
107 119
	cmake_src_install
108 120

  
......
121 133
	fi
122 134

  
123 135
	insinto /etc/openvas
124
	doins "${FILESDIR}/openvas.conf"
136
	newins "${FILESDIR}/openvas.conf-22" openvas.conf
137

  
138
	systemd_newunit "${FILESDIR}/redis-openvas.service" redis-openvas.service
139
	newtmpfiles "${FILESDIR}/redis-openvas.tmpfiles" redis-openvas.conf
140

  
141
	insinto /etc/gvm
142
	doins config/redis-openvas.conf
143
	use prefix || fowners -R gvm:gvm /etc/gvm /etc/gvm/redis-openvas.conf
144
	fperms 0750 /etc/gvm
145
	fperms 0644 /etc/gvm/redis-openvas.conf
146

  
147
	newconfd "${FILESDIR}/redis-openvas.confd" redis-openvas
148
	newinitd "${FILESDIR}/redis-openvas.initd" redis-openvas
149

  
150
	if use prefix; then
151
		diropts -m0750
152
	else
153
		diropts -m0750 -o gvm -g gvm
154
	fi
155
	keepdir /var/lib/openvas/redis
156

  
157
	readme.gentoo_create_doc
158
}
159

  
160
pkg_postinst() {
161
	tmpfiles_process redis-openvas.conf
162
	optfeature "port scanner" net-analyzer/nmap
163
	readme.gentoo_print_elog
125 164
}
Thank you!