net-misc/kea: drop 2.6.3, 2.6.4, 3.0.1-r1, 3.0.2

Clean up dev-libs/botan:2 revdeps.

Bug: https://bugs.gentoo.org/967170
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
Andreas Sturmlechner
2026-01-15 21:37:20 +01:00
parent b2a672f0c3
commit a73124778a
9 changed files with 0 additions and 1362 deletions

View File

@@ -1,6 +1,2 @@
DIST kea-2.6.3.tar.gz 10498882 BLAKE2B 7a8549ceb86dccaa2ca8d541cbfd27618ccf8aeedfb8ff26f9d0e10cfd8a103efd70320a55dc318a84094a7764c560c100cf6e10421ae6d40e6c62891570c604 SHA512 d7781c0b95529bfe89c19615c1dd5952fd4c4b60274e187a641992dad81ef5af921dfb15050ec43169a0c2ad267639642b2e294c5d43405f85a5fb11bb1a939a
DIST kea-2.6.4.tar.gz 10498705 BLAKE2B 491a73dd0d4f7ffc068642d14a597158b70a5e6042967fd1f367f3269dd84bc4f1526b4158c7da8a474e385528b74985ac542c1591c458c6a0df42fc627b612d SHA512 f4dce03a30ba5c0a1a0d97730d7cccc0876188fb7d165e8f67cf4df906cdf157049d651d0a38b3a01f33e5b0ac7b9e8b5b479543e06c89da197d6ef9d0937a18
DIST kea-3.0.1.tar.xz 6632284 BLAKE2B 7fc66680ddfd6805cb8eb7480d552c8fbd29416175cb2b81e0ef68436e1a2ed9c94c50e0a7037402e02620ef047a66c8dcafb3d89a6a0d7d552c5d5da04f5755 SHA512 84e2164aa91c95b2e6e65994a2327fa1233c82b06af69312f55464119d4edc6151a4662a54f4a3ae83e0487dac7b25c5e59e60bcbed653fd30fb32ae7cacddf3
DIST kea-3.0.2.tar.xz 6634300 BLAKE2B 8c7dccbb118f09e0c4dbd0fbb1889fba03bda633bedd6b05f91445d0979bbbedd8c7150ceaad73a280e58401eba4671398c65717f747b661fa0891e310dac1ea SHA512 454081be248d6021aa99bfe027111f093795b123c827c6062e29a215856d29ec827f5757a1a6fc3351e74276563f101b52f26db2098cdd0b4e6f86e1b3449ba3
DIST kea-manpages-3.0.1.tar.gz 6789 BLAKE2B 37d79b0be3959cc0b12a4f0a782feb4065a7dffd741551f9ab1edfe1c4c3db0dc4fed24881a9e11fa2aeb214e8b094894f48741a5823e13d78fb41837adf0975 SHA512 4930173e93a8ae7ac0a933a8d82a1c90f79321365bf02f3995d8ef0496bddf4f611cf2d23c806ecee5017e7b98c2799d0d3ac00a66535be35898f89cd3f75f86
DIST kea-manpages-3.0.2.tar.gz 6743 BLAKE2B 30d254a0db2b635493a0f9fe5480cf731978532f860d9acf74f8d6114539f0f9e594aa68aeb1181ee05da51707fd35a900be72c79bc7abf31124c1c5ea439ef4 SHA512 cfcf91abfd34e44319d4ea58de15bc068e5c7be7c94f211e85890009ef285ab84ca310dbe4ba8879a4797574715086861755cd528ea90a65e88980adeabc43a1

View File

@@ -1,11 +0,0 @@
--- a/m4macros/ax_crypto.m4
+++ b/m4macros/ax_crypto.m4
@@ -258,7 +258,7 @@ then
else
CRYPTO_NAME="OpenSSL"
DISABLED_CRYPTO="Botan"
- CRYPTO_PACKAGE="openssl-1.1.0"
+ CRYPTO_PACKAGE="openssl"
DISTCHECK_CRYPTO_CONFIGURE_FLAG="--with-openssl=${use_openssl}"
AC_DEFINE_UNQUOTED([WITH_OPENSSL], [], [Compile with OpenSSL crypto])
AC_MSG_CHECKING(for OpenSSL library)

View File

