2024-03-04 15:03:42

by Max Gautier

[permalink] [raw]
Subject: [PATCH BlueZ] 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.44.0



2024-03-04 15:34:27

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ] Don't install conf and state dir on systemd

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

2024-03-04 21:01:00

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ] Don't install conf and state dir on systemd

Hello:

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

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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html