From Gentoo Wiki
Jump to:navigation Jump to:search

LLVM release cycle

LLVM follows a biannual major release cycle. Every six months a new major release is branched out. After a few RCs, x.0.0 release is made. Afterwards, fixes are collected for a bugfix release. Again, after a few RCs x.0.1 release is made.

Handling LLVM releases

New release branches

When upstream creates a new release branch (e.g. release/13.x), main becomes the next major version. We need to update the live ebuilds for that, that is:

  1. Update _LLVM_MASTER_MAJOR in to the new major version (e.g. 14). This will switch all existing to the release/13.x branch.
  2. Update _LLVM_KNOWN_SLOTS in llvm.eclass
  3. Bump the live ebuilds for the new main version (e.g. copy *- to *- (sys-devel/llvmgold from 13 to 14.

Release candidates

Once upstream starts tagging RCs, create unkeyworded ebuilds for them:

  1. Clone the repository, select the latest gentoo* tag, fetch from upstream, rebase against upstream release tag and release the patchset.
  1. Copy the old live ebuilds into _rcN ebuilds and the eclass handles the rest (e.g. to 13.0.0_rc1).

Final releases

The process is pretty much the same as for RCs. The only differences are:

  1. Ebuilds get regular ~arch keywords.
  2. Copy generated manpages from sys-devel/llvm and sys-devel/clang to a dist tarball, and switch the ebuild to LLVM_MANPAGES=pregenerated.

x.0.1 release

Upstream generally makes one bugfix release to each major version. Once x.0.1 final is packaged, you can remove the corresponding live ebuilds.


user $git remote add upstream
user $git fetch --all --tags
user $# Assuming current version is 14.0.0 and we're bumping to 14.0.1
user $git checkout gentoo-14.0.0
user $git rebase llvmorg-14.0.1
user $# Make any relevant cherry-picks / backports which are missing upstream (hopefully none!)
user $# If you do, remember to add a Gentoo-Component trailer to the commit message!
user $# git cherry-pick -x ...
user $# Create the patchset tarball (from mgorny-dev-scripts)
user $llvm-patchset 14.0.1

Bump the ebuilds generically:

user $# Enter git repository
user $cd ~/git/gentoo
user $# Run llvm-foreach-pkg (from mgorny-dev-scripts)
user $git add -A
user $# Update LLVM_PATCHSET in each of the ebuilds
user $llvm-foreach-pkg pkgdev manifest
user $llvm-foreach-pkg pkgcommit -sS . -m "Bump to 14.0.1"

Do not push yet. Generate the man pages tarball by building LLVM with man page generation enabled:

user $ebuild sys-devel/llvm/llvm-14.0.1.ebuild clean install
user $# Copy the man pages out
user $mkdir -p /tmp/llvm-manpages/{clang,llvm} && cd /tmp/llvm-manpages
user $mv /var/tmp/portage/sys-devel/llvm-14.0.1/work/llvm-14.0.1_build-abi_x86_64.amd64/docs/man/* /tmp/llvm-manpages/llvm/
user $# Ditto Clang
user $ebuild sys-devel/clang/clang-14.0.1.ebuild clean install
user $# Copy the man pages out
user $mv /var/tmp/portage/sys-devel/clang-14.0.1/work/x/y/clang-abi_x86_64.amd64/docs/* /tmp/llvm-manpages/clang/