Merge lp:~gandelman-a/ubuntu/saucy/horizon/apache24 into lp:~ubuntu-server-dev/horizon/havana

Proposed by Adam Gandelman
Status: Merged
Merged at revision: 164
Proposed branch: lp:~gandelman-a/ubuntu/saucy/horizon/apache24
Merge into: lp:~ubuntu-server-dev/horizon/havana
Diff against target: 171 lines (+67/-14)
8 files modified
debian/changelog (+6/-0)
debian/control (+1/-0)
debian/openstack-dashboard.dirs (+2/-0)
debian/openstack-dashboard.install (+1/-1)
debian/openstack-dashboard.postinst (+23/-5)
debian/openstack-dashboard.postrm (+24/-4)
debian/openstack-dashboard.preinst (+6/-0)
debian/rules (+4/-4)
To merge this branch: bzr merge lp:~gandelman-a/ubuntu/saucy/horizon/apache24
Reviewer Review Type Date Requested Status
Ubuntu Server Developers Pending
Review via email: mp+183302@code.launchpad.net

Commit message

Adds apache 2.4 transition. To avoid needing to carry a delta in the Cloud Archive, it also preserves apache 2.2. compatibility.

To post a comment you must log in.

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 2013-08-21 14:08:37 +0000
3+++ debian/changelog 2013-08-31 01:43:04 +0000
4@@ -1,3 +1,9 @@
5+horizon (1:2013.2~b2-0ubuntu4) saucy; urgency=low
6+
7+ * Update for apache 2.4, preserve 2.2 compatability. (LP: #1218535)
8+
9+ -- Adam Gandelman <adamg@ubuntu.com> Fri, 30 Aug 2013 15:31:49 -0700
10+
11 horizon (1:2013.2~b2-0ubuntu3) saucy; urgency=low
12
13 * debian/rules: Don't remove egg information while cleaning.
14
15=== modified file 'debian/control'
16--- debian/control 2013-07-22 18:36:36 +0000
17+++ debian/control 2013-08-31 01:43:04 +0000
18@@ -48,6 +48,7 @@
19 Architecture: all
20 Pre-Depends: dpkg (>= 1.15.7.2)
21 Depends: adduser,
22+ apache2,
23 libapache2-mod-wsgi (>= 2.3),
24 python-django-horizon (= ${source:Version}),
25 ${misc:Depends},
26
27=== modified file 'debian/openstack-dashboard.dirs'
28--- debian/openstack-dashboard.dirs 2012-09-11 03:23:07 +0000
29+++ debian/openstack-dashboard.dirs 2013-08-31 01:43:04 +0000
30@@ -1,3 +1,5 @@
31+/etc/openstack-dashboard
32+/usr/share/openstack-dashboard
33 /usr/share/openstack-dashboard/bin/less/
34 /usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/js
35 /usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/css
36
37=== modified file 'debian/openstack-dashboard.install'
38--- debian/openstack-dashboard.install 2012-09-11 03:23:07 +0000
39+++ debian/openstack-dashboard.install 2013-08-31 01:43:04 +0000
40@@ -1,4 +1,4 @@
41-etc/apache2/conf.d
42+debian/openstack-dashboard.conf etc/apache2/conf-available
43 etc/openstack-dashboard
44 usr/share/openstack-dashboard
45 debian/static/openstack-dashboard/manifest.json usr/share/openstack-dashboard/openstack_dashboard/static/dashboard
46
47=== modified file 'debian/openstack-dashboard.postinst'
48--- debian/openstack-dashboard.postinst 2012-08-15 23:07:10 +0000
49+++ debian/openstack-dashboard.postinst 2013-08-31 01:43:04 +0000
50@@ -2,20 +2,38 @@
51
52 set -e
53
54+CONF="openstack-dashboard.conf"
55+
56 if [ "$1" = "configure" ]; then
57- # /etc/apache2/conf.d/dashboard.conf -> /etc/apache2/conf.d/openstack-dashboard.conf
58+ # /etc/apache2/conf.d/dashboard.conf -> /etc/apache2/conf-available/openstack-dashboard.conf
59 dpkg-maintscript-helper mv_conffile \
60- /etc/apache2/conf.d/dashboard.conf /etc/apache2/conf.d/openstack-dashboard.conf \
61+ /etc/apache2/conf.d/dashboard.conf /etc/apache2/conf-available/$CONF \
62 2012.1~rc1-0ubuntu1 -- "$@"
63
64- if [ -x /etc/init.d/apache2 ]; then
65- invoke-rc.d --quiet apache2 reload
66- fi
67+ # Transition config to apache 2.4 compatable location.
68+ dpkg-maintscript-helper mv_conffile \
69+ /etc/apache2/conf.d/$CONF \
70+ /etc/apache2/conf-available/$CONF \
71+ 1:2013.2~b2-0ubuntu3 -- "$@"
72
73 if [ -e /usr/share/openstack-dashboard/openstack_dashboard/static ] ; then
74 chown -R www-data:www-data \
75 /usr/share/openstack-dashboard/openstack_dashboard/static
76 fi
77+
78+ A22_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
79+
80+ if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
81+ # apache 2.4
82+ . /usr/share/apache2/apache2-maintscript-helper
83+ apache2_invoke enconf $CONF || exit $?
84+ elif [ "$A22_STATE" = "installed" ] || [ "$A22_STATE" = "unpacked" ] ; then
85+ # apache 2.2
86+ [ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/$CONF ] &&
87+ ln -s ../conf-available/$CONF /etc/apache2/conf.d/$CONF
88+ [ -x /etc/init.d/apache2 ] && invoke-rc.d --quiet apache2 reload
89+ fi
90+
91 fi
92
93 #DEBHELPER#
94
95=== modified file 'debian/openstack-dashboard.postrm'
96--- debian/openstack-dashboard.postrm 2012-06-22 15:31:09 +0000
97+++ debian/openstack-dashboard.postrm 2013-08-31 01:43:04 +0000
98@@ -2,13 +2,33 @@
99
100 set -e
101
102-# /etc/apache2/conf.d/dashboard.conf -> /etc/apache2/conf.d/openstack-dashboard.conf
103+CONF="openstack-dashboard.conf"
104+
105+# /etc/apache2/conf.d/dashboard.conf -> /etc/apache2/conf-available/openstack-dashboard.conf
106 dpkg-maintscript-helper mv_conffile \
107- /etc/apache2/conf.d/dashboard.conf /etc/apache2/conf.d/openstack-dashboard.conf \
108+ /etc/apache2/conf.d/dashboard.conf /etc/apache2/conf-available/$CONF \
109 2012.1~rc1-0ubuntu1 -- "$@"
110
111-if [ -x "`which invoke-rc.d 2>/dev/null`" -a -x "/etc/init.d/apache2" ] ; then
112- invoke-rc.d --quiet apache2 reload
113+# Transition config to apache 2.4 compatable location.
114+dpkg-maintscript-helper mv_conffile \
115+ /etc/apache2/conf.d/openstack-dashboared.conf \
116+ /etc/apache2/conf-available/openstack-dashboard.conf \
117+ 1:2013.2~b2-0ubuntu3 -- "$@"
118+
119+if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then
120+ A22_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
121+
122+ if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
123+ # apache 2.4
124+ . /usr/share/apache2/apache2-maintscript-helper
125+ apache2_invoke disconf $CONF || exit $?
126+ elif [ "$A22_STATE" = "installed" ] || [ "$A22_STATE" = "unpacked" ] ; then
127+ # apache 2.2
128+ [ -d /etc/apache2/conf.d/ ] && [ -L /etc/apache2/conf.d/$CONF ] &&
129+ rm /etc/apache2/conf.d/$CONF
130+ [ -x /etc/init.d/apache2 ] && invoke-rc.d --quiet apache2 reload
131+ fi
132+
133 fi
134
135 #DEBHELPER#
136
137=== modified file 'debian/openstack-dashboard.preinst'
138--- debian/openstack-dashboard.preinst 2012-06-22 15:31:09 +0000
139+++ debian/openstack-dashboard.preinst 2013-08-31 01:43:04 +0000
140@@ -7,4 +7,10 @@
141 /etc/apache2/conf.d/dashboard.conf /etc/apache2/conf.d/openstack-dashboard.conf \
142 2012.1~rc1-0ubuntu1 -- "$@"
143
144+# Transition config to apache 2.4 compatable location.
145+dpkg-maintscript-helper mv_conffile \
146+ /etc/apache2/conf.d/openstack-dashboared.conf \
147+ /etc/apache2/conf-available/openstack-dashboard.conf \
148+ 1:2013.2~b2-0ubuntu3 -- "$@"
149+
150 #DEBHELPER#
151
152=== modified file 'debian/rules'
153--- debian/rules 2013-08-21 14:08:37 +0000
154+++ debian/rules 2013-08-31 01:43:04 +0000
155@@ -11,12 +11,12 @@
156 python setup.py install --root=$(CURDIR)/debian/tmp --no-compile -O0 --install-layout=deb
157 install -d -m 755 $(CURDIR)/debian/tmp/usr/share/openstack-dashboard
158 install -d -m 755 $(CURDIR)/debian/tmp/etc/openstack-dashboard
159- install -d -m 755 $(CURDIR)/debian/tmp/etc/apache2/conf.d
160-
161+ install -d -m 755 $(CURDIR)/debian/tmp/etc/apache2/conf-available
162+
163 cp -a $(CURDIR)/openstack_dashboard/ $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/
164+ install -d -m 755 $(CURDIR)/debian/tmp/etc/openstack-dashboard
165 cp -a $(CURDIR)/openstack_dashboard/settings.py $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/
166-
167- cp -a $(CURDIR)/debian/openstack-dashboard.conf $(CURDIR)/debian/tmp/etc/apache2/conf.d
168+
169 cp $(CURDIR)/openstack_dashboard/local/local_settings.py.example \
170 $(CURDIR)/debian/tmp/etc/openstack-dashboard/local_settings.py
171 cp $(CURDIR)/manage.py \

Subscribers

People subscribed via source and target branches