# 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.
# 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.)
# TODO: so there's a funny little issue: because we didn't clone the full repository history, some automated tools can't figure out the version number (well, actually the appropriate commit hash). This causes the frontend for the remote debugging port to crash, because it was expecting a version number. I see a few possible fixes:
# 1. Clone the full repository. But this blows up the size, from ~25 GB to ~100 GB.
# 2. Patch the C++ version API (see src/components/version_info) before compiling, to hard-code the number in.
# 3. Patch the frontend JS (not sure where it is) before compiling.
# 4. Proxy the connection and patch the server's response on the fly.
# The correct commit hash for this particular version should be 3aad95ffffff0767e9b7d161885aa811de1f2195, which you can verify at https://github.com/chromium/chromium/commit/3aad95ffffff0767e9b7d161885aa811de1f2195 and find by searching on https://chromium-review.googlesource.com/c/chromium/src/.
[chromium-download]
# There's nothing special about version 91.0.4472.132. It just happened to be
# the current Chromium stable version at the time of writing.
# TODO: set source URL as a parameter to avoid duplication?
[chromium-source]
recipe = plone.recipe.command
# This revision is 56.0.2924.122. Because the chromedriver only support some certain
# version. Which version 56 is in the middle of 55-57.
# Possible foot-gun: if you specify PATH=...:$PATH, it will literally insert the string '$PATH' on your PATH; buildout won't do the expansion unless you use %(PATH)s
# TODO: make sure it's appropriate for SlapOS components to depend on things in /bin, /usr/bin, etc.