Diff kea-3.0.3-r1 with a kea-3.2.0-r1

/usr/portage/net-misc/kea/kea-3.2.0-r1.ebuild 2026-09-07 20:03:07.379238826 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
PATCHSET=kea-3.0.2-patchset
7
PYTHON_COMPAT=( python3_{11..14} )
6
PYTHON_COMPAT=( python3_{11..15} )
8 7
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/isc.asc
9 8
inherit eapi9-ver flag-o-matic meson python-r1 systemd tmpfiles
10 9
inherit toolchain-funcs verify-sig
......
20 19
		https://downloads.isc.org/isc/kea/${PV}/${P}.tar.xz
21 20
		!doc? ( https://codeberg.org/peter1010/kea-manpages/archive/kea-manpages-${PV}.tar.gz )
22 21
		verify-sig? ( https://downloads.isc.org/isc/kea/${PV}/${P}.tar.xz.asc )
23
		https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}.tar.xz
24 22
	"
25
	KEYWORDS="amd64 arm arm64 ~x86"
23
	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
26 24
fi
27 25

  
28 26
LICENSE="MPL-2.0"
......
33 31
RESTRICT="!test? ( test )"
34 32

  
35 33
COMMON_DEPEND="
36
	>=dev-libs/boost-1.69:=
34
	>=dev-libs/boost-1.66:=
37 35
	dev-libs/log4cplus:=
38 36
	kerberos? ( virtual/krb5 )
39 37
	mysql? (
......
68 66
	verify-sig? ( sec-keys/openpgp-keys-isc )
69 67
"
70 68

  
71
PATCHES=( "${WORKDIR}"/${PATCHSET} )
72

  
73 69
python_check_deps() {
74
	use doc || return 0;
70
	use doc || return 0
75 71
	python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" \
76 72
		"dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]"
77 73
}
78 74

  
79 75
pkg_setup() {
80
	python_setup
76
	[[ ${MERGE_TYPE} != binary ]] && python_setup
81 77
}
82 78

  
83 79
src_unpack() {
84
	if [[ ${PV} == 9999 ]] ; then
80
	if [[ ${PV} == 9999 ]]; then
85 81
		git-r3_src_unpack
86 82
		return
87 83
	fi
......
117 113
		-i src/bin/shell/meson.build || die
118 114

  
119 115
	# do not create /run
120
	sed -e '/^install_emptydir(RUNSTATEDIR)$/d' \
116
	sed -e '/^install_emptydir(RUNSTATEDIR/d' \
121 117
		-i meson.build || die
122 118
}
123 119

  
......
125 121
	# https://bugs.gentoo.org/861617
126 122
	# https://gitlab.isc.org/isc-projects/kea/-/issues/3946
127 123
	#
128
	# Kea Devs say no to LTO
124
	# Upstream does not support LTO
129 125
	filter-lto
130 126

  
131 127
	if use !openssl; then
......
171 167
	# Discard the shell tests as we can't run shell tests in sandbox
172 168

  
173 169
	pushd "${BUILD_DIR}" || die
174
	local -A TEST_SUITES
175 170

  
176
	while IFS="/: " read -a words ; do
171
	local -A test_suites
172
	local -a words
173
	while IFS="/: " read -ra words ; do
177 174
		if [[ "${words[0]}" != "shell-tests" ]] && [[ "${words[2]}" != "shell-tests" ]]; then
178
			TEST_SUITES["${words[-1]}"]=1
175
			test_suites["${words[-1]}"]=1
179 176
		fi
180 177
	done < <(meson test --list || die)
181
	popd
178
	popd || die
182 179

  
183 180
	# Some other tests will fail for interface access restrictions, we have to remove the test suites those tests
184 181
	# belong to
185
	local SKIP_TESTS=(
182
	local -a skip_tests=(
186 183
		dhcp-radius-tests
187 184
		kea-log-buffer_logger_test.sh
188 185
		kea-log-console_test.sh
......
194 191

  
195 192
	# skip shell tests that require a running instance of MySQL
196 193
	if use mysql; then
197
		SKIP_TESTS+=(
194
		skip_tests+=(
198 195
			kea-mysql-tests
199 196
			dhcp-mysql-lib-tests
200
			dhcp-forensic-log-libloadtests
197
			dhcp-forensic-log-libload-tests
201 198
		)
202 199
	fi
203 200

  
204 201
	# skip shell tests that require a running instance of PgSQL
205 202
	if use postgres; then
206
		SKIP_TESTS+=(
203
		skip_tests+=(
207 204
			kea-pgsql-tests
208 205
			dhcp-pgsql-lib-tests
209
			dhcp-forensic-log-libloadtests
206
			dhcp-forensic-log-libload-tests
210 207
		)
211 208
	fi
212 209

  
213 210
	if use kerberos; then
214
		SKIP_TESTS+=(
211
		skip_tests+=(
215 212
			ddns-gss-tsig-tests
216 213
		)
217 214
	fi
218 215

  
219 216
	if [[ $(tc-get-ptr-size) -eq 4 ]]; then
220 217
		# see https://bugs.gentoo.org/958171 for reason for skipping these tests
221
		SKIP_TESTS+=(
218
		skip_tests+=(
222 219
			kea-util-tests
223 220
			kea-dhcpsrv-tests
224 221
			dhcp-ha-lib-tests
......
226 223
		)
227 224
	fi
228 225

  
229
	for SKIP in ${SKIP_TESTS[@]}; do
230
		unset TEST_SUITES["${SKIP}"]
226
	local name
227
	for name in ${skip_tests[@]}; do
228
		unset -v 'test_suites[${name}]'
231 229
	done
232 230

  
233
	meson_src_test ${!TEST_SUITES[@]}
231
	meson_src_test "${!test_suites[@]}"
234 232
}
235 233

  
236 234
install_shell() {
237
	python_domodule ${ORIG_BUILD_DIR}/src/bin/shell/*.py
238
	python_doscript ${ORIG_BUILD_DIR}/src/bin/shell/kea-shell
235
	local orig_build_dir=$1
236
	python_domodule "${orig_build_dir}"/src/bin/shell/*.py
237
	python_doscript "${orig_build_dir}"/src/bin/shell/kea-shell
239 238

  
240 239
	# fix path to import kea modules
241 240
	sed -e "/^sys.path.append/s|(.*)|('$(python_get_sitedir)/${PN}')|"	\
......
245 244
src_install() {
246 245
	meson_install
247 246

  
248
	# Tidy up
249
	rm -r "${ED}"/usr/share/kea/meson-info || die
247
	# Remove unused database files
250 248
	if use !mysql; then
251 249
		rm -r "${ED}"/usr/share/kea/scripts/mysql || die
252 250
	fi
......
263 261

  
264 262
	if use shell; then
265 263
		python_moduleinto ${PN}
266
		ORIG_BUILD_DIR=${BUILD_DIR} python_foreach_impl install_shell
264
		python_foreach_impl install_shell "${BUILD_DIR}"
267 265
	fi
268 266

  
269 267
	# We don't use keactrl.conf so move to reduce confusion
......
277 275
	chmod 0640 "${ED}"/etc/${PN}/*.conf || die
278 276

  
279 277
	# Install a conf per service and a linked init script per service
280
	newinitd "${FILESDIR}"/${PN}-initd-r4 ${PN}
278
	newinitd "${FILESDIR}"/${PN}-initd-r5 ${PN}
281 279
	local svc
282
	for svc in dhcp4 dhcp6 dhcp-ddns ctrl-agent; do
283
		newconfd "${FILESDIR}"/${PN}-confd-r3 kea-${svc}
280
	for svc in dhcp4 dhcp6 dhcp-ddns; do
281
		newconfd "${FILESDIR}"/${PN}-confd-r4 kea-${svc}
284 282
		sed -e "s:@KEA_SVC@:${svc}:g" \
285 283
			-i "${ED}"/etc/conf.d/kea-${svc} || die
286 284
		dosym kea "${EPREFIX}"/etc/init.d/kea-${svc}
......
290 288
		doman "${WORKDIR}"/kea-manpages/man/*
291 289
	fi
292 290

  
293
	systemd_newunit "${FILESDIR}"/${PN}-ctrl-agent.service-r2 ${PN}-ctrl-agent.service
294 291
	systemd_newunit "${FILESDIR}"/${PN}-dhcp-ddns.service-r2 ${PN}-dhcp-ddns.service
295 292
	systemd_newunit "${FILESDIR}"/${PN}-dhcp4.service-r2 ${PN}-dhcp4.service
296 293
	systemd_newunit "${FILESDIR}"/${PN}-dhcp6.service-r2 ${PN}-dhcp6.service
......
312 309
		ewarn "    /etc/kea/kea-dhcp4.conf"
313 310
		ewarn "    /etc/kea/kea-dhcp6.conf"
314 311
		ewarn "    /etc/kea/kea-dhcp-ddns.conf"
315
		ewarn "    /etc/kea/kea-ctrl-agent.conf"
316 312
		ewarn
317 313
		ewarn "  Daemons are launched by default with the unprivileged user 'dhcp'"
318 314
		ewarn
......
329 325
		ewarn "      kea-dhcp4"
330 326
		ewarn "      kea-dhcp6"
331 327
		ewarn "      kea-dhcp-ddns"
332
		ewarn "      kea-ctrl"
333 328
		ewarn "Please adjust your service startups appropriately"
334 329
	fi
335 330

  
Thank you!