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

Proposed by Andres Rodriguez
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: 43
Proposed branch: lp:~andreserl/maas/packaging_update_bzr448
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 121 lines (+27/-12)
4 files modified
debian/changelog (+5/-3)
debian/extras/99-maas (+4/-0)
debian/maas.install (+1/-0)
debian/maas.postinst (+17/-9)
To merge this branch: bzr merge lp:~andreserl/maas/packaging_update_bzr448
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+101675@code.launchpad.net

Commit message

* debian/maas.postinst: use local variables in functions.
* debian/extras/99-maas: Add squid-deb-proxy file to enable PPAs. (LP: #979383)

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) :
review: Approve

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-04-12 01:08:48 +0000
3+++ debian/changelog 2012-04-12 03:47:18 +0000
4@@ -1,4 +1,4 @@
5-maas (0.1+bzr445+dfsg-0ubuntu1) UNRELEASED; urgency=low
6+maas (0.1+bzr448+dfsg-0ubuntu1) UNRELEASED; urgency=low
7
8 [ Scott Moser ]
9 * add dependency on distro-info (LP: #949442)
10@@ -23,7 +23,9 @@
11 - debian/patches/04-run-wsgi-as-user.patch: Run maas-http.conf as 'maas'.
12 * debian/patches/01-fix-database-settings.patch: Remove adding of PSERV_URL.
13 * debian/maas.postinst: Handle config file upgrade from versions lower than
14- 0.1+bzr445+dfsg-0ubuntu1, by creating new passwords and updating accordingly.
15+ 0.1+bzr445+dfsg-0ubuntu1, by creating new passwords and updating accordingly;
16+ use local variables in functions.
17+ * debian/extras/99-maas: Add squid-deb-proxy file to enable PPAs. (LP: #979383)
18
19 [ Dave Walker (Daviey) ]
20 * debian/patches/02-pserv-config.patch: Refreshed to apply to updated config.
21@@ -32,7 +34,7 @@
22 * debian/maas.postinst: Update pserv.yaml and maas_local_settings.py to use
23 password.
24
25- -- Scott Moser <smoser@ubuntu.com> Wed, 11 Apr 2012 21:05:59 -0400
26+ -- Andres Rodriguez <andreserl@ubuntu.com> Wed, 11 Apr 2012 23:44:10 -0400
27
28 maas (0.1+bzr415+dfsg-0ubuntu2) precise; urgency=low
29
30
31=== added file 'debian/extras/99-maas'
32--- debian/extras/99-maas 1970-01-01 00:00:00 +0000
33+++ debian/extras/99-maas 2012-04-12 03:47:18 +0000
34@@ -0,0 +1,4 @@
35+# /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas
36+#
37+# Enable launchpad personal package archives for squid-deb-proxy
38+ppa.launchpad.net
39
40=== modified file 'debian/maas.install'
41--- debian/maas.install 2012-04-11 01:18:12 +0000
42+++ debian/maas.install 2012-04-12 03:47:18 +0000
43@@ -28,6 +28,7 @@
44 debian/extras/maas usr/bin
45 debian/extras/20-maas.conf etc/rsyslog.d
46 debian/extras/maas_remote_syslog_compress etc/cron.d
47+debian/extras/99-maas etc/squid-deb-proxy/mirror-dstdomain.acl.d
48
49 # Install preseeds/snippets
50 contrib/preseeds/* var/lib/cobbler/kickstarts
51
52=== modified file 'debian/maas.postinst'
53--- debian/maas.postinst 2012-04-12 01:08:48 +0000
54+++ debian/maas.postinst 2012-04-12 03:47:18 +0000
55@@ -22,8 +22,8 @@
56 }
57
58 add_user_group(){
59- user="maas"
60- group="maas"
61+ local user="maas"
62+ local group="maas"
63 if ! getent group "$group" >/dev/null; then
64 addgroup --quiet --system "$group" || true
65 fi
66@@ -38,8 +38,8 @@
67
68 configure_maas_cobbler_user() {
69 # Create 'maas' user and password to autoconfigure
70- cblr_pass="$(pwgen -s 20)"
71- hash=$(printf "maas:Cobbler:$cblr_pass" | md5sum | awk '{print $1}')
72+ local cblr_pass="$(pwgen -s 20)"
73+ local hash=$(printf "maas:Cobbler:$cblr_pass" | md5sum | awk '{print $1}')
74 [ -e /etc/cobbler/users.digest ] || install -o root -g root -m 0600 /dev/null /etc/cobbler/users.digest
75 htpasswd -D /etc/cobbler/users.digest "maas" || true
76 printf "maas:Cobbler:$hash\n" >> /etc/cobbler/users.digest
77@@ -50,7 +50,7 @@
78 }
79
80 configure_maas_pserv_user() {
81- pserv_pass="$(pwgen -s 20)"
82+ local pserv_pass="$(pwgen -s 20)"
83 if grep -qs "^password: \"test\"" /etc/maas/pserv.yaml; then
84 sed -i '/^password:/s/"test"/"'"${pserv_pass}"'"/' /etc/maas/pserv.yaml
85 fi
86@@ -60,9 +60,9 @@
87 }
88
89 configure_maas_txlongpoll_rabbitmq_user() {
90- longpoll_user="maas_longpoll"
91- longpoll_pass="$(pwgen -s 20)"
92- longpoll_vhost="/maas_longpoll"
93+ local longpoll_user="maas_longpoll"
94+ local longpoll_pass="$(pwgen -s 20)"
95+ local longpoll_vhost="/maas_longpoll"
96 if [ -x /usr/sbin/rabbitmqctl ]; then
97 if ! rabbitmqctl list_users | grep -qs "$longpoll_user"; then
98 rabbitmqctl add_user "$longpoll_user" "$longpoll_pass" || true
99@@ -84,7 +84,7 @@
100 }
101
102 configure_maas_database() {
103- dbc_dbpass="$1"
104+ local dbc_dbpass="$1"
105 if grep -qs "^\ \{1,\} 'PASSWORD': '[a-zA-Z0-9]\{0,\}',$" /etc/maas/maas_local_settings.py; then
106 sed -i "s/^\ \{1,\} 'PASSWORD': '[a-zA-Z0-9]\{0,\}',$/ 'PASSWORD': '"$dbc_dbpass"',/" \
107 /etc/maas/maas_local_settings.py
108@@ -173,6 +173,14 @@
109 fi
110
111 #########################################################
112+ ################### Squid-deb-proxy ####################
113+ #########################################################
114+ # Make sure squid-deb-proxy reads our config (99-maas)
115+ if [ -x /usr/sbin/invoke-rc.d ]; then
116+ invoke-rc.d squid-deb-proxy restart
117+ fi
118+
119+ #########################################################
120 ########## Configure longpoll rabbitmq config ###########
121 #########################################################
122

Subscribers

People subscribed via source and target branches

to all changes: