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