linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ] Don't install conf and state dir on systemd
@ 2024-03-04 14:21 Max Gautier
  2024-03-04 15:32 ` [BlueZ] " bluez.test.bot
  2024-03-04 21:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Max Gautier @ 2024-03-04 14:21 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Max Gautier

The bluetooth.service file already specify the State and Configuration
directories with the correct modes, which guarantee they will be
available (with proper permissions) when bluetoohd starts.

Not installing those helps implementing the "Hermetic /usr" pattern
(TL;DR: '/usr' contains everything necessary to boostrap a working
system)

Handling this in upstream bluez (rather than in distribution packaging
scripts) avoid duplication of efforts between distros.

Links: https://0pointer.net/blog/fitting-everything-together.html
---
 Makefile.am | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index d94839856..ed4f9dc51 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -422,7 +422,12 @@ include Makefile.obexd
 include android/Makefile.am
 include Makefile.mesh
 
+if SYSTEMD
+install-data-hook: obexd-add-service-symlink
+else
 install-data-hook: bluetoothd-fix-permissions obexd-add-service-symlink
+endif
+
 uninstall-hook: obexd-remove-service-symlink
 
 if HID2HCI
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-04 21:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-04 14:21 [PATCH BlueZ] Don't install conf and state dir on systemd Max Gautier
2024-03-04 15:32 ` [BlueZ] " bluez.test.bot
2024-03-04 21:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).