After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 760887 - Do not depend on deprecated libnm-glib or dbus-glib when we only want to build the new libnma library
Do not depend on deprecated libnm-glib or dbus-glib when we only want to buil...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nm-applet
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-01-20 14:17 UTC by Javier Jardón (IRC: jjardon)
Modified: 2017-02-09 18:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Javier Jardón (IRC: jjardon) 2016-01-20 14:17:19 UTC
libnm-gtk is still needed by several GNOME components: gnome-shell, gnome-initial-setup, gnome-control-center
Comment 1 Thomas Haller 2016-01-20 14:31:26 UTC
What is this bug about?


libnm-gtk is provided by network-manager-applet project.
libnm-gtk itself uses libnm-glib and libnm-util.
nm-applet<=1.0 links against libnm-gtk, libnm-glib, libnm-util.


Starting with 1.1 branch, there is a new library libnma which replaces libnm-gtk. It links against the new libnm library (which was added by NetworkManager project 1.0 to replace libnm-glib/libnm-util).
nm-applet>=1.1 link against libnma and libnm.



gnome-control-center currently uses libnm-gtk (and in turn libnm-glib, libnm-util). Eventually it should be ported to use libnma and libnm.
Comment 2 Javier Jardón (IRC: jjardon) 2016-01-20 16:07:10 UTC
(In reply to Thomas Haller from comment #1)
> What is this bug about?
> 
> 
> libnm-gtk is provided by network-manager-applet project.
> libnm-gtk itself uses libnm-glib and libnm-util.
> nm-applet<=1.0 links against libnm-gtk, libnm-glib, libnm-util.
> 
> 
> Starting with 1.1 branch, there is a new library libnma which replaces
> libnm-gtk. It links against the new libnm library (which was added by
> NetworkManager project 1.0 to replace libnm-glib/libnm-util).
> nm-applet>=1.1 link against libnma and libnm.
> 
> 
> 
> gnome-control-center currently uses libnm-gtk (and in turn libnm-glib,
> libnm-util). Eventually it should be ported to use libnma and libnm.

Oh, rigth, sorry I didnt know about the libnma library; as I understand g-c-c should be ported and stop using the libraries provided by the network-anager-applet project

Thanks for the info, I will close this now
Comment 3 Thomas Haller 2016-01-20 16:18:05 UTC
for the record:

gnome-control-center should probably be ported to use libnma with libnm.

NetworkManager provides the libraries:
  libnm (since 1.0)
  libnm-glib+libnm-util (legacy).

network-manager-applet provides the libraries:
  libnma (since 1.2) (uses libnm)
  libnm-gtk (legacy) (uses libnm-glib+libnm-util)
Comment 4 Javier Jardón (IRC: jjardon) 2016-01-21 09:19:17 UTC
(In reply to Thomas Haller from comment #3)
> for the record:
> 
> gnome-control-center should probably be ported to use libnma with libnm.
> 
> NetworkManager provides the libraries:
>   libnm (since 1.0)
>   libnm-glib+libnm-util (legacy).
> 
> network-manager-applet provides the libraries:
>   libnma (since 1.2) (uses libnm)
>   libnm-gtk (legacy) (uses libnm-glib+libnm-util)

Mmm, we will have a problem here, because as libnma is still part of network-manager-applet, we will still depend on dbus-glib and the deprecated libnm-glib to build it; Im going to reopen this with another title, feel free to close an open a new bug report if its better for you
Comment 5 Thomas Haller 2016-01-21 09:59:47 UTC
(In reply to Javier Jardón (IRC: jjardon) from comment #4)
> (In reply to Thomas Haller from comment #3)
> > for the record:
> > 
> > gnome-control-center should probably be ported to use libnma with libnm.
> > 
> > NetworkManager provides the libraries:
> >   libnm (since 1.0)
> >   libnm-glib+libnm-util (legacy).
> > 
> > network-manager-applet provides the libraries:
> >   libnma (since 1.2) (uses libnm)
> >   libnm-gtk (legacy) (uses libnm-glib+libnm-util)
> 
> Mmm, we will have a problem here, because as libnma is still part of
> network-manager-applet, we will still depend on dbus-glib and the deprecated
> libnm-glib to build it; Im going to reopen this with another title, feel
> free to close an open a new bug report if its better for you

I agree with this bug, but note that the problem is only if you build from network-manager-applet source. Then we currently miss a configure option --without-libnm-gtk to build without legacy libraries.



Note that:

libnma doesn't use dbus-glib anymore (which was one of the reasons for the new libraries).

Distributions should split the packages. E.g. on Fedora 24 network-manager-applet source builds the packages:
  libnm-gtk
  libnm-gtk-devel
  libnma
  libnma-devel
  network-manager-applet
  nm-connection-editor
Comment 6 Javier Jardón (IRC: jjardon) 2016-01-21 14:17:33 UTC
(In reply to Thomas Haller from comment #5)
<snip>

> I agree with this bug, but note that the problem is only if you build from
> network-manager-applet source. Then we currently miss a configure option
> --without-libnm-gtk to build without legacy libraries.

We build for source in jhbuild and in our ci system

Looking to the code, seems nm-connection-editor depends on dbus-glib as well, so building with --without-libnm-gtk would not be enough
 
Maybe is better (or less confusing) to move libnma to a separate repo?
Comment 7 Thomas Haller 2016-01-21 14:51:31 UTC
(In reply to Javier Jardón (IRC: jjardon) from comment #6)
> (In reply to Thomas Haller from comment #5)
> <snip>
> 
> > I agree with this bug, but note that the problem is only if you build from
> > network-manager-applet source. Then we currently miss a configure option
> > --without-libnm-gtk to build without legacy libraries.
> 
> We build for source in jhbuild and in our ci system
> 
> Looking to the code, seems nm-connection-editor depends on dbus-glib as
> well, so building with --without-libnm-gtk would not be enough
>  
> Maybe is better (or less confusing) to move libnma to a separate repo?

then you are building nma-1-0 branch. libnma exists since development version 1.1 (the next stable version 1.2 is yet to be released).

On master branch (which is currently 1.1) only the legacy library libnm-gtk uses dbus-glib,libnm-glib,libnm-utils.
Comment 8 Javier Jardón (IRC: jjardon) 2016-01-21 15:09:57 UTC
mmm, looking again to the code, seems libnma is still using the old LIBGLIB CFLAGS:  https://git.gnome.org/browse/network-manager-applet/tree/src/libnma/Makefile.am#n25 defined in https://git.gnome.org/browse/network-manager-applet/tree/configure.ac#n78

and regardles nm-connection-editor:
https://git.gnome.org/browse/network-manager-applet/tree/src/connection-editor/Makefile.am#n16
Comment 9 Thomas Haller 2016-01-21 15:45:08 UTC
(In reply to Javier Jardón (IRC: jjardon) from comment #8)
> mmm, looking again to the code, seems libnma is still using the old LIBGLIB
> CFLAGS: 
> https://git.gnome.org/browse/network-manager-applet/tree/src/libnma/Makefile.
> am#n25 defined in
> https://git.gnome.org/browse/network-manager-applet/tree/configure.ac#n78

I don't see this. libnma uses LIBNM_CFLAGS, which is for libnm.
Which is distinct from LIBNM_GLIB_CFLAGS (which is for libnm-glib).



> and regardles nm-connection-editor:
> https://git.gnome.org/browse/network-manager-applet/tree/src/connection-
> editor/Makefile.am#n16

Ah right. nm-c-e also implements a D-Bus service and uses dbus-glib for that. that should be ported to use gio too. TODO.
Comment 10 Thomas Haller 2016-01-21 15:57:53 UTC
> > and regardles nm-connection-editor:
> > https://git.gnome.org/browse/network-manager-applet/tree/src/connection-
> > editor/Makefile.am#n16
> 
> Ah right. nm-c-e also implements a D-Bus service and uses dbus-glib for
> that. that should be ported to use gio too. TODO.

opened bug 760946
Comment 11 Matthias Clasen 2016-03-01 13:44:11 UTC
anything left to do here ?
Comment 12 Thomas Haller 2016-03-01 14:12:40 UTC
Yes, this asks for a configure option "--without-libnm-glib", like we have for the VPN plugins.

Currently, there is no way to build nm-applet from source without legacy libnm-gtk.
Comment 13 Javier Jardón (IRC: jjardon) 2016-03-01 14:20:27 UTC
(In reply to Thomas Haller from comment #12)
> Yes, this asks for a configure option "--without-libnm-glib", like we have
> for the VPN plugins.
> 
> Currently, there is no way to build nm-applet from source without legacy
> libnm-gtk.

As I said in comment #6, Maybe is easier (or less confusing) to move libnma to a separate repo? Or maybe move it inside the main NetworkManager repository?
Comment 14 Thomas Haller 2017-02-09 18:00:47 UTC
now there is a configure option --without-libnm-gtk.

https://git.gnome.org/browse/network-manager-applet/commit/?id=1b61161a75c96715b12d88203c123c007d7160ad