Merge lp:~evarlast/charms/trusty/mediawiki/trusty-port into lp:charms/mediawiki

Proposed by Jay R. Wren
Status: Rejected
Rejected by: José Antonio Rey
Proposed branch: lp:~evarlast/charms/trusty/mediawiki/trusty-port
Merge into: lp:charms/mediawiki
Diff against target: 75 lines (+14/-9)
3 files modified
hooks/config-changed (+2/-6)
hooks/db-relation-changed (+1/-1)
hooks/install (+11/-2)
To merge this branch: bzr merge lp:~evarlast/charms/trusty/mediawiki/trusty-port
Reviewer Review Type Date Requested Status
José Antonio Rey (community) Disapprove
Adam Israel (community) Needs Fixing
Review via email: mp+226752@code.launchpad.net

Description of the change

Make it work with trusty.

To post a comment you must log in.
Revision history for this message
Jorge Castro (jorge) wrote :

Can we just remove the PPA entirely before promoting this to trusty?

Revision history for this message
Jay R. Wren (evarlast) wrote :

I did not test that at all. I'll test it and see if it works.

On Tue, Jul 29, 2014 at 3:58 PM, Jorge O. Castro <email address hidden> wrote:

> Can we just remove the PPA entirely before promoting this to trusty?
> --
>
> https://code.launchpad.net/~evarlast/charms/trusty/mediawiki/trusty-port/+merge/226752
> You are the owner of lp:~evarlast/charms/trusty/mediawiki/trusty-port.
>

81. By Jay R. Wren

ppa is no longer needed

With the changes for trusty, the precise ppa is no longer needed.

Revision history for this message
Jay R. Wren (evarlast) wrote :

Removed PPA entirely. Tested to confirm that this works with precise.

Revision history for this message
Adam Israel (aisrael) wrote :

Hey Jay,

Thanks for sending this in.

In reviewing this, I found that the DocumentRoot wasn't quite being updated correctly. The path was set to '/usr/share/mediawiki/html', but should be set to '/usr/share/mediawiki'.

Other than that, the charm works for me.

review: Needs Fixing
Revision history for this message
Adam Israel (aisrael) wrote :

Hey Jay,

I went ahead and made a merge to fix your merge.

https://code.launchpad.net/~aisrael/charms/trusty/mediawiki/trusty-port/+merge/233656

Revision history for this message
José Antonio Rey (jose) wrote :

This MP is currently superseded by aisrael's (https://code.launchpad.net/~aisrael/charms/trusty/mediawiki/trusty-port/+merge/233656), which also contain these changes. Thanks for your efforts in the MediaWiki charm, Jay! :)

review: Disapprove
Revision history for this message
Jay R. Wren (evarlast) wrote :

Huge thanks for that Adam. I was unable to do it in a timely manner.

On Sun, Sep 7, 2014 at 10:41 PM, José Antonio Rey <email address hidden> wrote:

> The proposal to merge lp:~evarlast/charms/trusty/mediawiki/trusty-port
> into lp:charms/mediawiki has been updated.
>
> Status: Needs review => Rejected
>
> For more details, see:
>
> https://code.launchpad.net/~evarlast/charms/trusty/mediawiki/trusty-port/+merge/226752
> --
>
> https://code.launchpad.net/~evarlast/charms/trusty/mediawiki/trusty-port/+merge/226752
> You are the owner of lp:~evarlast/charms/trusty/mediawiki/trusty-port.
>

Unmerged revisions

81. By Jay R. Wren

ppa is no longer needed

With the changes for trusty, the precise ppa is no longer needed.

80. By Jay R. Wren

fix install

79. By Jay R. Wren

trusty fixes for mediawiki

This charm was only working by chance. The sed -ie was making
backup files in apache conf dir. Those files were being read, hence
the attempted toggle DocumentRoot was a no-op or inverse.

clint-fewbar/fixes ppa does not exist for trusty, and is not needed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/config-changed'
2--- hooks/config-changed 2014-05-09 18:21:05 +0000
3+++ hooks/config-changed 2014-08-01 13:09:19 +0000
4@@ -1,5 +1,5 @@
5 #!/bin/sh
6-set -e
7+set -eux
8
9 wikiname=`config-get name`
10 skin=`config-get skin`
11@@ -9,14 +9,10 @@
12
13 if [ "`config-get --format json use_suffix`" = "true" ] ; then
14 # Change root from /usr/share/mediawiki /to var/www
15- sed -ie 's/\/usr\/share\/mediawiki/\/var\/www/' \
16- /etc/apache2/sites-enabled/000-default
17 imagepath="/var/www/images"
18 scriptpath="/mediawiki"
19 else
20 # Change root from /var/www to /usr/share/mediawiki
21- sed -ie 's/\/var\/www/\/usr\/share\/mediawiki/' \
22- /etc/apache2/sites-enabled/000-default
23 imagepath="/usr/share/mediawiki/images"
24 scriptpath=""
25 fi
26@@ -42,7 +38,7 @@
27
28 new_file=`mktemp /etc/mediawiki/config-settings.XXXXXXXXX.php`
29
30-if [ -n "$wgLogo" ] ; then
31+if [ -n "$logo" ] ; then
32 wgLogo="'$wgLogo'"
33 else
34 wgLogo="null"
35
36=== modified file 'hooks/db-relation-changed'
37--- hooks/db-relation-changed 2014-05-09 18:16:48 +0000
38+++ hooks/db-relation-changed 2014-08-01 13:09:19 +0000
39@@ -207,7 +207,7 @@
40 return
41
42 # Enable the Alias in the apache config
43- do("sed", "-ie","s,^#Alias /mediawiki,Alias /mediawiki,","/etc/mediawiki/apache.conf")
44+ do("sed", "-i","s,^#Alias /mediawiki,Alias /mediawiki,","/etc/mediawiki/apache.conf")
45
46 # Restart apache
47 do("/etc/init.d/apache2", "reload")
48
49=== modified file 'hooks/install'
50--- hooks/install 2013-08-29 03:35:44 +0000
51+++ hooks/install 2014-08-01 13:09:19 +0000
52@@ -2,8 +2,8 @@
53
54 set -xe
55
56-add-apt-repository -y ppa:clint-fewbar/fixes
57-apt-get update
58+[[ -f /etc/lsb-release ]] && . /etc/lsb-release
59+
60 apt-get --no-install-recommends -y -q install mediawiki php5-cli postfix python-mysqldb pwgen
61
62 # a bit hacky -- makes sure its there even if memcached is never related
63@@ -11,3 +11,12 @@
64 chmod 0644 /etc/mediawiki/memcached_settings.php
65 touch /etc/mediawiki/dbservers.php
66 chmod 0644 /etc/mediawiki/dbservers.php
67+
68+[[ trusty == "$DISTRIB_CODENAME" ]] && a2enconf mediawiki || true
69+
70+[[ precise == $DISTRIB_CODENAME ]] && \
71+ sed -i 's/\/var\/www/\/usr\/share\/mediawiki/' \
72+ /etc/apache2/sites-enabled/000-default || true
73+[[ trusty == $DISTRIB_CODENAME ]] && \
74+ sed -i 's/\/var\/www/\/usr\/share\/mediawiki/' \
75+ /etc/apache2/sites-enabled/000-default.conf || true

Subscribers

People subscribed via source and target branches

to all changes: