Skip to contentSkip to conversation

build: Install DBus policy in /usr/share/dbus-1/system.d

PATCH Applied Jonas Bonn 2 participants 7 messages Feb 4, 2018 – Feb 14, 2018

lore
Share & tools
lore

Jonas Bonn

author
#0 lore raw

PATCH 1/4 build: Install DBus policy in /usr/share/dbus-1/system.d

The default location for DBus policy files should be /usr/share/dbus-1/system.d and the corresponding directory under /etc should be reserved for administrative changes to default/packaged settings. This removes a dependency of ofono on a populated /etc.

---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure.ac +2 -2
index f3148a40..79436adc 100644
@@ -83,9 +83,9 @@ AC_SUBST(DBUS_LIBS)
 
 AC_ARG_WITH(dbusconfdir, AC_HELP_STRING([--with-dbusconfdir=PATH],
 	[path to D-Bus config directory]), [path_dbusconf=${withval}],
-		[path_dbusconf="`$PKG_CONFIG --variable=sysconfdir dbus-1`"])
+		[path_dbusconf="`$PKG_CONFIG --variable=datadir dbus-1`"])
 if (test -z "${path_dbusconf}"); then
-	DBUS_CONFDIR="${sysconfdir}/dbus-1/system.d"
+	DBUS_CONFDIR="${datadir}/dbus-1/system.d"
 else
 	DBUS_CONFDIR="${path_dbusconf}/dbus-1/system.d"
 fi
Signature · 1 line
2.14.1
author
#1 lore raw

PATCH 2/4 xmm7modem: drop executable bit from C source file

---
 drivers/xmm7modem/ims.c | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 drivers/xmm7modem/ims.c
drivers/xmm7modem/ims.c +0 -0
old mode 100755
new mode 100644
Signature · 1 line
2.14.1
#2 lore raw

Re: [PATCH 2/4] xmm7modem: drop executable bit from C source file

Hi Jonas,

Quoted 5 lines · Jonas Bonn
---
  drivers/xmm7modem/ims.c | 0
  1 file changed, 0 insertions(+), 0 deletions(-)

mode change 100755 => 100644 drivers/xmm7modem/ims.c

Applied, thanks.

Regards,
-Denis

author
#3 lore raw

Re: [PATCH 2/4] xmm7modem: drop executable bit from C source file

Quoted 10 lines · Denis Kenzior

Hi Jonas,

Quoted 5 lines · Jonas Bonn

---
  drivers/xmm7modem/ims.c | 0

  1 file changed, 0 insertions(+), 0 deletions(-)

  mode change 100755 => 100644 drivers/xmm7modem/ims.c

Applied, thanks.

What about the other three patches? Are they being silently rejected or did they just fall off the radar?

In particular, patch 1/4 is important...

/Jonas

Quoted 4 lines

Regards,
-Denis

#4 lore raw

Re: [PATCH 2/4] xmm7modem: drop executable bit from C source file

Hi Jonas,

Quoted 5 lines

What about the other three patches?  Are they being silently rejected or did they just fall off the radar?

In particular, patch 1/4 is important...

They're not ignored, but I'm not competent enough to review the build system changes. They need to be acked by Marcel first who can be a bit slow to respond.

Regards,
-Denis

author
#5 lore raw

PATCH 3/4 Remove unused threading support

In reply to Jonas Bonn

Threads are not used anywhere within ofono so there's no point in having a configure option to enable threading in GLib or DBus. I think this is mostly a leftover from when ofono underwent mitosis from Connman...? :)

---
 configure.ac         |  8 --------
 src/main.c           | 12 ------------
 tools/auto-enable.c  | 12 ------------
 tools/huawei-audio.c | 12 ------------
 4 files changed, 44 deletions(-)
configure.ac +0 -8
index 79436adc..a22b0b11 100644
@@ -68,14 +68,6 @@ PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
-if (test "${enable_threads}" = "yes"); then
-	AC_DEFINE(NEED_THREADS, 1, [Define if threading support is required])
-	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.4, dummy=yes,
 				AC_MSG_ERROR(D-Bus >= 1.4 is required))
 AC_SUBST(DBUS_CFLAGS)
src/main.c +0 -12
index 2d359dde..2c1b23a0 100644
@@ -211,11 +211,6 @@ int main(int argc, char **argv)
 	struct ell_event_source *source;
 #endif
 
-#ifdef NEED_THREADS
-	if (g_thread_supported() == FALSE)
-		g_thread_init(NULL);
-#endif
-
 	context = g_option_context_new(NULL);
 	g_option_context_add_main_entries(context, options, NULL);
 
@@ -246,13 +241,6 @@ int main(int argc, char **argv)
 
 	event_loop = g_main_loop_new(NULL, FALSE);
 
-#ifdef NEED_THREADS
-	if (dbus_threads_init_default() == FALSE) {
-		fprintf(stderr, "Can't init usage of threads\n");
-		exit(1);
-	}
-#endif
-
 #ifdef HAVE_ELL
 	l_log_set_stderr();
 	l_debug_enable("*");
tools/auto-enable.c +0 -12
index 87fb0a8d..1fb23401 100644
@@ -492,11 +492,6 @@ int main(int argc, char **argv)
 	guint watch;
 	struct sigaction sa;
 
-#ifdef NEED_THREADS
-	if (g_thread_supported() == FALSE)
-		g_thread_init(NULL);
-#endif
-
 	context = g_option_context_new(NULL);
 	g_option_context_add_main_entries(context, options, NULL);
 
@@ -518,13 +513,6 @@ int main(int argc, char **argv)
 
 	main_loop = g_main_loop_new(NULL, FALSE);
 
