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
=== modified file 'hooks/config-changed'
--- hooks/config-changed 2014-05-09 18:21:05 +0000
+++ hooks/config-changed 2014-08-01 13:09:19 +0000
@@ -1,5 +1,5 @@
1#!/bin/sh1#!/bin/sh
2set -e2set -eux
33
4wikiname=`config-get name`4wikiname=`config-get name`
5skin=`config-get skin`5skin=`config-get skin`
@@ -9,14 +9,10 @@
99
10if [ "`config-get --format json use_suffix`" = "true" ] ; then10if [ "`config-get --format json use_suffix`" = "true" ] ; then
11 # Change root from /usr/share/mediawiki /to var/www11 # Change root from /usr/share/mediawiki /to var/www
12 sed -ie 's/\/usr\/share\/mediawiki/\/var\/www/' \
13 /etc/apache2/sites-enabled/000-default
14 imagepath="/var/www/images"12 imagepath="/var/www/images"
15 scriptpath="/mediawiki"13 scriptpath="/mediawiki"
16else14else
17 # Change root from /var/www to /usr/share/mediawiki15 # Change root from /var/www to /usr/share/mediawiki
18 sed -ie 's/\/var\/www/\/usr\/share\/mediawiki/' \
19 /etc/apache2/sites-enabled/000-default
20 imagepath="/usr/share/mediawiki/images"16 imagepath="/usr/share/mediawiki/images"
21 scriptpath=""17 scriptpath=""
22fi18fi
@@ -42,7 +38,7 @@
4238
43new_file=`mktemp /etc/mediawiki/config-settings.XXXXXXXXX.php`39new_file=`mktemp /etc/mediawiki/config-settings.XXXXXXXXX.php`
4440
45if [ -n "$wgLogo" ] ; then41if [ -n "$logo" ] ; then
46 wgLogo="'$wgLogo'"42 wgLogo="'$wgLogo'"
47else43else
48 wgLogo="null"44 wgLogo="null"
4945
=== modified file 'hooks/db-relation-changed'
--- hooks/db-relation-changed 2014-05-09 18:16:48 +0000
+++ hooks/db-relation-changed 2014-08-01 13:09:19 +0000
@@ -207,7 +207,7 @@
207 return207 return
208208
209 # Enable the Alias in the apache config209 # Enable the Alias in the apache config
210 do("sed", "-ie","s,^#Alias /mediawiki,Alias /mediawiki,","/etc/mediawiki/apache.conf")210 do("sed", "-i","s,^#Alias /mediawiki,Alias /mediawiki,","/etc/mediawiki/apache.conf")
211211
212 # Restart apache212 # Restart apache
213 do("/etc/init.d/apache2", "reload")213 do("/etc/init.d/apache2", "reload")
214214
=== modified file 'hooks/install'
--- hooks/install 2013-08-29 03:35:44 +0000
+++ hooks/install 2014-08-01 13:09:19 +0000
@@ -2,8 +2,8 @@
22
3set -xe3set -xe
44
5add-apt-repository -y ppa:clint-fewbar/fixes5[[ -f /etc/lsb-release ]] && . /etc/lsb-release
6apt-get update6
7apt-get --no-install-recommends -y -q install mediawiki php5-cli postfix python-mysqldb pwgen7apt-get --no-install-recommends -y -q install mediawiki php5-cli postfix python-mysqldb pwgen
88
9# a bit hacky -- makes sure its there even if memcached is never related9# a bit hacky -- makes sure its there even if memcached is never related
@@ -11,3 +11,12 @@
11chmod 0644 /etc/mediawiki/memcached_settings.php11chmod 0644 /etc/mediawiki/memcached_settings.php
12touch /etc/mediawiki/dbservers.php12touch /etc/mediawiki/dbservers.php
13chmod 0644 /etc/mediawiki/dbservers.php13chmod 0644 /etc/mediawiki/dbservers.php
14
15[[ trusty == "$DISTRIB_CODENAME" ]] && a2enconf mediawiki || true
16
17[[ precise == $DISTRIB_CODENAME ]] && \
18 sed -i 's/\/var\/www/\/usr\/share\/mediawiki/' \
19 /etc/apache2/sites-enabled/000-default || true
20[[ trusty == $DISTRIB_CODENAME ]] && \
21 sed -i 's/\/var\/www/\/usr\/share\/mediawiki/' \
22 /etc/apache2/sites-enabled/000-default.conf || true

Subscribers

People subscribed via source and target branches

to all changes: