Quickstart guide
A more detailed documentation follows, starting from Contents section.
To get things moving follow these steps:
- Install gb-chroot with
host
USE flag on host and without it into target system - Configure
/etc/conf.d/gb-chroot
at the host and/etc/gb-chroot.conf
at the target - With
gb-install core2 amd64
you can create new chroot, named core2 and using amd64 stage3 (should be already downloaded) as a source - Configure the just-created chroot as required
- Use
gb-send-portage
on a target to populate chroot potage directories - Use
gb-upgrade-host
to upgrade everything - Use
gb-enter chroot_name emerge @host_name
to install all the required software in chroot and build corresponding binpkgs - Install
rsyncd
into host and configure it to serve portage tree - Install your preferred web-server into host and configure it to serve binpkgs
- Configure target systems to sync and get binpkgs from host
- Add
gb-update-host
intocron
using one of the supplied templates - At a later time use
gb-emerge anything
on target to start compiling a binpkg in chroot and then immediately emerge it on target if succeded
Contents
- Quickstart guide
- Contents
- Terminology
- Prerequisites
- Installation
- Available scripts
- Creating chroot
- Managing chroot
- gb-chroot service
- Managing target
- Managing host
- Emerging packages
- Using ccache
- Building Linux kernel
Terminology
Host is a system, that hosts all chroots. It could be a bare system, a KVM-guest.
Target is a system, which benefits from building binpkgs
elsewhere. Could be a number of similar systems, sharing portage configuration.
Chroot is a chroot environment, created within host system. It is a replica of target system in a way that it has identical configuration and all the packages, that are present on a target.
Prerequisites
If you’re planning to compile binpkgs for a different architecture, you might require qemu, supporting user-mode.
If your host is a kvm-guest, you might need to enable nested virtualization.
Installation
gb-chroot could be found in ::pf4public Gentoo overlay.
gb-chroot should be installed with USE flag host
into host system and without it (default option) into target and consequently chroot systems.
Available scripts
Creating chroot
- A chroot for a different CPU model should have a qemu binary to function. Append
qemu
togb-install
invocation, for example:gb-install arm32 armv7a_hardfp qemu
. This will install into chroot qemu from a host binpkg created prior withquickpkg app-emulation/qemu
Managing chroot
gb-chroot service
Managing target
Managing host
Emerging packages
USE=-pgo gb-enter haswell emerge ungoogled-chromium
USE=-pgo gb-emerge haswell ungoogled-chromium
USE=-pgo gb-emerge-all ungoogled-chromium
Using ccache
Building Linux kernel
UNINSTALL_IGNORE=”/var/run /var/lock”