Gentoo Build Publisher (GBP) is a Gentoo build server, binary package host (binhost), ebuild repo server, and configuration manager in one which uses continuous integration and other tools to deliver successful, consistent "builds" for a single machine or multiple heterogeneous Gentoo machines.
In case you didn't know, Gentoo Linux is a source-based rolling-release meta-distribution that you can twist and mold into pretty much anything you like. That's just a verbose way of saying Gentoo is awesome.
If you run a Gentoo system, say a laptop, you may be updating your system
using the standard emerge --sync
followed by a world update. This pulls in
the latest ebuilds from the Gentoo repo and if there are any updates
applicable to your system then they get built on your system.
Except sometimes they don't.
Sometimes builds fail. Sometimes USE
flags need to be changed. Sometimes
there's an update to a piece of software that is buggy and you want to revert.
Sometimes a build takes a long time and you don't want to wait.
Well since Gentoo is the distribution you build yourself, CI/CD seems like a natural fit. Enter Gentoo Build Publisher.
Gentoo Build Publisher combines a repo/overlay server, basic configuration management, and binary package server (binhost) for complete and atomic builds. Successful builds performed by Jenkins are served by GBP where client machines sync from.
- Build a Gentoo Build Publisher instance. Refer to the Install Guide.
- Create "machines" and "repos" jobs in Jenkins. For example
gbp addrepo gentoo https://anongit.gentoo.org/git/repo/gentoo.git; gbp addmachine base https://github.com/enku/gbp-machines.git
Use the gbp-machines repo as a starting point. This can also be done manually within the Jenkins UI. - Once a Jenkins job has been pulled by Gentoo Build Publisher it can be
published so that actual machines can use it (e.g. rsync for repos, http for
binpkgs). Use the CLI (
gbp publish
) to publish a pulled build. - If the job fails, it will not be pulled.
- Your real machine, for example,
base
, syncs from,rsync://gbp/repos/base/gentoo
. You can dynamically acquire therepos.conf
file fromhttps://gbp/machines/base/repos.conf
and thebinrepos.conf
fromhttps://gbp/machines/base/binrepos.conf
.
The command-line interface can inspect, publish, pull, schedule builds and more.
Below are some articles that explain some aspects of Build Publisher in detail.
- Introducing Gentoo Build Publisher: June 2021
- Exploring the Gentoo Build Publisher Dashboard: November 2021
- Getting failure logs: April 2022
- Installing Gentoo Build Publisher August 2022
- Rolling Back a Rolling Release with Gentoo Build Publisher: September 2022
- Bisecting GBP Builds to Find a Bad Package: April 2023
- Gentoo Build Publisher: Pro-Tip: Purging a Machine that is Disabled on Jenkins: August 2023
- Gentoo binary host, Gentoo Build Publisher version 2 & Plugins: January 2024
- Running arbitrary commands in a machine's chroot: February 2024
- Gentoo Build Publisher: Manually Running Repo Jobs: September 2024
- Gentoo Build Publisher: Using Separate Machines for Overlays September 2024