Merge lp:~cyphermox/ubuntu/natty/cnetworkmanager/lp677589 into lp:ubuntu/natty/cnetworkmanager

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Merged at revision: 4
Proposed branch: lp:~cyphermox/ubuntu/natty/cnetworkmanager/lp677589
Merge into: lp:ubuntu/natty/cnetworkmanager
Diff against target: 151 lines (+121/-1)
4 files modified
debian/changelog (+9/-0)
debian/control (+2/-1)
debian/patches/nm_0-8-2_dbus_api.patch (+109/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~cyphermox/ubuntu/natty/cnetworkmanager/lp677589
Reviewer Review Type Date Requested Status
Artur Rona (community) Approve
Review via email: mp+41363@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Artur Rona (ari-tczew) wrote :
review: Needs Fixing
5. By Mathieu Trudel-Lapierre

Add missing DEP-3 tags for the patch. Oops.

Revision history for this message
Artur Rona (ari-tczew) wrote :

Please improve debian/changelog entry with following suggestion:

target to natty: s/UNRELEASED/natty

  * debian/patches/nm_0-8-2_dbus_api.patch: Unbreak as much as possible
    of cnetworkmanager to work with NM 0.8.2 and above. Some DBUS API changes broke
    ap listing, connection, etc. Which really should work for the package to be useful.
    (LP: #677589)

update timestamp would be nice.;
add dot at the end of subject tag;
add tag 'Description' before sentence in line 4 (patch), so should look like Description: There has been...

Package built fine.

review: Needs Fixing
6. By Mathieu Trudel-Lapierre

Apply a few more formatting changes suggested by Artur Rona. Thanks!

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I'll respectfully disagree on some points:

 - target to Natty; I'm fine with applying this change (and I did), but it's not strictly required. It's also fairly common procedure to submit UNRELEASED changes for sponsoring, then the sponsor will use dch -t or whatnot to release/commit/upload.

 - entry format: I think this is to be left to the individual maintainers. There is no guideline or rule made for how a changelog entry should look, and for other networkmanager packages we've been routinely using the "previous" format (the one I initially had in changelog. That said, I don't feel strongly for either way, so I've updated it.

 - DEP-3 states: "When Subject is used, it is expected that the long description is outside of the structured fields." which is why I've added a short description on the Subject: line, and a long description outside of structured fields.

Revision history for this message
Artur Rona (ari-tczew) wrote :

Now looks good. Please reconsider forwarding this patch to Debian and upstream.

Thank you for your contribution!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2010-09-06 19:49:12 +0000
+++ debian/changelog 2010-12-08 15:56:33 +0000
@@ -1,3 +1,12 @@
1cnetworkmanager (0.21.1-1.1ubuntu1) natty; urgency=low
2
3 * debian/patches/nm_0-8-2_dbus_api.patch: Unbreak as much as possible
4 of cnetworkmanager to work with NM 0.8.2 and above. Some DBUS API
5 changes broke ap listing, connection, etc. Which really should work
6 for the package to be useful. (LP: #677589)
7
8 -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Wed, 08 Dec 2010 10:52:08 -0500
9
1cnetworkmanager (0.21.1-1.1) unstable; urgency=low10cnetworkmanager (0.21.1-1.1) unstable; urgency=low
211
3 * Non-maintainer upload.12 * Non-maintainer upload.
413
=== modified file 'debian/control'
--- debian/control 2010-09-06 19:49:12 +0000
+++ debian/control 2010-12-08 15:56:33 +0000
@@ -1,7 +1,8 @@
1Source: cnetworkmanager1Source: cnetworkmanager
2Section: net2Section: net
3Priority: extra3Priority: extra
4Maintainer: Python Applications Packaging Team <python-apps-team@lists.alioth.debian.org>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Python Applications Packaging Team <python-apps-team@lists.alioth.debian.org>
5Uploaders: W. Martin Borgert <debacle@debian.org>6Uploaders: W. Martin Borgert <debacle@debian.org>
6Build-Depends: cdbs, debhelper (>= 7), python, python-support, xsltproc, docbook-xsl7Build-Depends: cdbs, debhelper (>= 7), python, python-support, xsltproc, docbook-xsl
7Standards-Version: 3.8.48Standards-Version: 3.8.4
89
=== added directory 'debian/patches'
=== added file 'debian/patches/nm_0-8-2_dbus_api.patch'
--- debian/patches/nm_0-8-2_dbus_api.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/nm_0-8-2_dbus_api.patch 2010-12-08 15:56:33 +0000
@@ -0,0 +1,109 @@
1From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2Subject: Have cnetworkmanager deal with NM 0.8.2's DBus API.
3Bug-Ubuntu: https://launchpad.net/bugs/677589
4
5There has been a number of changes in the API for NM since the last
6upstream release of cnetworkmanager, and even more with the release
7of NetworkManager 0.8.2. Attempt to cope with the new API in two ways:
8
9 1) Set the correct DBus API Interface for Wired / Wireless devices
10 2) Attempt a basic level of support for inheritance of DBus interfaces
11
12The second is done by providing a "base interface" from which different
13types of devices could "inherit" or require to use.
14
15One a first call with the "real" interface specific to a device fails
16with an AccessDenied DBus error, try a second time to issue the call
17with the base interface for .Device. In reality, there aren't really
18so many more levels of inheritance in devices types past that.
19
20Index: cnetworkmanager-0.21.1/dbusclient/__init__.py
21===================================================================
22--- cnetworkmanager-0.21.1.orig/dbusclient/__init__.py 2010-11-19 12:26:55.076768001 -0500
23+++ cnetworkmanager-0.21.1/dbusclient/__init__.py 2010-11-19 12:27:03.946768001 -0500
24@@ -35,10 +35,13 @@
25 if introspection does not provide it for a method/property
26 """
27
28- # FIXME common for this class, all classes?
29 self.__default_interface = kwargs.pop("default_interface", None)
30+
31 super(DBusMio, self).__init__(conn, bus_name, object_path, introspect, follow_name_owner_changes, **kwargs)
32
33+ def set_base_iface(self, iface):
34+ self.__base_interface = iface
35+
36 def __getattr__(self, name):
37 """Proxied DBus methods.
38
39@@ -72,9 +75,14 @@
40 """
41
42 iface = self.__default_interface # TODO cache
43+ base_iface = self.__base_interface
44 # TODO _introspect_property_map
45 pmi = dbus.Interface(self, "org.freedesktop.DBus.Properties")
46- return pmi.Get(iface, key, byte_arrays=True)
47+ try:
48+ return pmi.Get(iface, key, byte_arrays=True)
49+ except dbus.exceptions.DBusException, e:
50+ if "AccessDenied" in e.get_dbus_name():
51+ return pmi.Get(base_iface, key, byte_arrays=True)
52
53 def __setitem__(self, key, value):
54 """Proxies DBus properties as dictionary items.
55@@ -89,7 +97,9 @@
56 iface = self.__default_interface # TODO cache
57 # TODO _introspect_property_map
58 pmi = dbus.Interface(self, "org.freedesktop.DBus.Properties")
59- return pmi.Set(iface, key, value, byte_arrays=True)
60+ pmi_res = pmi.Set(iface, key, value, byte_arrays=True)
61+ if not pmi_res:
62+ return pmi.Set(base_iface, key, value, byte_arrays=True)
63
64 def _mklist(x):
65 """Return a list.
66@@ -112,6 +122,8 @@
67 "properties": {},
68 }
69
70+ def set_base_iface(self, iface):
71+ super(DBusClient, self).set_base_iface(iface)
72
73 @classmethod
74 def _get_adaptor(cls, kind, name):
75Index: cnetworkmanager-0.21.1/networkmanager/device.py
76===================================================================
77--- cnetworkmanager-0.21.1.orig/networkmanager/device.py 2010-11-19 12:27:00.316768002 -0500
78+++ cnetworkmanager-0.21.1/networkmanager/device.py 2010-11-19 12:27:03.946768001 -0500
79@@ -162,6 +162,8 @@
80 def __init__(self, opath):
81 """Inits the base class, unlike _create"""
82 super(Device, self).__init__(dbus.SystemBus(), self.SERVICE, opath, default_interface = self.IFACE)
83+ if self.BASE_IFACE:
84+ super(Device, self).set_base_iface(self.BASE_IFACE)
85
86
87 _constructors = {}
88@@ -209,8 +211,9 @@
89 def _settings_type(cls):
90 return "802-3-ethernet"
91
92- # FIXME but also use parent iface
93- IFACE = "org.freedesktop.NetworkManager.Device"
94+ IFACE = "org.freedesktop.NetworkManager.Device.Wired"
95+ BASE_IFACE = "org.freedesktop.NetworkManager.Device"
96+
97 # FIXME how to get parent adaptors?
98 Wired._add_adaptors(
99 # PropertiesChanged = SA(identity),
100@@ -238,6 +241,9 @@
101 def _settings_type(cls):
102 return "802-11-wireless"
103
104+ IFACE = "org.freedesktop.NetworkManager.Device.Wireless"
105+ BASE_IFACE = "org.freedesktop.NetworkManager.Device"
106+
107 Wireless._add_adaptors(
108 GetAccessPoints = MA(seq_adaptor(AccessPoint)),
109
0110
=== added file 'debian/patches/series'
--- debian/patches/series 1970-01-01 00:00:00 +0000
+++ debian/patches/series 2010-12-08 15:56:33 +0000
@@ -0,0 +1,1 @@
1nm_0-8-2_dbus_api.patch

Subscribers

People subscribed via source and target branches