2023-08-08 21:59:56

by Gioele Barabucci

[permalink] [raw]
Subject: [PATCH BlueZ v2] configure.ac: Install D-Bus policy in /usr/share, not /etc

From https://bugs.debian.org/1006631:

> dbus supports policy files in both `/usr/share/dbus-1/system.d` and
> `/etc/dbus-1/systemd`. [The] recently released dbus 1.14.0, officially
> deprecates installing packages' default policies into
> `/etc/dbus-1/systemd`, instead reserving it for the sysadmin.
> This is the same idea as the difference between `/usr/lib/udev/rules.d`
> and `/etc/udev/rules.d`.
---
v2: bump D-Bus min version, derive DBUS_CONFDIR from datadir
---
configure.ac | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index bc7edfcd3..ad864dea7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,23 +82,23 @@ if (test "${enable_threads}" = "yes"); then
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
AC_MSG_ERROR(GThread >= 2.16 is required))
GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
fi

-PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.6, dummy=yes,
- AC_MSG_ERROR(D-Bus >= 1.6 is required))
+PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.10, dummy=yes,
+ AC_MSG_ERROR(D-Bus >= 1.10 is required))
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)

AC_ARG_WITH([dbusconfdir], AS_HELP_STRING([--with-dbusconfdir=DIR],
[path to D-Bus configuration directory]),
[path_dbusconfdir=${withval}])
if (test -z "${path_dbusconfdir}"); then
AC_MSG_CHECKING([D-Bus configuration directory])
- path_dbusconfdir="`$PKG_CONFIG --variable=sysconfdir dbus-1`"
+ path_dbusconfdir="`$PKG_CONFIG --variable=datadir dbus-1`"
if (test -z "${path_dbusconfdir}"); then
AC_MSG_ERROR([D-Bus configuration directory is required])
fi
AC_MSG_RESULT([${path_dbusconfdir}])
fi
AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
--
2.39.2



2023-08-08 23:47:18

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ,v2] configure.ac: Install D-Bus policy in /usr/share, not /etc

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=774263

---Test result---

Test Summary:
CheckPatch PASS 0.34 seconds
GitLint PASS 0.24 seconds
BuildEll PASS 32.73 seconds
BluezMake PASS 998.03 seconds
MakeCheck PASS 13.17 seconds
MakeDistcheck PASS 187.49 seconds
CheckValgrind PASS 306.13 seconds
CheckSmatch PASS 405.81 seconds
bluezmakeextell PASS 124.90 seconds
IncrementalBuild PASS 817.38 seconds
ScanBuild PASS 1262.49 seconds



---
Regards,
Linux Bluetooth

2023-08-09 06:16:59

by Paul Menzel

[permalink] [raw]
Subject: Re: [PATCH BlueZ v2] configure.ac: Install D-Bus policy in /usr/share, not /etc

Dear Gioele,


Thank you very much for your patch.

Am 08.08.23 um 22:00 schrieb Gioele Barabucci:
> From https://bugs.debian.org/1006631:
>
>> dbus supports policy files in both `/usr/share/dbus-1/system.d` and
>> `/etc/dbus-1/systemd`. [The] recently released dbus 1.14.0, officially
>> deprecates installing packages' default policies into
>> `/etc/dbus-1/systemd`, instead reserving it for the sysadmin.
>> This is the same idea as the difference between `/usr/lib/udev/rules.d`
>> and `/etc/udev/rules.d`.
> ---
> v2: bump D-Bus min version, derive DBUS_CONFDIR from datadir

It’d be great if you mentioned the D-Bus version bump explicitly in the
commit message, and the years of the release (2012 and 2015). (Maybe
even make it a separate commit.)


Kind regards,

Paul


> ---
> configure.ac | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index bc7edfcd3..ad864dea7 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -82,23 +82,23 @@ if (test "${enable_threads}" = "yes"); then
> PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
> AC_MSG_ERROR(GThread >= 2.16 is required))
> GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
> GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
> fi
>
> -PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.6, dummy=yes,
> - AC_MSG_ERROR(D-Bus >= 1.6 is required))
> +PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.10, dummy=yes,
> + AC_MSG_ERROR(D-Bus >= 1.10 is required))
> AC_SUBST(DBUS_CFLAGS)
> AC_SUBST(DBUS_LIBS)
>
> AC_ARG_WITH([dbusconfdir], AS_HELP_STRING([--with-dbusconfdir=DIR],
> [path to D-Bus configuration directory]),
> [path_dbusconfdir=${withval}])
> if (test -z "${path_dbusconfdir}"); then
> AC_MSG_CHECKING([D-Bus configuration directory])
> - path_dbusconfdir="`$PKG_CONFIG --variable=sysconfdir dbus-1`"
> + path_dbusconfdir="`$PKG_CONFIG --variable=datadir dbus-1`"
> if (test -z "${path_dbusconfdir}"); then
> AC_MSG_ERROR([D-Bus configuration directory is required])
> fi
> AC_MSG_RESULT([${path_dbusconfdir}])
> fi
> AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])

2023-08-09 07:28:03

by Gioele Barabucci

[permalink] [raw]
Subject: Re: [PATCH BlueZ v2] configure.ac: Install D-Bus policy in /usr/share, not /etc

On 09/08/23 08:02, Paul Menzel wrote:
> Am 08.08.23 um 22:00 schrieb Gioele Barabucci:
>>  From https://bugs.debian.org/1006631:
>>
>>> dbus supports policy files in both `/usr/share/dbus-1/system.d` and
>>> `/etc/dbus-1/systemd`. [The] recently released dbus 1.14.0, officially
>>> deprecates installing packages' default policies into
>>> `/etc/dbus-1/systemd`, instead reserving it for the sysadmin.
>>> This is the same idea as the difference between `/usr/lib/udev/rules.d`
>>> and `/etc/udev/rules.d`.
>> ---
>> v2: bump D-Bus min version, derive DBUS_CONFDIR from datadir
>
> It’d be great if you mentioned the D-Bus version bump explicitly in the
> commit message, and the years of the release (2012 and 2015).

Sure. V3 is on its way.

> (Maybe even make it a separate commit.)

No problem. I sent everything in one patch because I read

> 3) Split your patch according to the top-level directories. E.g.: if
> you added a feature that touches files under 'include/', 'src/' and
> 'drivers/' directories, split in three separated patches, taking care
> not to break compilation.
in HACKING as "don't split too much, we prefer one patch per directory",
but I now understand that it actually means "touch at most one directory
per commit".

Regards,

--
Gioele Barabucci