Fetch external dependencies

The "vendor" subdirectory of the wiki tree is expected to contain
all MediaWiki's external dependencies which are no longer carried
within its core Git repository. The documentation on how to populate
it can be found here:

https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries

I'm not thrilled by the idea of running an application which creates
a directory within the Git worktree, but at least it and the other
trashfiles it creates are tracked in the .gitignore so shouldn't
pose a problem for updating the repository state.

Change-Id: I81ac4ff371346c217d760390a02139dfae82332f
This commit is contained in:
Jeremy Stanley 2019-10-15 17:27:52 +00:00
parent acf82e4407
commit b321a9229e
2 changed files with 10 additions and 0 deletions

View File

@ -7,6 +7,15 @@ class mediawiki::app ($revision = 'origin/REL1_28'){
source => 'https://gerrit.wikimedia.org/r/mediawiki/core.git', source => 'https://gerrit.wikimedia.org/r/mediawiki/core.git',
revision => $revision, revision => $revision,
} }
exec { 'fetch_external_libraries' :
# https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries
# note that the files this creates are tracked in .gitignore
command => '/usr/bin/composer update --no-dev',
cwd => '/srv/mediawiki/w',
refreshonly => true,
require => Class['mediawiki::php'],
subscribe => Vcsrepo['/srv/mediawiki/w'],
}
} }
# vim:sw=2:ts=2:expandtab:textwidth=79 # vim:sw=2:ts=2:expandtab:textwidth=79

View File

@ -2,6 +2,7 @@
# #
class mediawiki::php { class mediawiki::php {
package { [ package { [
'composer', # used by fetch_external_libraries in mediawiki::app
'php', 'php',
'php-apcu', 'php-apcu',
'php-cli', 'php-cli',