All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov via B4 Relay <devnull+emil.l.velikov.gmail.com@kernel.org>
To: linux-bluetooth@vger.kernel.org
Cc: Emil Velikov <emil.velikov@collabora.com>
Subject: [PATCH BlueZ 9/9] build: ship all config files with --enable-datafiles
Date: Wed, 24 Jan 2024 23:44:03 +0000	[thread overview]
Message-ID: <20240124-disto-patches-v1-9-97e0eb5625a3@gmail.com> (raw)
In-Reply-To: <20240124-disto-patches-v1-0-97e0eb5625a3@gmail.com>

From: Emil Velikov <emil.velikov@collabora.com>

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.
---
Some distributions do toggle some of the default values, by patching the
source tree. Future patches will add support for more maintainable
configuration handling akin to `man sysctl.d`.
---
 Makefile.am   | 8 +++++++-
 Makefile.mesh | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index e738eb3a5..9c19cec49 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 63f085de1..930262d53 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.43.0


WARNING: multiple messages have this Message-ID (diff)
From: Emil Velikov <emil.l.velikov@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Emil Velikov <emil.velikov@collabora.com>
Subject: [PATCH BlueZ 9/9] build: ship all config files with --enable-datafiles
Date: Wed, 24 Jan 2024 23:44:03 +0000	[thread overview]
Message-ID: <20240124-disto-patches-v1-9-97e0eb5625a3@gmail.com> (raw)
In-Reply-To: <20240124-disto-patches-v1-0-97e0eb5625a3@gmail.com>

From: Emil Velikov <emil.velikov@collabora.com>

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.
---
Some distributions do toggle some of the default values, by patching the
source tree. Future patches will add support for more maintainable
configuration handling akin to `man sysctl.d`.
---
 Makefile.am   | 8 +++++++-
 Makefile.mesh | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index e738eb3a5..9c19cec49 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 63f085de1..930262d53 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.43.0


  parent reply	other threads:[~2024-01-24 23:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 23:43 [PATCH BlueZ 0/9] Distribution inspired fixes Emil Velikov via B4 Relay
2024-01-24 23:43 ` Emil Velikov
2024-01-24 23:43 ` [PATCH BlueZ 1/9] Enable alternate Bluetooth connection modes Emil Velikov via B4 Relay
2024-01-24 23:43   ` Emil Velikov
2024-01-25  2:29   ` Distribution inspired fixes bluez.test.bot
2024-01-25  3:05   ` [PATCH BlueZ 1/9] Enable alternate Bluetooth connection modes Vicki Pfau
2024-01-25 13:41     ` Emil Velikov
2024-01-25  3:54   ` Luiz Augusto von Dentz
2024-01-25 13:39     ` Emil Velikov
2024-01-25 14:59       ` Luiz Augusto von Dentz
2024-01-25 16:32         ` Emil Velikov
2024-01-25 18:18           ` Luiz Augusto von Dentz
2024-01-24 23:43 ` [PATCH BlueZ 2/9] Return at least the title attribute from player_list_metadata() Emil Velikov via B4 Relay
2024-01-24 23:43   ` Emil Velikov
2024-01-24 23:43 ` [PATCH BlueZ 3/9] adapter: Remove experimental flag for PowerState Emil Velikov via B4 Relay
2024-01-24 23:43   ` Emil Velikov
2024-01-24 23:43 ` [PATCH BlueZ 4/9] test: consistently use /usr/bin/env python3 shebang Emil Velikov via B4 Relay
2024-01-24 23:43   ` Emil Velikov
2024-01-24 23:43 ` [PATCH BlueZ 5/9] profiles: remove unused suspend-dummy.c Emil Velikov via B4 Relay
2024-01-24 23:43   ` Emil Velikov
2024-01-24 23:44 ` [PATCH BlueZ 6/9] obex: remove unused syncevolution plugin Emil Velikov via B4 Relay
2024-01-24 23:44   ` Emil Velikov
2024-01-24 23:44 ` [PATCH BlueZ 7/9] obex: remove unused mas/messages-tracker impl Emil Velikov via B4 Relay
2024-01-24 23:44   ` Emil Velikov
2024-01-24 23:44 ` [PATCH BlueZ 8/9] obex: remove phonebook tracker backend Emil Velikov via B4 Relay
2024-01-24 23:44   ` Emil Velikov
2024-01-24 23:44 ` Emil Velikov via B4 Relay [this message]
2024-01-24 23:44   ` [PATCH BlueZ 9/9] build: ship all config files with --enable-datafiles Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240124-disto-patches-v1-9-97e0eb5625a3@gmail.com \
    --to=devnull+emil.l.velikov.gmail.com@kernel.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=emil.velikov@collabora.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.