Merge lp:~andreserl/maas/packaging_updates_bzr1170 into lp:~maas-maintainers/maas/packaging

Proposed by Andres Rodriguez on 2012-10-04
Status: Merged
Approved by: Andres Rodriguez on 2012-10-05
Approved revision: 120
Merged at revision: 117
Proposed branch: lp:~andreserl/maas/packaging_updates_bzr1170
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 351 lines (+117/-72)
9 files modified
debian/changelog (+14/-5)
debian/control (+3/-1)
debian/extras/99-maas (+3/-0)
debian/maas-region-controller.install (+1/-1)
debian/maas-region-controller.postinst (+34/-1)
debian/maas-region-controller.postrm (+10/-0)
debian/maintscript (+2/-0)
debian/po/POTFILES.in (+2/-2)
debian/po/templates.pot (+48/-62)
To merge this branch: bzr merge lp:~andreserl/maas/packaging_updates_bzr1170
Reviewer Review Type Date Requested Status
Scott Moser Approve on 2012-10-04
Launchpad code reviewers 2012-10-04 Pending
Review via email: mp+128088@code.launchpad.net

Commit Message

* debian/maas-region-controller.postinst:
  - Add MAAS server to allowed mirror in squid-deb-proxy
* debian/control: Depends on python-netifaces, python-lxml.
* Handle removal of non existant files (LP: #1059556):
  - debian/maintscript: Added to handle removal of conffiles.
  - debian/control: Add Pre-depends and bump debhelper version.
* update po files for the templates.
* debian/extras/99-maas: Install in usr/share/maas/conf and symlink to the
appropriate etc dir.

To post a comment you must log in.
Scott Moser (smoser) wrote :

Approve, but please just remove the 'grep' in configure_maas_squid_deb_proxy .

Secondly, please try to avoid conf-file prompts.

review: Approve
118. By Andres Rodriguez on 2012-10-04

Source dbconfig conf file for maas-region-controller on upgrade because
it writes a new config file and no longer preservers the previous password.

119. By Andres Rodriguez on 2012-10-04

Correctly handle upgrades

120. By Andres Rodriguez on 2012-10-05

debian/extras/99-maas: Install in usr/share/maas/conf and symlink to the
appropriate etc dir.

Andres Rodriguez (andreserl) wrote :

Addressed smoser's suggetions.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-10-03 06:50:25 +0000
3+++ debian/changelog 2012-10-05 04:31:21 +0000
4@@ -1,4 +1,4 @@
5-maas (0.1+bzr1139+dfsg-0ubuntu2) UNRELEASED; urgency=low
6+maas (0.1+bzr1170+dfsg-0ubuntu1) UNRELEASED; urgency=low
7
8 * New upstream release.
9
10@@ -24,13 +24,22 @@
11
12 [ Andres Rodriguez ]
13 * debian/maas-dhcp.postinst: Stop isc-dhcp-server not isc_dhcp_server.
14- * debian/maas-region-controller.postinst: Always update passwords
15- on upgrade. No longer check versioning. (LP: #1060094).
16+ * debian/maas-region-controller.postinst:
17+ - Always update passwords on upgrade. No longer check versioning. (LP: #1060094).
18+ - Add MAAS server to allowed mirror in squid-deb-proxy
19+ - Source dbconfig conf file for maas-region-controller on upgrade because
20+ it writes a new config file and no longer preservers the previous password.
21 * debian/maas-cluster-controller.maas-cluster-celery.upstart: Remove set{uid/gid}.
22- * debian/control: Depends on python-netifaces.
23+ * debian/control: Depends on python-netifaces, python-lxml.
24 * debian/maas-region-controller: Install maas-import-squashfs
25+ * Handle removal of non existant files (LP: #1059556):
26+ - debian/maintscript: Added to handle removal of conffiles.
27+ - debian/control: Add Pre-depends and bump debhelper version.
28+ * update po files for the templates.
29+ * debian/extras/99-maas: Install in usr/share/maas/conf and symlink to the
30+ appropriate etc dir.
31
32- -- Julian Edwards <julian.edwards@canonical.com> Wed, 03 Oct 2012 16:49:24 +1000
33+ -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 04 Oct 2012 13:34:12 -0400
34
35 maas (0.1+bzr1110+dfsg-0ubuntu1) quantal; urgency=low
36
37
38=== modified file 'debian/control'
39--- debian/control 2012-10-02 19:37:19 +0000
40+++ debian/control 2012-10-05 04:31:21 +0000
41@@ -2,7 +2,7 @@
42 Section: net
43 Priority: optional
44 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
45-Build-Depends: debhelper (>= 8),
46+Build-Depends: debhelper (>= 8.1.0~),
47 dh-apport,
48 po-debconf,
49 python (>= 2.7),
50@@ -15,6 +15,7 @@
51
52 Package: maas
53 Architecture: all
54+Pre-Depends: ${misc:Pre-Depends}
55 Depends: maas-cluster-controller, maas-region-controller, python-django-maas
56 Conflicts: dnsmasq, maas-provision, tftpd-hpa
57 Replaces: maas-provision
58@@ -188,6 +189,7 @@
59 python-convoy,
60 python-dbus,
61 python-lockfile,
62+ python-lxml,
63 python-maas-client (= ${binary:Version}),
64 python-netaddr,
65 python-oops,
66
67=== modified file 'debian/extras/99-maas'
68--- debian/extras/99-maas 2012-04-12 03:37:08 +0000
69+++ debian/extras/99-maas 2012-10-05 04:31:21 +0000
70@@ -2,3 +2,6 @@
71 #
72 # Enable launchpad personal package archives for squid-deb-proxy
73 ppa.launchpad.net
74+# Enable access to MAAS server HTTP to allow squashfs download
75+# during install
76+maas.internal.example.com # maasurl
77
78=== modified file 'debian/maas-region-controller.install'
79--- debian/maas-region-controller.install 2012-10-02 18:42:28 +0000
80+++ debian/maas-region-controller.install 2012-10-05 04:31:21 +0000
81@@ -47,4 +47,4 @@
82 debian/extras/maas usr/sbin
83 debian/extras/20-maas.conf etc/rsyslog.d
84 debian/extras/maas_remote_syslog_compress etc/cron.d
85-debian/extras/99-maas etc/squid-deb-proxy/mirror-dstdomain.acl.d
86+debian/extras/99-maas usr/share/maas/conf
87
88=== modified file 'debian/maas-region-controller.postinst'
89--- debian/maas-region-controller.postinst 2012-10-02 19:37:19 +0000
90+++ debian/maas-region-controller.postinst 2012-10-05 04:31:21 +0000
91@@ -37,6 +37,14 @@
92 fi
93 }
94
95+restart_squid_deb_proxy() {
96+ if [ -x /usr/sbin/invoke-rc.d ]; then
97+ invoke-rc.d squid-deb-proxy restart || true
98+ else
99+ /etc/init.d/squid-deb-proxy restart || true
100+ fi
101+}
102+
103 add_user_group(){
104 local user="maas"
105 local group="maas"
106@@ -125,6 +133,19 @@
107 fi
108 }
109
110+configure_maas_squid_deb_proxy() {
111+ local ipaddr="$1"
112+
113+ if [ -e /usr/share/maas/conf/99-maas -a \
114+ ! -L /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas ]; then
115+ ln -sf /usr/share/maas/conf/99-maas \
116+ /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas
117+ fi
118+
119+ sed -i "s/\(^[a-zA-Z0-9\.\-].*\) # maasurl$/$ipaddr # maasurl/" \
120+ /usr/share/maas/conf/99-maas
121+}
122+
123 if [ "$1" = "configure" ] && [ -z "$2" ]; then
124 #########################################################
125 ################ User/Group Creatiion ##################
126@@ -174,6 +195,7 @@
127 # Set the IP address of the interface with default route
128 if [ -n "$ipaddr" ]; then
129 configure_maas_default_url "$ipaddr"
130+ configure_maas_squid_deb_proxy "$ipaddr"
131 db_subst maas/installation-note MAAS_URL "$ipaddr"
132 db_set maas/default-maas-url "$ipaddr"
133 fi
134@@ -253,6 +275,7 @@
135 db_set maas/default-maas-url "$ipaddr"
136 if [ -n "$ipaddr" ]; then
137 configure_maas_default_url "$ipaddr"
138+ configure_maas_squid_deb_proxy "$ipaddr"
139 fi
140
141 elif [ "$1" = "configure" ] && dpkg --compare-versions "$2" gt 0.1+bzr266+dfsg-0ubuntu1; then
142@@ -268,13 +291,21 @@
143 db_get maas/default-maas-url
144 ipaddr="$RET"
145 configure_maas_default_url "$ipaddr"
146+ configure_maas_squid_deb_proxy "$ipaddr"
147 # make sure rabbitmq is running
148 restart_rabbitmq
149 configure_maas_txlongpoll_rabbitmq_user
150 # Handle celery/rabbitmq publishing
151 configure_maas_workers_rabbitmq_user
152 # handle database upgrade
153- dbc_go maas-region-controller $@
154+ if [ -f /etc/dbconfig-common/maas-region-controller.conf ]; then
155+ # source dbconfig-common db config for maas-region-controller
156+ # before upgrading database, otherwise a new config is written
157+ # but the password is no longer preserved.
158+ . /etc/dbconfig-common/maas-region-controller.conf
159+ else
160+ dbc_go maas-region-controller $@
161+ fi
162 configure_maas_database "$dbc_dbpass"
163
164 maas_sync_migrate_db
165@@ -283,6 +314,8 @@
166
167 restart_apache2
168
169+restart_squid_deb_proxy
170+
171 db_stop
172
173 #DEBHELPER#
174
175=== modified file 'debian/maas-region-controller.postrm'
176--- debian/maas-region-controller.postrm 2012-09-28 02:40:23 +0000
177+++ debian/maas-region-controller.postrm 2012-10-05 04:31:21 +0000
178@@ -31,6 +31,16 @@
179 deluser maas || true
180 fi
181
182+ # Delete symlink
183+ if [ -L /etc/tgt/conf.d/maas.conf ]; then
184+ rm -rf /etc/tgt/conf.d/maas.conf
185+ fi
186+
187+ # Delete symlink
188+ if [ -L /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas ]; then
189+ rm -rf /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas
190+ fi
191+
192 # Remove rabbitmq/longpoll/celery
193 longpoll_user="maas_longpoll"
194 longpoll_vhost="/maas_longpoll"
195
196=== added file 'debian/maintscript'
197--- debian/maintscript 1970-01-01 00:00:00 +0000
198+++ debian/maintscript 2012-10-05 04:31:21 +0000
199@@ -0,0 +1,2 @@
200+rm_conffile /etc/init/maas-celery.conf 0.1+bzr971+dfsg-0ubuntu2
201+rm_conffile /etc/dbconfig-common/maas.conf 0.1+bzr971+dfsg-0ubuntu2
202
203=== modified file 'debian/po/POTFILES.in'
204--- debian/po/POTFILES.in 2012-04-04 18:52:33 +0000
205+++ debian/po/POTFILES.in 2012-10-05 04:31:21 +0000
206@@ -1,2 +1,2 @@
207-[type: gettext/rfc822deb] maas-dhcp.templates
208-[type: gettext/rfc822deb] maas.templates
209+[type: gettext/rfc822deb] maas-region-controller.templates
210+[type: gettext/rfc822deb] maas-cluster-controller.templates
211
212=== modified file 'debian/po/templates.pot'
213--- debian/po/templates.pot 2012-04-04 18:52:33 +0000
214+++ debian/po/templates.pot 2012-10-05 04:31:21 +0000
215@@ -8,7 +8,7 @@
216 msgstr ""
217 "Project-Id-Version: maas\n"
218 "Report-Msgid-Bugs-To: maas@packages.debian.org\n"
219-"POT-Creation-Date: 2012-04-04 14:45-0400\n"
220+"POT-Creation-Date: 2012-10-04 13:40-0400\n"
221 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
222 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
223 "Language-Team: LANGUAGE <LL@li.org>\n"
224@@ -17,73 +17,15 @@
225 "Content-Type: text/plain; charset=CHARSET\n"
226 "Content-Transfer-Encoding: 8bit\n"
227
228-#. Type: string
229-#. Description
230-#: ../maas-dhcp.templates:1001
231-msgid "Set the network range for DHCP Clients:"
232-msgstr ""
233-
234-#. Type: string
235-#. Description
236-#: ../maas-dhcp.templates:1001
237-msgid ""
238-"Ubuntu MAAS Server can manage DHCP for address allocation for the "
239-"provisioned systems. If the network range for the DHCP is different from "
240-"the default (192.168.1.5,192.168.1.200), you should set it here."
241-msgstr ""
242-
243-#. Type: string
244-#. Description
245-#: ../maas-dhcp.templates:1001
246-msgid "An example of how a network range should be specified is:"
247-msgstr ""
248-
249-#. Type: string
250-#. Description
251-#: ../maas-dhcp.templates:1001
252-msgid "10.10.10.2,10.10.10.254"
253-msgstr ""
254-
255-#. Type: string
256-#. Description
257-#: ../maas-dhcp.templates:2001
258-msgid "Set default Gateway for DHCP Clients:"
259-msgstr ""
260-
261-#. Type: string
262-#. Description
263-#: ../maas-dhcp.templates:2001
264-msgid ""
265-"Ubuntu MAAS Server can manage DHCP for address allocation for the "
266-"provisioned systems. If the Ubuntu MAAS Server is NOT the default Gateway "
267-"for the provisioned systems, you should set the default Gateway here, "
268-"otherwise leave this blank."
269-msgstr ""
270-
271-#. Type: string
272-#. Description
273-#: ../maas-dhcp.templates:3001
274-msgid "Set the domain name for DHCP Clients:"
275-msgstr ""
276-
277-#. Type: string
278-#. Description
279-#: ../maas-dhcp.templates:3001
280-msgid ""
281-"Ubuntu MAAS Server can manage DHCP for address allocation for the "
282-"provisioned systems. If these systems are required to be under a domain, you "
283-"should enter it here."
284-msgstr ""
285-
286 #. Type: note
287 #. Description
288-#: ../maas.templates:1001
289+#: ../maas-region-controller.templates:1001
290 msgid "Ubuntu MAAS Server"
291 msgstr ""
292
293 #. Type: note
294 #. Description
295-#: ../maas.templates:1001
296+#: ../maas-region-controller.templates:1001
297 msgid ""
298 "The Ubuntu MAAS Server has been installed in your system. You can access the "
299 "MAAS Web interface here:"
300@@ -91,6 +33,50 @@
301
302 #. Type: note
303 #. Description
304-#: ../maas.templates:1001
305+#: ../maas-region-controller.templates:1001
306 msgid " http://${MAAS_URL}/MAAS"
307 msgstr ""
308+
309+#. Type: note
310+#. Description
311+#: ../maas-region-controller.templates:1001
312+msgid ""
313+"If the automatically detected address above is not in the same network as "
314+"the MAAS clients, you need to reconfigure it:"
315+msgstr ""
316+
317+#. Type: note
318+#. Description
319+#: ../maas-region-controller.templates:1001
320+msgid " sudo dpkg-reconfigure maas-region-controller"
321+msgstr ""
322+
323+#. Type: string
324+#. Description
325+#: ../maas-region-controller.templates:2001
326+msgid "Ubuntu MAAS PXE/Provisioning network address:"
327+msgstr ""
328+
329+#. Type: string
330+#. Description
331+#: ../maas-region-controller.templates:2001
332+msgid ""
333+"The Ubuntu MAAS Server automatically detects the IP address that is used for "
334+"PXE and provisioning. However, it needs to be in the same network as the "
335+"clients. If the automatically detected address is not in the same network as "
336+"the clients, it must be changed."
337+msgstr ""
338+
339+#. Type: string
340+#. Description
341+#: ../maas-cluster-controller.templates:1001
342+msgid "Ubuntu MAAS API address:"
343+msgstr ""
344+
345+#. Type: string
346+#. Description
347+#: ../maas-cluster-controller.templates:1001
348+msgid ""
349+"The MAAS Cluster Controller needs to contact the MAAS server to register its "
350+"presence. Set the URL to the MAAS API here, e.g. http://192.168.1.1/MAAS"
351+msgstr ""

Subscribers

People subscribed via source and target branches

to all changes: