From 7665fb5d943c3910465123fc7b08922e44adb7a2 Mon Sep 17 00:00:00 2001 From: Max Gautier Date: Mon, 4 Mar 2024 15:21:57 +0100 Subject: [PATCH] Don't install conf and state dir on systemd 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.47.3