Merge lp:~patrick-hetu/charms/oneiric/openerp-web/trunk into lp:charms/openerp-web

Proposed by Patrick Hetu
Status: Merged
Approved by: Juan L. Negron
Approved revision: 26
Merge reported by: Juan L. Negron
Merged at revision: not available
Proposed branch: lp:~patrick-hetu/charms/oneiric/openerp-web/trunk
Merge into: lp:charms/openerp-web
Diff against target: 128 lines (+46/-16)
6 files modified
config.yaml (+8/-3)
hooks/config-changed (+34/-0)
hooks/openerp-relation-joined (+1/-3)
hooks/start (+1/-5)
hooks/stop (+1/-5)
metadata.yaml (+1/-0)
To merge this branch: bzr merge lp:~patrick-hetu/charms/oneiric/openerp-web/trunk
Reviewer Review Type Date Requested Status
Juan L. Negron (community) Approve
Review via email: mp+116936@code.launchpad.net

Description of the change

add myself as maintainer

To post a comment you must log in.
Revision history for this message
Juan L. Negron (negronjl) wrote :

Reviewing this now.

-Juan

Revision history for this message
Juan L. Negron (negronjl) wrote :

Hi Patrick:

Thanks for the changes ... BTW .. there were a few changes to this charm beyond just adding yourself as the maintainer.

They all seem to work fine so, I am approving this.

In the future, it helps if there is a bit more information on the changes made.

thanks,

Juan

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2012-03-28 19:41:55 +0000
3+++ config.yaml 2012-07-26 18:19:19 +0000
4@@ -6,15 +6,20 @@
5 This is the location to download OpenERP. It can be the keyword: distro
6 or lp. With lp you can set a version number. Note that the distro keyword
7 will not work on a Precise release of Ubuntu and if the multiverse repository
8- are not available.
9+ are not available. Note the this configuration is only valid at installation
10+ time and cannot be changed afterwards.
11 version:
12 type: string
13 default: "/6.1"
14 description: |
15 This set the version of the code to install. Empty string will download
16 the trunk version. Don't forget the / at the beginning if you set a
17- version number.
18+ version number. Note the this configuration is only valid at installation
19+ time and cannot be changed afterwards.
20 db_filter:
21 type: string
22 default: ".*"
23- description: The regex that filter listed databases on the login page.
24+ description: |
25+ The regex that filter listed databases on the login page. Note the this
26+ configuration is only valid at installation time and cannot be changed
27+ afterwards.
28
29=== added file 'hooks/config-changed'
30--- hooks/config-changed 1970-01-01 00:00:00 +0000
31+++ hooks/config-changed 2012-07-26 18:19:19 +0000
32@@ -0,0 +1,34 @@
33+#!/bin/bash
34+
35+set -eu # -x for verbose logging to juju debug-log
36+
37+ORIGIN=$(config-get origin)
38+VERSION=$(config-get version)
39+
40+if [[ $ORIGIN == lp ]]; then
41+
42+ apt-get -y update
43+ apt-get install -y python-werkzeug python-simplejson python-tz \
44+ python-dateutil python-babel --no-install-recommends
45+
46+ cd /srv/
47+
48+ if [[ ! -d openerp-web ]]; then
49+ bzr checkout --lightweight lp:openerp-web${VERSION} openerp-web
50+ fi
51+
52+else
53+
54+ apt-get -y update
55+ apt-get install -y openerp-web apache2 --no-install-recommends
56+
57+fi
58+
59+if [[ -e /etc/init/openerp-web.conf ]]; then
60+ # installed: change the existing configuration
61+ if [[ $ORIGIN == lp ]]; then
62+ sed -i -e 's|--db-filter=".*"|--db-filter="${DB_FILTER}|' /etc/init/openerp-web.conf
63+ else
64+
65+ fi
66+fi
67
68=== modified file 'hooks/openerp-relation-joined'
69--- hooks/openerp-relation-joined 2012-03-28 19:40:57 +0000
70+++ hooks/openerp-relation-joined 2012-07-26 18:19:19 +0000
71@@ -30,8 +30,6 @@
72 exec su -c "./openerp-web --proxy-mode --db-filter="${DB_FILTER}" --addons-path=addons --server-host ${REMOTE_PRIVATE_ADDRESS}" openerp
73 EOF
74
75- start openerp-web || restart openerp-web
76-
77 open-port 8002/tcp
78
79 else
80@@ -97,7 +95,7 @@
81
82 EOF
83
84- service openerp-web start || service openerp-web restart
85 open-port 80/tcp
86 fi
87
88+service openerp-web start || service openerp-web restart
89
90=== modified file 'hooks/start'
91--- hooks/start 2012-03-20 18:40:08 +0000
92+++ hooks/start 2012-07-26 18:19:19 +0000
93@@ -4,8 +4,4 @@
94
95 ORIGIN=$(config-get origin)
96
97-if [[ $ORIGIN == lp ]]; then
98- start openerp-web || true
99-else
100- service openerp-web start || true
101-fi
102+service openerp-web start || true
103
104=== modified file 'hooks/stop'
105--- hooks/stop 2012-03-20 17:17:57 +0000
106+++ hooks/stop 2012-07-26 18:19:19 +0000
107@@ -4,9 +4,5 @@
108
109 ORIGIN=$(config-get origin)
110
111-if [[ $ORIGIN == lp ]]; then
112- stop openerp-web
113-else
114- service openerp-web stop
115-fi
116+service openerp-web stop
117
118
119=== modified file 'metadata.yaml'
120--- metadata.yaml 2012-03-16 18:43:36 +0000
121+++ metadata.yaml 2012-07-26 18:19:19 +0000
122@@ -1,5 +1,6 @@
123 name: openerp-web
124 summary: Enterprise Resource Management (server)
125+maintainer: Patrick Hetu <patrick.hetu@gmail.com>
126 description: |
127 Open ERP, previously known as TinyERP, is a complete ERP and CRM. The
128 main features are accounting (analytic and financial), stock

Subscribers

People subscribed via source and target branches

to all changes: