All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] build: Install DBus policy in /usr/share/dbus-1/system.d
@ 2018-02-04 22:55 Jonas Bonn
  2018-02-04 22:55 ` [PATCH 2/4] xmm7modem: drop executable bit from C source file Jonas Bonn
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jonas Bonn @ 2018-02-04 22:55 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 973 bytes --]

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(-)

diff --git a/configure.ac b/configure.ac
index f3148a40..79436adc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] xmm7modem: drop executable bit from C source file
  2018-02-04 22:55 [PATCH 1/4] build: Install DBus policy in /usr/share/dbus-1/system.d Jonas Bonn
@ 2018-02-04 22:55 ` Jonas Bonn
  2018-02-05 16:20   ` Denis Kenzior
  2018-02-04 22:55 ` [PATCH 3/4] Remove unused threading support Jonas Bonn
  2018-02-04 22:55 ` [PATCH 4/4] configure.ac: simplify usage of PKG_CHECK_MODULES Jonas Bonn
  2 siblings, 1 reply; 7+ messages in thread
From: Jonas Bonn @ 2018-02-04 22:55 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

---
 drivers/xmm7modem/ims.c | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 drivers/xmm7modem/ims.c

diff --git a/drivers/xmm7modem/ims.c b/drivers/xmm7modem/ims.c
old mode 100755
new mode 100644
-- 
2.14.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/4] Remove unused threading support
  2018-02-04 22:55 [PATCH 1/4] build: Install DBus policy in /usr/share/dbus-1/system.d Jonas Bonn
  2018-02-04 22:55 ` [PATCH 2/4] xmm7modem: drop executable bit from C source file Jonas Bonn
@ 2018-02-04 22:55 ` Jonas Bonn
  2018-02-04 22:55 ` [PATCH 4/4] configure.ac: simplify usage of PKG_CHECK_MODULES Jonas Bonn
  2 siblings, 0 replies; 7+ messages in thread
From: Jonas Bonn @ 2018-02-04 22:55 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 3435 bytes --]

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(-)

diff --git a/configure.ac b/configure.ac
index 79436adc..a22b0b11 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)
diff --git a/src/main.c b/src/main.c
index 2d359dde..2c1b23a0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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("*");
diff --git a/tools/auto-enable.c b/tools/auto-enable.c
index 87fb0a8d..1fb23401 100644
--- a/tools/auto-enable.c
+++ b/tools/auto-enable.c
@@ -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);
diff --git a/tools/huawei-audio.c b/tools/huawei-audio.c
index 9997a581..b22b50a3 100644
--- a/tools/huawei-audio.c
+++ b/tools/huawei-audio.c
@@ -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);
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] configure.ac: simplify usage of PKG_CHECK_MODULES
  2018-02-04 22:55 [PATCH 1/4] build: Install DBus policy in /usr/share/dbus-1/system.d Jonas Bonn
  2018-02-04 22:55 ` [PATCH 2/4] xmm7modem: drop executable bit from C source file Jonas Bonn
  2018-02-04 22:55 ` [PATCH 3/4] Remove unused threading support Jonas Bonn
@ 2018-02-04 22:55 ` Jonas Bonn
  2 siblings, 0 replies; 7+ messages in thread
From: Jonas Bonn @ 2018-02-04 22:55 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 3070 bytes --]

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(-)

diff --git a/configure.ac b/configure.ac
index a22b0b11..d07652f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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")
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] xmm7modem: drop executable bit from C source file
  2018-02-04 22:55 ` [PATCH 2/4] xmm7modem: drop executable bit from C source file Jonas Bonn
@ 2018-02-05 16:20   ` Denis Kenzior
  2018-02-14  9:36     ` Jonas Bonn
  0 siblings, 1 reply; 7+ messages in thread
From: Denis Kenzior @ 2018-02-05 16:20 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

Hi Jonas,

On 02/04/2018 04:55 PM, Jonas Bonn wrote:
> ---
>   drivers/xmm7modem/ims.c | 0
>   1 file changed, 0 insertions(+), 0 deletions(-)
>   mode change 100755 => 100644 drivers/xmm7modem/ims.c
> 

Applied, thanks.

Regards,
-Denis


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] xmm7modem: drop executable bit from C source file
  2018-02-05 16:20   ` Denis Kenzior
@ 2018-02-14  9:36     ` Jonas Bonn
  2018-02-14 16:47       ` Denis Kenzior
  0 siblings, 1 reply; 7+ messages in thread
From: Jonas Bonn @ 2018-02-14  9:36 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 496 bytes --]

On 02/05/2018 05:20 PM, Denis Kenzior wrote:
> Hi Jonas,
> 
> On 02/04/2018 04:55 PM, Jonas Bonn wrote:
>> ---
>>   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


> 
> Regards,
> -Denis
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] xmm7modem: drop executable bit from C source file
  2018-02-14  9:36     ` Jonas Bonn
@ 2018-02-14 16:47       ` Denis Kenzior
  0 siblings, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2018-02-14 16:47 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 368 bytes --]

Hi Jonas,


> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-02-14 16:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-04 22:55 [PATCH 1/4] build: Install DBus policy in /usr/share/dbus-1/system.d Jonas Bonn
2018-02-04 22:55 ` [PATCH 2/4] xmm7modem: drop executable bit from C source file Jonas Bonn
2018-02-05 16:20   ` Denis Kenzior
2018-02-14  9:36     ` Jonas Bonn
2018-02-14 16:47       ` Denis Kenzior
2018-02-04 22:55 ` [PATCH 3/4] Remove unused threading support Jonas Bonn
2018-02-04 22:55 ` [PATCH 4/4] configure.ac: simplify usage of PKG_CHECK_MODULES Jonas Bonn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.