@@ -1,51 +0,0 @@
https://bugs.gentoo.org/963975
Fixes the build with Boost 1.89
diff --git a/m4macros/ax_boost_for_kea.m4 b/m4macros/ax_boost_for_kea.m4
index 996413374a..7d616eb03e 100644
--- a/m4macros/ax_boost_for_kea.m4
+++ b/m4macros/ax_boost_for_kea.m4
@@ -205,7 +205,7 @@ AC_ARG_ENABLE([boost-headers-only],
as it may result in non-optimized code on some
platforms or introduce runtime errors on others.])],
[enable_boost_header="yes"; BOOST_LIBS=""],
- [BOOST_LIBS="${BOOST_LIBS} -lboost_system"])
+ [BOOST_LIBS="${BOOST_LIBS}"])
# BOOST_ERROR_CODE_HEADER_ONLY in versions below Boost 1.56.0 can fail
# to find the error_code.cpp file.
diff --git a/src/lib/asiodns/io_fetch.cc b/src/lib/asiodns/io_fetch.cc
index 742abc66e9..d87e4abdcc 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 e93e796ae9..c968b45c02 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>

View File

@@ -1,12 +0,0 @@
# Which services should be taken into account?
DHCP4="true"
DHCP6="false"
DDNS="false"
CTRL_AGENT="false"
# Define your config files here. Otherwise we default to files in /etc/kea
# (see init script)
#DHCP4_CONFIG="/etc/kea/kea-dhcp4.conf"
#DHCP6_CONFIG="/etc/kea/kea-dhcp6.conf"
#DDNS_CONFIG="/etc/kea/kea-dhcp-ddns.conf"
#CTRL_AGENT_CONFIG="/etc/kea/kea-ctrl-agent.conf"

View File

