From Gentoo Wiki
Jump to:navigation Jump to:search

Chromium and Chromium-Tooling related packaging notes

This section contains notes on Chromium and related packages.

Comments in ebuilds take precedence over notes in a wiki - if a comment is wrong fix it!

Google roll their bundled Clang every two weeks, and the bundled Rust is rolled regularly and depends on that. While we do our best to build with system Clang, we will eventually hit the point where we need to use the bundled Clang due to the use of prerelease features. We've been lucky enough so far that this hasn't been an issue.

We try and avoid forcing the use of libcxx, but sometimes it is unavoidable. Remember to force the use of Clang when this is forced.

GCC is _not_ supported upstream, though patches are welcome. We do our best to enable builds with GCC but reserve the right to force Clang builds if we can't keep up with upstream's changes. Please comment when forcing Clang builds so we can track the need for it.

GN is bundled with Chromium, but we always use the system version. Remember to check for upstream changes to GN and update ebuild as required.

Bumping `dev-util/gn`

Chromium relies on an ever-updating bundled copy of dev-util/gn. Gentoo packages this separately to enable better cross-compilation (and to share the dependency between packages).

This means that without regular updates to the gn ebuild eventually we will see breakage (seebug #914370 for an example).

As a matter of typical Chromium ebuild maintenance we should bump the gn ebuild (and version requirement in every time a new 0/beta keyword is added - that should provide sufficient time for it to be stablised on the arches that we care about before the chromium release hits stable.

To generate a new gn release tarball:

user $cd gn
user $git describe HEAD --abbrev=12 # The version number is derived from this
user $git config --global tar.tar.xz.command "xz -T0 -9 -c"
user $git archive --format=tar.xz -o /tmp/gn-${PV}.tar.xz --prefix=gn-${PV}/ main
FILE /data/development/chromium-utils/

commit=$(git describe --tags)
[[ $commit =~ $pattern ]]

git archive --format=tar.xz --prefix=gn-0.${count}/ -o /tmp/gn-0.${count}.tar.xz HEAD

Bumping `www-client/google-chrome`, `www-client/microsoft-edge`, `www-client/opera`

Google Chrome and Microsoft Edge are binary packages which are updated frequently. Anyone can submit a PR to update the existing ebuilds and the process is (mostly) automated.

All of the automation is found within the chromium-tools repository. The chrome-bump, edge-bump, opera-bump scripts will automatically update the ebuilds and manifest files, and create a commit. If /var/db/repos/gentoo is not a full copy with git history, update the scripts to point to a repository that is - Portage needs to know about the repository (i.e. it needs to be in repos.conf - ensure that profiles/repo_name lines up with what Portage expects!). The Gentoo Mirror on Github is ideal as the resulting commits can be directly PR'd.

Ensure that you use the same python impl as Portage or the scripts will fail to import portage components.
user $cd chromium-tools
user $./chrome-bump
user $./edge-bump
user $./opera-bump