Commit 6a7e0d3d authored by Eric Zheng's avatar Eric Zheng

remove font configuration from headless-chromium software release

parent 50131f18
[template-cfg] [template-cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 0a2a190d4b392a4b101fdd53baf73c35 md5sum = 39b836260a86fde229f49d83c09c137d
[instance-headless-chromium] [instance-headless-chromium]
_update_hash_filename_ = instance_headless-chromium.cfg.in _update_hash_filename_ = instance_headless-chromium.cfg.in
md5sum = 046a3e363f679f43ecf94313479462f5 md5sum = a4018b6bfd3c74386ed0d16edcd00880
[template_launcher] [template-launcher]
_update_hash_filename_ = templates/launcher.in _update_hash_filename_ = templates/launcher.in
md5sum = b03e36cfa43a82fac297e12013899bfc md5sum = 4a4d9e6a2dbb347eba83a37817d0af63
...@@ -8,12 +8,8 @@ offline = true ...@@ -8,12 +8,8 @@ offline = true
[profile-common] [profile-common]
dash_location = {{ dash_location }} dash_location = {{ dash_location }}
liberation_fonts_location = {{ liberation_fonts_location }} chromium_wrapper = {{ chromium_wrapper }}
fontconfig_location = {{ fontconfig_location }}
chromium_location = {{ chromium_location }}
template_launcher = {{ template_launcher_target }} template_launcher = {{ template_launcher_target }}
runtime_libraries = {{ runtime_libraries }}
template_fontconfig = {{ template_fontconfig }}
[instance-headless-chromium] [instance-headless-chromium]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
......
...@@ -7,41 +7,26 @@ eggs-directory = {{ buildout['eggs-directory'] }} ...@@ -7,41 +7,26 @@ eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }} develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
offline = true offline = true
# Create the directories that we need. We just have: # Create the directories that we need. We just have /etc/service
# /etc/service
# /etc/fonts
# /tmp/fontconfig-cache
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory} home = ${buildout:directory}
etc = ${:home}/etc etc = ${:home}/etc
tmp = ${:home}/tmp
[basedirectory] [basedirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
service = ${directory:etc}/service service = ${directory:etc}/service
fontconfig_cache = ${directory:tmp}/fontconfig-cache
[headless-chromium] [headless-chromium]
ip = ${slap-network-information:global-ipv6} ip = ${slap-network-information:global-ipv6}
port = 8081 port = 8081
url = https://example.com
remote_debug_url = http://[${:ip}]:${:port} remote_debug_url = http://[${:ip}]:${:port}
bin_chromium = {{ parameter_list['chromium_location'] }}/headless-chromium chromium_wrapper = {{ parameter_list['chromium_wrapper'] }}
bin_launcher = ${basedirectory:service}/launcher bin_launcher = ${basedirectory:service}/launcher
bin_shell = {{ parameter_list['dash_location'] }}/bin/dash bin_shell = {{ parameter_list['dash_location'] }}/bin/dash
fontconfig_target = ${directory:etc}/fonts.conf
[default-fonts]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_fontconfig'] }}
rendered = ${headless-chromium:fontconfig_target}
context =
key fonts {{ parameter_list['liberation_fonts_location'] }}
key includes {{ parameter_list['fontconfig_location'] }}/etc/fonts/conf.d
key cachedir ${basedirectory:fontconfig_cache}
[launcher] [launcher]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_launcher'] }} template = {{ parameter_list['template_launcher'] }}
......
...@@ -4,8 +4,6 @@ extends = ...@@ -4,8 +4,6 @@ extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
../../component/headless-chromium/buildout.cfg ../../component/headless-chromium/buildout.cfg
../../component/dash/buildout.cfg ../../component/dash/buildout.cfg
../../component/fonts/buildout.cfg
../../component/fontconfig/buildout.cfg
parts = parts =
slapos-cookbook slapos-cookbook
...@@ -19,14 +17,10 @@ filename = instance.cfg.in ...@@ -19,14 +17,10 @@ filename = instance.cfg.in
mode = 0644 mode = 0644
context = context =
section buildout buildout section buildout buildout
key chromium_location chromium:location
key dash_location dash:location key dash_location dash:location
key liberation_fonts_location liberation-fonts:location key chromium_wrapper chromium-wrapper:location
key fontconfig_location fontconfig:location key template_launcher_target template-launcher:target
key template_launcher_target template_launcher:target
key template_instance_headless_chromium_target instance-headless-chromium:target key template_instance_headless_chromium_target instance-headless-chromium:target
key template_fontconfig template-fonts-conf:output
key runtime_libraries chromium:libraries
[download-base] [download-base]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
...@@ -36,5 +30,5 @@ mode = 0644 ...@@ -36,5 +30,5 @@ mode = 0644
[instance-headless-chromium] [instance-headless-chromium]
<= download-base <= download-base
[template_launcher] [template-launcher]
<= download-base <= download-base
#! {{ param_chromium_headless['bin_shell'] }} #! {{ param_chromium_headless['bin_shell'] }}
# Load runtime dependencies. # Run headless Chromium
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{{ param_chromium_headless['runtime_libraries'] }} exec {{ param_chromium_headless['chromium_wrapper'] }} \
--remote-debugging-port={{ param_chromium_headless['port'] }} \
# If FONTCONFIG_FILE is not set, Chromium will complain on startup. param_chromium_headless['url']
FONTCONFIG_FILE={{ param_chromium_headless['fontconfig_target'] }}
# Run headless Chromeium
exec {{ param_chromium_headless['bin_chromium'] }} \
--remote-debugging-port={{ param_chromium_headless['port'] }}
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