From: Damodar Reddy GangiReddy <quic_dgangire@xxxxxxxxxxx> Currently obexd uses session bus. Distros where session bus is not supported and still obex profiles are required in that case use system bus instead of session bus which can be configured with new optional feature Additional optional feature has been added to achieve this with name --enable-use-systembus-for-obexd steps to configure system bus ./configure --enable-use-systembus-for-obexd If this optional option is approved will add other patches on how to use system bus based on this option --- Makefile.obexd | 14 ++++++++++++++ configure.ac | 9 +++++++++ 2 files changed, 23 insertions(+) diff --git a/Makefile.obexd b/Makefile.obexd index b7e9f2d33..87432cc37 100644 --- a/Makefile.obexd +++ b/Makefile.obexd @@ -2,6 +2,19 @@ if OBEX if SYSTEMD + +if USE_SYSTEMBUS_FOR_OBEXD + +systemdsystemunit_DATA += obexd/src/obex.service +dbussystembus_DATA += obexd/src/org.bluez.obex.service + +obexd-add-service-symlink: + $(LN_S) -f obex.service $(DESTDIR)$(SYSTEMD_SYSTEMUNITDIR)/dbus-org.bluez.obex.service + +obexd-remove-service-symlink: + rm -f $(DESTDIR)$(SYSTEMD_SYSTEMUNITDIR)/dbus-org.bluez.obex.service +else + systemduserunitdir = $(SYSTEMD_USERUNITDIR) systemduserunit_DATA = obexd/src/obex.service @@ -13,6 +26,7 @@ obexd-add-service-symlink: obexd-remove-service-symlink: rm -f $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service +endif else obexd-add-service-symlink: obexd-remove-service-symlink: diff --git a/configure.ac b/configure.ac index d31eb1656..cc9a55f4c 100644 --- a/configure.ac +++ b/configure.ac @@ -283,6 +283,15 @@ if (test "${enable_obex}" != "no"); then fi AM_CONDITIONAL(OBEX, test "${enable_obex}" != "no") +AC_ARG_ENABLE(use-systembus-for-obexd, AS_HELP_STRING([--enable-use-systembus-for-obexd], + [enable systembus for obexd]), [enable_use_systembus_for_obexd=${enableval}]) +AM_CONDITIONAL(USE_SYSTEMBUS_FOR_OBEXD, test "${enable_use_systembus_for_obexd}" = "yes") +if (test "${enable_use_systembus_for_obexd}" = "yes"); then + AC_DEFINE(USE_SYSTEMBUS_FOR_OBEXD, 1, [Define to 1 if you want to use system bus for obexd.]) +else + AC_DEFINE(USE_SYSTEMBUS_FOR_OBEXD, 0, [Define to 0 if you want to use session bus for obexd.]) +fi + AC_ARG_ENABLE(btpclient, AS_HELP_STRING([--enable-btpclient], [enable BTP client]), [enable_btpclient=${enableval}]) AM_CONDITIONAL(BTPCLIENT, test "${enable_btpclient}" = "yes") -- 2.34.1