diff mbox series

[BlueZ] Don't install conf and state dir on systemd

Message ID 20240304142200.69968-1-mg@max.gautier.name
State New
Headers show
Series [BlueZ] Don't install conf and state dir on systemd | expand

Commit Message

Max Gautier March 4, 2024, 2:21 p.m. UTC
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 mbox series

Patch

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