Diff gvmd-21.4.5-r5 with a gvmd-22.5.5

/usr/portage/net-analyzer/gvmd/gvmd-22.5.5.ebuild 2023-10-09 14:52:33.316368447 +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
......
16 16
RESTRICT="!test? ( test )"
17 17

  
18 18
DEPEND="
19
	acct-group/gvm
20 19
	acct-user/gvm
21 20
	app-crypt/gpgme:1=
22
	dev-db/postgresql:*[uuid]
23
	dev-libs/glib:2
24
	dev-libs/libical:=
25
	>=net-analyzer/gvm-libs-21.4.4
26
	net-libs/gnutls:=[tools]
21
	>=dev-db/postgresql-9.6:=[uuid]
22
	>=dev-libs/glib-2.42:2
23
	>=dev-libs/libical-1.0.0
24
	>=net-analyzer/gvm-libs-20.08.0
25
	>=net-libs/gnutls-3.2.15[tools]
27 26
"
28 27
# gvmd (optionally) uses xml_split from XML-Twig at runtime. And texlive
29 28
# and xmlstartlet are used for (PDF) report generator at runtime.
......
32 31
	app-text/xmlstarlet
33 32
	dev-perl/XML-Twig
34 33
	dev-texlive/texlive-latexextra
35
	net-analyzer/ospd-openvas
34
	>=net-analyzer/ospd-openvas-22.4
35
	>=dev-db/pg-gvm-22.4
36 36
"
37 37
BDEPEND="
38 38
	sys-devel/bison
......
65 65
		   done
66 66
		fi
67 67
	fi
68

  
69
	# https://github.com/greenbone/gvmd/pull/1819
70
	sed -i "/^EnvironmentFile/d" config/gvmd.service.in || die
71

  
72
	# Upstream 3ebab6044818f1710b73c04e94fd9bea148c9853
73
	sed -i \
74
		-e 's/^RuntimeDirectory=gvm/RuntimeDirectory=gvmd/' \
75
		-e 's/GVM_RUN_DIR/GVMD_RUN_DIR/' \
76
		config/gvmd.service.in || die
77

  
78
	# https://github.com/greenbone/gvmd/pull/1824
79
	sed -i '/^install (DIRECTORY DESTINATION ${GVMD_RUN_DIR})/d' CMakeLists.txt || die
80 68
}
81 69

  
82 70
src_configure() {
......
110 98
	cmake_src_install
111 99

  
112 100
	insinto /etc/gvm/sysconfig
113
	doins "${FILESDIR}/${PN}-daemon.conf"
101
	newins "${FILESDIR}/${PN}-daemon-22.conf" "${PN}-daemon.conf"
114 102
	if ! use prefix; then
115 103
		fowners -R gvm:gvm /etc/gvm
116 104
	fi
117 105

  
118
	newinitd "${FILESDIR}/${P}.init" "${PN}"
119
	newconfd "${FILESDIR}/${PN}-daemon.conf" "${PN}"
106
	newinitd "${FILESDIR}/${PN}-22.init" "${PN}"
107
	newconfd "${FILESDIR}/${PN}-daemon-22.conf" "${PN}"
120 108

  
121 109
	# Set proper permissions on required files/directories
122 110
	keepdir /var/lib/gvm/gvmd
......
126 114

  
127 115
	dosbin "${FILESDIR}"/gvm-sync-all
128 116
	systemd_dounit "${FILESDIR}"/gvm-sync-all.{service,timer}
117

  
118
	systemd_install_serviced "${FILESDIR}/gvmd.service.conf" \
119
			${PN}.service
120
}
121

  
122
pkg_postinst() {
123
	elog "If you are upgrading from a previous version, you need to update the database version."
124
	elog "Please, create the running directory and give write permission to the database user"
125
	elog "then run gvmd as the gvm user with --migrate option:"
126
	elog "~# mkdir /run/gvmd"
127
	elog "~# setfacl -m u:gvm:rwx /run/gvmd/"
128
	elog "~# sudo -u gvm gvmd --migrate"
129 129
}
Thank you!