Skip to contentSkip to conversation

configure.ac: Install D-Bus policy in /usr/share, not /etc

PATCH Superseded Gioele Barabucci 3 participants 4 messages Aug 8, 2023 – Aug 9, 2023 Bluetooth drivers

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 configure.ac: Install D-Bus policy in /usr/share, not /etc

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

Quoted 6 lines

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(-)
configure.ac +3 -3
index bc7edfcd3..ad864dea7 100644
@@ -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}])
Signature · 1 line
2.39.2
#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=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

#2 lore raw
In reply to Gioele Barabucci

Dear Gioele,

Thank you very much for your patch.

Am 08.08.23 um 22:00 schrieb Gioele Barabucci:

Quoted 10 lines

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

Quoted 6 lines

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

Quoted 35 lines
---
  configure.ac | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
configure.ac +3 -3
index bc7edfcd3..ad864dea7 100644
@@ -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}])
#3 lore raw
Quoted 9 lines · Paul Menzel

Am 08.08.23 um 22:00 schrieb Gioele Barabucci:

Quoted 8 lines

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

Quoted 6 lines

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.

Quoted 4 lines
Quoted 2 lines

---
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.

Quoted 1 line

(Maybe even make it a separate commit.)

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

Quoted 3 lines

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,

Signature · 1 line
Gioele Barabucci