Merge lp:~tribaal/landscape-client/cleanup-dbus-dependencies into lp:~landscape/landscape-client/trunk

Proposed by Chris Glass
Status: Merged
Approved by: Chris Glass
Approved revision: 691
Merged at revision: 682
Proposed branch: lp:~tribaal/landscape-client/cleanup-dbus-dependencies
Merge into: lp:~landscape/landscape-client/trunk
Diff against target: 192 lines (+26/-43)
8 files modified
dbus-1/landscape.conf (+0/-11)
debian/control (+3/-1)
debian/landscape-client-ui.install (+1/-0)
debian/landscape-client.install (+0/-1)
debian/landscape-client.postinst (+2/-1)
debian/rules (+2/-23)
scripts/landscape-dbus-proxy (+10/-1)
setup.py (+8/-5)
To merge this branch: bzr merge lp:~tribaal/landscape-client/cleanup-dbus-dependencies
Reviewer Review Type Date Requested Status
Chris Glass (community) Approve
Björn Tillenius (community) Approve
Christopher Armstrong (community) Approve
Review via email: mp+164355@code.launchpad.net

Commit message

Remove dbus dependency from the landscape-client package.

Description of the change

A small branch that removes the dbus dependency from the landscape-client package.

NB: The landscape-client-ui package still needs dbus!

To post a comment you must log in.
Revision history for this message
Christopher Armstrong (radix) wrote :

[1] Why do we need the dbus-1/landscape.conf at all? At the very least, there's other "Hal" stuff in there that I don't think is necessary any more, but do we need any of the stuff about the individual Landscape components?

+1! Burn, dbus, burn!

Revision history for this message
Christopher Armstrong (radix) :
review: Approve
Revision history for this message
Björn Tillenius (bjornt) wrote :

Looks good to me, basically +1.

I have some comments. [1] needs to be resolved, but the others are not dbus
related, so could go in another branch.

[1]

=== modified file 'debian/landscape-client.install'
--- debian/landscape-client.install 2012-03-05 14:11:42 +0000
+++ debian/landscape-client.install 2013-05-20 07:31:31 +0000
@@ -10,5 +10,4 @@
 usr/bin/landscape-is-cloud-managed
 usr/bin/landscape-dbus-proxy

Hmm, so what's the deal with landscape-dbus-proxy? It still depends on dbus.

[2]

# hardy only
 ifneq (,$(findstring $(dist_release),hardy))
- # We depend on bug-fixed versions of python-dbus and pycurl on hardy
- echo "extra:Depends=python-dbus" >> $(landscape_common_substvars)
- echo "extra:Depends=python-pycurl, hal" >> $(landscape_client_substvars)
+ # We depend on bug-fixed versions pycurl on hardy
+ echo "extra:Depends=python-pycurl" >> $(landscape_client_substvars)

We should clean up this part of the rules file, not to care about hardy anymore.

[3]

 ifeq (,$(filter $(dist_release),hardy lucid))
- # Starting natty, no more hal or dbus
  echo "extra:Depends=libpam-modules (>= 1.0.1-9ubuntu3)" >> $(landscape_common_substvars)
  echo "extra:Depends=python-pycurl, gir1.2-gudev-1.0 (>= 165-0ubuntu2), python-gi" >>

Are gir1.2-gudev-1.0 and python-gi needed for any of the non-ui packages?

review: Needs Information
Revision history for this message
Björn Tillenius (bjornt) wrote :

Could you please also add to the dbus-proxy comment, explaining that it will only be run for old packages depending on dbus, so we don't need to depend on dbus in the current package.

review: Approve
Revision history for this message
Chris Glass (tribaal) wrote :

I took the initiative to clean up the rules files a bit.

Most of the contitional "depends" are now gone since we dropped hardy support and hal dependency altogether (yay!).
python-pycurl and libpam-modules are now defined in the control file directly.

This makes the rules file much easier to read.

Revision history for this message
Björn Tillenius (bjornt) wrote :

On Mon, Jun 03, 2013 at 10:23:44AM -0000, Chris Glass wrote:
> I took the initiative to clean up the rules files a bit.
>
> Most of the contitional "depends" are now gone since we dropped hardy support and hal dependency altogether (yay!).
> python-pycurl and libpam-modules are now defined in the control file directly.
>
> This makes the rules file much easier to read.

Thanks, it does look much better now, +1!

