OpenStack Compute (Nova)

Merge lp:~pabelanger/nova/dbconfig-common into lp:~ubuntu-server-dev/nova/essex

Proposed by Paul Belanger on 2012-03-14
Status: Needs review
Proposed branch: lp:~pabelanger/nova/dbconfig-common
Merge into: lp:~ubuntu-server-dev/nova/essex
Diff against target: 840 lines (+610/-24) 15 files modified
To merge this branch: bzr merge lp:~pabelanger/nova/dbconfig-common
Reviewer Review Type Date Requested Status
Ubuntu Server Developers 2012-03-14 Pending
Review via email: mp+97464@code.launchpad.net
To post a comment you must log in.
lp:~pabelanger/nova/dbconfig-common updated on 2012-03-15
340. By Paul Belanger on 2012-03-15

debian/control: python-nova depends on openssh-client (LP: #956177)

341. By Paul Belanger on 2012-03-15

Also update control file

Adam Gandelman (gandelman-a) wrote :

Paul-

I've merged the openssh dep fix with the latest upload (2012.1~rc1~20120316.13416-0ubuntu1)

I'm going to defer the rest of the changes until next week. Chuck (zul) has been working on merging our openstack packaging with the openstack packaging in Debian. Part of that work is merging in dbconfig-common stuff they've added to their packaging. This has already been done for keystone, and started for Glance. I'd prefer you guys work together on this when he is back from vacation next week to avoid conflicts and reduce any potential delta between the Ubuntu and Debian work.

Thanks
Adam

Paul Belanger (pabelanger) wrote :

Adam,
Okay, wish I knew that before working on this; oh well. Which version syncs with which? Is Ubuntu master or is Debian?

Unmerged revisions

341. By Paul Belanger on 2012-03-15

Also update control file

340. By Paul Belanger on 2012-03-15

debian/control: python-nova depends on openssh-client (LP: #956177)

339. By Paul Belanger on 2012-03-14

* debian/control, debian/nova-backend-mysql,
  debian/nova-backend-pgsql, debian/nova-backend-sqlite3:
  - Add dbconfig-common support to nova (LP: #954915)
* debian/rules get-orig-source:
  - Download tarballs to '../tarballs'
  - Check if '../tarballs' exists, if not create it
  - Download current version not latest.
* debian/nova.conf: Add sql_connection setting
* debian/gbp.conf: Update for overlay

Preview Diff

1=== modified file 'debian/changelog'
2--- debian/changelog 2012-03-09 18:07:23 +0000
3+++ debian/changelog 2012-03-15 17:59:22 +0000
4@@ -1,3 +1,18 @@
5+nova (2012.1~rc1~20120309.13261-0ubuntu2) UNRELEASED; urgency=low
6+
7+ * debian/control, debian/nova-backend-mysql,
8+ debian/nova-backend-pgsql, debian/nova-backend-sqlite3:
9+ - Add dbconfig-common support to nova (LP: #954915)
10+ * debian/rules get-orig-source:
11+ - Download tarballs to '../tarballs'
12+ - Check if '../tarballs' exists, if not create it
13+ - Download current version not latest.
14+ * debian/nova.conf: Add sql_connection setting
15+ * debian/gbp.conf: Adding git-buildpackage config file
16+ * debian/control: python-nova depends on openssh-client (LP: #956177)
17+
18+ -- Paul Belanger <paul.belanger@polybeacon.com> Thu, 15 Mar 2012 13:54:58 -0400
19+
20 nova (2012.1~rc1~20120309.13261-0ubuntu1) precise; urgency=low
21
22 [ Chuck Short ]
23
24=== modified file 'debian/control'
25--- debian/control 2012-02-29 20:34:53 +0000
26+++ debian/control 2012-03-15 17:59:22 +0000
27@@ -50,7 +50,6 @@
28 Vcs-Browser: http://bazaar.launchpad.net/~ubuntu-server-dev/nova/essex/debian/files
29 Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-server-dev/nova/essex
30
31-
32 Package: python-nova
33 Architecture: all
34 Section: python
35@@ -87,6 +86,7 @@
36 python-suds,
37 python-iso8601,
38 sudo,
39+ openssh-client,
40 ${misc:Depends}
41 Suggests: python-suds (>= 0.4.0),
42 Conflicts: python-cjson
43@@ -132,9 +132,83 @@
44 .
45 This package contains things that are needed by all parts of Nova.
46
47+Package: nova-backend-mysql
48+Architecture: all
49+Depends: ${python:Depends}, ${misc:Depends}, nova-common (= ${binary:Version}), dbconfig-common, mysql-client, python-mysqldb
50+Provides: nova-backend
51+Conflicts: nova-backend
52+Suggests: mysql-server
53+Description: OpenStack Compute - Backend (MySQL)
54+ OpenStack is a reliable cloud infrastructure. Its mission is to produce
55+ the ubiquitous cloud computing platform that will meet the needs of public
56+ and private cloud providers regardless of size, by being simple to implement
57+ and massively scalable.
58+ .
59+ OpenStack Compute, codenamed Nova, is a cloud computing fabric controller. In
60+ addition to its "native" API (the OpenStack API), it also supports the Amazon
61+ EC2 API.
62+ .
63+ Nova is intended to be modular and easy to extend and adapt. It supports many
64+ different hypervisors (KVM and Xen to name a few), different database backends
65+ (SQLite, MySQL, and PostgreSQL, for instance), different types of user
66+ databases (LDAP or SQL), etc.
67+ .
68+ This version sets nova's backend to a MySQL database, and thus is suited
69+ for large installations.
70+
71+
72+Package: nova-backend-pgsql
73+Architecture: all
74+Depends: ${python:Depends}, ${misc:Depends}, nova-common (= ${binary:Version}), dbconfig-common, postgresql-client, python-psycopg2
75+Provides: nova-backend
76+Conflicts: nova-backend
77+Suggests: mysql-server
78+Description: OpenStack Compute - Backend (PostgreSQL)
79+ OpenStack is a reliable cloud infrastructure. Its mission is to produce
80+ the ubiquitous cloud computing platform that will meet the needs of public
81+ and private cloud providers regardless of size, by being simple to implement
82+ and massively scalable.
83+ .
84+ OpenStack Compute, codenamed Nova, is a cloud computing fabric controller. In
85+ addition to its "native" API (the OpenStack API), it also supports the Amazon
86+ EC2 API.
87+ .
88+ Nova is intended to be modular and easy to extend and adapt. It supports many
89+ different hypervisors (KVM and Xen to name a few), different database backends
90+ (SQLite, MySQL, and PostgreSQL, for instance), different types of user
91+ databases (LDAP or SQL), etc.
92+ .
93+ This version sets nova's backend to a MySQL database, and thus is suited
94+ for large installations.
95+
96+Package: nova-backend-sqlite3
97+Architecture: all
98+Depends: ${python:Depends}, ${misc:Depends}, nova-common (= ${binary:Version}), dbconfig-common, sqlite3
99+Provides: nova-backend
100+Conflicts: nova-backend
101+Suggests: mysql-server
102+Description: OpenStack Compute - Backend (SQLite3)
103+ OpenStack is a reliable cloud infrastructure. Its mission is to produce
104+ the ubiquitous cloud computing platform that will meet the needs of public
105+ and private cloud providers regardless of size, by being simple to implement
106+ and massively scalable.
107+ .
108+ OpenStack Compute, codenamed Nova, is a cloud computing fabric controller. In
109+ addition to its "native" API (the OpenStack API), it also supports the Amazon
110+ EC2 API.
111+ .
112+ Nova is intended to be modular and easy to extend and adapt. It supports many
113+ different hypervisors (KVM and Xen to name a few), different database backends
114+ (SQLite, MySQL, and PostgreSQL, for instance), different types of user
115+ databases (LDAP or SQL), etc.
116+ .
117+ This version sets nova's backend to a MySQL database, and thus is suited
118+ for smaller installations.
119+
120 Package: nova-compute
121 Architecture: all
122-Depends: lsb-base (>= 3.0.6), nova-common (= ${binary:Version}), qemu-utils, kpartx, curl, parted, vlan,
123+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
124+Depends: lsb-base (>= 3.0.6), qemu-utils, kpartx, curl, parted, vlan,
125 ebtables, gawk, iptables, open-iscsi, nova-compute-kvm | nova-compute-hypervisor,
126 ${python:Depends}, ${misc:Depends}
127 Description: OpenStack Compute - compute node
128@@ -330,7 +404,8 @@
129
130 Package: nova-cert
131 Architecture: all
132-Depends: ${ostack-lsb-base}, nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
133+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
134+Depends: ${ostack-lsb-base}, ${python:Depends}, ${misc:Depends}
135 Description: OpenStack Compute - virtual machine scheduler
136 OpenStack is a reliable cloud infrastructure. Its mission is to produce
137 the ubiquitous cloud computing platform that will meet the needs of public
138@@ -350,7 +425,8 @@
139
140 Package: nova-scheduler
141 Architecture: all
142-Depends: ${ostack-lsb-base}, nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
143+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
144+Depends: ${ostack-lsb-base}, ${python:Depends}, ${misc:Depends}
145 Description: OpenStack Compute - virtual machine scheduler
146 OpenStack is a reliable cloud infrastructure. Its mission is to produce
147 the ubiquitous cloud computing platform that will meet the needs of public
148@@ -370,7 +446,8 @@
149
150 Package: nova-volume
151 Architecture: all
152-Depends: ${ostack-lsb-base}, nova-common (= ${binary:Version}), lvm2, tgt, ${python:Depends}, ${misc:Depends}
153+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
154+Depends: ${ostack-lsb-base}, lvm2, tgt, ${python:Depends}, ${misc:Depends}
155 Suggests: sheepdog
156 Description: OpenStack Compute - storage
157 OpenStack is a reliable cloud infrastructure. Its mission is to produce
158@@ -410,7 +487,8 @@
159
160 Package: nova-vncproxy
161 Architecture: all
162-Depends: ${ostack-lsb-base}, nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
163+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
164+Depends: ${ostack-lsb-base}, ${python:Depends}, ${misc:Depends}
165 Description: OpenStack Compute - VNC proxy
166 OpenStack is a reliable cloud infrastructure. Its mission is to produce
167 the ubiquitous cloud computing platform that will meet the needs of public
168@@ -431,7 +509,8 @@
169
170 Package: nova-api
171 Architecture: all
172-Depends: ${ostack-lsb-base}, nova-common (= ${binary:Version}), nova-cert, ${python:Depends}, ${misc:Depends}
173+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
174+Depends: ${ostack-lsb-base}, nova-cert, ${python:Depends}, ${misc:Depends}
175 Description: OpenStack Compute - API frontend
176 OpenStack is a reliable cloud infrastructure. Its mission is to produce
177 the ubiquitous cloud computing platform that will meet the needs of public
178@@ -451,7 +530,8 @@
179
180 Package: nova-network
181 Architecture: all
182-Depends: ${ostack-lsb-base}, netcat, vlan, bridge-utils, dnsmasq-base, iputils-arping, dnsmasq-utils, nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
183+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
184+Depends: ${ostack-lsb-base}, netcat, vlan, bridge-utils, dnsmasq-base, iputils-arping, dnsmasq-utils, ${python:Depends}, ${misc:Depends}
185 Suggests: radvd
186 Description: OpenStack Compute - Network manager
187 OpenStack is a reliable cloud infrastructure. Its mission is to produce
188@@ -476,7 +556,8 @@
189
190 Package: nova-objectstore
191 Architecture: all
192-Depends: ${ostack-lsb-base}, nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
193+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
194+Depends: ${ostack-lsb-base}, ${python:Depends}, ${misc:Depends}
195 Description: OpenStack Compute - object store
196 OpenStack is a reliable cloud infrastructure. Its mission is to produce
197 the ubiquitous cloud computing platform that will meet the needs of public
198@@ -497,7 +578,8 @@
199
200 Package: nova-console
201 Architecture: all
202-Depends: ${ostack-lsb-base}, nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
203+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
204+Depends: ${ostack-lsb-base}, ${python:Depends}, ${misc:Depends}
205 Description: OpenStack Compute - Console
206 OpenStack is a reliable cloud infrastructure. Its mission is to produce
207 the ubiquitous cloud computing platform that will meet the needs of public
208@@ -541,7 +623,8 @@
209
210 Package: nova-api-metadata
211 Architecture: all
212-Depends: ${ostack-lsb-base}, nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
213+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
214+Depends: ${ostack-lsb-base}, ${python:Depends}, ${misc:Depends}
215 Description: OpenStack Compute - metadata API frontend
216 OpenStack is a reliable cloud infrastructure. Its mission is to produce
217 the ubiquitous cloud computing platform that will meet the needs of public
218@@ -556,7 +639,8 @@
219
220 Package: nova-api-os-compute
221 Architecture: all
222-Depends: ${ostack-lsb-base}, nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
223+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
224+Depends: ${ostack-lsb-base}, ${python:Depends}, ${misc:Depends}
225 Description: OpenStack Compute - OpenStack Compute API frontend
226 OpenStack is a reliable cloud infrastructure. Its mission is to produce
227 the ubiquitous cloud computing platform that will meet the needs of public
228@@ -571,7 +655,8 @@
229
230 Package: nova-api-os-volume
231 Architecture: all
232-Depends: ${ostack-lsb-base}, nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
233+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
234+Depends: ${ostack-lsb-base}, ${python:Depends}, ${misc:Depends}
235 Description: OpenStack Compute - OpenStack Volume API frontend
236 OpenStack is a reliable cloud infrastructure. Its mission is to produce
237 the ubiquitous cloud computing platform that will meet the needs of public
238@@ -586,7 +671,8 @@
239
240 Package: nova-api-ec2
241 Architecture: all
242-Depends: ${ostack-lsb-base}, nova-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
243+Pre-Depends: nova-backend-sqlite3 (= ${binary:Version}) | nova-backend
244+Depends: ${ostack-lsb-base}, ${python:Depends}, ${misc:Depends}
245 Description: OpenStack Compute - EC2 API frontend
246 OpenStack is a reliable cloud infrastructure. Its mission is to produce
247 the ubiquitous cloud computing platform that will meet the needs of public
248
249=== modified file 'debian/gbp.conf'
250--- debian/gbp.conf 2012-02-20 01:43:23 +0000
251+++ debian/gbp.conf 2012-03-15 17:59:22 +0000
252@@ -1,6 +1,9 @@
253 [DEFAULT]
254-upstream-branch = master
255-debian-branch = debian/unstable
256+cleaner = /bin/true
257
258 [git-buildpackage]
259 export-dir = ../build-area/
260+tarball-dir = ../tarballs/
261+overlay = True
262+pristine-tar = False
263+compression = gzip
264
265=== added file 'debian/nova-backend-mysql.config'
266--- debian/nova-backend-mysql.config 1970-01-01 00:00:00 +0000
267+++ debian/nova-backend-mysql.config 2012-03-15 17:59:22 +0000
268@@ -0,0 +1,38 @@
269+#!/bin/sh
270+# config script for nova-backend-mysql
271+#
272+# see: dh_installdeb(1)
273+
274+# source debconf stuff
275+. /usr/share/debconf/confmodule
276+
277+set -e
278+
279+if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
280+ dbc_dbname=nova
281+ dbc_dbuser=nova
282+ dbc_first_version=2012.1~rc1~20120309.13261-0ubuntu2
283+
284+ . /usr/share/dbconfig-common/dpkg/config.mysql
285+ dbc_go nova-backend-mysql $@
286+fi
287+
288+case "$1" in
289+ configure)
290+ ;;
291+
292+ reconfigure)
293+ ;;
294+
295+ *)
296+ echo "config called with unknown argument \`$1'" >&2
297+ exit 1
298+ ;;
299+esac
300+
301+# dh_installdeb will replace this with shell code automatically
302+# generated by other debhelper scripts.
303+
304+#DEBHELPER#
305+
306+exit 0
307
308=== added file 'debian/nova-backend-mysql.postinst'
309--- debian/nova-backend-mysql.postinst 1970-01-01 00:00:00 +0000
310+++ debian/nova-backend-mysql.postinst 2012-03-15 17:59:22 +0000
311@@ -0,0 +1,77 @@
312+#!/bin/sh
313+# postinst script for nova-backend-mysql
314+#
315+# see: dh_installdeb(1)
316+
317+# source debconf stuff
318+. /usr/share/debconf/confmodule
319+
320+set -e
321+
322+# summary of how this script can be called:
323+# * <postinst> `configure' <most-recently-configured-version>
324+# * <old-postinst> `abort-upgrade' <new version>
325+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
326+# <new-version>
327+# * <postinst> `abort-remove'
328+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
329+# <failed-install-package> <version> `removing'
330+# <conflicting-package> <version>
331+# for details, see http://www.debian.org/doc/debian-policy/ or
332+# the debian-policy package
333+
334+if [ -f /usr/share/dbconfig-common/dpkg/postinst.mysql ]; then
335+ dbc_first_version=2012.1~rc1~20120309.13261-0ubuntu2
336+
337+ . /usr/share/dbconfig-common/dpkg/postinst.mysql
338+ dbc_go nova-backend-mysql $@
339+fi
340+
341+PACKAGES="nova-api nova-api-ec2 nova-api-metadata nova-api-os-compute \
342+nova-api-os-volume nova-cert nova-compute nova-console nova-network \
343+nova-objectstore nova-scheduler nova-volume nova-vpnproxy"
344+
345+CFGFILE="/etc/nova/nova.conf"
346+
347+case "$1" in
348+ configure)
349+ echo -n "Processing configuration..."
350+ . /etc/dbconfig-common/nova-backend-mysql.conf
351+
352+ if [ "$dbc_install" = "true" ]; then
353+ TARGET=$CFGFILE.dpkg-tmp
354+ if [ "$dbc_dbserver" = "" ]; then
355+ dbc_dbserver=localhost
356+ fi
357+
358+ SQLCONN="$dbc_dbtype://$dbc_dbuser:$dbc_dbpass@$dbc_dbserver/$dbc_dbname"
359+ sed -e "s|^--sql_connection=.*|--sql_connection=$SQLCONN|" \
360+ $CFGFILE > $TARGET
361+ mv $TARGET $CFGFILE
362+
363+ su -s /bin/sh -c 'nova-manage db sync' nova
364+ fi
365+
366+ echo "Ok."
367+ ;;
368+
369+ abort-upgrade|abort-remove|abort-deconfigure)
370+ ;;
371+
372+ *)
373+ echo "postinst called with unknown argument \`$1'" >&2
374+ exit 1
375+ ;;
376+esac
377+
378+# Do start daemon(s)
379+for PKG in $PACKAGES; do
380+ invoke-rc.d --quiet $PKG start || true
381+done
382+
383+# dh_installdeb will replace this with shell code automatically
384+# generated by other debhelper scripts.
385+
386+#DEBHELPER#
387+
388+exit 0
389
390=== added file 'debian/nova-backend-mysql.prerm'
391--- debian/nova-backend-mysql.prerm 1970-01-01 00:00:00 +0000
392+++ debian/nova-backend-mysql.prerm 2012-03-15 17:59:22 +0000
393@@ -0,0 +1,47 @@
394+#!/bin/sh
395+# prerm script for nova-backend-mysql
396+#
397+# see: dh_installdeb(1)
398+
399+set -e
400+
401+# summary of how this script can be called:
402+# * <prerm> `remove'
403+# * <old-prerm> `upgrade' <new-version>
404+# * <new-prerm> `failed-upgrade' <old-version>
405+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
406+# * <deconfigured's-prerm> `deconfigure' `in-favour'
407+# <package-being-installed> <version> `removing'
408+# <conflicting-package> <version>
409+# for details, see http://www.debian.org/doc/debian-policy/ or
410+# the debian-policy package
411+
412+PACKAGES="nova-api nova-api-ec2 nova-api-metadata nova-api-os-compute \
413+nova-api-os-volume nova-cert nova-compute nova-console nova-network \
414+nova-objectstore nova-scheduler nova-volume nova-vpnproxy"
415+
416+case "$1" in
417+ remove|deconfigure)
418+ for PKG in $PACKAGES; do
419+ invoke-rc.d --quiet $PKG stop || true
420+ done;
421+ ;;
422+
423+ upgrade)
424+ ;;
425+
426+ failed-upgrade)
427+ ;;
428+
429+ *)
430+ echo "prerm called with unknown argument \`$1'" >&2
431+ exit 1
432+ ;;
433+esac
434+
435+# dh_installdeb will replace this with shell code automatically
436+# generated by other debhelper scripts.
437+
438+#DEBHELPER#
439+
440+exit 0
441
442=== added file 'debian/nova-backend-pgsql.config'
443--- debian/nova-backend-pgsql.config 1970-01-01 00:00:00 +0000
444+++ debian/nova-backend-pgsql.config 2012-03-15 17:59:22 +0000
445@@ -0,0 +1,38 @@
446+#!/bin/sh
447+# config script for nova-backend-pgsql
448+#
449+# see: dh_installdeb(1)
450+
451+# source debconf stuff
452+. /usr/share/debconf/confmodule
453+
454+set -e
455+
456+if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
457+ dbc_dbname=nova
458+ dbc_dbuser=nova
459+ dbc_first_version=2012.1~rc1~20120309.13261-0ubuntu2
460+
461+ . /usr/share/dbconfig-common/dpkg/config.pgsql
462+ dbc_go nova-backend-pgsql $@
463+fi
464+
465+case "$1" in
466+ configure)
467+ ;;
468+
469+ reconfigure)
470+ ;;
471+
472+ *)
473+ echo "config called with unknown argument \`$1'" >&2
474+ exit 1
475+ ;;
476+esac
477+
478+# dh_installdeb will replace this with shell code automatically
479+# generated by other debhelper scripts.
480+
481+#DEBHELPER#
482+
483+exit 0
484
485=== added file 'debian/nova-backend-pgsql.postinst'
486--- debian/nova-backend-pgsql.postinst 1970-01-01 00:00:00 +0000
487+++ debian/nova-backend-pgsql.postinst 2012-03-15 17:59:22 +0000
488@@ -0,0 +1,77 @@
489+#!/bin/sh
490+# postinst script for nova-backend-pgsql
491+#
492+# see: dh_installdeb(1)
493+
494+# source debconf stuff
495+. /usr/share/debconf/confmodule
496+
497+set -e
498+
499+# summary of how this script can be called:
500+# * <postinst> `configure' <most-recently-configured-version>
501+# * <old-postinst> `abort-upgrade' <new version>
502+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
503+# <new-version>
504+# * <postinst> `abort-remove'
505+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
506+# <failed-install-package> <version> `removing'
507+# <conflicting-package> <version>
508+# for details, see http://www.debian.org/doc/debian-policy/ or
509+# the debian-policy package
510+
511+if [ -f /usr/share/dbconfig-common/dpkg/postinst.pgsql ]; then
512+ dbc_first_version=2012.1~rc1~20120309.13261-0ubuntu2
513+
514+ . /usr/share/dbconfig-common/dpkg/postinst.pgsql
515+ dbc_go nova-backend-pgsql $@
516+fi
517+
518+PACKAGES="nova-api nova-api-ec2 nova-api-metadata nova-api-os-compute \
519+nova-api-os-volume nova-cert nova-compute nova-console nova-network \
520+nova-objectstore nova-scheduler nova-volume nova-vpnproxy"
521+
522+CFGFILE="/etc/nova/nova.conf"
523+
524+case "$1" in
525+ configure)
526+ echo -n "Processing configuration..."
527+ . /etc/dbconfig-common/nova-backend-pgsql.conf
528+
529+ if [ "$dbc_install" = "true" ]; then
530+ TARGET=$CFGFILE.dpkg-tmp
531+ if [ "$dbc_dbserver" = "" ]; then
532+ dbc_dbserver=localhost
533+ fi
534+
535+ SQLCONN="postgresql://$dbc_dbuser:$dbc_dbpass@$dbc_dbserver/$dbc_dbname"
536+ sed -e "s|^--sql_connection=.*|--sql_connection=$SQLCONN|" \
537+ $CFGFILE > $TARGET
538+ mv $TARGET $CFGFILE
539+
540+ su -s /bin/sh -c 'nova-manage db sync' nova
541+ fi
542+
543+ echo "Ok."
544+ ;;
545+
546+ abort-upgrade|abort-remove|abort-deconfigure)
547+ ;;
548+
549+ *)
550+ echo "postinst called with unknown argument \`$1'" >&2
551+ exit 1
552+ ;;
553+esac
554+
555+# Do start daemon(s)
556+for PKG in $PACKAGES; do
557+ invoke-rc.d --quiet $PKG start || true
558+done
559+
560+# dh_installdeb will replace this with shell code automatically
561+# generated by other debhelper scripts.
562+
563+#DEBHELPER#
564+
565+exit 0
566
567=== added file 'debian/nova-backend-pgsql.prerm'
568--- debian/nova-backend-pgsql.prerm 1970-01-01 00:00:00 +0000
569+++ debian/nova-backend-pgsql.prerm 2012-03-15 17:59:22 +0000
570@@ -0,0 +1,47 @@
571+#!/bin/sh
572+# prerm script for nova-backend-pgsql
573+#
574+# see: dh_installdeb(1)
575+
576+set -e
577+
578+# summary of how this script can be called:
579+# * <prerm> `remove'
580+# * <old-prerm> `upgrade' <new-version>
581+# * <new-prerm> `failed-upgrade' <old-version>
582+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
583+# * <deconfigured's-prerm> `deconfigure' `in-favour'
584+# <package-being-installed> <version> `removing'
585+# <conflicting-package> <version>
586+# for details, see http://www.debian.org/doc/debian-policy/ or
587+# the debian-policy package
588+
589+PACKAGES="nova-api nova-api-ec2 nova-api-metadata nova-api-os-compute \
590+nova-api-os-volume nova-cert nova-compute nova-console nova-network \
591+nova-objectstore nova-scheduler nova-volume nova-vpnproxy"
592+
593+case "$1" in
594+ remove|deconfigure)
595+ for PKG in $PACKAGES; do
596+ invoke-rc.d --quiet $PKG stop || true
597+ done;
598+ ;;
599+
600+ upgrade)
601+ ;;
602+
603+ failed-upgrade)
604+ ;;
605+
606+ *)
607+ echo "prerm called with unknown argument \`$1'" >&2
608+ exit 1
609+ ;;
610+esac
611+
612+# dh_installdeb will replace this with shell code automatically
613+# generated by other debhelper scripts.
614+
615+#DEBHELPER#
616+
617+exit 0
618
619=== added file 'debian/nova-backend-sqlite3.config'
620--- debian/nova-backend-sqlite3.config 1970-01-01 00:00:00 +0000
621+++ debian/nova-backend-sqlite3.config 2012-03-15 17:59:22 +0000
622@@ -0,0 +1,39 @@
623+#!/bin/sh
624+# config script for nova-backend-sqlite3
625+#
626+# see: dh_installdeb(1)
627+
628+# source debconf stuff
629+. /usr/share/debconf/confmodule
630+
631+set -e
632+
633+if [ -f /usr/share/dbconfig-common/dpkg/config.sqlite3 ]; then
634+ dbc_basepath=/var/lib/nova
635+ dbc_dbname=nova.sqlite
636+ dbc_dbuser=nova
637+ dbc_first_version=2012.1~rc1~20120309.13261-0ubuntu2
638+
639+ . /usr/share/dbconfig-common/dpkg/config.sqlite3
640+ dbc_go nova-backend-sqlite3 $@
641+fi
642+
643+case "$1" in
644+ configure)
645+ ;;
646+
647+ reconfigure)
648+ ;;
649+
650+ *)
651+ echo "config called with unknown argument \`$1'" >&2
652+ exit 1
653+ ;;
654+esac
655+
656+# dh_installdeb will replace this with shell code automatically
657+# generated by other debhelper scripts.
658+
659+#DEBHELPER#
660+
661+exit 0
662
663=== added file 'debian/nova-backend-sqlite3.postinst'
664--- debian/nova-backend-sqlite3.postinst 1970-01-01 00:00:00 +0000
665+++ debian/nova-backend-sqlite3.postinst 2012-03-15 17:59:22 +0000
666@@ -0,0 +1,75 @@
667+#!/bin/sh
668+# postinst script for nova-backend-sqlite3
669+#
670+# see: dh_installdeb(1)
671+
672+# source debconf stuff
673+. /usr/share/debconf/confmodule
674+
675+set -e
676+
677+# summary of how this script can be called:
678+# * <postinst> `configure' <most-recently-configured-version>
679+# * <old-postinst> `abort-upgrade' <new version>
680+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
681+# <new-version>
682+# * <postinst> `abort-remove'
683+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
684+# <failed-install-package> <version> `removing'
685+# <conflicting-package> <version>
686+# for details, see http://www.debian.org/doc/debian-policy/ or
687+# the debian-policy package
688+
689+if [ -f /usr/share/dbconfig-common/dpkg/postinst.sqlite3 ]; then
690+ dbc_first_version=2012.1~rc1~20120309.13261-0ubuntu2
691+
692+ . /usr/share/dbconfig-common/dpkg/postinst.sqlite3
693+ dbc_go nova-backend-sqlite3 $@
694+fi
695+
696+PACKAGES="nova-api nova-api-ec2 nova-api-metadata nova-api-os-compute \
697+nova-api-os-volume nova-cert nova-compute nova-console nova-network \
698+nova-objectstore nova-scheduler nova-volume nova-vpnproxy"
699+
700+CFGFILE="/etc/nova/nova.conf"
701+
702+case "$1" in
703+ configure)
704+ echo -n "Processing configuration..."
705+ . /etc/dbconfig-common/nova-backend-sqlite3.conf
706+
707+ if [ "$dbc_install" = "true" ]; then
708+ TARGET=$CFGFILE.dpkg-tmp
709+ DB="$dbc_basepath/$dbc_dbname"
710+ SQLCONN="sqlite:///$DB"
711+ sed -e "s|^--sql_connection=.*|--sql_connection=$SQLCONN|" \
712+ $CFGFILE > $TARGET
713+ mv $TARGET $CFGFILE
714+
715+ chown nova: $dbc_basepath $DB
716+ su -s /bin/sh -c 'nova-manage db sync' nova
717+ fi
718+
719+ echo "Ok."
720+ ;;
721+
722+ abort-upgrade|abort-remove|abort-deconfigure)
723+ ;;
724+
725+ *)
726+ echo "postinst called with unknown argument \`$1'" >&2
727+ exit 1
728+ ;;
729+esac
730+
731+# Do start daemon(s)
732+for PKG in $PACKAGES; do
733+ invoke-rc.d --quiet $PKG start || true
734+done
735+
736+# dh_installdeb will replace this with shell code automatically
737+# generated by other debhelper scripts.
738+
739+#DEBHELPER#
740+
741+exit 0
742
743=== added file 'debian/nova-backend-sqlite3.prerm'
744--- debian/nova-backend-sqlite3.prerm 1970-01-01 00:00:00 +0000
745+++ debian/nova-backend-sqlite3.prerm 2012-03-15 17:59:22 +0000
746@@ -0,0 +1,47 @@
747+#!/bin/sh
748+# prerm script for nova-backend-sql
749+#
750+# see: dh_installdeb(1)
751+
752+set -e
753+
754+# summary of how this script can be called:
755+# * <prerm> `remove'
756+# * <old-prerm> `upgrade' <new-version>
757+# * <new-prerm> `failed-upgrade' <old-version>
758+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
759+# * <deconfigured's-prerm> `deconfigure' `in-favour'
760+# <package-being-installed> <version> `removing'
761+# <conflicting-package> <version>
762+# for details, see http://www.debian.org/doc/debian-policy/ or
763+# the debian-policy package
764+
765+PACKAGES="nova-api nova-api-ec2 nova-api-metadata nova-api-os-compute \
766+nova-api-os-volume nova-cert nova-compute nova-console nova-network \
767+nova-objectstore nova-scheduler nova-volume nova-vpnproxy"
768+
769+case "$1" in
770+ remove|deconfigure)
771+ for PKG in $PACKAGES; do
772+ invoke-rc.d --quiet $PKG stop || true
773+ done;
774+ ;;
775+
776+ upgrade)
777+ ;;
778+
779+ failed-upgrade)
780+ ;;
781+
782+ *)
783+ echo "prerm called with unknown argument \`$1'" >&2
784+ exit 1
785+ ;;
786+esac
787+
788+# dh_installdeb will replace this with shell code automatically
789+# generated by other debhelper scripts.
790+
791+#DEBHELPER#
792+
793+exit 0
794
795=== modified file 'debian/nova-common.postinst'
796--- debian/nova-common.postinst 2012-02-13 17:01:11 +0000
797+++ debian/nova-common.postinst 2012-03-15 17:59:22 +0000
798@@ -44,10 +44,6 @@
799 chmod 600 /etc/nova/policy.json
800 chmod 0440 /etc/sudoers.d/nova_sudoers
801 chmod 0700 /var/log/nova
802- if ! grep -q sql_connection /etc/nova/nova.conf
803- then
804- su -s /bin/sh -c 'nova-manage db sync' nova
805- fi
806 fi
807
808 #DEBHELPER#
809
810=== modified file 'debian/nova.conf'
811--- debian/nova.conf 2012-02-13 19:38:28 +0000
812+++ debian/nova.conf 2012-03-15 17:59:22 +0000
813@@ -9,3 +9,4 @@
814 --connection_type=libvirt
815 --root_helper=sudo nova-rootwrap
816 --verbose
817+--sql_connection=sqlite:////var/lib/nova/nova.sqlite
818
819=== modified file 'debian/rules'
820--- debian/rules 2012-03-06 23:31:34 +0000
821+++ debian/rules 2012-03-15 17:59:22 +0000
822@@ -35,10 +35,6 @@
823 mkdir -p $(CURDIR)/doc/build/html
824 endif
825
826-get-orig-source:
827- uscan --verbose --force-download --rename --destdir=../build-area
828-
829-
830 UPSTREAM_GIT=git://github.com/openstack/nova.git
831 DEBIAN_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
832 DEBIAN_NAME=nova
833@@ -82,3 +78,7 @@
834 override_dh_python2:
835 dh_python2
836 dh_python2 /usr/lib/xcp
837+
838+get-orig-source:
839+ @@[ -d ../tarballs/. ] || mkdir -p ../tarballs
840+ uscan --verbose --force-download --download-current-version --destdir=../tarballs

Subscribers

People subscribed via source and target branches