Re: [PATCH BlueZ 1/2] build: add bluez.tmpfiles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/04/2025 16:31, Luiz Augusto von Dentz wrote:
Hi Andrew,

On Wed, Apr 16, 2025 at 11:21 AM Andrew Sayers
<kernel.org@xxxxxxxxxxxxxxx> wrote:
Systemd tmpfiles ensure the status of particular files.
Add a file that bluez can use in future.

Distributors should install the new "tools/bluez.tmpfiles" file, e.g. by
moving it to `debian/bluez.tmpfile` or using Fedora's `%{_tmpfilesdir}`
variable.
Not really following the purpose of this one, it just in order to tell
the packages to create this file? Is this specific to obexd lock file?
If it is then we probably should have it somewhere under obexd folder.
We need a directory for the lock file that's guaranteed to be world-writable,
but in some distributions (e.g. Fedora), /run/lock is only writable by root.
systemd-tmpfiles is systemd's solution to this problem - config files like this
go in /usr/lib/tmpfiles.d and tell systemd to create files at boot time.
In this case, patch 2/2 adds an instruction to create `/run/lock/bluez`.

Distro's need to install this in some distro-specific way, so I split
it out into its own commit to make it easier for them to spot.  As
that's a bit of extra work for them, I've proposed creating a more
general file that can be reused in the (plausible but not probable)
case another temporary file is required some time in the future.
Happy to make the file obex-specific instead if that's better, in
which case I'll call the temp directory /run/lock/obex.
Signed-off-by: Andrew Sayers <kernel.org@xxxxxxxxxxxxxxx>
---
  .gitignore              | 1 +
  configure.ac            | 1 +
  tools/bluez.tmpfiles.in | 0
  3 files changed, 2 insertions(+)
  create mode 100644 tools/bluez.tmpfiles.in

diff --git a/.gitignore b/.gitignore
index 108c3b820..e4431443f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -157,6 +157,7 @@ obexd/src/obex.service
  obexd/src/org.bluez.obex.service
  tools/obex-client-tool
  tools/obex-server-tool
+tools/bluez.tmpfiles
  unit/test-gobex
  unit/test-gobex-apparam
  unit/test-gobex-header
diff --git a/configure.ac b/configure.ac
index 1e089aaa7..4ebd513d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -530,5 +530,6 @@ AC_CONFIG_FILES(
         src/bluetooth.service
         tools/bluetooth-logger.service
         tools/mpris-proxy.service
+       tools/bluez.tmpfiles
  )
  AC_OUTPUT
diff --git a/tools/bluez.tmpfiles.in b/tools/bluez.tmpfiles.in
new file mode 100644
index 000000000..e69de29bb
--
2.49.0







[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux