diff mbox series

[V3] bluez5: change configuration directory mode

Message ID 20221005195128.9978-1-liu.ming50@gmail.com
State New
Headers show
Series [V3] bluez5: change configuration directory mode | expand

Commit Message

Ming Liu Oct. 5, 2022, 7:51 p.m. UTC
From: Ming Liu <liu.ming50@gmail.com>

Change configuration directory mode from 0755 to 0555, this fixes a
following warning when bluetoothd starts:
| ConfigurationDirectory 'bluetooth' already exists but the mode is different.
| (File system: 755 ConfigurationDirectoryMode: 555)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
 meta/recipes-connectivity/bluez5/bluez5.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Luca Ceresoli Oct. 6, 2022, 9:37 a.m. UTC | #1
Hello Ming Liu,

On Wed,  5 Oct 2022 21:51:28 +0200
"Ming Liu" <liu.ming50@gmail.com> wrote:

> From: Ming Liu <liu.ming50@gmail.com>
> 
> Change configuration directory mode from 0755 to 0555, this fixes a
> following warning when bluetoothd starts:
> | ConfigurationDirectory 'bluetooth' already exists but the mode is different.
> | (File system: 755 ConfigurationDirectoryMode: 555)
> 
> Signed-off-by: Ming Liu <liu.ming50@gmail.com>
> ---
>  meta/recipes-connectivity/bluez5/bluez5.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
> index 79d4645ca8..9f5c78b81e 100644
> --- a/meta/recipes-connectivity/bluez5/bluez5.inc
> +++ b/meta/recipes-connectivity/bluez5/bluez5.inc
> @@ -82,7 +82,7 @@ do_install:append() {
>  	install -d ${D}${INIT_D_DIR}
>  	install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
>  
> -	install -d ${D}${sysconfdir}/bluetooth/
> +	install -m 0555 -d ${D}${sysconfdir}/bluetooth/

This change triggers errors in the do_testsdk task of core-image-sato,
as reported by the autobuilders:

Exception: subprocess.CalledProcessError: Command '['rm', '-rf', '/home/pokybuild/yocto-worker/qemumips64/build/build/tmp/work/qemumips64-poky-linux/core-image-sato/1.0-r0/testimage-sdk/']' returned non-zero exit status 1.

Some logs are:

https://autobuilder.yoctoproject.org/typhoon/#/builders/74/builds/5911/steps/15/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/73/builds/5909/steps/15/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/53/builds/5960/steps/16/logs/stdio

The reason, not visible in those logs, is that the new permissions do
not allow removing files in ${sysconfdir}/bluetooth/.

Your patch looks legitimate after the upstream change [1] so I'm afraid
I don't know which would be the best solution here. Some ideas that
come to mind, least ugly first:

1) chmod -R ugo+w on the entire tree before calling 'rm'
2) revert the upstream patch -- not good for oe-core maintainability

BTW please mention [1] in your commit message should you send a new
patch to handle this issue.

[1]
https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=00cfb36e20e3c35db2150e7d0351ad7b8442e2d8
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index 79d4645ca8..9f5c78b81e 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -82,7 +82,7 @@  do_install:append() {
 	install -d ${D}${INIT_D_DIR}
 	install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
 
-	install -d ${D}${sysconfdir}/bluetooth/
+	install -m 0555 -d ${D}${sysconfdir}/bluetooth/
 	if [ -f ${S}/profiles/network/network.conf ]; then
 		install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/
 	fi