Commit 4f42e59c authored by Eric Zheng's avatar Eric Zheng

component/headless-chromium: remove PATH and LD_LIBRARY_PATH from wrapper

parent a973e5c1
[buildout]
extends =
# Build dependencies: note that bash, bzip2, getconf, grep, tar, and xz are already in /bin and /usr/bin
# TODO: I think findutils is only here to expose xargs, which is already in /usr/bin, so see if we can get away with not requiring it
# If the Python version doesn't default to 2, it might be necessary to include Python 2 as a component and then prepend it to the PATH or some similar trick.
# Build dependencies:
../coreutils/buildout.cfg
../curl/buildout.cfg
../depot_tools/buildout.cfg
......@@ -18,15 +16,6 @@ extends =
parts =
chromium-wrapper
# Note that we'll need to proxy the websocket connection to the headless
# Chromium shell, for several reasons. The web server that Chromium
# spins up refuses HTTP requests unless the Host header is localhost or
# an IP address [0], but we need SSL (i.e. wss://) because the frontend
# page is loaded over HTTPS, and the mixed-content policy prevents us
# from loading an ordinary ws:// connection.
# [0] Security issue; see
# https://bugs.chromium.org/p/chromium/issues/detail?id=813540
# TODO: it may be more appropriate to manage our own copy of depot_tools, because I think some of the "gclient sync" commands may modify depot_tools, which could be problematic if other components or software releases depend on a shared copy, and at any rate it causes some build errors: when updating depot_tools, git complains because HEAD has been moved. Is there a way to guarantee a private copy? (This may be a moot point, since I don't think it's used by anything else, anyway, and trying again fixes the git issue.)
# There's nothing special about version 91.0.4472.132. It just happened to be
......@@ -83,9 +72,6 @@ configure-command =
# You can run the headless Chromium shell using
# ${:location}/headless-chromium --remote-debugging-port=1234
# Note that your client browser must be Chromium-based, since Firefox
# and Safari do not support constructible stylesheets yet (see e.g.
# https://bugzilla.mozilla.org/show_bug.cgi?id=1520690).
make-binary =
autoninja -C ${:location} headless_shell
environment =
......@@ -98,11 +84,6 @@ runtime-libraries =
${nspr:location}/lib
${nss:location}/lib
# Runtime path
# TODO: see if this part is really necessary
runtime-path =
${fontconfig:location}/bin
promises =
${:location}/headless_shell
......@@ -136,14 +117,9 @@ install =
part = self.buildout[os.path.basename(chromium)]
with open(location, 'w') as f:
f.write("""#!/bin/sh -e
cd {}
export LD_LIBRARY_PATH={}
export PATH={}:$PATH
[ -z $FONTCONFIG_FILE ] && export FONTCONFIG_FILE=${default-font-config:rendered}
exec ${chromium:path}/out/headless/headless_shell "$@"
""".format(
chromium,
':'.join(part['runtime-libraries'].split()),
':'.join(part['runtime-path'].split()),
))
os.fchmod(f.fileno(), 0o755)
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