Skip to contentSkip to conversation

Don't install conf and state dir on systemd

PATCH Applied Max Gautier 3 participants 3 messages Mar 4, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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(+)
Makefile.am +5 -0
index d94839856..ed4f9dc51 100644
@@ -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
Signature · 1 line
2.44.0
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=832119

---Test result---

Test Summary:

CheckPatch                    PASS      0.41 seconds
GitLint                       PASS      0.31 seconds
BuildEll                      PASS      25.01 seconds
BluezMake                     PASS      725.21 seconds
MakeCheck                     PASS      11.83 seconds
MakeDistcheck                 PASS      166.95 seconds
CheckValgrind                 PASS      229.44 seconds
CheckSmatch                   PASS      340.07 seconds
bluezmakeextell               PASS      109.26 seconds
IncrementalBuild              PASS      670.91 seconds
ScanBuild                     PASS      965.73 seconds

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Max Gautier
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 9 lines · On Mon, 4 Mar 2024 15:21:57 +0100 you wrote:

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)

[...]

Here is the summary with links:
- [BlueZ] Don't install conf and state dir on systemd

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=7665fb5d943c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html