@@ -1,147 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="kea dhcp services"
dhcp4_command="/usr/sbin/kea-dhcp4"
dhcp6_command="/usr/sbin/kea-dhcp6"
ddns_command="/usr/sbin/kea-dhcp-ddns"
ctrl_agent_command="/usr/sbin/kea-ctrl-agent"
dhcp4_config="${DHCP4_CONFIG:-/etc/kea/kea-dhcp4.conf}"
dhcp6_config="${DHCP6_CONFIG:-/etc/kea/kea-dhcp6.conf}"
ddns_config="${DDNS_CONFIG:-/etc/kea/kea-dhcp-ddns.conf}"
ctrl_agent_config="${CTRL_AGENT_CONFIG:-/etc/kea/kea-ctrl-agent.conf}"
dhcp4_pidfile="/run/kea/$(basename ${dhcp4_config%.conf}).kea-dhcp4.pid"
dhcp6_pidfile="/run/kea/$(basename ${dhcp6_config%.conf}).kea-dhcp6.pid"
ddns_pidfile="/run/kea/$(basename ${ddns_config%.conf}).kea-dhcp-ddns.pid"
ctrl_agent_pidfile="/run/kea/$(basename ${ctrl_agent_config%.conf}).kea-ctrl-agent.pid"
kea_user="${KEA_USER:-dhcp}"
kea_group="${KEA_GROUP:-dhcp}"
cap_list="^cap_net_bind_service"
cap4_list="${cap_list},^cap_net_raw"
depend() {
use net
}
start_pre() {
if ${DHCP4:-false} ; then
if [ ! -f "${dhcp4_config}" ] ; then
eerror "Please create a ${dhcp4_config} config file."
return 1
fi
if [ $(stat -c "%U:%G" ${dhcp4_config}) != "root:${kea_group}" ] ; then
eerror "${dhcp4_config} config file is not owned by root:${kea_group}"
eerror "you should reset the ownership:"
eerror "chown root:${kea_group} ${dhcp4_config}"
return 1
fi
if ! ${dhcp4_command} -t ${dhcp4_config} 1>/dev/null 2>/dev/null ; then
eerror "Error in config file ${dhcp4_config}"
return 1
fi
fi
if ${DHCP6:-false} ; then
if [ ! -f "${dhcp6_config}" ] ; then
eerror "Please create a ${dhcp6_file} config file."
return 1
fi
if [ $(stat -c "%U:%G" ${dhcp6_config}) != "root:${kea_group}" ] ; then
eerror "${dhcp6_config} config file is not owned by root:${kea_group}"
eerror "you should reset the ownership:"
eerror "chown root:${kea_group} ${dhcp6_config}"
return 1
fi
if ! ${dhcp6_command} -t ${dhcp6_config} 1>/dev/null 2>/dev/null ; then
eerror "Error in config file ${dhcp6_config}"
return 1
fi
fi
if ${DDNS:-false} ; then
if [ ! -f "${ddns_config}" ] ; then
eerror "Please create a ${ddns_config} config file."
return 1
fi
if [ $(stat -c "%U:%G" ${ddns_config}) != "root:${kea_group}" ] ; then
eerror "${ddns_config} config file is not owned by root:${kea_group}"
eerror "you should reset the ownership:"
eerror "chown root:${kea_group} ${ddns_config}"
return 1
fi
if ! ${ddns_command} -t ${ddns_config} 1>/dev/null 2>/dev/null ; then
eerror "Error in config file ${ddns_config}"
return 1
fi
fi
if ${CTRL_AGENT:-false} ; then
if [ ! -f "${ctrl_agent_config}" ] ; then
eerror "Please create a ${ctrl_agent_config} config file."
return 1
fi
if [ $(stat -c "%U:%G" ${ctrl_agent_config}) != "root:${kea_group}" ] ; then
eerror "${ctrl_agent_config} config file is not owned by root:${kea_group}"
eerror "you should reset the ownership:"
eerror "chown root:${kea_group} ${ctrl_agent_config}"
return 1
fi
if ! ${ctrl_agent_command} -t ${ctrl_agent_config} 1>/dev/null 2>/dev/null ; then
eerror "Error in config file ${ctrl_agent_config}"
return 1
fi
fi
}
start() {
einfo "Starting kea dhcp services"
atleastone=
if ${DHCP4:-false} ; then
start-stop-daemon -b --capabilities ${cap4_list} -u ${kea_user} -g ${kea_group} -p ${dhcp4_pidfile} \
-x ${dhcp4_command} -- -c ${dhcp4_config} \
|| return 1
atleastone=1
fi
if ${DHCP6:-false} ; then
start-stop-daemon -b --capabilities ${cap_list} -u ${kea_user} -g ${kea_group} -p ${dhcp6_pidfile} \
-x ${dhcp6_command} -- -c ${dhcp6_config} \
|| return 1
atleastone=1
fi
if ${DDNS:-false} ; then
start-stop-daemon -b --capabilities ${cap_list} -u ${kea_user} -g ${kea_group} -p ${ddns_pidfile} \
-x ${ddns_command} -- -c ${ddns_config} \
|| return 1
atleastone=1
fi
if ${CTRL_AGENT:-false} ; then
start-stop-daemon -b -u ${kea_user} -g ${kea_group} -p ${ctrl_agent_pidfile} \
-x ${ctrl_agent_command} -- -c ${ctrl_agent_config} \
|| return 1
atleastone=1
fi
if [ -z ${atleastone} ] ; then
eerror "No service has been launched!"
return 1
fi
}
stop() {
einfo "Stopping kea dhcp services"
if ${DHCP4:-false} ; then
start-stop-daemon --stop -p ${dhcp4_pidfile} \
|| return 1
fi
if ${DHCP6:-false} ; then
start-stop-daemon --stop -p ${dhcp6_pidfile} \
|| return 1
fi
if ${DDNS:-false} ; then
start-stop-daemon --stop -p ${ddns_pidfile} \
|| return 1
fi
if ${CTRL_AGENT:-false} ; then
start-stop-daemon --stop -p ${ctrl_agent_pidfile} \
|| return 1
fi
}

View File

