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 = ...@@ -24,13 +24,15 @@ command =
environment = environment =
PATH=%(PATH)s:${wget:location}/bin PATH=%(PATH)s:${wget:location}/bin
library-path = ${nspr:location}/lib:${nss:location}/lib library-path = ${nspr:location}/lib:${nss:location}/lib
binary = ${:path}/hc
# Create a wrapper at bin/headless-chromium. # Create a wrapper at bin/headless-chromium.
# TODO: we might need to explicitly set LD_LIBRARY_PATH since nss and # Note: we may need to explicitly set LD_LIBRARY_PATH, since nss and
# nspr are not where they were when the executable was built? # nspr are not where they where when the executable was built.
[chromium-wrapper] [chromium-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.recipe.template:jinja2
command-line = ${chromium:path}/hc template = ${:_profile_base_location_}/wrapper-template.in
wrapper-path = ${buildout:bin-directory}/headless-chromium rendered = ${buildout:bin-directory}/headless-chromium
environment = context =
LD_LIBRARY_PATH=${chromium:library-path} 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 = ...@@ -73,16 +73,18 @@ make-binary =
environment = environment =
PATH=${depot_tools:location}:${gperf:location}/bin:${pkgconfig:location}/bin:${coreutils:location}/bin:${git:location}/bin:${curl:location}/bin:%(PATH)s 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 = runtime-libraries =
${nspr:location}/lib ${nspr:location}/lib
${nss:location}/lib ${nss:location}/lib
promises = binary = ${:location}/headless_shell
${:location}/headless_shell promises = ${:binary}
# Place a wrapper script at bin/headless-chromium # Place a wrapper script at bin/headless-chromium.
[chromium-wrapper] [chromium-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.recipe.template:jinja2
command-line = ${chromium:path}/out/headless/headless_shell template = ${:_profile_base_location_}/wrapper-template.in
wrapper-path = ${buildout:bin-directory}/headless-chromium rendered = ${buildout:bin-directory}/headless-chromium
context =
key chromium_binary chromium:binary
#!/bin/sh
exec {{ chromium_binary }} "$@"
...@@ -25,7 +25,7 @@ context = ...@@ -25,7 +25,7 @@ context =
key nginx_location nginx:location key nginx_location nginx:location
key liberation_fonts_location liberation-fonts:location key liberation_fonts_location liberation-fonts:location
key fontconfig_location fontconfig: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_nginx_config_target template-nginx-conf:target
key template_fonts_conf_target template-fonts-conf:output key template_fonts_conf_target template-fonts-conf:output
key template_instance_headless_chromium_target instance-headless-chromium:target 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