diff mbox series

[scarthgap,2/2] bluez5: Install /etc/bluetooth/main.conf

Message ID 20240910000209.3330191-2-pkj@axis.com
State Deferred
Headers show
Series [scarthgap,1/2] Revert "bluez5: remove configuration files from install task" | expand

Commit Message

Peter Kjellerstedt Sept. 10, 2024, 12:02 a.m. UTC
This matches what is installed in /etc/bluetooth by bluez 5.73+.

Also remove the if-statements testing the existence of the other files
installed to /etc/bluetooth as they are not needed (the files have
existed since bluez 4.0).

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/recipes-connectivity/bluez5/bluez5.inc | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

Comments

Guðni Már Gilbert Sept. 10, 2024, 8:17 a.m. UTC | #1
Hi thanks for the patch. I have one concern. Normally one would install a custom main.conf and not the one from BlueZ. With these changes is that still possible with a bbappend? The file must be installed in the same folder, I worry if this creates a conflict when two recipes are installing main.conf.

Best regards,
Gudni
Peter Kjellerstedt Oct. 23, 2024, 10:31 p.m. UTC | #2
This just installs a default main.conf file (which matches what 5.73+ does in Styhead and on master). If you have a bbappend that installs its own main.conf file, then that will overwrite the default file without any problems. On the other hand, if you have a separate recipe that installs its own version of main.conf, then there will now be a conflict.

Steve: I leave it to you to decide if you want to take this second patch, but the first patch in the series should be applied to restore the previous behavior.

//Peter

From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Guðni Már Gilbert
Sent: den 10 september 2024 10:18
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [scarthgap][PATCH 2/2] bluez5: Install /etc/bluetooth/main.conf

Hi thanks for the patch. I have one concern. Normally one would install a custom main.conf and not the one from BlueZ. With these changes is that still possible with a bbappend? The file must be installed in the same folder, I worry if this creates a conflict when two recipes are installing main.conf.

Best regards,
Gudni
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index e10158a6e5..fd0f58f3fc 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -87,13 +87,10 @@  do_install:append() {
 	install -d ${D}${INIT_D_DIR}
 	install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
 
-	install -d ${D}${sysconfdir}/bluetooth/
-	if [ -f ${S}/profiles/network/network.conf ]; then
-		install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/
-	fi
-	if [ -f ${S}/profiles/input/input.conf ]; then
-		install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/
-	fi
+	install -d ${D}${sysconfdir}/bluetooth
+	install -m 0644 ${S}/src/main.conf ${D}${sysconfdir}/bluetooth
+	install -m 0644 ${S}/profiles/network/network.conf ${D}${sysconfdir}/bluetooth
+	install -m 0644 ${S}/profiles/input/input.conf ${D}${sysconfdir}/bluetooth
 
 	if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then
 		sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth