* [PATCH 1/3 V2] kea: fix creating runtime directory in service files
@ 2025-12-18 13:44 Yi Zhao
2025-12-18 13:44 ` [PATCH 2/3 V2] kea: replace keactrl with kea daemons in initscripts Yi Zhao
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Yi Zhao @ 2025-12-18 13:44 UTC (permalink / raw)
To: openembedded-core
Create runtime and state directories using RuntimeDirectory and
StateDirectory in systemd service files, rather than creating
them via ExecStartPre.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
.../kea/files/kea-dhcp-ddns.service | 7 +++++--
.../recipes-connectivity/kea/files/kea-dhcp4.service | 8 +++++---
.../recipes-connectivity/kea/files/kea-dhcp6.service | 8 +++++---
meta/recipes-connectivity/kea/kea_3.0.1.bb | 12 +++++++-----
4 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service
index aec6446f0e..feef7e0b6e 100644
--- a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service
+++ b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service
@@ -5,8 +5,11 @@ After=network-online.target
After=time-sync.target
[Service]
-ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
-ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
+RuntimeDirectory=kea
+RuntimeDirectoryMode=0750
+RuntimeDirectoryPreserve=yes
+StateDirectory=kea
+StateDirectoryMode=0750
ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf
[Install]
diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp4.service b/meta/recipes-connectivity/kea/files/kea-dhcp4.service
index a2ed4edb59..ce1256cf26 100644
--- a/meta/recipes-connectivity/kea/files/kea-dhcp4.service
+++ b/meta/recipes-connectivity/kea/files/kea-dhcp4.service
@@ -5,9 +5,11 @@ After=network-online.target
After=time-sync.target
[Service]
-ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
-ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
-ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea
+RuntimeDirectory=kea
+RuntimeDirectoryMode=0750
+RuntimeDirectoryPreserve=yes
+StateDirectory=kea
+StateDirectoryMode=0750
ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf
[Install]
diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp6.service b/meta/recipes-connectivity/kea/files/kea-dhcp6.service
index ed6e017d0c..6123a8ad58 100644
--- a/meta/recipes-connectivity/kea/files/kea-dhcp6.service
+++ b/meta/recipes-connectivity/kea/files/kea-dhcp6.service
@@ -5,9 +5,11 @@ After=network-online.target
After=time-sync.target
[Service]
-ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
-ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
-ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea
+RuntimeDirectory=kea
+RuntimeDirectoryMode=0750
+RuntimeDirectoryPreserve=yes
+StateDirectory=kea
+StateDirectoryMode=0750
ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf
[Install]
diff --git a/meta/recipes-connectivity/kea/kea_3.0.1.bb b/meta/recipes-connectivity/kea/kea_3.0.1.bb
index 8729b1162e..1be557c79a 100644
--- a/meta/recipes-connectivity/kea/kea_3.0.1.bb
+++ b/meta/recipes-connectivity/kea/kea_3.0.1.bb
@@ -74,13 +74,15 @@ do_install:append() {
${D}${sbindir}/kea-admin
rm -rf ${D}${datadir}/${BPN}/meson-info
rm -rf ${D}${runtimedir}
+ rm -rf ${D}${localstatedir}
}
-do_install:append() {
- rm -rf "${D}${localstatedir}"
-}
-
-CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf"
+CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf \
+ ${sysconfdir}/kea/kea-ctrl-agent.conf \
+ ${sysconfdir}/kea/kea-dhcp-ddns.conf \
+ ${sysconfdir}/kea/kea-dhcp4.conf \
+ ${sysconfdir}/kea/kea-dhcp6.conf \
+ "
PACKAGES =+ "${PN}-python"
FILES:${PN}-python = "${nonarch_libdir}/python*/site-packages/*"
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3 V2] kea: replace keactrl with kea daemons in initscripts
2025-12-18 13:44 [PATCH 1/3 V2] kea: fix creating runtime directory in service files Yi Zhao
@ 2025-12-18 13:44 ` Yi Zhao
2025-12-18 13:44 ` [PATCH 3/3 V2] kea: remove keactrl from package Yi Zhao
2025-12-22 17:34 ` [OE-core] [PATCH 1/3 V2] kea: fix creating runtime directory in service files Randy MacLeod
2 siblings, 0 replies; 5+ messages in thread
From: Yi Zhao @ 2025-12-18 13:44 UTC (permalink / raw)
To: openembedded-core
The keactrl script is used to run Kea from installation directory and is
primarily intended for developers[1][2]. The initscripts should call kea
daemon directly, rather than through the keactrl script.
Also add a volatile file to create runtime directory.
[1] https://gitlab.isc.org/isc-projects/kea/-/blob/master/src/bin/keactrl/keactrl.in?ref_type=heads#L10
[2] https://kea.readthedocs.io/en/latest/arm/keactrl.html
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
.../kea/files/kea-dhcp-ddns-server | 16 ++++++-----
.../kea/files/kea-dhcp4-server | 16 ++++++-----
.../kea/files/kea-dhcp6-server | 16 ++++++-----
.../kea/files/kea.volatiles | 2 ++
meta/recipes-connectivity/kea/kea_3.0.1.bb | 27 +++++++++++++------
5 files changed, 51 insertions(+), 26 deletions(-)
create mode 100644 meta/recipes-connectivity/kea/files/kea.volatiles
diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns-server b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns-server
index 50fe40d439..ebdf6f4dd6 100644
--- a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns-server
+++ b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns-server
@@ -11,8 +11,9 @@
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="kea-dhcp-ddns-server"
NAME=kea-dhcp-ddns
-DAEMON=/usr/sbin/keactrl
-DAEMON_ARGS=" -s dhcp_ddns"
+DAEMON=/usr/sbin/kea-dhcp-ddns
+DAEMON_ARGS="-c /etc/kea/kea-dhcp-ddns.conf"
+PIDFILE=/var/run/kea/kea-dhcp-ddns.kea-dhcp-ddns.pid
set -e
@@ -25,13 +26,12 @@ set -e
case "$1" in
start)
echo -n "Starting $DESC: "
- start-stop-daemon -S -b -n $NAME -x $DAEMON -- start $DAEMON_ARGS
+ start-stop-daemon -S -b -n $NAME -p $PIDFILE -x $DAEMON -- $DAEMON_ARGS
echo "done."
;;
stop)
echo -n "Stopping $DESC: "
- kpid=`pidof $NAME`
- kill $kpid
+ start-stop-daemon -K -p $PIDFILE -x $DAEMON
echo "done."
;;
restart|force-reload)
@@ -39,8 +39,12 @@ case "$1" in
$0 stop
$0 start
;;
+ status)
+ status $DAEMON
+ exit $?
+ ;;
*)
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 1
;;
esac
diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp4-server b/meta/recipes-connectivity/kea/files/kea-dhcp4-server
index e83e51025d..247f15d7fb 100644
--- a/meta/recipes-connectivity/kea/files/kea-dhcp4-server
+++ b/meta/recipes-connectivity/kea/files/kea-dhcp4-server
@@ -11,8 +11,9 @@
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="kea-dhcp4-server"
NAME=kea-dhcp4
-DAEMON=/usr/sbin/keactrl
-DAEMON_ARGS=" -s dhcp4"
+DAEMON=/usr/sbin/kea-dhcp4
+DAEMON_ARGS="-c /etc/kea/kea-dhcp4.conf"
+PIDFILE=/var/run/kea/kea-dhcp4.kea-dhcp4.pid
set -e
@@ -25,13 +26,12 @@ set -e
case "$1" in
start)
echo -n "Starting $DESC: "
- start-stop-daemon -S -b -n $NAME -x $DAEMON -- start $DAEMON_ARGS
+ start-stop-daemon -S -b -n $NAME -p $PIDFILE -x $DAEMON -- $DAEMON_ARGS
echo "done."
;;
stop)
echo -n "Stopping $DESC: "
- kpid=`pidof $NAME`
- kill $kpid
+ start-stop-daemon -K -p $PIDFILE -x $DAEMON
echo "done."
;;
restart|force-reload)
@@ -39,8 +39,12 @@ case "$1" in
$0 stop
$0 start
;;
+ status)
+ status $DAEMON
+ exit $?
+ ;;
*)
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 1
;;
esac
diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp6-server b/meta/recipes-connectivity/kea/files/kea-dhcp6-server
index 10f2d22641..c04393ddb8 100644
--- a/meta/recipes-connectivity/kea/files/kea-dhcp6-server
+++ b/meta/recipes-connectivity/kea/files/kea-dhcp6-server
@@ -12,8 +12,9 @@
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="kea-dhcp6-server"
NAME=kea-dhcp6
-DAEMON=/usr/sbin/keactrl
-DAEMON_ARGS=" -s dhcp6"
+DAEMON=/usr/sbin/kea-dhcp6
+DAEMON_ARGS="-c /etc/kea/kea-dhcp6.conf"
+PIDFILE=/var/run/kea/kea-dhcp6.kea-dhcp6.pid
set -e
@@ -26,13 +27,12 @@ set -e
case "$1" in
start)
echo -n "Starting $DESC: "
- start-stop-daemon -S -b -n $NAME -x $DAEMON -- start $DAEMON_ARGS
+ start-stop-daemon -S -b -n $NAME -p $PIDFILE -x $DAEMON -- $DAEMON_ARGS
echo "done."
;;
stop)
echo -n "Stopping $DESC: "
- kpid=`pidof $NAME`
- kill $kpid
+ start-stop-daemon -K -p $PIDFILE -x $DAEMON
echo "done."
;;
restart|force-reload)
@@ -40,8 +40,12 @@ case "$1" in
$0 stop
$0 start
;;
+ status)
+ status $DAEMON
+ exit $?
+ ;;
*)
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 1
;;
esac
diff --git a/meta/recipes-connectivity/kea/files/kea.volatiles b/meta/recipes-connectivity/kea/files/kea.volatiles
new file mode 100644
index 0000000000..d0350e38a6
--- /dev/null
+++ b/meta/recipes-connectivity/kea/files/kea.volatiles
@@ -0,0 +1,2 @@
+d root root 0750 /var/run/kea none
+d root root 0644 /var/lib/kea none
diff --git a/meta/recipes-connectivity/kea/kea_3.0.1.bb b/meta/recipes-connectivity/kea/kea_3.0.1.bb
index 1be557c79a..6b07ab8a4a 100644
--- a/meta/recipes-connectivity/kea/kea_3.0.1.bb
+++ b/meta/recipes-connectivity/kea/kea_3.0.1.bb
@@ -14,6 +14,7 @@ SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.xz \
file://kea-dhcp4-server \
file://kea-dhcp6-server \
file://kea-dhcp-ddns-server \
+ file://kea.volatiles \
file://fix-multilib-conflict.patch \
file://fix_pid_keactrl.patch \
file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \
@@ -61,17 +62,27 @@ do_compile:prepend:class-target() {
}
do_install:append() {
- install -d ${D}${sysconfdir}/init.d
- install -d ${D}${systemd_system_unitdir}
-
- install -m 0644 ${UNPACKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir}
- install -m 0755 ${UNPACKDIR}/kea-*-server ${D}${sysconfdir}/init.d
- sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \
- -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \
- ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}/${sysconfdir}/default/volatiles
+
+ install -m 0755 ${UNPACKDIR}/kea-*-server ${D}${sysconfdir}/init.d
+ install -m 0644 ${UNPACKDIR}/kea.volatiles ${D}/${sysconfdir}/default/volatiles/99_kea
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${UNPACKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir}
+
+ sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ ${D}${systemd_system_unitdir}/kea-dhcp*service
+ fi
+
sed -i -e "s:${B}:@abs_top_builddir_placeholder@:g" \
-e "s:${S}:@abs_top_srcdir_placeholder@:g" \
${D}${sbindir}/kea-admin
+
rm -rf ${D}${datadir}/${BPN}/meson-info
rm -rf ${D}${runtimedir}
rm -rf ${D}${localstatedir}
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3 V2] kea: remove keactrl from package
2025-12-18 13:44 [PATCH 1/3 V2] kea: fix creating runtime directory in service files Yi Zhao
2025-12-18 13:44 ` [PATCH 2/3 V2] kea: replace keactrl with kea daemons in initscripts Yi Zhao
@ 2025-12-18 13:44 ` Yi Zhao
2025-12-22 17:34 ` [OE-core] [PATCH 1/3 V2] kea: fix creating runtime directory in service files Randy MacLeod
2 siblings, 0 replies; 5+ messages in thread
From: Yi Zhao @ 2025-12-18 13:44 UTC (permalink / raw)
To: openembedded-core
The keactrl script is used to run Kea from installation directory and is
primarily intended for developers[1][2]. It should not be shipped to kea
package. Remove it before packaging. A related patch is also removed.
[1] https://gitlab.isc.org/isc-projects/kea/-/blob/master/src/bin/keactrl/keactrl.in?ref_type=heads#L10
[2] https://kea.readthedocs.io/en/latest/arm/keactrl.html
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
.../kea/files/fix_pid_keactrl.patch | 30 -------------------
meta/recipes-connectivity/kea/kea_3.0.1.bb | 7 +++--
2 files changed, 4 insertions(+), 33 deletions(-)
delete mode 100644 meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
diff --git a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
deleted file mode 100644
index 9cc91bdddf..0000000000
--- a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From f5125725e4e2e250ccc78a17a8b77431100e7c15 Mon Sep 17 00:00:00 2001
-From: Armin kuster <akuster808@gmail.com>
-Date: Wed, 14 Oct 2020 22:48:31 -0700
-Subject: [PATCH] Busybox does not support ps -p so use pgrep
-
-Upstream-Status: Inappropriate [embedded specific]
-Based on changes from Diego Sueiro <Diego.Sueiro@arm.com>
-
-Signed-off-by: Armin kuster <akuster808@gmail.com>
-
-Refresh to apply on top of 2.6.1.
-
-Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
----
- src/bin/keactrl/keactrl.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/src/bin/keactrl/keactrl.in
-+++ b/src/bin/keactrl/keactrl.in
-@@ -157,8 +157,8 @@ check_running() {
- # Get the PID from the PID file (if it exists)
- get_pid_from_file "${proc_name}"
- if [ "${_pid}" -gt 0 ]; then
-- # Use ps to check if PID is alive
-- if ps -p "${_pid}" 1>/dev/null; then
-+ # Use pgrep and grep to check if PID is alive
-+ if pgrep -v 1 | grep ${_pid} 1>/dev/null; then
- # No error, so PID IS ALIVE
- _running=1
- fi
diff --git a/meta/recipes-connectivity/kea/kea_3.0.1.bb b/meta/recipes-connectivity/kea/kea_3.0.1.bb
index 6b07ab8a4a..61b6158de9 100644
--- a/meta/recipes-connectivity/kea/kea_3.0.1.bb
+++ b/meta/recipes-connectivity/kea/kea_3.0.1.bb
@@ -16,7 +16,6 @@ SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.xz \
file://kea-dhcp-ddns-server \
file://kea.volatiles \
file://fix-multilib-conflict.patch \
- file://fix_pid_keactrl.patch \
file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \
file://0001-build-boost-1.89.0-fixes.patch \
file://0001-meson-use-a-runtime-safe-interpreter-string.patch \
@@ -86,10 +85,12 @@ do_install:append() {
rm -rf ${D}${datadir}/${BPN}/meson-info
rm -rf ${D}${runtimedir}
rm -rf ${D}${localstatedir}
+
+ # Remove keactrl
+ rm -f ${D}${sbindir}/keactrl ${D}${sysconfdir}/kea/keactrl.conf
}
-CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf \
- ${sysconfdir}/kea/kea-ctrl-agent.conf \
+CONFFILES:${PN} = "${sysconfdir}/kea/kea-ctrl-agent.conf \
${sysconfdir}/kea/kea-dhcp-ddns.conf \
${sysconfdir}/kea/kea-dhcp4.conf \
${sysconfdir}/kea/kea-dhcp6.conf \
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH 1/3 V2] kea: fix creating runtime directory in service files
2025-12-18 13:44 [PATCH 1/3 V2] kea: fix creating runtime directory in service files Yi Zhao
2025-12-18 13:44 ` [PATCH 2/3 V2] kea: replace keactrl with kea daemons in initscripts Yi Zhao
2025-12-18 13:44 ` [PATCH 3/3 V2] kea: remove keactrl from package Yi Zhao
@ 2025-12-22 17:34 ` Randy MacLeod
2025-12-23 13:41 ` Yi Zhao
2 siblings, 1 reply; 5+ messages in thread
From: Randy MacLeod @ 2025-12-22 17:34 UTC (permalink / raw)
To: yi.zhao, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 5037 bytes --]
Hi Yi,
This is probably fine but it needs a better description in the commit log.
Please explain why you're making this change and
what the implication is for users, such as changing a build-time config
to a run-time instantiation.
Also the conf files change is not mentioned.
We'll hold your other kea commits for v2.
In patch 2:
Is : kea.volatiles for sysvinit ? Is so, please mention that in the
commit log.
Patch 3: looks good.
Thanks,
../Randy
On 2025-12-18 8:44 a.m., Yi Zhao via lists.openembedded.org wrote:
> Create runtime and state directories using RuntimeDirectory and
> StateDirectory in systemd service files, rather than creating
> them via ExecStartPre.
>
> Signed-off-by: Yi Zhao<yi.zhao@windriver.com>
> ---
> .../kea/files/kea-dhcp-ddns.service | 7 +++++--
> .../recipes-connectivity/kea/files/kea-dhcp4.service | 8 +++++---
> .../recipes-connectivity/kea/files/kea-dhcp6.service | 8 +++++---
> meta/recipes-connectivity/kea/kea_3.0.1.bb | 12 +++++++-----
> 4 files changed, 22 insertions(+), 13 deletions(-)
>
> diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service
> index aec6446f0e..feef7e0b6e 100644
> --- a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service
> +++ b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service
> @@ -5,8 +5,11 @@ After=network-online.target
> After=time-sync.target
>
> [Service]
> -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
> -ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
> +RuntimeDirectory=kea
> +RuntimeDirectoryMode=0750
> +RuntimeDirectoryPreserve=yes
> +StateDirectory=kea
> +StateDirectoryMode=0750
> ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf
>
> [Install]
> diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp4.service b/meta/recipes-connectivity/kea/files/kea-dhcp4.service
> index a2ed4edb59..ce1256cf26 100644
> --- a/meta/recipes-connectivity/kea/files/kea-dhcp4.service
> +++ b/meta/recipes-connectivity/kea/files/kea-dhcp4.service
> @@ -5,9 +5,11 @@ After=network-online.target
> After=time-sync.target
>
> [Service]
> -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
> -ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
> -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea
> +RuntimeDirectory=kea
> +RuntimeDirectoryMode=0750
> +RuntimeDirectoryPreserve=yes
> +StateDirectory=kea
> +StateDirectoryMode=0750
> ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf
>
> [Install]
> diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp6.service b/meta/recipes-connectivity/kea/files/kea-dhcp6.service
> index ed6e017d0c..6123a8ad58 100644
> --- a/meta/recipes-connectivity/kea/files/kea-dhcp6.service
> +++ b/meta/recipes-connectivity/kea/files/kea-dhcp6.service
> @@ -5,9 +5,11 @@ After=network-online.target
> After=time-sync.target
>
> [Service]
> -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
> -ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
> -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea
> +RuntimeDirectory=kea
> +RuntimeDirectoryMode=0750
> +RuntimeDirectoryPreserve=yes
> +StateDirectory=kea
> +StateDirectoryMode=0750
> ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf
>
> [Install]
> diff --git a/meta/recipes-connectivity/kea/kea_3.0.1.bb b/meta/recipes-connectivity/kea/kea_3.0.1.bb
> index 8729b1162e..1be557c79a 100644
> --- a/meta/recipes-connectivity/kea/kea_3.0.1.bb
> +++ b/meta/recipes-connectivity/kea/kea_3.0.1.bb
> @@ -74,13 +74,15 @@ do_install:append() {
> ${D}${sbindir}/kea-admin
> rm -rf ${D}${datadir}/${BPN}/meson-info
> rm -rf ${D}${runtimedir}
> + rm -rf ${D}${localstatedir}
> }
>
> -do_install:append() {
> - rm -rf "${D}${localstatedir}"
> -}
> -
> -CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf"
> +CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf \
> + ${sysconfdir}/kea/kea-ctrl-agent.conf \
> + ${sysconfdir}/kea/kea-dhcp-ddns.conf \
> + ${sysconfdir}/kea/kea-dhcp4.conf \
> + ${sysconfdir}/kea/kea-dhcp6.conf \
> + "
>
> PACKAGES =+ "${PN}-python"
> FILES:${PN}-python = "${nonarch_libdir}/python*/site-packages/*"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#228122):https://lists.openembedded.org/g/openembedded-core/message/228122
> Mute This Topic:https://lists.openembedded.org/mt/116841995/3616765
> Group Owner:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [randy.macleod@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
--
# Randy MacLeod
# Wind River Linux
[-- Attachment #2: Type: text/html, Size: 6552 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH 1/3 V2] kea: fix creating runtime directory in service files
2025-12-22 17:34 ` [OE-core] [PATCH 1/3 V2] kea: fix creating runtime directory in service files Randy MacLeod
@ 2025-12-23 13:41 ` Yi Zhao
0 siblings, 0 replies; 5+ messages in thread
From: Yi Zhao @ 2025-12-23 13:41 UTC (permalink / raw)
To: Randy MacLeod, openembedded-core
On 12/23/25 01:34, Randy MacLeod wrote:
> Hi Yi,
>
> This is probably fine but it needs a better description in the commit log.
>
> Please explain why you're making this change and
> what the implication is for users, such as changing a build-time
> config to a run-time instantiation.
>
> Also the conf files change is not mentioned.
>
> We'll hold your other kea commits for v2.
OK. I will send v2.
Thanks,
Yi
>
>
> In patch 2:
> Is : kea.volatiles for sysvinit ? Is so, please mention that in the
> commit log.
>
> Patch 3: looks good.
>
> Thanks,
>
> ../Randy
>
>
> On 2025-12-18 8:44 a.m., Yi Zhao via lists.openembedded.org wrote:
>> Create runtime and state directories using RuntimeDirectory and
>> StateDirectory in systemd service files, rather than creating
>> them via ExecStartPre.
>>
>> Signed-off-by: Yi Zhao<yi.zhao@windriver.com>
>> ---
>> .../kea/files/kea-dhcp-ddns.service | 7 +++++--
>> .../recipes-connectivity/kea/files/kea-dhcp4.service | 8 +++++---
>> .../recipes-connectivity/kea/files/kea-dhcp6.service | 8 +++++---
>> meta/recipes-connectivity/kea/kea_3.0.1.bb | 12 +++++++-----
>> 4 files changed, 22 insertions(+), 13 deletions(-)
>>
>> diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service
>> index aec6446f0e..feef7e0b6e 100644
>> --- a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service
>> +++ b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service
>> @@ -5,8 +5,11 @@ After=network-online.target
>> After=time-sync.target
>>
>> [Service]
>> -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
>> -ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
>> +RuntimeDirectory=kea
>> +RuntimeDirectoryMode=0750
>> +RuntimeDirectoryPreserve=yes
>> +StateDirectory=kea
>> +StateDirectoryMode=0750
>> ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf
>>
>> [Install]
>> diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp4.service b/meta/recipes-connectivity/kea/files/kea-dhcp4.service
>> index a2ed4edb59..ce1256cf26 100644
>> --- a/meta/recipes-connectivity/kea/files/kea-dhcp4.service
>> +++ b/meta/recipes-connectivity/kea/files/kea-dhcp4.service
>> @@ -5,9 +5,11 @@ After=network-online.target
>> After=time-sync.target
>>
>> [Service]
>> -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
>> -ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
>> -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea
>> +RuntimeDirectory=kea
>> +RuntimeDirectoryMode=0750
>> +RuntimeDirectoryPreserve=yes
>> +StateDirectory=kea
>> +StateDirectoryMode=0750
>> ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf
>>
>> [Install]
>> diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp6.service b/meta/recipes-connectivity/kea/files/kea-dhcp6.service
>> index ed6e017d0c..6123a8ad58 100644
>> --- a/meta/recipes-connectivity/kea/files/kea-dhcp6.service
>> +++ b/meta/recipes-connectivity/kea/files/kea-dhcp6.service
>> @@ -5,9 +5,11 @@ After=network-online.target
>> After=time-sync.target
>>
>> [Service]
>> -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
>> -ExecStartPre=@BASE_BINDIR@/chmod 750 @LOCALSTATEDIR@/run/kea/
>> -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea
>> +RuntimeDirectory=kea
>> +RuntimeDirectoryMode=0750
>> +RuntimeDirectoryPreserve=yes
>> +StateDirectory=kea
>> +StateDirectoryMode=0750
>> ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf
>>
>> [Install]
>> diff --git a/meta/recipes-connectivity/kea/kea_3.0.1.bb b/meta/recipes-connectivity/kea/kea_3.0.1.bb
>> index 8729b1162e..1be557c79a 100644
>> --- a/meta/recipes-connectivity/kea/kea_3.0.1.bb
>> +++ b/meta/recipes-connectivity/kea/kea_3.0.1.bb
>> @@ -74,13 +74,15 @@ do_install:append() {
>> ${D}${sbindir}/kea-admin
>> rm -rf ${D}${datadir}/${BPN}/meson-info
>> rm -rf ${D}${runtimedir}
>> + rm -rf ${D}${localstatedir}
>> }
>>
>> -do_install:append() {
>> - rm -rf "${D}${localstatedir}"
>> -}
>> -
>> -CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf"
>> +CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf \
>> + ${sysconfdir}/kea/kea-ctrl-agent.conf \
>> + ${sysconfdir}/kea/kea-dhcp-ddns.conf \
>> + ${sysconfdir}/kea/kea-dhcp4.conf \
>> + ${sysconfdir}/kea/kea-dhcp6.conf \
>> + "
>>
>> PACKAGES =+ "${PN}-python"
>> FILES:${PN}-python = "${nonarch_libdir}/python*/site-packages/*"
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#228122):https://lists.openembedded.org/g/openembedded-core/message/228122
>> Mute This Topic:https://lists.openembedded.org/mt/116841995/3616765
>> Group Owner:openembedded-core+owner@lists.openembedded.org
>> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [randy.macleod@windriver.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>
> --
> # Randy MacLeod
> # Wind River Linux
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-12-23 13:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-18 13:44 [PATCH 1/3 V2] kea: fix creating runtime directory in service files Yi Zhao
2025-12-18 13:44 ` [PATCH 2/3 V2] kea: replace keactrl with kea daemons in initscripts Yi Zhao
2025-12-18 13:44 ` [PATCH 3/3 V2] kea: remove keactrl from package Yi Zhao
2025-12-22 17:34 ` [OE-core] [PATCH 1/3 V2] kea: fix creating runtime directory in service files Randy MacLeod
2025-12-23 13:41 ` Yi Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox