Project:Prefix

To bring out the virtues of Gentoo Linux on different operating systems, the Gentoo Prefix project develops and maintains a way of installing Gentoo systems in a non-standard location, designated by a "prefix".

Usually, Gentoo Linux's package manager (Portage) installs in the root of the filesystem hierarchy known as. On systems other than Gentoo Linux, this usually results in problems, due to conflicts of software packages, unless the OS is adapted like Gentoo FreeBSD. Instead, Gentoo Prefix installs within an offset, known as a prefix, allowing users to install Gentoo in another location in the filesystem hierarchy, hence avoiding conflicts. Next to this offset, Gentoo Prefix runs unprivileged, meaning no root user or rights are required to use it.

By using an offset (the "prefix" location), it is possible for many "alternative" user groups to benefit from a large part of the packages in the Gentoo ebuild repository. Currently users of the following systems successfully run Gentoo Prefix: macOS on PowerPC and Intel, Linux on x86, x86_64 and arm, Solaris 11 on Sparc, Sparc/64, x86 and x86_64. Other platforms have been successfully used in the past.

Today, there up to 3 variants of Prefix:

1. RAP as in "RAP ain't Prefix"

For Android and Linux, using host kernel but it's own glibc. This is most similar to Gentoo Linux and does neither need the prefix-overlay nor baselayout-prefix once bootstrapped.

2. Prefix Guest

The original Prefix as invented, using (POSIX) host libc+kernel. This is the only option for non-Linux, such as macOS (Darwin) and Solaris (SunOS) hosts.

3. Prefix Stack

Use build environment (bash, python, portage, compiler, etc) from some base Prefix (traditionally Prefix Guest on Cygwin) to build packages for platforms (traditionally Win32 using MSVC toolchain) that would not allow for a native portage – but without the whole cross-compilation pain, because Cygwin can very well execute native Win32 binaries.

Bootstrapping
To get a prefixed Portage installed on your system, you need to go through a few steps we call bootstrapping. Note that, for systems where is missing, you need to bootstrap it first with the  script.

Helper scripts
To ease the setup of a prefixed Portage installation, the Gentoo Prefix project provides a script called. This script is a sort of kickstart in the bootstrap process, automating downloading the Portage tree, installing Portage and the necessary temporary helper applications. In addition, it tries to setup a profile and prepares those settings that it can deduce automatically.

Bootstrap guides
The following guides give a detailed description on how to install a Gentoo Prefix system:


 * General bootstrap process: for all systems and is recommended for general use.
 * Manual bootstrap process: legacy document meant for power-users and not recommended for general use.

Platform-specific notes

 * Android
 * Darwin (macOS)
 * Cygwin

Platform matrix
To keep track of the supported platforms, the following matrix is maintained. It also provides feedback on which developer is maintaining the platform or has direct access to such systems.

Legend:

Tested Prefix Installations
A community-maintained table is available here.

Resources
Resources offered by the prefix project include:
 * Technical documentation - How Gentoo Prefix works, and what changes are necessary to get ebuilds working.
 * Use cases - An article with a global overview of Gentoo Prefix, including use cases examplifying who could benefit from a Prefix installation.
 * FAQ - Frequently Asked Questions about the Gentoo Prefix project.
 * Gentoo On Unrooted Android - Gentoo Prefix on Android
 * Open bugs for Component PREFIX
 * Open bugs assigned to prefix@gentoo.org

Hall of Fame
Over time, developers come and go again. Some mysteriously disappear, others loose interest and decide to leave. For all past contributors we would like to express our gratitude towards them for helping the Prefix project to become what it is today.