@@ -1,253 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
inherit autotools eapi9-ver flag-o-matic python-r1 systemd tmpfiles
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.gz"
KEYWORDS="amd64 ~arm64 ~x86"
fi
LICENSE="MPL-2.0"
SLOT="0"
IUSE="debug doc mysql +openssl postgres shell test"
REQUIRED_USE="shell? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
COMMON_DEPEND="
>=dev-libs/boost-1.66:=
dev-libs/log4cplus:=
mysql? (
app-arch/zstd:=
dev-db/mysql-connector-c:=
dev-libs/openssl:=
virtual/zlib:=
)
!openssl? ( dev-libs/botan:2=[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="
doc? (
$(python_gen_any_dep '
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
')
)
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-2.2.0-openssl-version.patch
)
python_check_deps() {
use doc || return 0;
python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" \
"dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]"
}
pkg_setup() {
if use doc || use shell; then
python_setup
fi
}
src_prepare() {
default
# set shebang before autotools
if use shell; then
sed -e 's:^#!@PYTHON@:#!/usr/bin/env python3:' \
-i src/bin/shell/kea-shell.in || die
fi
# fix gtest detection
sed -e "s:dir/lib/:dir/$(get_libdir)/:" \
-i m4macros/ax_gtest.m4 || die
# skip shell tests that fail to launch daemon in sandbox
# may fail to find a suitable interface for generating a DUID-LLT
sed -e '/TESTS += $(SHTESTS)$/d' \
-i src/bin/dhcp4/tests/Makefile.am \
-i src/bin/dhcp6/tests/Makefile.am || die
sed -e '/TESTS = $(SHTESTS)$/d' \
-i src/bin/keactrl/tests/Makefile.am || die
# skip shell tests that require a running instance of MySQL
if use mysql; then
sed -e "/SHTESTS += mysql_tests.sh$/d" \
-i src/bin/admin/tests/Makefile.am || die
fi
# skip shell tests that require a running instance of PgSQL
if use postgres; then
sed -e "/SHTESTS += pgsql_tests.sh$/d" \
-i src/bin/admin/tests/Makefile.am || die
fi
# do not create /run
sed -e '/$(DESTDIR)${runstatedir}/d' \
-i Makefile.am || die
eautoreconf
}
src_configure() {
# -Werror=odr
# https://bugs.gentoo.org/861617
#
# I would truly love to submit an upstream bug but their self-hosted gitlab
# won't let me sign up. -- Eli
filter-lto
local myeconfargs=(
--disable-install-configurations
--disable-rpath
# manually installed
--disable-shell
--disable-static
--enable-generate-messages
--enable-logger-checks
--enable-perfdhcp
--localstatedir="${EPREFIX}/var"
--runstatedir="${EPREFIX}/run"
--without-werror
--with-log4cplus
$(use_enable debug)
$(use_enable doc generate-docs)
$(use_with mysql)
$(use_with openssl)
$(use_with postgres pgsql)
$(usev test --with-gtest="${EPREFIX}/usr")
)
econf "${myeconfargs[@]}"
}
src_test() {
local GTEST_SKIP_TESTS=(
# may fail when checking addresses on detected interfaces
IfaceMgrTest*
# may fail to find a suitable interface for generating a DUID-LLT
JSONFileBackendTest*
CtrlChannelDhcpv6SrvTest*
# require srv_config_marker_file.txt similarly generated by a disabled test
LoadUnloadDhcpv6SrvTest*
)
# tests that require a running instance of MySQL
use mysql && GTEST_SKIP_TESTS+=(
*MySql*
*MySQL*
# conditional tests for MySQL
Dhcpv*SrvTest.checkConfigFiles
)
# tests that require a running instance of PgSQL
use postgres && GTEST_SKIP_TESTS+=(
*PgSql*
*PgSQL*
# conditional tests for PgSQL
Dhcpv*SrvTest.checkConfigFiles
)
local -x GTEST_FILTER
[[ -n ${GTEST_SKIP_TESTS[*]} ]] && GTEST_FILTER+="-$( IFS=':'; echo "${GTEST_SKIP_TESTS[*]}")"
default
}
install_shell() {
python_domodule src/bin/shell/*.py
python_doscript 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() {
emake -j1 install DESTDIR="${D}"
if use shell; then
python_moduleinto ${PN}
python_foreach_impl install_shell
fi
dodoc -r doc/examples
rm -f "${ED}"/usr/share/doc/${P}/COPYING
diropts -m 0750 -o root -g dhcp
dodir /etc/kea
insopts -m 0640 -o root -g dhcp
insinto /etc/kea
newins doc/examples/agent/comments.json kea-ctrl-agent.conf.sample
newins doc/examples/kea6/simple.json kea-dhcp6.conf.sample
newins doc/examples/kea4/single-subnet.json kea-dhcp4.conf.sample
newins doc/examples/ddns/comments.json kea-dhcp-ddns.conf.sample
# set log to syslog by default
sed -e 's/"output": "stdout"/"output": "syslog"/' \
-i "${ED}"/etc/kea/*.conf.sample || die
newconfd "${FILESDIR}"/${PN}-confd-r2 ${PN}
newinitd "${FILESDIR}"/${PN}-initd-r2 ${PN}
systemd_dounit "${FILESDIR}"/${PN}-ctrl-agent.service-r2
systemd_dounit "${FILESDIR}"/${PN}-dhcp-ddns.service-r2
systemd_dounit "${FILESDIR}"/${PN}-dhcp4.service-r2
systemd_dounit "${FILESDIR}"/${PN}-dhcp6.service-r2
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}
find "${ED}" -type f -name "*.la" -delete || die
}
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 ! has_version net-misc/kea; then
elog "See config files in:"
elog " ${EROOT}/etc/kea/*.sample"
elog " ${EROOT}/usr/share/doc/${PF}/examples"
fi
}

View File

@@ -1,269 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
inherit autotools eapi9-ver flag-o-matic python-r1 systemd tmpfiles toolchain-funcs
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.gz"
KEYWORDS="amd64 arm arm64 ~x86"
fi
LICENSE="MPL-2.0"
SLOT="0"
IUSE="debug doc mysql +openssl postgres shell test"
REQUIRED_USE="shell? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
COMMON_DEPEND="
>=dev-libs/boost-1.66:=
dev-libs/log4cplus:=
mysql? (
app-arch/zstd:=
dev-db/mysql-connector-c:=
dev-libs/openssl:=
virtual/zlib:=
)
!openssl? ( dev-libs/botan:2=[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="
doc? (
$(python_gen_any_dep '
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
')
)
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-2.2.0-openssl-version.patch
"${FILESDIR}"/${P}-boost-1.89.patch
)
python_check_deps() {
use doc || return 0;
python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" \
"dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]"
}
pkg_setup() {
if use doc || use shell; then
python_setup
fi
}
src_prepare() {
default
# set shebang before autotools
if use shell; then
sed -e 's:^#!@PYTHON@:#!/usr/bin/env python3:' \
-i src/bin/shell/kea-shell.in || die
fi
# fix gtest detection
sed -e "s:dir/lib/:dir/$(get_libdir)/:" \
-i m4macros/ax_gtest.m4 || die
# skip shell tests that fail to launch daemon in sandbox
# may fail to find a suitable interface for generating a DUID-LLT
sed -e '/TESTS += $(SHTESTS)$/d' \
-i src/bin/dhcp4/tests/Makefile.am \
-i src/bin/dhcp6/tests/Makefile.am || die
sed -e '/TESTS = $(SHTESTS)$/d' \
-i src/bin/keactrl/tests/Makefile.am || die
# skip shell tests that require a running instance of MySQL
if use mysql; then
sed -e "/SHTESTS += mysql_tests.sh$/d" \
-i src/bin/admin/tests/Makefile.am || die
fi
# skip shell tests that require a running instance of PgSQL
if use postgres; then
sed -e "/SHTESTS += pgsql_tests.sh$/d" \
-i src/bin/admin/tests/Makefile.am || die
fi
# do not create /run
sed -e '/$(DESTDIR)${runstatedir}/d' \
-i Makefile.am || die
eautoreconf
}
src_configure() {
# -Werror=odr
# https://bugs.gentoo.org/861617
#
# I would truly love to submit an upstream bug but their self-hosted gitlab
# won't let me sign up. -- Eli
filter-lto
local myeconfargs=(
--disable-install-configurations
--disable-rpath
# manually installed
--disable-shell
--disable-static
--enable-generate-messages
--enable-logger-checks
--enable-perfdhcp
--localstatedir="${EPREFIX}/var"
--runstatedir="${EPREFIX}/run"
--without-werror
--with-log4cplus
$(use_enable debug)
$(use_enable doc generate-docs)
$(use_with mysql)
$(use_with openssl)
$(use_with postgres pgsql)
$(usev test --with-gtest="${EPREFIX}/usr")
)
econf "${myeconfargs[@]}"
}
src_test() {
local GTEST_SKIP_TESTS=(
# may fail when checking addresses on detected interfaces
IfaceMgrTest*
# may fail to find a suitable interface for generating a DUID-LLT
JSONFileBackendTest*
CtrlChannelDhcpv6SrvTest*
# require srv_config_marker_file.txt similarly generated by a disabled test
LoadUnloadDhcpv6SrvTest*
)
# tests that require a running instance of MySQL
use mysql && GTEST_SKIP_TESTS+=(
*MySql*
*MySQL*
# conditional tests for MySQL
Dhcpv*SrvTest.checkConfigFiles
)
# tests that require a running instance of PgSQL
use postgres && GTEST_SKIP_TESTS+=(
*PgSql*
*PgSQL*
# conditional tests for PgSQL
Dhcpv*SrvTest.checkConfigFiles
)
if [ $(tc-get-ptr-size) -eq 4 ]; then
# see https://bugs.gentoo.org/958171 for reason for skipping these tests
GTEST_SKIP_TESTS+=(
BigintTest.int128
BigintTest.uint128
ThreadPoolTest.wait
LibDhcpTest.splitOptionNoBufferMultiThreading
LibDhcpTest.splitOptionOneByteLeftBufferMultiThreading
LibDhcpTest.splitOptionWithSuboptionAtLimitMultiThreading
LibDhcpTest.splitLongOptionMultiThreading
LibDhcpTest.splitOptionWithSuboptionWhichOverflowMultiThreading
LibDhcpTest.splitLongOptionWithLongSuboptionMultiThreading
)
fi
local -x GTEST_FILTER
[[ -n ${GTEST_SKIP_TESTS[*]} ]] && GTEST_FILTER+="-$( IFS=':'; echo "${GTEST_SKIP_TESTS[*]}")"
default
}
install_shell() {
python_domodule src/bin/shell/*.py
python_doscript 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() {
emake -j1 install DESTDIR="${D}"
if use shell; then
python_moduleinto ${PN}
python_foreach_impl install_shell
fi
dodoc -r doc/examples
rm -f "${ED}"/usr/share/doc/${P}/COPYING
diropts -m 0750 -o root -g dhcp
dodir /etc/kea
insopts -m 0640 -o root -g dhcp
insinto /etc/kea
newins doc/examples/agent/comments.json kea-ctrl-agent.conf.sample
newins doc/examples/kea6/simple.json kea-dhcp6.conf.sample
newins doc/examples/kea4/single-subnet.json kea-dhcp4.conf.sample
newins doc/examples/ddns/comments.json kea-dhcp-ddns.conf.sample
# set log to syslog by default
sed -e 's/"output": "stdout"/"output": "syslog"/' \
-i "${ED}"/etc/kea/*.conf.sample || die
newconfd "${FILESDIR}"/${PN}-confd-r2 ${PN}
newinitd "${FILESDIR}"/${PN}-initd-r2 ${PN}
systemd_dounit "${FILESDIR}"/${PN}-ctrl-agent.service-r2
systemd_dounit "${FILESDIR}"/${PN}-dhcp-ddns.service-r2
systemd_dounit "${FILESDIR}"/${PN}-dhcp4.service-r2
systemd_dounit "${FILESDIR}"/${PN}-dhcp6.service-r2
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}
find "${ED}" -type f -name "*.la" -delete || die
}
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 ! has_version net-misc/kea; then
elog "See config files in:"
elog " ${EROOT}/etc/kea/*.sample"
elog " ${EROOT}/usr/share/doc/${PF}/examples"
fi
}

View File

@@ -1,307 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
inherit eapi9-ver flag-o-matic meson python-r1 systemd tmpfiles toolchain-funcs
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 )
"
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.66:=
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="
>=dev-build/meson-1.8
doc? (
$(python_gen_any_dep '
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
')
)
virtual/pkgconfig
${PYTHON_DEPS}
"
PATCHES=(
"${FILESDIR}"/${P}-boost-1.89.patch
)
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_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
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)
)
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"
# Discard the shell tests as we can't run shell tests in sandbox
pushd "${BUILD_DIR}" || die
local -A TEST_SUITES
while IFS=" / " read -r subsystem test_suite ; do
if [[ ${subsystem} != "kea:shell-tests" ]]; then
TEST_SUITES["$test_suite"]=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-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
kea-dhcp4-tests
)
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
kea-dhcp4-tests
)
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-dhcp4-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}
# 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 "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
}

View File

@@ -1,308 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
inherit eapi9-ver flag-o-matic meson python-r1 systemd tmpfiles toolchain-funcs
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 )
"
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.66:=
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="
>=dev-build/meson-1.8
doc? (
$(python_gen_any_dep '
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
')
)
virtual/pkgconfig
${PYTHON_DEPS}
"
PATCHES=(
"${FILESDIR}"/kea-3.0.1-boost-1.89.patch
)
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_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
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)
)
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"
# Discard the shell tests as we can't run shell tests in sandbox
pushd "${BUILD_DIR}" || die
local -A TEST_SUITES
while IFS=" / " read -r subsystem test_suite ; do
if [[ ${subsystem} != "kea:shell-tests" ]]; then
TEST_SUITES["$test_suite"]=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}
# 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
}