I saw this, though:

 # from quantal onwards, we don't want python-gnupginterface anymore
 (#1045237)
  ifneq (,$(filter $(dist_release),hardy lucid oneiric precise))

Could you please remove hardy and oneiric from that list? They are both
EOL.

Revision history for this message
Chris Glass (tribaal) wrote :

(wrong tab :/)

review: Abstain
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :

Voting does not meet specified criteria. Required: Approve >= 2, Disapprove == 0. Got: 1 Approve.

Revision history for this message
Chris Glass (tribaal) wrote :

Will mark myself as approved, since tarmac is not very cooperative and does not count radix's review as valid anymore :(

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed directory 'dbus'
2=== renamed file 'dbus/landscape.conf' => 'dbus-1/landscape.conf'
3--- dbus/landscape.conf 2013-05-07 13:10:13 +0000
4+++ dbus-1/landscape.conf 2013-06-03 12:47:31 +0000
5@@ -16,17 +16,6 @@
6 <allow send_destination="com.canonical.landscape.Manager" />
7 <allow receive_sender="com.canonical.landscape.Manager" />
8
9- <allow send_interface="org.freedesktop.Hal.Manager" />
10- <allow send_interface="org.freedesktop.Hal.Device" />
11-
12- </policy>
13-
14- <policy user="haldaemon">
15- <!-- XXX: Is there a better way to do this? -->
16- <allow receive_sender="com.canonical.landscape.Manager" />
17- <allow receive_sender="com.canonical.landscape.Monitor" />
18- <allow receive_sender="com.canonical.landscape.Broker" />
19-
20 </policy>
21
22 <policy user="root">
23
24=== modified file 'debian/control'
25--- debian/control 2012-11-20 19:40:59 +0000
26+++ debian/control 2013-06-03 12:47:31 +0000
27@@ -19,7 +19,8 @@
28 lsb-base,
29 adduser,
30 bc,
31- lshw
32+ lshw,
33+ libpam-modules
34 Suggests: ${extra:Suggests}
35 # added/changed when we moved the sysinfo manpage from client to common
36 # in r582. There is no accompaining "Breaks" because -client requires
37@@ -41,6 +42,7 @@
38 ${shlibs:Depends},
39 python-twisted-web,
40 python-twisted-names,
41+ python-pycurl,
42 landscape-common (= ${binary:Version})
43 Suggests: ${extra:Suggests}
44 Description: The Landscape administration system client
45
46=== modified file 'debian/landscape-client-ui.install'
47--- debian/landscape-client-ui.install 2012-03-22 18:43:44 +0000
48+++ debian/landscape-client-ui.install 2013-06-03 12:47:31 +0000
49@@ -6,4 +6,5 @@
50 usr/share/polkit-1/actions/com.canonical.LandscapeClientSettings.policy
51 etc/dbus-1/system.d/com.canonical.LandscapeClientSettings.conf
52 etc/dbus-1/system.d/com.canonical.LandscapeClientRegistration.conf
53+etc/dbus-1/system.d/landscape.conf
54 usr/share/glib-2.0/schemas/com.canonical.landscape-client-settings.gschema.xml
55
56=== modified file 'debian/landscape-client.install'
57--- debian/landscape-client.install 2012-03-05 14:11:42 +0000
58+++ debian/landscape-client.install 2013-06-03 12:47:31 +0000
59@@ -10,5 +10,4 @@
60 usr/bin/landscape-is-cloud-managed
61 usr/bin/landscape-dbus-proxy
62 usr/share/landscape/cloud-default.conf
63-etc/dbus-1/system.d/landscape.conf
64 usr/lib/landscape
65
66=== modified file 'debian/landscape-client.postinst'
67--- debian/landscape-client.postinst 2013-04-18 08:41:48 +0000
68+++ debian/landscape-client.postinst 2013-06-03 12:47:31 +0000
69@@ -108,7 +108,8 @@
70 rm $very_old_cron_job
71 fi
72
73- # Check if we're upgrading from a D-Bus version
74+ # Check if we're upgrading from a D-Bus version like the client in the
75+ # lucid archives.
76 if ! [ -z $2 ]; then
77 if dpkg --compare-versions $2 lt 1.5.1; then
78 # Launch a proxy service that will forward requests over DBus
79
80=== modified file 'debian/rules'
81--- debian/rules 2012-11-22 19:25:47 +0000
82+++ debian/rules 2013-06-03 12:47:31 +0000
83@@ -64,10 +64,10 @@
84
85 python setup.py install --root $(root_dir) $(py_setup_install_args)
86
87+ # Keep in mind that some installed files are defined in setup.py
88 install -D -o root -g root -m 755 debian/landscape-sysinfo.wrapper $(root_dir)/usr/share/landscape/landscape-sysinfo.wrapper
89 install -D -o root -g root -m 644 debian/cloud-default.conf $(root_dir)/usr/share/landscape/cloud-default.conf
90 install -D -o root -g root -m 755 apt-update/apt-update $(root_dir)/usr/lib/landscape/apt-update
91- install -D -o root -g root -m 644 dbus/landscape.conf $(root_dir)/etc/dbus-1/system.d/landscape.conf
92
93 binary-indep:
94 # do nothing
95@@ -88,29 +88,8 @@
96 dh_fixperms
97 dh_shlibdeps
98
99-# hardy only
100-ifneq (,$(findstring $(dist_release),hardy))
101- # We depend on bug-fixed versions of python-dbus and pycurl on hardy
102- echo "extra:Depends=python-dbus" >> $(landscape_common_substvars)
103- echo "extra:Depends=python-pycurl, hal" >> $(landscape_client_substvars)
104- # The python-image-store-proxy package is needed for the eucalyptus plugin
105- echo "extra:Suggests=python-image-store-proxy" >> $(landscape_common_substvars)
106-endif
107-# lucid only
108-ifneq (,$(filter $(dist_release),lucid))
109- # We want libpam-modules in lucid
110- echo "extra:Depends=libpam-modules (>= 1.0.1-9ubuntu3), python-dbus" >> $(landscape_common_substvars)
111- echo "extra:Depends=python-pycurl, hal" >> $(landscape_client_substvars)
112-endif
113-# not hardy, not lucid
114-ifeq (,$(filter $(dist_release),hardy lucid))
115- # Starting natty, no more hal or dbus
116- echo "extra:Depends=libpam-modules (>= 1.0.1-9ubuntu3)" >> $(landscape_common_substvars)
117- echo "extra:Depends=python-pycurl, gir1.2-gudev-1.0 (>= 165-0ubuntu2), python-gi" >> $(landscape_client_substvars)
118- echo "extra:Suggests=python-dbus, hal" >> $(landscape_client_substvars)
119-endif
120 # from quantal onwards, we don't want python-gnupginterface anymore (#1045237)
121-ifneq (,$(filter $(dist_release),hardy lucid oneiric precise))
122+ifneq (,$(filter $(dist_release),lucid precise))
123 echo "extra:Depends=python-gnupginterface" >> $(landscape_common_substvars)
124 endif
125
126
127=== modified file 'scripts/landscape-dbus-proxy'
128--- scripts/landscape-dbus-proxy 2013-05-15 21:42:49 +0000
129+++ scripts/landscape-dbus-proxy 2013-06-03 12:47:31 +0000
130@@ -1,4 +1,14 @@
131 #!/usr/bin/env python
132+"""
133+This script is needed in case the client is upgrading from a pre-AMP version
134+using Dbus as the messaging mechanism (like the landscape-client package from
135+the lucid archives).
136+This allows the package changer to send package changes to the broker using
137+Dbus.
138+
139+This will only be run for old packages depending on DBus, we don't need to
140+depend on DBus in the current version.
141+"""
142
143 import os
144 import dbus
145@@ -39,7 +49,6 @@
146 to the newer AMP-based one, for letting the old package-changer process
147 performing the upgrade communicate with the new version of the client.
148 """
149-
150 bus_name = BUS_NAME
151 object_path = OBJECT_PATH
152
153
154=== modified file 'setup.py'
155--- setup.py 2013-05-03 12:36:06 +0000
156+++ setup.py 2013-06-03 12:47:31 +0000
157@@ -1,12 +1,15 @@
158 #!/usr/bin/python
159
160-from distutils.core import setup, Extension
161+from distutils.core import setup
162
163 from landscape import UPSTREAM_VERSION
164
165 from DistUtilsExtra.command import build_extra, build_i18n
166 from DistUtilsExtra.auto import clean_build_tree
167
168+# This is just because the path is hard to line-break.
169+glib_path = [
170+ "glib-2.0/schemas/com.canonical.landscape-client-settings.gschema.xml"]
171
172 setup(name="Landscape Client",
173 version=UPSTREAM_VERSION,
174@@ -35,14 +38,14 @@
175 data_files=[
176 ("/usr/share/dbus-1/system-services/",
177 ["dbus-1/com.canonical.LandscapeClientSettings.service",
178- "dbus-1/com.canonical.LandscapeClientRegistration.service"]),
179+ "dbus-1/com.canonical.LandscapeClientRegistration.service"]),
180 ("/etc/dbus-1/system.d/",
181 ["dbus-1/com.canonical.LandscapeClientSettings.conf",
182- "dbus-1/com.canonical.LandscapeClientRegistration.conf"]),
183+ "dbus-1/com.canonical.LandscapeClientRegistration.conf",
184+ "dbus-1/landscape.conf"]),
185 ("/usr/share/icons/hicolor/scalable/apps/",
186 ["icons/preferences-management-service.svg"]),
187- ("/usr/share/glib-2.0/schemas/",
188- ["glib-2.0/schemas/com.canonical.landscape-client-settings.gschema.xml"])],
189+ ("/usr/share/glib-2.0/schemas/", glib_path)],
190 scripts=["scripts/landscape-client",
191 "scripts/landscape-config",
192 "scripts/landscape-message",

Subscribers

People subscribed via source and target branches

to all changes: