net-misc/kea: Fix build with boost 1.90

Add boost patch file for 1.90

* asturm 2026-01-30:
  Fix upstream boost-1.89 patch to require >=boost-1.69
  Split boost-1.90 patch to reflect upstream origin from 2 commits
  Source boost-1.90-1 from final version committed upstream (c54dfd47)
  Put all patches into patchset tarball pulled from devspace

Bug: https://bugs.gentoo.org/969070
Signed-off-by: Peter Leese <inbox@peterleese.org>
Part-of: https://github.com/gentoo/gentoo/pull/45545
Closes: https://github.com/gentoo/gentoo/pull/45545
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
Peter Leese
2026-01-23 06:54:18 +00:00
committed by Andreas Sturmlechner
parent 3c5911e93b
commit 799d809054
4 changed files with 342 additions and 56 deletions
+1
View File
@@ -1,3 +1,4 @@
DIST kea-3.0.2-patchset.tar.xz 6216 BLAKE2B e004eff1c89d6ba749018e80b0023d179f6c84dc271f9c187cc642355eda83d2c06cda2f8518377b14268038a2092b62637ca2eaa7e058f0bf5c27f68f5d935a SHA512 e9313f72c661749809696d857cd4d4bc56f96c61b9a9eed6f2bf3dd3639a167372077a3de37760009e32c724cf02a94c6c871d78888d3852096f91de3bfd6b79
DIST kea-3.0.2.tar.xz 6634300 BLAKE2B 8c7dccbb118f09e0c4dbd0fbb1889fba03bda633bedd6b05f91445d0979bbbedd8c7150ceaad73a280e58401eba4671398c65717f747b661fa0891e310dac1ea SHA512 454081be248d6021aa99bfe027111f093795b123c827c6062e29a215856d29ec827f5757a1a6fc3351e74276563f101b52f26db2098cdd0b4e6f86e1b3449ba3
DIST kea-3.0.2.tar.xz.asc 833 BLAKE2B 7345cfc7fb6bec6a9ec06f7d9861cc43b0b11bdc6e80acdd6016dc7677cbe0af659fb4cb0d62b6acfcf1c53e47e936400e75096abcd8d66b7dd5e6ef8b520b58 SHA512 0735968604d1ac0821f00a01e3f61134e118ec0fb26846eb6413867c855923a148316ef20022e9a51af8507711eeadaf68b2da85504332cf8c882e75fffa8793
DIST kea-manpages-3.0.2.tar.gz 6743 BLAKE2B 30d254a0db2b635493a0f9fe5480cf731978532f860d9acf74f8d6114539f0f9e594aa68aeb1181ee05da51707fd35a900be72c79bc7abf31124c1c5ea439ef4 SHA512 cfcf91abfd34e44319d4ea58de15bc068e5c7be7c94f211e85890009ef285ab84ca310dbe4ba8879a4797574715086861755cd528ea90a65e88980adeabc43a1
@@ -1,53 +0,0 @@
https://bugs.gentoo.org/963749
https://gitlab.isc.org/isc-projects/kea/-/issues/4085
https://gitlab.isc.org/isc-projects/kea/-/merge_requests/2771
Fixes the build with Boost 1.89
diff --git a/meson.build b/meson.build
index ab2fa78212..8592196856 100644
--- a/meson.build
+++ b/meson.build
@@ -189,7 +189,7 @@ message(f'Detected system "@SYSTEM@".')
#### Dependencies
-boost_dep = dependency('boost', version: '>=1.66', modules: ['system'])
+boost_dep = dependency('boost', version: '>=1.66')
dl_dep = dependency('dl')
threads_dep = dependency('threads')
add_project_dependencies(boost_dep, dl_dep, threads_dep, language: ['cpp'])
diff --git a/src/lib/asiodns/io_fetch.cc b/src/lib/asiodns/io_fetch.cc
index c140676f66..ee2575a884 100644
--- a/src/lib/asiodns/io_fetch.cc
+++ b/src/lib/asiodns/io_fetch.cc
@@ -24,6 +24,7 @@
#include <boost/scoped_ptr.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <boost/asio/deadline_timer.hpp>
#include <functional>
#include <unistd.h> // for some IPC/network system calls
diff --git a/src/lib/asiodns/tests/io_fetch_unittest.cc b/src/lib/asiodns/tests/io_fetch_unittest.cc
index 7b4cd0568e..3d04230f02 100644
--- a/src/lib/asiodns/tests/io_fetch_unittest.cc
+++ b/src/lib/asiodns/tests/io_fetch_unittest.cc
@@ -21,6 +21,7 @@
#include <gtest/gtest.h>
#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <boost/asio/deadline_timer.hpp>
#include <algorithm>
#include <cstdlib>
diff --git a/src/lib/asiolink/interval_timer.cc b/src/lib/asiolink/interval_timer.cc
index fa0d9e1b67..4ac0b20c7d 100644
--- a/src/lib/asiolink/interval_timer.cc
+++ b/src/lib/asiolink/interval_timer.cc
@@ -12,6 +12,7 @@
#include <boost/enable_shared_from_this.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
+#include <boost/asio/deadline_timer.hpp>
#include <exceptions/exceptions.h>
+3 -3
View File
@@ -3,6 +3,7 @@
EAPI=8
PATCHSET=${P}-patchset
PYTHON_COMPAT=( python3_{11..14} )
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/isc.asc
inherit eapi9-ver flag-o-matic meson python-r1 systemd tmpfiles
@@ -19,6 +20,7 @@ else
https://downloads.isc.org/isc/kea/${PV}/${P}.tar.xz
!doc? ( https://codeberg.org/peter1010/kea-manpages/archive/kea-manpages-${PV}.tar.gz )
verify-sig? ( https://downloads.isc.org/isc/kea/${PV}/${P}.tar.xz.asc )
https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}.tar.xz
"
KEYWORDS="amd64 arm arm64 ~x86"
fi
@@ -65,9 +67,7 @@ BDEPEND="
verify-sig? ( sec-keys/openpgp-keys-isc )
"
PATCHES=(
"${FILESDIR}"/kea-3.0.1-boost-1.89.patch
)
PATCHES=( "${WORKDIR}"/${PATCHSET}/kea-3.0.1-boost-1.89.patch )
python_check_deps() {
use doc || return 0;
+338
View File
@@ -0,0 +1,338 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PATCHSET=${P}-patchset
PYTHON_COMPAT=( python3_{11..14} )
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/isc.asc
inherit eapi9-ver flag-o-matic meson python-r1 systemd tmpfiles
inherit toolchain-funcs verify-sig
DESCRIPTION="High-performance production grade DHCPv4 & DHCPv6 server"
HOMEPAGE="https://www.isc.org/kea/"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://gitlab.isc.org/isc-projects/kea.git"
else
SRC_URI="
https://downloads.isc.org/isc/kea/${PV}/${P}.tar.xz
!doc? ( https://codeberg.org/peter1010/kea-manpages/archive/kea-manpages-${PV}.tar.gz )
verify-sig? ( https://downloads.isc.org/isc/kea/${PV}/${P}.tar.xz.asc )
https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}.tar.xz
"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
fi
LICENSE="MPL-2.0"
SLOT="0"
IUSE="debug doc kerberos mysql +openssl postgres shell test"
REQUIRED_USE="shell? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
COMMON_DEPEND="
>=dev-libs/boost-1.69:=
dev-libs/log4cplus:=
kerberos? ( virtual/krb5 )
mysql? (
app-arch/zstd:=
dev-db/mysql-connector-c:=
dev-libs/openssl:=
virtual/zlib:=
)
!openssl? ( dev-libs/botan:3=[boost] )
openssl? ( dev-libs/openssl:0= )
postgres? ( dev-db/postgresql:* )
shell? ( ${PYTHON_DEPS} )
"
DEPEND="${COMMON_DEPEND}
test? ( dev-cpp/gtest )
"
RDEPEND="${COMMON_DEPEND}
acct-group/dhcp
acct-user/dhcp
"
BDEPEND="
${PYTHON_DEPS}
>=dev-build/meson-1.8
virtual/pkgconfig
doc? (
$(python_gen_any_dep '
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
')
)
verify-sig? ( sec-keys/openpgp-keys-isc )
"
PATCHES=( "${WORKDIR}"/${PATCHSET} )
python_check_deps() {
use doc || return 0;
python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" \
"dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]"
}
pkg_setup() {
python_setup
}
src_unpack() {
if [[ ${PV} == 9999 ]] ; then
git-r3_src_unpack
return
fi
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.asc}
fi
default
}
src_prepare() {
default
# Fix up all doc paths, whether or not we are installing full set of docs
sed -e "s:'doc/kea':'doc/${PF}':" \
-i meson.build || die
sed -e "s:'share/doc/kea':'share/doc/${PF}':" \
-i doc/meson.build || die
sed -e "s:'doc/kea':'doc/${PF}':" \
-i doc/sphinx/meson.build || die
sed -e "s:share/doc/kea/:share/doc/${PF}/:" \
-i doc/sphinx/arm/install.rst || die
sed -e "s:share/doc/kea/examples:share/doc/${PF}/examples:" \
-i doc/sphinx/arm/config.rst || die
# set shebang before meson whether or not we are installing the shell
sed -e 's:^#!@PYTHON@:#!/usr/bin/env python3:' \
-i src/bin/shell/kea-shell.in || die
# Don't allow meson to install shell, we shall do that if required
sed -e 's:install\: true:install\: false:' \
-i src/bin/shell/meson.build || die
# do not create /run
sed -e '/^install_emptydir(RUNSTATEDIR)$/d' \
-i meson.build || die
}
src_configure() {
# https://bugs.gentoo.org/861617
# https://gitlab.isc.org/isc-projects/kea/-/issues/3946
#
# Kea Devs say no to LTO
filter-lto
if use !openssl; then
append-cxxflags -std=c++20
fi
# Note: https://gitlab.isc.org/isc-projects/kea/-/issues/4171 suggests patching meson.build to set umask,
# instead here we pass install-umask as an argument to do the same thing, i.e. control permissions on
# installed files.
local emesonargs=(
--localstatedir="${EPREFIX}/var"
-Drunstatedir="${EPREFIX}/run"
$(meson_feature kerberos krb5)
-Dnetconf=disabled
-Dcrypto=$(usex openssl openssl botan)
$(meson_feature mysql)
$(meson_feature postgres postgresql)
$(meson_feature test tests)
--install-umask=0o023
)
if use debug; then
emesonargs+=(
--debug
)
fi
meson_src_configure
}
src_compile() {
meson_src_compile
use doc && meson_src_compile doc
}
src_test() {
# Get list of all test suites into an associative array
# the meson test --list returns either "kea / test_suite", "kea:shell-tests / test_suite" or
# "kea:python-tests / test_suite"
# Note: In meson >= 1.10 the format has changed to
# the meson test --list returns either "kea:test_suite", "shell-tests - kea:test_suite" or
# "python-tests - kea:test_suite"
#
# Discard the shell tests as we can't run shell tests in sandbox
pushd "${BUILD_DIR}" || die
local -A TEST_SUITES
while IFS="/: " read -a words ; do
if [[ "${words[0]}" != "shell-tests" ]] && [[ "${words[2]}" != "shell-tests" ]]; then
TEST_SUITES["${words[-1]}"]=1
fi
done < <(meson test --list || die)
popd
# Some other tests will fail for interface access restrictions, we have to remove the test suites those tests
# belong to
local SKIP_TESTS=(
dhcp-radius-tests
kea-log-buffer_logger_test.sh
kea-log-console_test.sh
dhcp-lease-query-tests
kea-dhcp6-tests
kea-dhcp4-tests
kea-dhcp-tests
)
# skip shell tests that require a running instance of MySQL
if use mysql; then
SKIP_TESTS+=(
kea-mysql-tests
dhcp-mysql-lib-tests
dhcp-forensic-log-libloadtests
)
fi
# skip shell tests that require a running instance of PgSQL
if use postgres; then
SKIP_TESTS+=(
kea-pgsql-tests
dhcp-pgsql-lib-tests
dhcp-forensic-log-libloadtests
)
fi
if use kerberos; then
SKIP_TESTS+=(
ddns-gss-tsig-tests
)
fi
if [[ $(tc-get-ptr-size) -eq 4 ]]; then
# see https://bugs.gentoo.org/958171 for reason for skipping these tests
SKIP_TESTS+=(
kea-util-tests
kea-dhcpsrv-tests
dhcp-ha-lib-tests
kea-d2-tests
)
fi
for SKIP in ${SKIP_TESTS[@]}; do
unset TEST_SUITES["${SKIP}"]
done
meson_src_test ${!TEST_SUITES[@]}
}
install_shell() {
python_domodule ${ORIG_BUILD_DIR}/src/bin/shell/*.py
python_doscript ${ORIG_BUILD_DIR}/src/bin/shell/kea-shell
# fix path to import kea modules
sed -e "/^sys.path.append/s|(.*)|('$(python_get_sitedir)/${PN}')|" \
-i "${ED}"/usr/lib/python-exec/${EPYTHON}/kea-shell || die
}
src_install() {
meson_install
# Tidy up
rm -r "${ED}"/usr/share/kea/meson-info || die
if use !mysql; then
rm -r "${ED}"/usr/share/kea/scripts/mysql || die
fi
if use !postgres; then
rm -r "${ED}"/usr/share/kea/scripts/pgsql || die
fi
# No easy way to control how meson_install sets permissions in meson < 1.9
# So make sure permissions are same as in previous versions of kea
# To avoid any differences between an update vers first time install
fperms -R 0755 /usr/sbin
fperms -R 0755 /usr/bin
fperms -R 0755 /usr/$(get_libdir)
if use shell; then
python_moduleinto ${PN}
ORIG_BUILD_DIR=${BUILD_DIR} python_foreach_impl install_shell
fi
# We don't use keactrl.conf so move to reduce confusion
mv "${ED}"/etc/${PN}/keactrl.conf "${ED}"/usr/share/doc/${PF}/examples/keactrl.conf || die
fowners -R root:dhcp /etc/${PN}
# A side effect of using install_umask 023 in meson setup is setting config files to be world readable
# lets not do that
fperms -R 0640 /etc/${PN}
# Install a conf per service and a linked init script per service
newinitd "${FILESDIR}"/${PN}-initd-r3 ${PN}
local svc
for svc in dhcp4 dhcp6 dhcp-ddns ctrl-agent; do
newconfd "${FILESDIR}"/${PN}-confd-r3 kea-${svc}
sed -e "s:@KEA_SVC@:${svc}:g" \
-i "${ED}"/etc/conf.d/kea-${svc} || die
dosym kea "${EPREFIX}"/etc/init.d/kea-${svc}
done
if use !doc; then
doman "${WORKDIR}"/kea-manpages/man/*
fi
systemd_newunit "${FILESDIR}"/${PN}-ctrl-agent.service-r2 ${PN}-ctrl-agent.service
systemd_newunit "${FILESDIR}"/${PN}-dhcp-ddns.service-r2 ${PN}-dhcp-ddns.service
systemd_newunit "${FILESDIR}"/${PN}-dhcp4.service-r2 ${PN}-dhcp4.service
systemd_newunit "${FILESDIR}"/${PN}-dhcp6.service-r2 ${PN}-dhcp6.service
newtmpfiles "${FILESDIR}"/${PN}.tmpfiles.conf ${PN}.conf
keepdir /var/lib/${PN} /var/log/${PN}
fowners -R dhcp:dhcp /var/lib/${PN} /var/log/${PN}
fperms 750 /var/lib/${PN} /var/log/${PN}
}
pkg_postinst() {
tmpfiles_process ${PN}.conf
if ver_replacing -lt 2.6; then
ewarn "Several changes have been made for daemons:"
ewarn " To comply with common practices for this package,"
ewarn " config paths by default has been changed as below:"
ewarn " /etc/kea/kea-dhcp4.conf"
ewarn " /etc/kea/kea-dhcp6.conf"
ewarn " /etc/kea/kea-dhcp-ddns.conf"
ewarn " /etc/kea/kea-ctrl-agent.conf"
ewarn
ewarn " Daemons are launched by default with the unprivileged user 'dhcp'"
ewarn
ewarn "Please check your configuration!"
fi
if ver_replacing -lt 3.0; then
ewarn "Make sure that ${EPREFIX}/var/lib/kea and all the files in it are owned by dhcp:"
ewarn "chown -R dhcp:dhcp ${EPREFIX}/var/lib/kea"
ewarn
ewarn "If using openrc;"
ewarn " There are now separate conf.d scripts and associated init.d per daemon!"
ewarn " Each Daemon needs to be launched separately, i.e. the daemons are"
ewarn " kea-dhcp4"
ewarn " kea-dhcp6"
ewarn " kea-dhcp-ddns"
ewarn " kea-ctrl"
ewarn "Please adjust your service startups appropriately"
fi
if ! has_version net-misc/kea; then
elog "See examples of config files in:"
elog " ${EROOT}/usr/share/doc/${PF}/examples"
fi
}