Bug#862678: #862678 Drop leftover Build-Depends on network-manager-dev

2018-03-11 Thread Michael Biebl
Control: retitle -1 Switch from network-manager-dev to libnm-dev

Hi Ari

Am 11.03.2018 um 22:16 schrieb Ari Pollak:
> On Sun, Mar 11, 2018 at 5:15 PM Ari Pollak  > wrote:
> 
> On Sun, Mar 11, 2018 at 5:00 PM Michael Biebl  > wrote:
> 
> By that I mean: If you don't have a runtime requirement, do you
> only use
> the D-Bus API? If so, why is network-manager-dev required as build
> dependency at all?
> 
> 
> Right, it's just using the D-Bus API during runtime, but still uses
> the headers during compilation for state constants.
> 
> 
> Oops, meant to include a link too:
> https://anonscm.debian.org/cgit/collab-maint/pidgin.git/tree/libpurple/network.c

Thanks for the additional information. Seems I mistitled the bug report,
so fixing that. As I didn't see a runtime dependency on either
libnm-glib or libnm-util, I wrongly concluded, that network-manager-dev
was a left-over build depdendency.

So, back to the issue:

The successor of libnm-glib/libnm-util is libnm.

If you are only interested in NM state constants, you should be able to
simply use NetworkManager.h which is also provided by libnm-dev.
While the APIs of libnm and libnm-glib/libnm-util are not completely the
same, I think in your case it might be sufficiently compatible:

