Port headless Chromium to SlapOS
This merge request port Chromium to SlapOS in headless mode.
Some notes:
- The repo of Chromium and its dependencies are extremely big. ~19G after completely fetch. So be patient when fetch and building it...
- Use the
fetch
andgclient
command provided bydepot_tools
to fetch and synchronize source code. Do not use plaingit
unless you understand the chromium repo deeply. Because to the dependencies relationship of chromium is complicated. Plaingit
may only fetch or update part of repo[1]. Then the revisions of different dependencies are inconsistent. In this situation, you have to re-do everything from scratch. Which is time-consuming. -
fetch
command only could work in an empty dir. Usegclient
to update code. - Each version of
chromedriver
(required byselenium
) only support 3 major version of Chrome[2]. It often 2 version behind the latest Chromium. For example, the latestchromedriver
2.28 only support 55-57. And the latest Chromium is 59[3]. If you want to update the version. Please make sure thechromedriver
could fit them. - The Chromium can run manually by
./chrome --headless --no-sandbox --disable-gpu
. (Make sure you already usexvfb
to start a display and set proper system path). - The
[chromium-download]
will fetch Chromium source code in${buildout:parts-directory}/src
directory. This directory created byfetch
command. Then the[chromium]
section will enter this repo to fetch additional libs bygclient runhooks
. So the repo will contaminant by this command. Be careful this when you need to rebuild Chromium or re-run the[chromium-download]
section.
1. https://www.chromium.org/developers/how-tos/get-the-code/working-with-release-branches
2. https://sites.google.com/a/chromium.org/chromedriver/downloads