Choose how packages are built (configs)

A Portage config is a set of settings for how packages are built. Without one, you get Gentoo’s defaults.

Builds > Portage configs.

The list of Portage configs showing kaji/server and its files

The shared config kaji/server, with the files it is made of.

You fill in fields instead of writing files:

Field

What it does

Profile

A Gentoo profile such as default/linux/amd64/23.0/desktop. Empty keeps the default.

USE

Flags that switch features on and off: -X -gtk -qt5 -systemd builds without a desktop. A - turns one off.

Accept keywords

~amd64 accepts testing packages.

Accept license, CFLAGS, CXXFLAGS, CPU flags, L10N, video cards, input devices

The usual build variables.

Other make.conf lines

Anything else, as VARIABLE="value" lines or # comments.

package.use, package.accept_keywords, package.license, package.mask, package.unmask, package.env

Settings for single packages, one entry per line: app-misc/jq static-libs.

Other files

Anything else, as YAML: path and content.

Use a config

In a package build, tick it under Portage configs. When you tick several, their order is their priority: the one higher up has the last word on a setting they share.

The root filesystem you make from the build uses the same config; leave its own field empty.

Hardened amd64 servers

Every plan can inspect these public configs under Builds > Portage configs. To use their profiles in a package or root filesystem build, the organization that owns the build needs Teams or Enterprise. This also applies to inherited configs and retries.

  • kaji/hardened-amd64-server and -openrc select Gentoo’s hardened glibc/OpenRC profile.

  • hardened-amd64-server-systemd selects glibc with systemd.

  • hardened-amd64-server-selinux-systemd selects default/linux/amd64/23.0/hardened/selinux/systemd.

  • hardened-amd64-server-musl-openrc and hardened-amd64-server-musl-systemd select the experimental hardened musl profiles.

The price of settings

Every flag you set away from Gentoo’s defaults means ready-made packages (see Take ready-made packages (pull from)) no longer match for the packages it touches, and for what depends on them. Those are then compiled. A shared config such as kaji/server (no X, GTK, Qt or systemd) is a good start for servers.

Tip

Open a config you can see but do not own to read what is in it: a public config is shown read-only, with every setting filled in.

The read-only page of the config kaji/server with its USE flags, compiler flags and package settings

kaji/server: no X, GTK, Qt or systemd, -O2 -pipe, and a few package settings.