Merge lp:~teknico/charms/precise/discourse/add-cheetah-pkg-misc-fixes into lp:~marcoceppi/charms/precise/discourse/trunk

Proposed by Nicola Larosa
Status: Needs review
Proposed branch: lp:~teknico/charms/precise/discourse/add-cheetah-pkg-misc-fixes
Merge into: lp:~marcoceppi/charms/precise/discourse/trunk
Diff against target: 111 lines (+12/-11)
6 files modified
README.md (+1/-1)
contrib/nginx/discourse (+1/-1)
hooks/db-relation-changed (+2/-2)
hooks/install (+4/-4)
hooks/upgrade-charm (+3/-2)
revision (+1/-1)
To merge this branch: bzr merge lp:~teknico/charms/precise/discourse/add-cheetah-pkg-misc-fixes
Reviewer Review Type Date Requested Status
Marco Ceppi Pending
Review via email: mp+174248@code.launchpad.net

Description of the change

1) Add the python-cheetah package to the packages installed by the install hook.

2) Fix removal of existing conf file in the install hook.

3) Misc. fixes to typos in comments and strings.

Note: this incorporates and improves the fix proposed in the lp:~george-edison55/charms/precise/discourse/trunk branch (point #2 above).

To post a comment you must log in.

Unmerged revisions

47. By Nicola Larosa

Add the python-cheetah package to the installed ones in hooks/install, and fix typos in code and comments.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.md'
2--- README.md 2013-05-29 23:47:47 +0000
3+++ README.md 2013-07-11 16:56:24 +0000
4@@ -74,7 +74,7 @@
5 is pointed at the latest version of Discourse.
6
7 For production deployments of Discourse it's recommended you change this version
8-either during deployment or shortly after to the corrosponding [release](https://github.com/discourse/discourse/tags)
9+either during deployment or shortly after to the corresponding [release](https://github.com/discourse/discourse/tags)
10 of Discourse you deployed. Doing so will ensure that during scale-out you'll
11 maintain the same version of Discourse between units. Failure to do so may
12 result in broken behavior due to version inconsistency between units.
13
14=== modified file 'contrib/nginx/discourse'
15--- contrib/nginx/discourse 2013-05-29 23:29:41 +0000
16+++ contrib/nginx/discourse 2013-07-11 16:56:24 +0000
17@@ -44,7 +44,7 @@
18 proxy_set_header Host $http_host;
19
20 # If the file exists as a static file serve it directly without
21- # running all the other rewite tests on it
22+ # running all the other rewrite tests on it.
23 # Brandon would have a fit if he saw these if statements. You apparently
24 # don't use if statements in nginx. Should replaces these with try_files
25 if (-f $request_filename) {
26
27=== modified file 'hooks/db-relation-changed'
28--- hooks/db-relation-changed 2013-05-30 00:25:57 +0000
29+++ hooks/db-relation-changed 2013-07-11 16:56:24 +0000
30@@ -21,7 +21,7 @@
31 fi
32
33 cat > /home/discourse/discourse/config/database.yml <<EOF
34-# This file was generated by Juju DON'T EDIT IT!
35+# This file was generated by Juju. DON'T EDIT IT!
36 production:
37 adapter: postgresql
38 database: $database
39@@ -39,7 +39,7 @@
40
41 if [ ! -f ".psql" ]; then
42 cat > .psql <<EOF
43-# This file was generated by Juju!
44+# This file was generated by Juju. DON'T EDIT IT!
45 db_host=$host
46 db_port=$port
47 db_user=$user
48
49=== modified file 'hooks/install'
50--- hooks/install 2013-05-30 01:56:08 +0000
51+++ hooks/install 2013-07-11 16:56:24 +0000
52@@ -9,7 +9,7 @@
53
54 apt-get install -qy ruby1.9.3 git-core build-essential libxml2-dev \
55 libxslt1-dev libpq-dev nginx redis-server postgresql-client-common \
56- postgresql-client-9.1 sendmail libtcmalloc-minimal0
57+ postgresql-client-9.1 sendmail libtcmalloc-minimal0 python-cheetah
58
59 export LANG=en_US.UTF-8
60 export LC_ALL=en_US.UTF-8
61@@ -27,7 +27,7 @@
62 adduser --disabled-password --gecos 'Discourse' discourse
63 fi
64
65-# Discourse should probably use gunicon. gunicorn is cool.
66+# Discourse should probably use gunicorn. gunicorn is cool.
67 juju-log "Placing nginx configuration files"
68 rsync -az contrib/nginx/ /etc/nginx/sites-available/
69 rm -f /etc/nginx/sites-enabled/default
70@@ -108,9 +108,9 @@
71 echo "$token" > $CHARM_DIR/.secret_token
72 fi
73
74-if [ -f "/etc/init/discoruse.conf" ]; then
75+if [ -f "/etc/init/discourse.conf" ]; then
76 juju-log "Replacing old discourse upstart"
77- rm -f /etc/init/discoruse.conf
78+ rm -f /etc/init/discourse.conf
79 fi
80
81 . $CHARM_DIR/lib/file.bash
82
83=== modified file 'hooks/upgrade-charm'
84--- hooks/upgrade-charm 2013-05-28 22:33:22 +0000
85+++ hooks/upgrade-charm 2013-07-11 16:56:24 +0000
86@@ -4,7 +4,7 @@
87 repository=`config-get repository`
88
89 if [ "$current_repository" != "$repository" ]; then
90- # Yikes, they want to really blow this up. Lets try a live migration!
91+ # Yikes, they want to really blow this up. Let's try a live migration!
92 # Move installation out of the way, so we can re-do the whole setup thing.
93 mv /home/discourse/discourse /home/discourse/.backup/$(date "+%Y%m%d-%H%M")
94 touch $charm_dir/.migrate
95@@ -20,7 +20,8 @@
96 if [ -f "$charm_dir/.database.yml.bak" ]; then
97 cat $charm_dir/.database.yml.bak > config/database.yml
98 elif [ -f "config/database.yml" ] && [ ! -f "$charm_dir/.database.yml.bak" ]; then
99- # For backwards compatibility. Remove and favor running relation hook again when bug is fixed in juju-core
100+ # For backwards compatibility. Remove and favor running relation hook again
101+ # when bug is fixed in juju-core.
102 cp config/database.yml $charm_dir/.database.yml.bak
103 fi
104
105
106=== modified file 'revision'
107--- revision 2013-02-08 18:06:56 +0000
108+++ revision 2013-07-11 16:56:24 +0000
109@@ -1,1 +1,1 @@
110-3
111+4

Subscribers

People subscribed via source and target branches

to all changes: