Commit 56e42aa8 authored by Eric Zheng's avatar Eric Zheng

component/headless-chromium: remove slapos.cookbook dependency

There was an issue introduced in commit 7b512a88 through the use of
the `slapos.cookbook:wrapper` recipe. This recipe cannot be used in
a component without causing a dependency problem; see 22124832 for
a more complete description of the issue.
parent 8c6036d0
......@@ -24,13 +24,15 @@ command =
environment =
PATH=%(PATH)s:${wget:location}/bin
library-path = ${nspr:location}/lib:${nss:location}/lib
binary = ${:path}/hc
# Create a wrapper at bin/headless-chromium.
# TODO: we might need to explicitly set LD_LIBRARY_PATH since nss and
# nspr are not where they were when the executable was built?
# Note: we may need to explicitly set LD_LIBRARY_PATH, since nss and
# nspr are not where they where when the executable was built.
[chromium-wrapper]
recipe = slapos.cookbook:wrapper
command-line = ${chromium:path}/hc
wrapper-path = ${buildout:bin-directory}/headless-chromium
environment =
LD_LIBRARY_PATH=${chromium:library-path}
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/wrapper-template.in
rendered = ${buildout:bin-directory}/headless-chromium
context =
key chromium_binary chromium:binary
key ld_library_path chromium:library-path
#!/bin/sh
export LD_LIBRARY_PATH={{ ld_library_path }}
exec {{ chromium_binary }} "$@"
......@@ -73,16 +73,18 @@ make-binary =
environment =
PATH=${depot_tools:location}:${gperf:location}/bin:${pkgconfig:location}/bin:${coreutils:location}/bin:${git:location}/bin:${curl:location}/bin:%(PATH)s
# Make sure to compile libraries needed at runtime
# Make sure to compile libraries needed at runtime.
runtime-libraries =
${nspr:location}/lib
${nss:location}/lib
promises =
${:location}/headless_shell
binary = ${:location}/headless_shell
promises = ${:binary}
# Place a wrapper script at bin/headless-chromium
# Place a wrapper script at bin/headless-chromium.
[chromium-wrapper]
recipe = slapos.cookbook:wrapper
command-line = ${chromium:path}/out/headless/headless_shell
wrapper-path = ${buildout:bin-directory}/headless-chromium
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/wrapper-template.in
rendered = ${buildout:bin-directory}/headless-chromium
context =
key chromium_binary chromium:binary
#!/bin/sh
exec {{ chromium_binary }} "$@"
......@@ -25,7 +25,7 @@ context =
key nginx_location nginx:location
key liberation_fonts_location liberation-fonts:location
key fontconfig_location fontconfig:location
key chromium_wrapper chromium-wrapper:wrapper-path
key chromium_wrapper chromium-wrapper:rendered
key template_nginx_config_target template-nginx-conf:target
key template_fonts_conf_target template-fonts-conf:output
key template_instance_headless_chromium_target instance-headless-chromium:target
......
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