diff --git a/manifests/app.pp b/manifests/app.pp index 2a9e381..807cb92 100644 --- a/manifests/app.pp +++ b/manifests/app.pp @@ -1,10 +1,6 @@ # Class: mediawiki::app # -class mediawiki::app { - $revision = $::lsbdistcodename ? { - 'precise' => 'origin/master', # madness - 'trusty' => 'origin/REL1_27', - } +class mediawiki::app ($revision = 'origin/REL1_27'){ vcsrepo { '/srv/mediawiki/w': ensure => present, provider => git, diff --git a/manifests/extension.pp b/manifests/extension.pp index 62264e7..0c82d64 100644 --- a/manifests/extension.pp +++ b/manifests/extension.pp @@ -1,43 +1,16 @@ define mediawiki::extension ( $type = 'extension', - $ensure = undef, - $source = undef, - $revision = undef, + $ensure = latest, # keep up to date + $source = "https://gerrit.wikimedia.org/r/p/mediawiki/${type}s/${name}.git", + $revision = 'origin/REL1_27', ) { if $type != 'extension' and $type != 'skin' { fail( '$type must be extension or skin' ) } - - if $ensure == undef { - $vcsensure = $::lsbdistcodename ? { - 'precise' => present, - 'trusty' => latest, # keep up to date - } - } else { - $vcsensure = $ensure - } - if $revision == undef { - $vcsrevision = $::lsbdistcodename ? { - 'precise' => 'origin/master', # madness - 'trusty' => 'origin/REL1_27', - } - } else { - $vcsrevision = $revision - } - if $type == 'extension' { - $path = "extensions/${name}" - } elsif $type == 'skin' { - $path = "skins/${name}" - } - if $source == undef { - $vcssource = "https://gerrit.wikimedia.org/r/p/mediawiki/${path}.git" - } else { - $vcssource = $source - } - vcsrepo { "/srv/mediawiki/w/${path}": - ensure => $vcsensure, + vcsrepo { "/srv/mediawiki/w/${type}s/${name}": + ensure => $ensure, provider => git, - source => $vcssource, - revision => $vcsrevision, + source => $source, + revision => $revision, } } diff --git a/manifests/image_scaler.pp b/manifests/image_scaler.pp index e57faf4..192d889 100644 --- a/manifests/image_scaler.pp +++ b/manifests/image_scaler.pp @@ -1,34 +1,11 @@ # Class: mediawiki::image_scaler # class mediawiki::image_scaler { - if $::lsbdistcodename == 'precise' { - package { [ - # TODO: This seems to have been copied from wikimedia's mediawiki::multimedia, - # and wikimedia have the TimedMediaHandler extension installed which uses ffmpeg. - # But we don't, so is this needed? - 'ffmpeg', - 'libvips15', - 'ttf-arphic-ukai', - 'ttf-arphic-uming', - 'ttf-farsiweb', - 'ttf-khmeros', - 'ttf-lao', - 'ttf-manchufont', - 'ttf-mgopen', - 'ttf-nafees', - 'ttf-sil-abyssinica', - 'ttf-sil-ezra', - 'ttf-sil-padauk', - 'ttf-takao-gothic', - 'ttf-takao-mincho', - 'ttf-thai-tlwg', - 'ttf-tmuni']: - ensure => present, - } - } elsif $::lsbdistcodename == 'trusty' { - # No ffmpeg - it should work without? - # If it's needed it could be a pain as Ubuntu doesn't package it for trusty - package { [ 'libvips37', + # No ffmpeg - it should work without? If it's needed it could be a pain + # as Ubuntu doesn't package it for trusty + package { [ + 'djvulibre-bin', + 'ffmpeg2theora', 'fonts-arphic-ukai', 'fonts-arphic-uming', 'fonts-farsiweb', @@ -43,46 +20,43 @@ class mediawiki::image_scaler { 'fonts-takao-gothic', 'fonts-takao-mincho', 'fonts-thai-tlwg', - 'fonts-tibetan-machine']: - ensure => present, - } - } - package { [ 'djvulibre-bin', - 'ffmpeg2theora', - 'ghostscript', - 'gsfonts', - 'imagemagick', - 'libogg0', - 'librsvg2-bin', - 'libtheora0', - 'libvips-tools', - 'libvorbisenc2', - 'netpbm', - 'oggvideotools', - 'texlive-fonts-recommended', - 'ttf-alee', - 'ttf-arabeyes', - 'ttf-bengali-fonts', - 'ttf-devanagari-fonts', - 'ttf-gujarati-fonts', - 'ttf-kacst', - 'ttf-kannada-fonts', - 'ttf-liberation', - 'ttf-linux-libertine', - 'ttf-malayalam-fonts', - 'ttf-oriya-fonts', - 'ttf-punjabi-fonts', - 'ttf-sil-scheherazade', - 'ttf-sil-yi', - 'ttf-tamil-fonts', - 'ttf-ubuntu-font-family', - 'ttf-unfonts-extra', - 'ttf-wqy-zenhei', - 'xfonts-100dpi', - 'xfonts-75dpi', - 'xfonts-base', - 'xfonts-mplus', - 'xfonts-scalable']: + 'fonts-tibetan-machine', + 'ghostscript', + 'gsfonts', + 'imagemagick', + 'libogg0', + 'librsvg2-bin', + 'libtheora0', + 'libvips-tools', + 'libvips37', + 'libvorbisenc2', + 'netpbm', + 'oggvideotools', + 'texlive-fonts-recommended', + 'ttf-alee', + 'ttf-arabeyes', + 'ttf-bengali-fonts', + 'ttf-devanagari-fonts', + 'ttf-gujarati-fonts', + 'ttf-kacst', + 'ttf-kannada-fonts', + 'ttf-liberation', + 'ttf-linux-libertine', + 'ttf-malayalam-fonts', + 'ttf-oriya-fonts', + 'ttf-punjabi-fonts', + 'ttf-sil-scheherazade', + 'ttf-sil-yi', + 'ttf-tamil-fonts', + 'ttf-ubuntu-font-family', + 'ttf-unfonts-extra', + 'ttf-wqy-zenhei', + 'xfonts-100dpi', + 'xfonts-75dpi', + 'xfonts-base', + 'xfonts-mplus', + 'xfonts-scalable', + ]: ensure => present, } include ::tmpreaper diff --git a/manifests/init.pp b/manifests/init.pp index bc12c95..c046433 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -78,11 +78,6 @@ class mediawiki( source => 'https://github.com/HydraWiki/mediawiki-embedvideo.git', revision => 'origin/master', # Not from Wikimedia repos :( } - if $::lsbdistcodename == 'precise' { - # On trusty we use 1.27, which has this extension merged into core - # See https://phabricator.wikimedia.org/T108213 - mediawiki::extension { 'OpenSearchXml': } - } mediawiki::extension { 'strapping': type => 'skin', diff --git a/templates/Settings.php.erb b/templates/Settings.php.erb index 858985d..4c7fa67 100644 --- a/templates/Settings.php.erb +++ b/templates/Settings.php.erb @@ -282,11 +282,6 @@ include_once("$IP/extensions/Mantle/Mantle.php"); require_once("$IP/extensions/MobileFrontend/MobileFrontend.php"); $wgMFAutodetectMobileView = true; -if ( file_exists( "$IP/extensions/OpenSearchXml" ) ) { - # Needed by MobileFrontend - require_once( "$IP/extensions/OpenSearchXml/OpenSearchXml.php" ); -} - require_once( "$IP/extensions/SubPageList3/SubPageList3.php" ); require_once( "$IP/extensions/EmbedVideo/EmbedVideo.php" ); diff --git a/templates/apache/mediawiki.erb b/templates/apache/mediawiki.erb index 101a4b6..185702c 100644 --- a/templates/apache/mediawiki.erb +++ b/templates/apache/mediawiki.erb @@ -73,13 +73,7 @@ php_admin_flag engine off "> - = 2.4> Require all granted - - - Order allow,deny - allow from all - ExpiresActive On