From b321a9229e6702bd847bf9fe3a05eb4c8e6955bd Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 15 Oct 2019 17:27:52 +0000 Subject: [PATCH] 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 --- manifests/app.pp | 9 +++++++++ manifests/php.pp | 1 + 2 files changed, 10 insertions(+) diff --git a/manifests/app.pp b/manifests/app.pp index f40ab10..05b0f85 100644 --- a/manifests/app.pp +++ b/manifests/app.pp @@ -7,6 +7,15 @@ class mediawiki::app ($revision = 'origin/REL1_28'){ source => 'https://gerrit.wikimedia.org/r/mediawiki/core.git', 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 diff --git a/manifests/php.pp b/manifests/php.pp index 8bbc6d8..4d790d4 100644 --- a/manifests/php.pp +++ b/manifests/php.pp @@ -2,6 +2,7 @@ # class mediawiki::php { package { [ + 'composer', # used by fetch_external_libraries in mediawiki::app 'php', 'php-apcu', 'php-cli',