diff mbox series

[1/2] kea: fix EXTRA_OE config to EXTRA_OEMESON

Message ID 20251020023955.2962-2-liuyd.fnst@fujitsu.com
State Accepted, archived
Commit df3f4196693ae82bddebe134f3af0db92e5d5712
Headers show
Series kea: Fix EXTRA_OE config to EXTRA_OEMESON and installation umask of meson | expand

Commit Message

Liu Yiding Oct. 20, 2025, 2:39 a.m. UTC
After kea has been upgrade to 3.0.1,the build system changed to meson,but the config of build system is still be EXTRA_OECONF. So this commit fix it.

Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
---
 meta/recipes-connectivity/kea/kea_3.0.1.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Quentin Schulz Oct. 20, 2025, 5:05 p.m. UTC | #1
Hi Yiding Liu,

On 10/20/25 4:39 AM, Yiding Liu (Fujitsu) via lists.openembedded.org wrote:
> After kea has been upgrade to 3.0.1,the build system changed to meson,but the config of build system is still be EXTRA_OECONF. So this commit fix it.
> 
> Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
> ---
>   meta/recipes-connectivity/kea/kea_3.0.1.bb | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-connectivity/kea/kea_3.0.1.bb b/meta/recipes-connectivity/kea/kea_3.0.1.bb
> index cc34c05093..06f1a5edc3 100644
> --- a/meta/recipes-connectivity/kea/kea_3.0.1.bb
> +++ b/meta/recipes-connectivity/kea/kea_3.0.1.bb
> @@ -26,7 +26,7 @@ SRC_URI[sha256sum] = "ec84fec4bb7f6b9d15a82e755a571e9348eb4d6fbc62bb3f6f1296cd7a
>   
>   inherit meson pkgconfig systemd update-rc.d upstream-version-is-even
>   
> -EXTRA_OECONF += "-Dcrypto=openssl -Drunstatedir=${runtimedir} -Dkrb5=disabled -Dnetconf=disabled"
> +EXTRA_OEMESON += "-Dcrypto=openssl -Drunstatedir=${runtimedir} -Dkrb5=disabled -Dnetconf=disabled"
>   
>   INITSCRIPT_NAME = "kea-dhcp4-server"
>   INITSCRIPT_PARAMS = "defaults 30"
> @@ -72,6 +72,7 @@ do_install:append() {
>              -e "s:${S}:@abs_top_srcdir_placeholder@:g" \
>              ${D}${sbindir}/kea-admin
>       rm -rf ${D}${datadir}/${BPN}/meson-info
> +    rm -rf ${D}${runtimedir}

This change seems unrelated to the meson build system change (maybe it 
isn't?). Can you explain why this is needed?

Cheers,
Quentin
Liu Yiding Oct. 21, 2025, 6:46 a.m. UTC | #2
Hi Cheers
    When I changed to EXTRA_OEMESON, -Drunstatedir=${runtimedir} will be enabled,
and  it will produce /run directory which will cause do_package QA Error as follows:
ERROR: kea-3.0.1-r0 do_package: QA Issue: kea: Files/directories were installed but not shipped in any package:
  /run
  /run/kea

So I remove ${runtimedir} before do_package.

Liu
________________________________
发件人: Quentin Schulz <quentin.schulz@cherry.de>
发送时间: 2025年10月21日 01:05
收件人: Liu, Yiding/刘 乙丁 <liuyd.fnst@fujitsu.com>; openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>
主题: Re: [OE-core][PATCH 1/2] kea: fix EXTRA_OE config to EXTRA_OEMESON

[You don't often get email from quentin.schulz@cherry.de. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Hi Yiding Liu,

On 10/20/25 4:39 AM, Yiding Liu (Fujitsu) via lists.openembedded.org wrote:
> After kea has been upgrade to 3.0.1,the build system changed to meson,but the config of build system is still be EXTRA_OECONF. So this commit fix it.
>
> Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
> ---
>   meta/recipes-connectivity/kea/kea_3.0.1.bb | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-connectivity/kea/kea_3.0.1.bb b/meta/recipes-connectivity/kea/kea_3.0.1.bb
> index cc34c05093..06f1a5edc3 100644
> --- a/meta/recipes-connectivity/kea/kea_3.0.1.bb
> +++ b/meta/recipes-connectivity/kea/kea_3.0.1.bb
> @@ -26,7 +26,7 @@ SRC_URI[sha256sum] = "ec84fec4bb7f6b9d15a82e755a571e9348eb4d6fbc62bb3f6f1296cd7a
>
>   inherit meson pkgconfig systemd update-rc.d upstream-version-is-even
>
> -EXTRA_OECONF += "-Dcrypto=openssl -Drunstatedir=${runtimedir} -Dkrb5=disabled -Dnetconf=disabled"
> +EXTRA_OEMESON += "-Dcrypto=openssl -Drunstatedir=${runtimedir} -Dkrb5=disabled -Dnetconf=disabled"
>
>   INITSCRIPT_NAME = "kea-dhcp4-server"
>   INITSCRIPT_PARAMS = "defaults 30"
> @@ -72,6 +72,7 @@ do_install:append() {
>              -e "s:${S}:@abs_top_srcdir_placeholder@:g" \
>              ${D}${sbindir}/kea-admin
>       rm -rf ${D}${datadir}/${BPN}/meson-info
> +    rm -rf ${D}${runtimedir}

This change seems unrelated to the meson build system change (maybe it
isn't?). Can you explain why this is needed?

Cheers,
Quentin
Quentin Schulz Oct. 21, 2025, 9:43 a.m. UTC | #3
Hi Yiding Liu,

On 10/21/25 8:46 AM, Yiding Liu (Fujitsu) wrote:
> Hi Cheers
>      When I changed to EXTRA_OEMESON, -Drunstatedir=${runtimedir} will be enabled,
> and  it will produce /run directory which will cause do_package QA Error as follows:
> ERROR: kea-3.0.1-r0 do_package: QA Issue: kea: Files/directories were installed but not shipped in any package:
>    /run
>    /run/kea
> 
> So I remove ${runtimedir} before do_package.
> 

runstatedir is "The directory for installing data files which the 
programs modify while they run". Looking quickly in the source code, it 
seems this is used mainly for control sockets or PID files. Which is 
confirmed by 
https://www.gnu.org/prep/standards/html_node/Directory-Variables.html 
which is pointing at by 
https://github.com/isc-projects/kea/blob/master/ChangeLog#L211-L217.

kea's meson explicitly generates an empty directory for this path, 
hinting that this is necessary for the programs to function correctly.

We have another recipe removing runtimedir which is dbus and it's 
removed because "Remove /run as it is created on startup".

Does kea work properly if the directory pointed at by runtimedir doesn't 
exist? (Note that kea's meson creates a subdirectory named "kea" in the 
runtimedir directory). 
https://kea.readthedocs.io/en/latest/arm/security.html#securing-kea-administrative-access 
seems to indicate that CONTROL_SOCKET_DIR/KEA_CONTROL_SOCKET_DIR is used 
for the control channel which is disabled by default but notes "however, 
many configuration examples have it enabled, as it is a very popular 
feature.". SO I'm wondering if we should not rather *add* runtimedir to 
the package if it's actually necessary?

Cheers,
Quentin
Liu Yiding Oct. 22, 2025, 5:27 a.m. UTC | #4
Hi Cheers

Thanks for your answer.

>>Does kea work properly if the directory pointed at by runtimedir doesn't
exist?
I tryed to start  kea-dhcp-ddns.service in runtime and the runtimedir /run/kea/ was created on startup as dbus.

root@qemux86-64:~# systemctl start kea-dhcp-ddns.service
root@qemux86-64:~# ls /run/
agetty.reload  dbus           klogd.pid      log            sepermit       syslogd.pid    udev           utmp
credentials    kea            lock           mount          sshd           systemd        user
root@qemux86-64:~# ls /run/kea/
kea-ddns-ctrl-socket             kea-ddns-ctrl-socket.lock        kea-dhcp-ddns.kea-dhcp-ddns.pid  logger_lockfile

So I think we can remove ${runtimedir} before do_package.

________________________________


On 10/21/25 8:46 AM, Yiding Liu (Fujitsu) wrote:
> Hi Cheers
>      When I changed to EXTRA_OEMESON, -Drunstatedir=${runtimedir} will be enabled,
> and  it will produce /run directory which will cause do_package QA Error as follows:
> ERROR: kea-3.0.1-r0 do_package: QA Issue: kea: Files/directories were installed but not shipped in any package:
>    /run
>    /run/kea
>
> So I remove ${runtimedir} before do_package.
>

runstatedir is "The directory for installing data files which the
programs modify while they run". Looking quickly in the source code, it
seems this is used mainly for control sockets or PID files. Which is
confirmed by
https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
which is pointing at by
https://github.com/isc-projects/kea/blob/master/ChangeLog#L211-L217.

kea's meson explicitly generates an empty directory for this path,
hinting that this is necessary for the programs to function correctly.

We have another recipe removing runtimedir which is dbus and it's
removed because "Remove /run as it is created on startup".

Does kea work properly if the directory pointed at by runtimedir doesn't
exist? (Note that kea's meson creates a subdirectory named "kea" in the
runtimedir directory).
https://kea.readthedocs.io/en/latest/arm/security.html#securing-kea-administrative-access
seems to indicate that CONTROL_SOCKET_DIR/KEA_CONTROL_SOCKET_DIR is used
for the control channel which is disabled by default but notes "however,
many configuration examples have it enabled, as it is a very popular
feature.". SO I'm wondering if we should not rather *add* runtimedir to
the package if it's actually necessary?

Cheers,
Quentin
Quentin Schulz Oct. 22, 2025, 9:04 a.m. UTC | #5
Hi Yiding Liu,

On 10/22/25 7:27 AM, Yiding Liu (Fujitsu) wrote:
>   Hi Cheers
> 
> Thanks for your answer.
> 
>>> Does kea work properly if the directory pointed at by runtimedir doesn't
> exist?
> I tryed to start  kea-dhcp-ddns.service in runtime and the runtimedir /run/kea/ was created on startup as dbus.
> 
> root@qemux86-64:~# systemctl start kea-dhcp-ddns.service
> root@qemux86-64:~# ls /run/
> agetty.reload  dbus           klogd.pid      log            sepermit       syslogd.pid    udev           utmp
> credentials    kea            lock           mount          sshd           systemd        user
> root@qemux86-64:~# ls /run/kea/
> kea-ddns-ctrl-socket             kea-ddns-ctrl-socket.lock        kea-dhcp-ddns.kea-dhcp-ddns.pid  logger_lockfile
> 
> So I think we can remove ${runtimedir} before do_package.
> 

Great! Thanks for confirming! Can you add a comment like for 
meta/recipes-core/dbus/dbus_1.16.2.bb?

  # Remove /run as it is created on startup

What do you think?

Cheers,
Quentin
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/kea/kea_3.0.1.bb b/meta/recipes-connectivity/kea/kea_3.0.1.bb
index cc34c05093..06f1a5edc3 100644
--- a/meta/recipes-connectivity/kea/kea_3.0.1.bb
+++ b/meta/recipes-connectivity/kea/kea_3.0.1.bb
@@ -26,7 +26,7 @@  SRC_URI[sha256sum] = "ec84fec4bb7f6b9d15a82e755a571e9348eb4d6fbc62bb3f6f1296cd7a
 
 inherit meson pkgconfig systemd update-rc.d upstream-version-is-even
 
-EXTRA_OECONF += "-Dcrypto=openssl -Drunstatedir=${runtimedir} -Dkrb5=disabled -Dnetconf=disabled"
+EXTRA_OEMESON += "-Dcrypto=openssl -Drunstatedir=${runtimedir} -Dkrb5=disabled -Dnetconf=disabled"
 
 INITSCRIPT_NAME = "kea-dhcp4-server"
 INITSCRIPT_PARAMS = "defaults 30"
@@ -72,6 +72,7 @@  do_install:append() {
            -e "s:${S}:@abs_top_srcdir_placeholder@:g" \
            ${D}${sbindir}/kea-admin
     rm -rf ${D}${datadir}/${BPN}/meson-info
+    rm -rf ${D}${runtimedir}
 }
 
 do_install:append() {