Skip to contentSkip to conversation

Revert "bluez5: remove configuration files from install task"

PATCH In review Peter Kjellerstedt 3 participants 4 messages Sep 10, 2024 – Oct 23, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Revert "bluez5: remove configuration files from install task"

This reverts commit 49391fdcf71b32c5fd3c7b134c1d1c45cc1db388.

It motivated the removal of the installation of files in /etc/bluetooth with that commit be0e796299b0 ("build: ship all config files with --enable-datafiles") in bluez already does it. However, that commit is part of bluez 5.73 while the recipe is only at 5.72.

---
 meta/recipes-connectivity/bluez5/bluez5.inc | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-connectivity/bluez5/bluez5.inc +8 -0
index a31d7076ba..e10158a6e5 100644
@@ -87,6 +87,14 @@ 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
+
 	if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then
 		sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth
 	fi
#1 lore raw

PATCH 2/2 bluez5: Install /etc/bluetooth/main.conf

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).

---
 meta/recipes-connectivity/bluez5/bluez5.inc | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
meta/recipes-connectivity/bluez5/bluez5.inc +4 -7
index e10158a6e5..fd0f58f3fc 100644
@@ -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
#2 lore raw

Re: [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

#3 lore raw

RE: [OE-core] [scarthgap][PATCH 2/2] bluez5: Install /etc/bluetooth/main.conf

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: [email protected] <[email protected]> On Behalf Of Guðni Már Gilbert
Sent: den 10 september 2024 10:18
To: [email protected]
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