]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/mediawiki/recipes/default.rb
mediawiki: monkey-patch for broken parsoid release
[chef.git] / cookbooks / mediawiki / recipes / default.rb
index b9c87860180ebd85eb8af9ffe008bf16a8362ccf..20b5f6f3e4df619745cf606e4883bf388539e77a 100644 (file)
@@ -26,9 +26,11 @@ include_recipe "git"
 package "php"
 package "php-cli"
 package "php-curl"
-package "php-mysql"
 package "php-gd"
 package "php-intl"
+package "php-mbstring"
+package "php-mysql"
+package "php-xml"
 
 # Mediawiki enhanced difference engine
 package "php-wikidiff2"
@@ -49,6 +51,16 @@ package "liblz4-tool"
 package "curl"
 package "parsoid"
 
+# Mediawiki packages for SyntaxHighight support
+package "python-pygments"
+
+# parsoid 0.6.1all is broken with Ubuntu 16.04+ version of node. Monkey patch a fix.
+link "/usr/lib/parsoid/lib" do
+  to "/usr/lib/parsoid/src/lib"
+  link_type :symbolic
+  not_if { File.exist?("/usr/lib/parsoid/lib") }
+end
+
 template "/etc/mediawiki/parsoid/settings.js" do
   source "parsoid-settings.js.erb"
   owner "root"
@@ -60,6 +72,7 @@ service "parsoid" do
   action [:enable]
   supports :status => false, :restart => true, :reload => false
   subscribes :restart, "template[/etc/mediawiki/parsoid/settings.js]"
+  subscribes :restart, "link[/usr/lib/parsoid/lib]"
 end
 
 apache_module "php7.0"