Commit 97000d01 authored by Tristan Cavelier's avatar Tristan Cavelier Committed by Cédric Le Ninivin

cloudooo: allow wkhtmltopdf to use xvfb

fixing segmentation fault on css opacity rendering

/reviewed-on nexedi/slapos!81
parent 5b7faa5b
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
parts = parts =
publish-cloudooo-connection-information publish-cloudooo-connection-information
cloudooo-test-runner cloudooo-test-runner
xvfb-instance
wkhtmltopdf-on-xvfb
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
...@@ -95,12 +97,13 @@ link-binary = ...@@ -95,12 +97,13 @@ link-binary =
{{ parameter_dict['coreutils'] }}/bin/tr {{ parameter_dict['coreutils'] }}/bin/tr
{{ parameter_dict['coreutils'] }}/bin/uname {{ parameter_dict['coreutils'] }}/bin/uname
{{ parameter_dict['coreutils'] }}/bin/dirname {{ parameter_dict['coreutils'] }}/bin/dirname
# wrapper recipe needs the head command
{{ parameter_dict['coreutils'] }}/bin/head
{{ parameter_dict['imagemagick'] }}/bin/convert {{ parameter_dict['imagemagick'] }}/bin/convert
{{ parameter_dict['imagemagick'] }}/bin/identify {{ parameter_dict['imagemagick'] }}/bin/identify
{{ parameter_dict['poppler'] }}/bin/pdfinfo {{ parameter_dict['poppler'] }}/bin/pdfinfo
{{ parameter_dict['poppler'] }}/bin/pdftotext {{ parameter_dict['poppler'] }}/bin/pdftotext
{{ parameter_dict['poppler'] }}/bin/pdftohtml {{ parameter_dict['poppler'] }}/bin/pdftohtml
{{ parameter_dict['wkhtmltopdf'] }}/wkhtmltopdf
# rest of parts are candidates for some generic stuff # rest of parts are candidates for some generic stuff
[directory] [directory]
...@@ -112,3 +115,21 @@ run = ${:var}/run ...@@ -112,3 +115,21 @@ run = ${:var}/run
services = ${:etc}/run services = ${:etc}/run
srv = ${buildout:directory}/srv srv = ${buildout:directory}/srv
var = ${buildout:directory}/var var = ${buildout:directory}/var
framebuffer = ${:srv}/framebuffer
[xvfb-instance]
recipe = slapos.cookbook:xvfb
runner-path = ${directory:services}/xvfb
xvfb-path = {{ parameter_dict["xserver"] }}/bin/Xvfb
fbdir-path = ${directory:framebuffer}
tmp-path = ${directory:run}
shell-path = {{ parameter_dict["dash"] }}/bin/dash
[wkhtmltopdf-on-xvfb]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:bin}/wkhtmltopdf
environment =
DISPLAY=:0
TMPDIR=${directory:run}
command-line = {{ parameter_dict['wkhtmltopdf'] }}/wkhtmltopdf --use-xserver
parameters-extra = true
...@@ -29,6 +29,7 @@ buildout-bin-directory = {{ buildout_bin_directory }} ...@@ -29,6 +29,7 @@ buildout-bin-directory = {{ buildout_bin_directory }}
cairo = {{ cairo_location }} cairo = {{ cairo_location }}
coreutils = {{ coreutils_location }} coreutils = {{ coreutils_location }}
cups = {{ cups_location }} cups = {{ cups_location }}
dash = {{ dash_location }}
dbus = {{ dbus_location }} dbus = {{ dbus_location }}
dbus-glib = {{ dbus_glib_location }} dbus-glib = {{ dbus_glib_location }}
file = {{ file_location }} file = {{ file_location }}
...@@ -57,6 +58,7 @@ pixman = {{ pixman_location }} ...@@ -57,6 +58,7 @@ pixman = {{ pixman_location }}
wkhtmltopdf = {{ wkhtmltopdf_location }} wkhtmltopdf = {{ wkhtmltopdf_location }}
xdamage = {{ xdamage_location }} xdamage = {{ xdamage_location }}
xfixes = {{ xfixes_location }} xfixes = {{ xfixes_location }}
xserver = {{ xserver_location }}
zlib = {{ zlib_location }} zlib = {{ zlib_location }}
[dynamic-template-cloudooo] [dynamic-template-cloudooo]
......
...@@ -38,12 +38,13 @@ context = ...@@ -38,12 +38,13 @@ context =
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in template = ${:_profile_base_location_}/instance.cfg.in
md5sum = 9871d0f315e49da0571b8a02f38e53c3 md5sum = 6e215fc2969a5d3d653981371a3a952a
extra-context = extra-context =
key buildout_bin_directory buildout:bin-directory key buildout_bin_directory buildout:bin-directory
key coreutils_location coreutils:location key coreutils_location coreutils:location
key cairo_location cairo:location key cairo_location cairo:location
key cups_location cups:location key cups_location cups:location
key dash_location dash:location
key dbus_glib_location dbus-glib:location key dbus_glib_location dbus-glib:location
key dbus_location dbus:location key dbus_location dbus:location
key dcron_location dcron:location key dcron_location dcron:location
...@@ -76,10 +77,11 @@ extra-context = ...@@ -76,10 +77,11 @@ extra-context =
key wkhtmltopdf_location wkhtmltopdf:location key wkhtmltopdf_location wkhtmltopdf:location
key xdamage_location xdamage:location key xdamage_location xdamage:location
key xfixes_location xfixes:location key xfixes_location xfixes:location
key xserver_location xserver:location
key zlib_location zlib:location key zlib_location zlib:location
[template-cloudooo] [template-cloudooo]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudoo.cfg.in url = ${:_profile_base_location_}/instance-cloudoo.cfg.in
md5sum = 0d569da3eef7d6a6d2966dbe3033626a md5sum = 2763ad422f2afb2edecd58e1933b7ae6
mode = 640 mode = 640
...@@ -9,6 +9,7 @@ extends = ...@@ -9,6 +9,7 @@ extends =
../component/cloudooo/buildout.cfg ../component/cloudooo/buildout.cfg
../component/coreutils/buildout.cfg ../component/coreutils/buildout.cfg
../component/cups/buildout.cfg ../component/cups/buildout.cfg
../component/dash/buildout.cfg
../component/dbus/buildout.cfg ../component/dbus/buildout.cfg
../component/dcron/buildout.cfg ../component/dcron/buildout.cfg
../component/ffmpeg/buildout.cfg ../component/ffmpeg/buildout.cfg
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment