Bug#862879: Port from libnm-util/libnm-glib to libnm (or GNetworkMonitor)

2018-04-15 Thread Ricardo Mones
Hi Michael,

On Sat, Apr 14, 2018 at 01:04:33AM +0200, Michael Biebl wrote:
> Control: severity -1 serious
> 
> Hi,
> 
> I intend to upload a new version of network-manager soonish which will
> drop libnm-glib/libnm-util. I'm thus bumping this issue to RC in
> preparation for that.

OK, thanks for the info.

best regards,
-- 
  Ricardo Mones 
  ~
  Absence of evidence is not evidence of absence.  Carl Sagan



signature.asc
Description: PGP signature


Bug#862879: Port from libnm-util/libnm-glib to libnm (or GNetworkMonitor)

2018-04-13 Thread Michael Biebl
Control: severity -1 serious

Hi,

I intend to upload a new version of network-manager soonish which will
drop libnm-glib/libnm-util. I'm thus bumping this issue to RC in
preparation for that.

Regards,
Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#862879: Port from libnm-util/libnm-glib to libnm (or GNetworkMonitor)

2017-12-20 Thread Lubomir Rintel
Forwarded your patch upstream:
http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3938



Bug#862879: Port from libnm-util/libnm-glib to libnm (or GNetworkMonitor)

2017-05-17 Thread Michael Biebl
Source: claws-mail
Version: 3.14.1-3
Severity: normal
Tags: patch
User: pkg-utopia-maintain...@lists.alioth.debian.org
Usertags: libnm

Hi,

the libnm-glib/libnm-util libraries have been deprecated upstream in
favour of libnm.

Your package declares a Build-Depends on network-manager-dev.

It seems to not actually link against libnm-util/libnm-glib, but uses the
D-Bus API for the online connectivity check and requires a few macros
and defines from NetworkManager.h.

Please consider porting claws-mail to libnm. The API of libnm is very
similar to the one provided by libnm-glib/libnm-util [1], e.g. the
NetworkManager.h header file is also provided by libnm.

Since you only need to detect the network connectivity status, an even
better approach might be use GNetworkMonitor instead, which was
introduced in glib 2.32 [2] and is available since wheezy.
This would also allow you to get rid of dbus-1-glib, which is another
deprecated library.

The attached patch does a minimal conversion only by using libnm's
NetworkManager.h. Since libnm was introduced in version 1.0, it also
drops the fallback for versions older then 0.8.992.

Since the patch touches configure.ac, you need to rebuild the build
system. Using dh-autoreconf is the most convenient solution for this.
The remaining change is the changing the Build-Depends on
network-manager-dev to libnm-dev.

Would be great if you can prepare those changes in experimental or
upload early in the buster development cycle.

Regards,
Michael

[1] https://developer.gnome.org/libnm/stable/
[2] https://developer.gnome.org/gio/stable/GNetworkMonitor.html



-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64
 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
--- claws-mail-3.14.1.orig/configure.ac
+++ claws-mail-3.14.1/configure.ac
@@ -872,7 +872,7 @@ dnl # Check for NetworkManager support
 dnl ###
 if test x"$enable_dbus_glib" = xyes; then
if test x"$enable_networkmanager" = xyes; then
-   PKG_CHECK_MODULES(NETWORKMANAGER_SUPPORT, NetworkManager >= 
0.6.2,
+   PKG_CHECK_MODULES(NETWORKMANAGER_SUPPORT, libnm,
[
AC_DEFINE(HAVE_NETWORKMANAGER_SUPPORT, 1, [Define if 
NetworkManager support is to be included.])
echo "Building with NetworkManager support"
--- claws-mail-3.14.1.orig/src/main.c
+++ claws-mail-3.14.1/src/main.c
@@ -149,10 +149,6 @@
 static gboolean went_offline_nm;
 #endif
 
-#if !defined(NM_CHECK_VERSION)
-#define NM_CHECK_VERSION(x,y,z) 0
-#endif
-
 #ifdef HAVE_DBUS_GLIB
 static DBusGProxy *awn_proxy = NULL;
 #endif
@@ -2935,14 +2931,9 @@ gboolean networkmanager_is_online(GError
g_propagate_error(error, tmp_error);
return TRUE;
}
-#if NM_CHECK_VERSION(0,8,992)
return (state == NM_STATE_CONNECTED_LOCAL ||
state == NM_STATE_CONNECTED_SITE ||
state == NM_STATE_CONNECTED_GLOBAL ||
state == NM_STATE_UNKNOWN);
-#else
-   return (state == NM_STATE_CONNECTED ||
-   state == NM_STATE_UNKNOWN);
-#endif
 }
 #endif