-#ifdef NEED_THREADS
-	if (dbus_threads_init_default() == FALSE) {
-		fprintf(stderr, "Can't init usage of threads\n");
-		exit(1);
-	}
-#endif
-
 	dbus_error_init(&err);
 
 	conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, NULL, &err);
tools/huawei-audio.c +0 -12
index 9997a581..b22b50a3 100644
@@ -775,11 +775,6 @@ int main(int argc, char **argv)
 	guint watch;
 	struct sigaction sa;
 
-#ifdef NEED_THREADS
-	if (g_thread_supported() == FALSE)
-		g_thread_init(NULL);
-#endif
-
 	context = g_option_context_new(NULL);
 	g_option_context_add_main_entries(context, options, NULL);
 
@@ -801,13 +796,6 @@ int main(int argc, char **argv)
 
 	main_loop = g_main_loop_new(NULL, FALSE);
 
-#ifdef NEED_THREADS
-	if (dbus_threads_init_default() == FALSE) {
-		fprintf(stderr, "Can't init usage of threads\n");
-		exit(1);
-	}
-#endif
-
 	dbus_error_init(&err);
 
 	conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, NULL, &err);
Signature · 1 line
2.14.1
author
#6 lore raw

PATCH 4/4 configure.ac: simplify usage of PKG_CHECK_MODULES

In reply to Jonas Bonn

These days pkg-config does the right thing pretty much automatically so the usage of the autoconf macros can be simplified a bit. This functionality exists from pkg-config 0.24, which is already pretty old, so we specify that as a minimum version for that utility.

---
 configure.ac | 28 ++++++----------------------
 1 file changed, 6 insertions(+), 22 deletions(-)
configure.ac +6 -22
index a22b0b11..d07652f1 100644
@@ -10,7 +10,7 @@ AM_MAINTAINER_MODE
 
 AC_PREFIX_DEFAULT(/usr/local)
 
-PKG_PROG_PKG_CONFIG
+PKG_PROG_PKG_CONFIG([0.24])
 
 COMPILER_FLAGS
 
@@ -63,15 +63,8 @@ AC_CHECK_FUNC(signalfd, dummy=yes,
 AC_CHECK_LIB(dl, dlopen, dummy=yes,
 			AC_MSG_ERROR(dynamic linking loader is required))
 
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
-				AC_MSG_ERROR(GLib >= 2.32 is required))
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
-
-PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4, dummy=yes,
-				AC_MSG_ERROR(D-Bus >= 1.4 is required))
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32)
+PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4)
 
 AC_ARG_WITH(dbusconfdir, AC_HELP_STRING([--with-dbusconfdir=PATH],
 	[path to D-Bus config directory]), [path_dbusconf=${withval}],
@@ -118,8 +111,7 @@ AC_ARG_ENABLE(udev, AC_HELP_STRING([--disable-udev],
 			[disable udev modem detection support]),
 						[enable_udev=${enableval}])
 if (test "${enable_udev}" != "no"); then
-	PKG_CHECK_MODULES(UDEV, libudev >= 143, [enable_udev="yes"],
-				AC_MSG_ERROR(libudev >= 143 is required))
+	PKG_CHECK_MODULES(UDEV, libudev >= 143, [enable_udev="yes"])
 	UDEV_DATADIR="`$PKG_CONFIG --variable=udevdir udev`"
 	if (test -z "${UDEV_DATADIR}"); then
 		UDEV_DATADIR="${sysconfdir}/udev/rules.d"
@@ -128,8 +120,6 @@ if (test "${enable_udev}" != "no"); then
 	fi
 	AC_SUBST(UDEV_DATADIR)
 fi
-AC_SUBST(UDEV_CFLAGS)
-AC_SUBST(UDEV_LIBS)
 AM_CONDITIONAL(UDEV, test "${enable_udev}" = "yes")
 
 AC_ARG_ENABLE(atmodem, AC_HELP_STRING([--disable-atmodem],
@@ -172,10 +162,7 @@ AC_ARG_ENABLE(bluez4, AC_HELP_STRING([--enable-bluez4],
 					[enable_bluez4=${enableval}])
 
 if (test "${enable_bluez4}" = "yes"); then
-	PKG_CHECK_MODULES(BLUEZ, bluez >= 4.99 bluez < 5, dummy=yes,
-			  AC_MSG_ERROR(Bluetooth library >= 4.99 and < 5 is required))
-	AC_SUBST(BLUEZ_CFLAGS)
-	AC_SUBST(BLUEZ_LIBS)
+	PKG_CHECK_MODULES(BLUEZ, bluez >= 4.99 bluez < 5)
 fi
 
 AM_CONDITIONAL(BLUEZ4, test "${enable_bluetooth}" != "no" && test "${enable_bluez4}" = "yes")
@@ -220,10 +207,7 @@ AC_ARG_ENABLE(ell, AC_HELP_STRING([--enable-ell],
 
 if (test "${enable_ell}" = "yes"); then
 	AC_DEFINE(HAVE_ELL, 1, [Defined if Ell is enabled])
-	PKG_CHECK_MODULES(ELL, ell >= 0.2, dummy=yes,
-			  AC_MSG_ERROR(ell library >= 0.2 is required))
-	AC_SUBST(ELL_CFLAGS)
-	AC_SUBST(ELL_LIBS)
+	PKG_CHECK_MODULES(ELL, ell >= 0.2)
 fi
 
 AM_CONDITIONAL(MBIMMODEM, test "${enable_ell}" != "no" && test "${enable_mbimmodem}" = "yes")
Signature · 1 line
2.14.1