Drop Ubuntu Precise compatibility
Since we've already manually upgraded production to Ubuntu Trusty, let's start with a clean slate for now and just target latest Mediawiki on a fresh Trusty deployment. This simplifies or removes some of the conditional logic in this module. Change-Id: Ia8e74c85667719178c2f50b1458a9719582e8502
This commit is contained in:
parent
742d9c09a9
commit
670312c04a
@ -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,
|
||||
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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',
|
||||
|
@ -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" );
|
||||
|
@ -73,13 +73,7 @@
|
||||
php_admin_flag engine off
|
||||
</Directory>
|
||||
<Directory "<%= scope.lookupvar('mediawiki::mediawiki_location') %>">
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.4>
|
||||
Order allow,deny
|
||||
allow from all
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
|
Loading…
Reference in New Issue
Block a user