> michael@pluto:~$ grep NM_STATE /usr/include/libnm/*
> /usr/include/libnm/nm-dbus-interface.h: * @NM_STATE_UNKNOWN: Networking state 
> is unknown. This indicates a daemon error
> /usr/include/libnm/nm-dbus-interface.h: * @NM_STATE_ASLEEP: Networking is not 
> enabled, the system is being suspended or
> /usr/include/libnm/nm-dbus-interface.h: * @NM_STATE_DISCONNECTED: There is no 
> active network connection.
> /usr/include/libnm/nm-dbus-interface.h: * @NM_STATE_DISCONNECTING: Network 
> connections are being cleaned up.
> /usr/include/libnm/nm-dbus-interface.h: * @NM_STATE_CONNECTING: A network 
> connection is being started
> /usr/include/libnm/nm-dbus-interface.h: * @NM_STATE_CONNECTED_LOCAL: There is 
> only local IPv4 and/or IPv6 connectivity,
> /usr/include/libnm/nm-dbus-interface.h: * @NM_STATE_CONNECTED_SITE: There is 
> only site-wide IPv4 and/or IPv6 connectivity.
> /usr/include/libnm/nm-dbus-interface.h: * @NM_STATE_CONNECTED_GLOBAL: There 
> is global IPv4 and/or IPv6 Internet connectivity
> /usr/include/libnm/nm-dbus-interface.h:   NM_STATE_UNKNOWN  = 0,
> /usr/include/libnm/nm-dbus-interface.h:   NM_STATE_ASLEEP   = 10,
> /usr/include/libnm/nm-dbus-interface.h:   NM_STATE_DISCONNECTED = 20,
> /usr/include/libnm/nm-dbus-interface.h:   NM_STATE_DISCONNECTING= 30,
> /usr/include/libnm/nm-dbus-interface.h:   NM_STATE_CONNECTING   = 40,
> /usr/include/libnm/nm-dbus-interface.h:   NM_STATE_CONNECTED_LOCAL  = 50,
> /usr/include/libnm/nm-dbus-interface.h:   NM_STATE_CONNECTED_SITE   = 60,
> /usr/include/libnm/nm-dbus-interface.h:   NM_STATE_CONNECTED_GLOBAL = 70,

nm-dbus-interface.h is included by /usr/include/libnm/NetworkManager.h

> michael@pluto:~$ grep NM_STATE /usr/include/NetworkManager/*
> /usr/include/NetworkManager/NetworkManager.h: * @NM_STATE_UNKNOWN: networking 
> state is unknown
> /usr/include/NetworkManager/NetworkManager.h: * @NM_STATE_ASLEEP: networking 
> is not enabled
> /usr/include/NetworkManager/NetworkManager.h: * @NM_STATE_DISCONNECTED: there 
> is no active network connection
> /usr/include/NetworkManager/NetworkManager.h: * @NM_STATE_DISCONNECTING: 
> network connections are being cleaned up
> /usr/include/NetworkManager/NetworkManager.h: * @NM_STATE_CONNECTING: a 
> network connection is being started
> /usr/include/NetworkManager/NetworkManager.h: * @NM_STATE_CONNECTED_LOCAL: 
> there is only local IPv4 and/or IPv6 connectivity
> /usr/include/NetworkManager/NetworkManager.h: * @NM_STATE_CONNECTED_SITE: 
> there is only site-wide IPv4 and/or IPv6 connectivity
> /usr/include/NetworkManager/NetworkManager.h: * @NM_STATE_CONNECTED_GLOBAL: 
> there is global IPv4 and/or IPv6 Internet connectivity
> /usr/include/NetworkManager/NetworkManager.h: NM_STATE_UNKNOWN  = 0,
> /usr/include/NetworkManager/NetworkManager.h: NM_STATE_ASLEEP   = 10,
> /usr/include/NetworkManager/NetworkManager.h: NM_STATE_DISCONNECTED = 20,
> /usr/include/NetworkManager/NetworkManager.h: NM_STATE_DISCONNECTING= 30,
> /usr/include/NetworkManager/NetworkManager.h: NM_STATE_CONNECTING   = 40,
> /usr/include/NetworkManager/NetworkManager.h: NM_STATE_CONNECTED_LOCAL  = 50,
> /usr/include/NetworkManager/NetworkManager.h: NM_STATE_CONNECTED_SITE   = 60,
> /usr/include/NetworkManager/NetworkManager.h: NM_STATE_CONNECTED_GLOBAL = 70,
> /usr/include/NetworkManager/NetworkManager.h:#define NM_STATE_CONNECTED 
> NM_STATE_CONNECTED_GLOBAL


The only tricky part in  libpurple/network.c is

> if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN)

NM_STATE_CONNECTED 

Bug#862678: #862678 Drop leftover Build-Depends on network-manager-dev

2018-03-11 Thread Ari Pollak
On Sun, Mar 11, 2018 at 5:15 PM Ari Pollak  wrote:

> On Sun, Mar 11, 2018 at 5:00 PM Michael Biebl  wrote:
>
>> By that I mean: If you don't have a runtime requirement, do you only use
>> the D-Bus API? If so, why is network-manager-dev required as build
>> dependency at all?
>>
>
> Right, it's just using the D-Bus API during runtime, but still uses the
> headers during compilation for state constants.
>

Oops, meant to include a link too:
https://anonscm.debian.org/cgit/collab-maint/pidgin.git/tree/libpurple/network.c


Bug#862678: #862678 Drop leftover Build-Depends on network-manager-dev

2018-03-11 Thread Ari Pollak
On Sun, Mar 11, 2018 at 5:00 PM Michael Biebl  wrote:

> By that I mean: If you don't have a runtime requirement, do you only use
> the D-Bus API? If so, why is network-manager-dev required as build
> dependency at all?
>

Right, it's just using the D-Bus API during runtime, but still uses the
headers during compilation for state constants.


Bug#862678: #862678 Drop leftover Build-Depends on network-manager-dev

2018-03-11 Thread Michael Biebl
Am 11.03.2018 um 21:56 schrieb Michael Biebl:
> Am 11.03.2018 um 21:10 schrieb Ari Pollak:
>> Pidgin is still using network-manager-dev to have NetworkManager support
>> without requiring an extra runtime dependency. 
> 
> How does that work?

By that I mean: If you don't have a runtime requirement, do you only use
the D-Bus API? If so, why is network-manager-dev required as build
dependency at all?


-- 
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#862678: #862678 Drop leftover Build-Depends on network-manager-dev

2018-03-11 Thread Michael Biebl
Am 11.03.2018 um 21:10 schrieb Ari Pollak:
> Pidgin is still using network-manager-dev to have NetworkManager support
> without requiring an extra runtime dependency. 

How does that work?

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