Bug 96707 - telepathy-mission-control-5.16.3: fails to build/configure with recent NetworkManager versions unable to find libnm-glib
Summary: telepathy-mission-control-5.16.3: fails to build/configure with recent Networ...
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: mission-control (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: diane
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-28 14:15 UTC by Timo Gurr
Modified: 2016-06-30 06:16 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Port to using the new nm 1 API (2.07 KB, patch)
2016-06-29 05:11 UTC, diane
Details | Splinter Review
port to using new NM API (2.86 KB, patch)
2016-06-30 05:43 UTC, diane
Details | Splinter Review

Description Timo Gurr 2016-06-28 14:15:29 UTC
[...]
configure: error: Couldn't find Network Manager dependencies:

No package 'libnm-glib' found
[...]

Installed NetworkManager version: 1.2.2

libnm-glib is considered a legacy library in recent NetworkManager versions and may not be available, see upstream commit: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?h=nm-1-2&id=753e81d21f15bb9cba0bb41493b5bda4b4f625f8
Comment 1 diane 2016-06-29 03:25:22 UTC
I wonder how long until telepathy-glib breaks too then.
Comment 2 diane 2016-06-29 05:11:25 UTC
Created attachment 124774 [details] [review]
Port to using the new nm 1 API

Technically libnm is using gio/gio.h and the rest of telepathy is still using dbus-glib so that will eventually break too.

Testing was to disable my normally installed mission-control-5 by moving it out of the way, and running the new mission-control-5 from source. simple gabble resources and idle connected, but my google resources didn't load.

How does it work for you?
Comment 3 Timo Gurr 2016-06-29 10:24:50 UTC
(In reply to diane from comment #2)
> Created attachment 124774 [details] [review] [review]
> Port to using the new nm 1 API
> 
> How does it work for you?

I've applied your patch and successfully compiled telepathy-mission-control with NetworkManager support:

# ldd /usr/x86_64-pc-linux-gnu/libexec/mission-control-5
libnm.so.0 => /usr/x86_64-pc-linux-gnu/lib/libnm.so.0 (0x00007f1bcbc51000)

My already existing Jabber/XMPP connection works fine so far, I'm however not sure how to test some NetworkManager<->telepathy-mission-control related features in particular.
Comment 4 diane 2016-06-29 17:00:52 UTC
> 
> My already existing Jabber/XMPP connection works fine so far, I'm however
> not sure how to test some NetworkManager<->telepathy-mission-control related
> features in particular.

mission-control uses NetworkManager to see if you have a network connection. you should see your contact list go off-line when you disconnect from all networks, you should see it reconnect when slightly after re-establishing a network connection, and you should not see your client spinning trying to connect to your jabber server while you're disconnected.
Comment 5 George Kiagiadakis 2016-06-30 05:17:25 UTC
Comment on attachment 124774 [details] [review]
Port to using the new nm 1 API

Review of attachment 124774 [details] [review]:
-----------------------------------------------------------------

Looks good to me. It looks like it should work fine.

In addition to your changes, I would also now remove NM_CHECK_VERSION check on line 205 and leave the "|| state == NM_STATE_DISCONNECTING" compile unconditionally (as we no longer support older versions), and also remove the NM_CHECK_VERSION definition on line 185-187 (this is to support even older versions that don't have the NM_CHECK_VERSION macro in the headers)

::: src/connectivity-monitor.c
@@ +459,4 @@
>  mcd_connectivity_monitor_init (McdConnectivityMonitor *connectivity_monitor)
>  {
>    McdConnectivityMonitorPrivate *priv;
> +  GError *error;

GError pointers must be initialized to NULL before use.
Comment 6 diane 2016-06-30 05:43:52 UTC
Created attachment 124791 [details] [review]
port to using new NM API

Fixed the GError initialization.

And removed the macro definition and use you mentioned in the review.

I first thought about putting removing the macros into a separate commit, but decided to merge them as it was all part of the logical change of moving to the new API.
Comment 7 George Kiagiadakis 2016-06-30 06:01:49 UTC
Looks good. Please commit. I suggest committing it in the 5.16 branch; since master contains incompatible changes, I think we should make a new 5.16.x release at some point for this before jumping to the incompatible version.
Comment 8 diane 2016-06-30 06:16:19 UTC
Comment on attachment 124791 [details] [review]
port to using new NM API

Perhaps it'd be better if I didn't commit things just before going to sleep, as I apparently need to proofread my commit messages more carefully.

but pushed to telepathy-mission-control-5.16 as commit 91499340222a563bacce7994f32275c38ff55ff0


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.