Skip to content

Commit

Permalink
Don't install conf and state dir on systemd
Browse files Browse the repository at this point in the history
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
  • Loading branch information
VannTen authored and Vudentz committed Mar 4, 2024
1 parent 3eba64b commit 7665fb5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile.am
Expand Up @@ -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
Expand Down

0 comments on commit 7665fb5

Please sign in to comment.