diff mbox series

[BlueZ,v2,1/2] build: add bluez.tmpfiles

Message ID 20250418153115.1714964-2-kernel.org@pileofstuff.org (mailing list archive)
State New
Headers show
Series obexd: only run one instance at once | expand

Commit Message

Andrew Sayers April 18, 2025, 3:30 p.m. UTC
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.

Signed-off-by: Andrew Sayers <kernel.org@pileofstuff.org>
---
 .gitignore              | 1 +
 configure.ac            | 1 +
 tools/bluez.tmpfiles.in | 0
 3 files changed, 2 insertions(+)
 create mode 100644 tools/bluez.tmpfiles.in

Comments

Luiz Augusto von Dentz April 18, 2025, 3:35 p.m. UTC | #1
Hi Andrew,

On Fri, Apr 18, 2025 at 11:31 AM Andrew Sayers
<kernel.org@pileofstuff.org> 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.

I thought we would not be adding this anymore with the addition to '-'
prefix and the added comments that should be left to distros to figure
it out.

> Signed-off-by: Andrew Sayers <kernel.org@pileofstuff.org>
> ---
>  .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
>
>
Andrew Sayers April 18, 2025, 4:40 p.m. UTC | #2
On 18/04/2025 16:35, Luiz Augusto von Dentz wrote:
> Hi Andrew,
>
> On Fri, Apr 18, 2025 at 11:31 AM Andrew Sayers
> <kernel.org@pileofstuff.org> 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.
> I thought we would not be adding this anymore with the addition to '-'
> prefix and the added comments that should be left to distros to figure
> it out.

Ah sorry, I thought you meant to add the comment *instead of* the '-'.
Leaving it to distro's feels a bit dangerous, but Pauli Virtanen's idea
seems like a better approach anyway (thanks Pauli!).

I'll take a look at that and should be back with a v3 next week.

>
>> Signed-off-by: Andrew Sayers <kernel.org@pileofstuff.org>
>> ---
>>   .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
>>
>>
>
Pauli Virtanen April 18, 2025, 5:26 p.m. UTC | #3
pe, 2025-04-18 kello 17:40 +0100, Andrew Sayers kirjoitti:
> On 18/04/2025 16:35, Luiz Augusto von Dentz wrote:
> > Hi Andrew,
> > 
> > On Fri, Apr 18, 2025 at 11:31 AM Andrew Sayers
> > <kernel.org@pileofstuff.org> 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.
> > I thought we would not be adding this anymore with the addition to '-'
> > prefix and the added comments that should be left to distros to figure
> > it out.
> 
> Ah sorry, I thought you meant to add the comment *instead of* the '-'.
> Leaving it to distro's feels a bit dangerous, but Pauli Virtanen's idea
> seems like a better approach anyway (thanks Pauli!).
> 
> I'll take a look at that and should be back with a v3 next week.

Note though that the seat state monitoring also has some drawbacks,
e.g. ssh logins are not considered "active" so for headless / system-
wide obexd configurations you'd probably want some command-line or
configuration option to disable the feature.

> > > Signed-off-by: Andrew Sayers <kernel.org@pileofstuff.org>
> > > ---
> > >   .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
> > > 
> > > 
> >
Luiz Augusto von Dentz April 18, 2025, 6:09 p.m. UTC | #4
Hi Pauli,

On Fri, Apr 18, 2025 at 1:26 PM Pauli Virtanen <pav@iki.fi> wrote:
>
> pe, 2025-04-18 kello 17:40 +0100, Andrew Sayers kirjoitti:
> > On 18/04/2025 16:35, Luiz Augusto von Dentz wrote:
> > > Hi Andrew,
> > >
> > > On Fri, Apr 18, 2025 at 11:31 AM Andrew Sayers
> > > <kernel.org@pileofstuff.org> 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.
> > > I thought we would not be adding this anymore with the addition to '-'
> > > prefix and the added comments that should be left to distros to figure
> > > it out.
> >
> > Ah sorry, I thought you meant to add the comment *instead of* the '-'.
> > Leaving it to distro's feels a bit dangerous, but Pauli Virtanen's idea
> > seems like a better approach anyway (thanks Pauli!).
> >
> > I'll take a look at that and should be back with a v3 next week.
>
> Note though that the seat state monitoring also has some drawbacks,
> e.g. ssh logins are not considered "active" so for headless / system-
> wide obexd configurations you'd probably want some command-line or
> configuration option to disable the feature.

I wonder if it wouldn't make sense to add seat options directly into
the systemd service file so it does the monitoring by itself rather
than each component having to do it on its own.

> > > > Signed-off-by: Andrew Sayers <kernel.org@pileofstuff.org>
> > > > ---
> > > >   .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
> > > >
> > > >
> > >
>
> --
> Pauli Virtanen
diff mbox series

Patch

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