diff mbox series

[scarthgap] bluez5: backport configuration file shipping from 5.73 to 5.72

Message ID 20250108110844.3849307-1-catalin.popescu@leica-geosystems.com
State New
Headers show
Series [scarthgap] bluez5: backport configuration file shipping from 5.73 to 5.72 | expand

Commit Message

Catalin Popescu Jan. 8, 2025, 11:08 a.m. UTC
Commit 49391fdcf71b32c5fd3c7b134c1d1c45cc1db388 removed the shipping of
configuration files from install task too early. The configuration files
shipping has been added to bluez5 5.73 whereas scarthgap is on older
version 5.72. To address this issue backport the patch from 5.73 to 5.72
and add it to the bluez5 recipe.

Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
---
 meta/recipes-connectivity/bluez5/bluez5.inc   |  1 +
 ...l-config-files-with-enable-datafiles.patch | 61 +++++++++++++++++++
 2 files changed, 62 insertions(+)
 create mode 100644 meta/recipes-connectivity/bluez5/bluez5/0001-build-ship-all-config-files-with-enable-datafiles.patch


base-commit: 01423828248b75e1f5afe2e5959ccd971df875cd
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index 3f2f096aac..d7283fba00 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -54,6 +54,7 @@  SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
            ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
            file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
            file://0001-test-gatt-Fix-hung-issue.patch \
+           file://0001-build-ship-all-config-files-with-enable-datafiles.patch \
            "
 S = "${WORKDIR}/bluez-${PV}"
 
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-build-ship-all-config-files-with-enable-datafiles.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-build-ship-all-config-files-with-enable-datafiles.patch
new file mode 100644
index 0000000000..6e10674bf9
--- /dev/null
+++ b/meta/recipes-connectivity/bluez5/bluez5/0001-build-ship-all-config-files-with-enable-datafiles.patch
@@ -0,0 +1,61 @@ 
+From be0e796299b0e7a73bf06c5655b56180588550b0 Mon Sep 17 00:00:00 2001
+From: Emil Velikov <emil.velikov@collabora.com>
+Date: Mon, 12 Feb 2024 20:02:44 +0000
+Subject: [PATCH] build: ship all config files with --enable-datafiles
+
+Currently we ship only the dbus/systemd policy files and omit the other
+four - /etc/bluetooth/{main,mesh-main,input,network}.conf.
+
+Outside of those files, there is no documentation what the defaults are
+and the other possible options. A number of distributions (Arch, Gentoo,
+Fedora) have opted to manually copy those into the package. Alas this
+does not scale and leaves other distros at disadvantage, in a sense.
+
+Note: we need a custom install target to ensure confdir and statedir
+have the correct permissions.
+
+Upstream-Status: Backport [5.73]
+Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
+---
+ Makefile.am   | 8 +++++++-
+ Makefile.mesh | 1 +
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 2b1b9acdf..2cbfed2db 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -31,11 +31,17 @@ AM_LDFLAGS = $(MISC_LDFLAGS)
+ confdir = $(sysconfdir)/bluetooth
+ statedir = $(localstatedir)/lib/bluetooth
+ 
++install-data-hook:
++	install -dm555 $(DESTDIR)$(confdir)
++	install -dm700 $(DESTDIR)$(statedir)
++
+ if DATAFILES
+ dbusdir = $(DBUS_CONFDIR)/dbus-1/system.d
+ dbus_DATA = src/bluetooth.conf
+ 
+-conf_DATA =
++conf_DATA = src/main.conf
++conf_DATA += profiles/input/input.conf
++conf_DATA += profiles/network/network.conf
+ state_DATA =
+ endif
+ 
+diff --git a/Makefile.mesh b/Makefile.mesh
+index ea50383d2..e4c9fa6a3 100644
+--- a/Makefile.mesh
++++ b/Makefile.mesh
+@@ -3,6 +3,7 @@ if MESH
+ 
+ if DATAFILES
+ dbus_DATA += mesh/bluetooth-mesh.conf
++conf_DATA += mesh/mesh-main.conf
+ endif
+ 
+ if SYSTEMD
+-- 
+2.34.1
+