public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Randy MacLeod <randy.macleod@windriver.com>
To: yi.zhao@eng.windriver.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 1/3 V2] kea: fix creating runtime directory in service files
Date: Mon, 22 Dec 2025 12:34:37 -0500	[thread overview]
Message-ID: <af7814b2-9d54-4235-bb21-c1aac90638ff@windriver.com> (raw)
In-Reply-To: <20251218134426.4187527-1-yi.zhao@windriver.com>

[-- 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 --]

  parent reply	other threads:[~2025-12-22 17:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-12-23 13:41   ` [OE-core] [PATCH 1/3 V2] kea: fix creating runtime directory in service files Yi Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=af7814b2-9d54-4235-bb21-c1aac90638ff@windriver.com \
    --to=randy.macleod@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=yi.zhao@eng.windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox