Merge lp:~andreserl/maas/packaging_quantal_slangasek_backport into lp:~maas-maintainers/maas/packaging.quantal

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: no longer in the source branch.
Merged at revision: 166
Proposed branch: lp:~andreserl/maas/packaging_quantal_slangasek_backport
Merge into: lp:~maas-maintainers/maas/packaging.quantal
Diff against target: 461 lines (+83/-123)
15 files modified
debian/changelog (+28/-1)
debian/maas-cluster-controller.config (+4/-4)
debian/maas-cluster-controller.postinst (+4/-3)
debian/maas-cluster-controller.postrm (+2/-9)
debian/maas-cluster-controller.prerm (+0/-10)
debian/maas-common.postinst (+6/-14)
debian/maas-common.postrm (+1/-0)
debian/maas-dhcp.postinst (+6/-13)
debian/maas-dhcp.postrm (+5/-3)
debian/maas-dns.postinst (+6/-7)
debian/maas-dns.postrm (+3/-4)
debian/maas-region-controller.config (+6/-6)
debian/maas-region-controller.postinst (+11/-38)
debian/maas-region-controller.postrm (+0/-4)
debian/maas-region-controller.prerm (+1/-7)
To merge this branch: bzr merge lp:~andreserl/maas/packaging_quantal_slangasek_backport
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+154450@code.launchpad.net

Commit message

Backport slangasek fixes to packaging (rev 169)

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Approving mysql.

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 2013-03-08 23:09:22 +0000
+++ debian/changelog 2013-03-20 17:45:26 +0000
@@ -1,4 +1,4 @@
1maas (1.2+bzr1372+dfsg-0ubuntu1) quantal-proposed; urgency=low1maas (1.2+bzr1373+dfsg-0ubuntu1) UNRELEASED; urgency=low
22
3 * MAAS Stable Release Update (LP: #1109283):3 * MAAS Stable Release Update (LP: #1109283):
4 This SRU brings a new upstream release of MAAS that removes4 This SRU brings a new upstream release of MAAS that removes
@@ -7,6 +7,33 @@
7 Board to proceed. More information can be found in:7 Board to proceed. More information can be found in:
8 https://lists.ubuntu.com/archives/ubuntu-devel-announce/2013-February/001012.html8 https://lists.ubuntu.com/archives/ubuntu-devel-announce/2013-February/001012.html
99
10 [ Steve Langasek ]
11 * postinst scripts are never called with 'reconfigure' as the script
12 argument. Remove references to this (mythical) invocation.
13 * always call 'set -e' from maintainer scripts instead of passing 'sh -e'
14 as the interpreter, so that scripts will behave correctly when run via
15 'sh -x'.
16 * invoke-rc.d is never allowed to not exist - simplify scripts (and make
17 them better policy-compliant) by invoking unconditionally. (The only
18 possible exception is in the postrm, where it's *theoretically* possible
19 for invoke-rc.d to be missing if the user has completely stripped
20 down their system; that's a fairly unreasonable corner case, but we
21 might as well be correct if it ever happens.)
22 * db_get+db_set is a no-op; don't call db_set to push back a value we just
23 got from db_get.
24 * Omit superfluous calls to 'exit 0' at the end of each script.
25 * Remove maas-cluster-controller prerm script, which called debconf for no
26 reason.
27 * Don't invoke debconf in the postrm script either, debhelper already does
28 this for us.
29 * Other miscellaneous maintainer script fixes
30 * debian/maas-common.postinst: call adduser and addgroup unconditionally;
31 the tools are already designed to DTRT, we don't need to check for the
32 user/group existence before calling them nor should we worry about
33 calling them only once on first install.
34 * debian/maas-common.postrm: delete the maas group, not just the user,
35 as the comment in the code implies we should do.
36
10 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 07 Mar 2013 14:22:35 -050037 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 07 Mar 2013 14:22:35 -0500
1138
12maas (1.2+bzr1370+dfsg-0ubuntu1) raring; urgency=low39maas (1.2+bzr1370+dfsg-0ubuntu1) raring; urgency=low
1340
=== modified file 'debian/maas-cluster-controller.config'
--- debian/maas-cluster-controller.config 2012-11-13 20:40:35 +0000
+++ debian/maas-cluster-controller.config 2013-03-20 17:45:26 +0000
@@ -1,4 +1,6 @@
1#!/bin/sh -e1#!/bin/sh
2
3set -e
24
3. /usr/share/debconf/confmodule5. /usr/share/debconf/confmodule
4db_version 2.06db_version 2.0
@@ -8,9 +10,7 @@
8if ([ "$1" = "configure" ] && [ -z "$2" ]); then10if ([ "$1" = "configure" ] && [ -z "$2" ]); then
911
10 db_get maas-cluster-controller/maas-url || true12 db_get maas-cluster-controller/maas-url || true
11 if [ -n "$RET" ]; then13 if [ -z "$RET" ]; then
12 db_set maas-cluster-controller/maas-url "$RET"
13 else
14 # Attempt to pre-populate if installing on the region controller.14 # Attempt to pre-populate if installing on the region controller.
15 if [ -e /etc/maas/maas_local_settings.py ]; then15 if [ -e /etc/maas/maas_local_settings.py ]; then
16 url=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"\"")} END{print array[2] }' /etc/maas/maas_local_settings.py)16 url=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"\"")} END{print array[2] }' /etc/maas/maas_local_settings.py)
1717
=== modified file 'debian/maas-cluster-controller.postinst'
--- debian/maas-cluster-controller.postinst 2012-12-13 11:00:54 +0000
+++ debian/maas-cluster-controller.postinst 2013-03-20 17:45:26 +0000
@@ -1,4 +1,6 @@
1#!/bin/sh -e1#!/bin/sh
2
3set -e
24
3. /usr/share/debconf/confmodule5. /usr/share/debconf/confmodule
4db_version 2.06db_version 2.0
@@ -72,7 +74,7 @@
72 configure_maas_tgt74 configure_maas_tgt
73fi75fi
7476
75if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then77if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ -n "$DEBCONF_RECONFIGURE" ]; then
7678
77 if dpkg --compare-versions "$2" lt 0.1+bzr1239+dfsg-0ubuntu1; then79 if dpkg --compare-versions "$2" lt 0.1+bzr1239+dfsg-0ubuntu1; then
78 create_log_dir80 create_log_dir
@@ -104,4 +106,3 @@
104fi106fi
105107
106#DEBHELPER#108#DEBHELPER#
107exit 0
108109
=== modified file 'debian/maas-cluster-controller.postrm'
--- debian/maas-cluster-controller.postrm 2012-11-20 22:13:28 +0000
+++ debian/maas-cluster-controller.postrm 2013-03-20 17:45:26 +0000
@@ -2,15 +2,12 @@
22
3set -e3set -e
44
5. /usr/share/debconf/confmodule5#DEBHELPER#
6db_version 2.0
76
8case "$1" in7case "$1" in
9 purge)8 purge)
10 # remove log directory9 # remove log directory
11 if [ -d /var/log/maas ]; then10 rm -rf /var/log/maas
12 rm -rf /var/log/maas
13 fi
14 # remove var directory11 # remove var directory
15 rm -rf /var/lib/maas/celerybeat-cluster-schedule12 rm -rf /var/lib/maas/celerybeat-cluster-schedule
16 DIR=/var/lib/maas13 DIR=/var/lib/maas
@@ -24,7 +21,3 @@
24 fi21 fi
2522
26esac23esac
27
28#DEBHELPER#
29
30exit 0
3124
=== removed file 'debian/maas-cluster-controller.prerm'
--- debian/maas-cluster-controller.prerm 2012-10-08 17:16:30 +0000
+++ debian/maas-cluster-controller.prerm 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
1#!/bin/sh
2
3set -e
4
5. /usr/share/debconf/confmodule
6db_version 2.0
7
8#DEBHELPER#
9
10exit 0
110
=== modified file 'debian/maas-common.postinst'
--- debian/maas-common.postinst 2012-10-11 18:16:28 +0000
+++ debian/maas-common.postinst 2013-03-20 17:45:26 +0000
@@ -1,22 +1,14 @@
1#!/bin/sh -e1#!/bin/sh
2
3set -e
24
3add_user_group(){5add_user_group(){
4 local user="maas"6 local user="maas"
5 local group="maas"7 local group="maas"
6 if ! getent group "$group" >/dev/null; then8 addgroup --quiet --system "$group" || true
7 addgroup --quiet --system "$group" || true9 adduser --quiet --system --group --no-create-home "$user" || true
8 fi
9 if ! getent passwd "$user" > /dev/null 2>&1; then
10 adduser --quiet \
11 --system \
12 --group \
13 --no-create-home \
14 "$user" || true
15 fi
16}10}
1711
18if [ "$1" = "configure" ]; then12add_user_group
19 add_user_group
20fi
2113
22#DEBHELPER#14#DEBHELPER#
2315
=== modified file 'debian/maas-common.postrm'
--- debian/maas-common.postrm 2012-10-11 18:16:28 +0000
+++ debian/maas-common.postrm 2013-03-20 17:45:26 +0000
@@ -7,6 +7,7 @@
7 # Deleting user/group7 # Deleting user/group
8 if getent passwd maas >/dev/null; then8 if getent passwd maas >/dev/null; then
9 deluser maas || true9 deluser maas || true
10 delgroup maas || true
10 fi11 fi
11esac12esac
1213
1314
=== modified file 'debian/maas-dhcp.postinst'
--- debian/maas-dhcp.postinst 2012-10-02 18:42:28 +0000
+++ debian/maas-dhcp.postinst 2013-03-20 17:45:26 +0000
@@ -1,22 +1,15 @@
1#!/bin/sh -e1#!/bin/sh
22
3. /usr/share/debconf/confmodule3set -e
4db_version 2.0
5
6stop_isc_dhcp_server(){
7 invoke-rc.d isc-dhcp-server stop
8}
9
104
11if [ "$1" = "configure" ]; then5if [ "$1" = "configure" ]; then
12 stop_isc_dhcp_server6 invoke-rc.d isc-dhcp-server stop
137
14 dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd"8 dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd"
15 if [ -f "${dhcpd_prof}" ] &&9 if [ -f "${dhcpd_prof}" ] && command -v apparmor_parser >/dev/null 2>&1
16 command -v apparmor_parser >/dev/null 2>&1; then10 then
17 apparmor_parser --replace --write-cache --skip-read-cache "${dhcpd_prof}"11 apparmor_parser --replace --write-cache --skip-read-cache "${dhcpd_prof}"
18 fi12 fi
19fi13fi
2014
21#DEBHELPER#15#DEBHELPER#
22exit 0
2316
=== modified file 'debian/maas-dhcp.postrm'
--- debian/maas-dhcp.postrm 2012-09-14 18:06:57 +0000
+++ debian/maas-dhcp.postrm 2013-03-20 17:45:26 +0000
@@ -1,6 +1,8 @@
1#!/bin/sh -e1#!/bin/sh
22
3if [ "$1" = "remove" -o "$1" = "purge" ]; then3set -e
4
5if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
4 dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd"6 dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd"
5 if [ -f "${dhcpd_prof}" ] &&7 if [ -f "${dhcpd_prof}" ] &&
6 command -v apparmor_parser >/dev/null 2>&1; then8 command -v apparmor_parser >/dev/null 2>&1; then
79
=== modified file 'debian/maas-dns.postinst'
--- debian/maas-dns.postinst 2012-12-04 16:16:39 +0000
+++ debian/maas-dns.postinst 2013-03-20 17:45:26 +0000
@@ -1,6 +1,8 @@
1#!/bin/sh -e1#!/bin/sh
22
3if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then3set -e
4
5if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ -n "$DEBCONF_RECONFIGURE" ]; then
4 # If /etc/bind/maas is empty, set_up_dns.6 # If /etc/bind/maas is empty, set_up_dns.
5 if [ ! "$(ls -A /etc/bind/maas)" ]; then7 if [ ! "$(ls -A /etc/bind/maas)" ]; then
6 maas set_up_dns8 maas set_up_dns
@@ -28,10 +30,7 @@
2830
29 maas write_dns_config31 maas write_dns_config
3032
31 if [ -x /usr/sbin/invoke-rc.d ]; then33 invoke-rc.d bind9 restart || true
32 invoke-rc.d bind9 restart || true
33 fi
34fi34fi
3535
36#DEBHELPER#36#DEBHELPER#
37exit 0
3837
=== modified file 'debian/maas-dns.postrm'
--- debian/maas-dns.postrm 2012-08-10 23:50:38 +0000
+++ debian/maas-dns.postrm 2013-03-20 17:45:26 +0000
@@ -1,4 +1,6 @@
1#!/bin/sh -e1#!/bin/sh
2
3set -e
24
3if [ "$1" = "remove" ]; then5if [ "$1" = "remove" ]; then
4 if [ -f /etc/bind/named.conf.local ]; then6 if [ -f /etc/bind/named.conf.local ]; then
@@ -19,6 +21,3 @@
19fi21fi
2022
21#DEBHELPER#23#DEBHELPER#
22
23exit 0
24
2524
=== modified file 'debian/maas-region-controller.config'
--- debian/maas-region-controller.config 2012-10-11 18:50:41 +0000
+++ debian/maas-region-controller.config 2013-03-20 17:45:26 +0000
@@ -1,4 +1,6 @@
1#!/bin/sh -e1#!/bin/sh
2
3set -e
24
3. /usr/share/debconf/confmodule5. /usr/share/debconf/confmodule
4db_version 2.06db_version 2.0
@@ -21,7 +23,7 @@
21 . /usr/share/dbconfig-common/dpkg/config.pgsql23 . /usr/share/dbconfig-common/dpkg/config.pgsql
22fi24fi
2325
24if ([ "$1" = "configure" ] && [ -z "$2" ]); then26if [ "$1" = "configure" ] && [ -z "$2" ]; then
25 # Hide maas/dbconfig-install question by setting default.27 # Hide maas/dbconfig-install question by setting default.
26 set_question maas-region-controller/dbconfig-install true28 set_question maas-region-controller/dbconfig-install true
27 set_question maas-region-controller/pgsql/app-pass ""29 set_question maas-region-controller/pgsql/app-pass ""
@@ -32,11 +34,9 @@
3234
33 dbc_go maas-region-controller $@35 dbc_go maas-region-controller $@
3436
35elif [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then37elif [ -n "$DEBCONF_RECONFIGURE" ]; then
36 db_get maas/default-maas-url || true38 db_get maas/default-maas-url || true
37 if [ -n "$RET" ]; then39 if [ -z "$RET" ]; then
38 db_set maas/default-maas-url "$RET"
39 else
40 ipaddr=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"/")} END{print array[3] }' /etc/maas/maas_local_settings.py)40 ipaddr=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"/")} END{print array[3] }' /etc/maas/maas_local_settings.py)
41 db_set maas/default-maas-url "$ipaddr"41 db_set maas/default-maas-url "$ipaddr"
42 fi42 fi
4343
=== modified file 'debian/maas-region-controller.postinst'
--- debian/maas-region-controller.postinst 2012-11-20 22:13:28 +0000
+++ debian/maas-region-controller.postinst 2013-03-20 17:45:26 +0000
@@ -1,4 +1,6 @@
1#!/bin/sh -e1#!/bin/sh
2
3set -e
24
3. /usr/share/debconf/confmodule5. /usr/share/debconf/confmodule
4db_version 2.06db_version 2.0
@@ -13,36 +15,16 @@
13 maas migrate metadataserver --noinput15 maas migrate metadataserver --noinput
14}16}
1517
16restart_apache2(){
17 if [ -x /usr/sbin/invoke-rc.d ]; then
18 invoke-rc.d apache2 restart || true
19 else
20 /etc/init.d/apache2 restart || true
21 fi
22}
23
24restart_rabbitmq(){18restart_rabbitmq(){
25 if [ -x /usr/sbin/invoke-rc.d ]; then19 invoke-rc.d rabbitmq-server restart || true
26 invoke-rc.d rabbitmq-server restart || true
27 else
28 /etc/init.d/rabbitmq-server restart || true
29 fi
30}20}
3121
32restart_postgresql(){22restart_postgresql(){
33 if [ -x /usr/sbin/invoke-rc.d ]; then23 invoke-rc.d --force postgresql restart || true
34 invoke-rc.d --force postgresql restart || true
35 else
36 /etc/init.d/postgresql restart || true
37 fi
38}24}
3925
40restart_squid_deb_proxy() {26restart_squid_deb_proxy() {
41 if [ -x /usr/sbin/invoke-rc.d ]; then27 invoke-rc.d squid-deb-proxy restart || true
42 invoke-rc.d squid-deb-proxy restart || true
43 else
44 /etc/init.d/squid-deb-proxy restart || true
45 fi
46}28}
4729
48configure_maas_txlongpoll_rabbitmq_user() {30configure_maas_txlongpoll_rabbitmq_user() {
@@ -191,17 +173,13 @@
191 mkdir -p /var/log/maas/rsyslog173 mkdir -p /var/log/maas/rsyslog
192 chown -R syslog:syslog /var/log/maas/rsyslog174 chown -R syslog:syslog /var/log/maas/rsyslog
193 # Make sure rsyslog reads our config175 # Make sure rsyslog reads our config
194 if [ -x /usr/sbin/invoke-rc.d ]; then176 invoke-rc.d rsyslog restart
195 invoke-rc.d rsyslog restart
196 fi
197177
198 #########################################################178 #########################################################
199 ################### Squid-deb-proxy ####################179 ################### Squid-deb-proxy ####################
200 #########################################################180 #########################################################
201 # Make sure squid-deb-proxy reads our config (99-maas)181 # Make sure squid-deb-proxy reads our config (99-maas)
202 if [ -x /usr/sbin/invoke-rc.d ]; then182 invoke-rc.d squid-deb-proxy restart
203 invoke-rc.d squid-deb-proxy restart
204 fi
205183
206 #########################################################184 #########################################################
207 ########## Configure longpoll rabbitmq config ###########185 ########## Configure longpoll rabbitmq config ###########
@@ -239,11 +217,10 @@
239 db_input high maas/installation-note || true217 db_input high maas/installation-note || true
240 db_go218 db_go
241219
242elif [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then220elif [ -n "$DEBCONF_RECONFIGURE" ]; then
243 # Set the IP address of the interface with default route221 # Set the IP address of the interface with default route
244 db_get maas/default-maas-url222 db_get maas/default-maas-url
245 ipaddr="$RET"223 ipaddr="$RET"
246 db_set maas/default-maas-url "$ipaddr"
247 if [ -n "$ipaddr" ]; then224 if [ -n "$ipaddr" ]; then
248 configure_maas_default_url "$ipaddr"225 configure_maas_default_url "$ipaddr"
249 configure_maas_squid_deb_proxy "$ipaddr"226 configure_maas_squid_deb_proxy "$ipaddr"
@@ -252,9 +229,7 @@
252229
253elif [ "$1" = "configure" ] && dpkg --compare-versions "$2" gt 0.1+bzr266+dfsg-0ubuntu1; then230elif [ "$1" = "configure" ] && dpkg --compare-versions "$2" gt 0.1+bzr266+dfsg-0ubuntu1; then
254 # If upgrading to any later package version, then upgrade db.231 # If upgrading to any later package version, then upgrade db.
255 if [ -x /usr/sbin/invoke-rc.d ]; then232 invoke-rc.d apache2 stop || true
256 invoke-rc.d apache2 stop || true
257 fi
258233
259 # make sure postgresql is running234 # make sure postgresql is running
260 restart_postgresql235 restart_postgresql
@@ -284,12 +259,10 @@
284259
285fi260fi
286261
287restart_apache2262invoke-rc.d apache2 restart || true
288263
289restart_squid_deb_proxy264restart_squid_deb_proxy
290265
291db_stop266db_stop
292267
293#DEBHELPER#268#DEBHELPER#
294
295exit 0
296269
=== modified file 'debian/maas-region-controller.postrm'
--- debian/maas-region-controller.postrm 2012-11-20 22:13:28 +0000
+++ debian/maas-region-controller.postrm 2013-03-20 17:45:26 +0000
@@ -22,8 +22,6 @@
22 # Restarting apache222 # Restarting apache2
23 if [ -x /usr/sbin/invoke-rc.d ]; then23 if [ -x /usr/sbin/invoke-rc.d ]; then
24 invoke-rc.d apache2 restart || true24 invoke-rc.d apache2 restart || true
25 else
26 /etc/init.d/apache2 restart || true
27 fi25 fi
2826
29 # Delete symlink27 # Delete symlink
@@ -48,5 +46,3 @@
48#DEBHELPER#46#DEBHELPER#
4947
50db_stop48db_stop
51
52exit 0
5349
=== modified file 'debian/maas-region-controller.prerm'
--- debian/maas-region-controller.prerm 2012-09-28 02:40:23 +0000
+++ debian/maas-region-controller.prerm 2013-03-20 17:45:26 +0000
@@ -6,13 +6,7 @@
66
7#DEBHELPER#7#DEBHELPER#
88
9if [ -x /usr/sbin/invoke-rc.d ]; then9invoke-rc.d apache2 stop || true
10 invoke-rc.d apache2 stop || true
11else
12 /etc/init.d/apache2 stop || true
13fi
1410
15. /usr/share/dbconfig-common/dpkg/prerm.pgsql11. /usr/share/dbconfig-common/dpkg/prerm.pgsql
16dbc_go maas-region-controller $@12dbc_go maas-region-controller $@
17
18exit 0

Subscribers

People subscribed via source and target branches