jenkins-bot has submitted this change and it was merged.

Change subject: Configure thumbor SVG support
......................................................................


Configure thumbor SVG support

Bug: T120204
Change-Id: If219dc72090d97980ac96eef631405fdb5ead9f2
---
M puppet/modules/role/manifests/thumbor.pp
M puppet/modules/role/templates/thumbor/local_repo.php.erb
M puppet/modules/thumbor/manifests/init.pp
M puppet/modules/thumbor/templates/thumbor.conf.erb
4 files changed, 11 insertions(+), 2 deletions(-)

Approvals:
  Dduvall: Looks good to me, approved
  Filippo Giunchedi: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/puppet/modules/role/manifests/thumbor.pp 
b/puppet/modules/role/manifests/thumbor.pp
index 6877173..7a9ccce 100644
--- a/puppet/modules/role/manifests/thumbor.pp
+++ b/puppet/modules/role/manifests/thumbor.pp
@@ -29,6 +29,7 @@
                 'jpg',
                 'jpeg',
                 'xcf',
+                'svg',
             ],
         },
     }
diff --git a/puppet/modules/role/templates/thumbor/local_repo.php.erb 
b/puppet/modules/role/templates/thumbor/local_repo.php.erb
index ab3f2c4..0847991 100644
--- a/puppet/modules/role/templates/thumbor/local_repo.php.erb
+++ b/puppet/modules/role/templates/thumbor/local_repo.php.erb
@@ -14,6 +14,7 @@
                 'jpg' => 'http://127.0.0.1:6081' . $wgUploadPath . '/thumb',
                 'png' => 'http://127.0.0.1:6081' . $wgUploadPath . '/thumb',
                 'gif' => 'http://127.0.0.1:6081' . $wgUploadPath . '/thumb',
+                'svg' => 'http://127.0.0.1:6081' . $wgUploadPath . '/thumb',
             ),
         ),
     ),
diff --git a/puppet/modules/thumbor/manifests/init.pp 
b/puppet/modules/thumbor/manifests/init.pp
index 69886f1..a4715e3 100644
--- a/puppet/modules/thumbor/manifests/init.pp
+++ b/puppet/modules/thumbor/manifests/init.pp
@@ -43,6 +43,9 @@
     # For GIF engine
     require_package('gifsicle')
 
+    # For SVG engine
+    require_package('librsvg2-bin')
+
     $statsd_host = 'localhost'
     $statsd_prefix = 'Thumbor'
 
@@ -71,6 +74,8 @@
             'pylibmc', # For memcache original file storage
             'git+https://gerrit.wikimedia.org/r/thumbor/exif-optimizer',
             'git+https://gerrit.wikimedia.org/r/thumbor/proxy-engine',
+            'git+https://gerrit.wikimedia.org/r/thumbor/base-engine',
+            'git+https://gerrit.wikimedia.org/r/thumbor/svg-engine',
         ],
         require  => [
             Package['libjpeg-progs'],
@@ -131,7 +136,7 @@
     varnish::backend { 'thumbor':
         host   => '127.0.0.1',
         port   => '8888',
-        onlyif => 'req.url ~ "^/images/thumb/.*\.(jpeg|jpg|jpe|png|apng|gif)"',
+        onlyif => 'req.url ~ 
"^/images/thumb/.*\.(jpeg|jpg|jpe|png|apng|gif|svg)"',
     }
 
     varnish::backend { 'swift':
diff --git a/puppet/modules/thumbor/templates/thumbor.conf.erb 
b/puppet/modules/thumbor/templates/thumbor.conf.erb
index 54a010e..7b9cf82 100644
--- a/puppet/modules/thumbor/templates/thumbor.conf.erb
+++ b/puppet/modules/thumbor/templates/thumbor.conf.erb
@@ -592,6 +592,8 @@
 SUBPROCESS_CGEXEC_PATH = '/usr/bin/cgexec'
 SUBPROCESS_CGROUP = 'memory:thumbor'
 
-PROXY_ENGINE_ENGINES = [ 'thumbor.engines.pil' ]
+RSVG_CONVERT_PATH = '/usr/bin/rsvg-convert'
+
+PROXY_ENGINE_ENGINES = [ 'wikimedia_thumbor_svg_engine', 'thumbor.engines.pil' 
]
 
 
################################################################################

-- 
To view, visit https://gerrit.wikimedia.org/r/259641
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If219dc72090d97980ac96eef631405fdb5ead9f2
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gilles <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Dduvall <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to