Commit d91750c5 authored by Eric Zheng's avatar Eric Zheng

component/headless-chromium: switch to slapos.recipe.build:gitclone

parent 0c0706e4
......@@ -18,34 +18,31 @@ parts =
# 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.)
# Note that the Chromium project recommends using their own `fetch' tool
# rather than doing a `git clone', but it should work just fine.
[chromium-source]
recipe = slapos.recipe.build:gitclone
repository = https://chromium.googlesource.com/chromium/src.git
revision = ${:version}
# 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?
# TODO: change to use either slapos.recipe.build:gitclone or depot tools fetch. Note that if you use gitclone, set develop = true.
[chromium-source]
recipe = plone.recipe.command
path = ${buildout:parts-directory}/${:_buildout_section_name_}
version = 91.0.4472.132
command =
PATH=$PATH:${git:location}/bin
rm -rf ${:path}
mkdir -p ${:path}
cd ${:path}
git clone https://chromium.googlesource.com/chromium/src.git
cd src
git checkout ${:version}
name = ${:_buildout_section_name_}
path = ${buildout:parts-directory}/${:name}
[chromium]
recipe = slapos.recipe.cmmi
path = ${chromium-source:path}/src
path = ${chromium-source:path}
location = ${:path}/out/headless
# Configuration file for GN, the tool to build the actual compilation configuration file.
# Configuration file for GN, the tool to build the actual compilation
# configuration file.
default-gclient-config =
solutions = [
{
"name": "src",
"url": "https://chromium.googlesource.com/chromium/src.git",
"name": "${chromium-source:name}",
"url": "${chromium-source:repository}",
"managed": False,
"custom_deps": {},
"custom_vars": {},
......@@ -62,7 +59,7 @@ build-config-options =
# Create a headless build configuration.
configure-command =
# Sync build dependencies---this is a little finnicky.
echo '${:default-gclient-config}' > ${chromium-source:path}/.gclient
echo '${:default-gclient-config}' > ${buildout:parts-directory}/.gclient
gclient sync --revision ${chromium-source:version}
gclient runhooks
# Generate build configuration files.
......@@ -75,11 +72,9 @@ configure-command =
make-binary =
autoninja -C ${:location} headless_shell
environment =
# 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.
PATH=${depot_tools:location}:${gperf:location}/bin:${pkgconfig:location}/bin:${coreutils:location}/bin:${git:location}/bin:${curl:location}/bin:%(PATH)s
# Runtime libraries
# Make sure to compile libraries needed at runtime
runtime-libraries =
${nspr:location}/lib
${nss:location}/lib
......
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