Ebuild repository/de

An ebuild repository is Article description::a file-structure that can provide packages for installation on a Gentoo system. Ebuild repositories contain, , and other types of descriptive metadata files that supply  with packages,  , , etc.

The Gentoo ebuild repository is Gentoo Linux's primary and official ebuild repository - it contains all the information needed to build and install every package that makes up Gentoo. Additional ebuild repositories, such as, can be configured with Portage, to provide even more packages.

Portage will install the latest available version of a package from any configured ebuild repository, by default. If the latest available version is provided by several ebuild repositories, it will be chosen according to a set order of priority - hence the colloquial name overlay.

Administrators of Gentoo systems can configure additional ebuild repositories with Portage by using the utilities and methods described below.



The Gentoo ebuild repository
The Gentoo ebuild repository is the main ebuild repository for a Gentoo Linux system, and is where all the packages come from by default. It is maintained on the gitweb.gentoo.org server, and gets synchronized to local machines (in ), to be available to.

The Gentoo ebuild repository contains  files that tell Portage how to build and install each package. The ebuilds come with metadata, dependency information, and everything else needed to get a package in working order.

The provides the package's name, version, where to get sources from, available, , website etc. Dependency information in ebuilds allows Portage to pull in any other packages required to build and run a package that is to be installed - no more, no less. Dependencies are very granular in Gentoo, they will even vary depending on what use flags are selected, for ultimate selectivity. Perhaps most importantly, ebuilds contain the information required to, (compile), , and  each package - usually from a project's own source code.

In addition to ebuilds, the Gentoo ebuild repository contains the official , which define the default state of, default values for most variables found in , the , etc.

The Gentoo ebuild repository is also the place where  are posted, which is why any new news items will be highlighted after a Gentoo ebuild repository synchronization.

The Gentoo ebuild repository, and it's ebuilds, are maintained by the Gentoo developers and other.



Where do ebuild repositories come from?
Because an ebuild repository is simply a structure of files and directories, a new ebuild repository can be made available to Portage simply by copying those files and directories to a location known to Portage. The ebuild repositories and their files are usually under, but the location of repositories configured for Portage is specified in. Ebuild repositories can be configured on any accessible filesystem however, even on an or  filesystem - allowing them to be stored on a network or Internet server.

As previously discussed, the Gentoo ebuild repository is hosted on gitweb.gentoo.org. That server also hosts other ebuild repositories.

In practice, any additional ebuild repositories usually aren't just copied to a directory by hand and configured for Portage (meaning added to ). Generally, new repositories are made available by third parties, and once configured for Portage, are synchronized by Portage. Synchronization mirrors all the files from a remote location to a locally available filesystem, as configured.

Because ebuild repositories are just file-structures, many methods can be used to synchronize them, and Portage offers several possibilities. is the default synchronization method, is also popular. The synchronization method is specified in when configuring a repository, along with the information needed to retrieve it.

Verfügbare Software
Use the tool to easily add, disable, or remove ebuild repositories configured with Portage. This tool also provides a handy way to list and add repositories available through being registered on repos.gentoo.org.

Ebuild repositories can always be configured manually, by editing.

New ebuild repositories for use with Portage can also be.

The list of active ebuild repositories can be obtained through the output of one of the following commands:



Installing packages from other repositories
Packages from repositories other than the Gentoo ebuild repository can be installed with the command, just as usual.

For example, once the repository is added, to install the x11-misc/xbanish package from that repository:

Note that the repository is not specified in the command. The "::guru" appended to the package atom in the output shows what repository the package will be installed from. This works because the x11-misc/xbanish package is present in the GURU repository, but not in the Gentoo repository.

If multiple versions of the same package are available from two or more different ebuild repositories, Portage will install the most recent version.

If the latest version of a package is available from more than one ebuild repository, the repository with the highest priority will be used. The priority can be set for an ebuild repository in. The Gentoo ebuild repository has a default priority set to, and the default if a priority is not set for a repository is. If several ebuild repositories have the same priority (such as two or more not having any priority set, so having priority ), the order is undetermined - a package to install will be selected arbitrarily.

It is possible to instruct to install a package from a specific ebuild repository with the    (can be used for different emerge instructions, e.g. uninstalling a package through  ):

See the repository management section to see how to list repositories configured for portage with their respective priorities.



Repository synchronization
Ebuild repositories should be synchronized, so that the local mirrors will reflect a recent state of the repositories. This is necessary to be able to, and current software.

Siehe den Sync (Portage Projekt) Artikel und.

To sync all repositories for which  is set, run  with the   switch (  for short). This is usually the command that should be run regularly, before system updates and package installation (and is equivalent to using the old command):

To sync the foo repository (irrespective of the foo auto-sync setting):

To sync all repositories with a valid sync-type and sync-url defined (ignoring auto-sync settings):

See for information on how to use the portage synchronization commands. See the article about migrating to the new modular sync system from Portage version 2.2.16, it contains important information, notably for users of, , and.

Zwischenspeichererstellung
When large ebuild repositories are installed, Portage may take a long time to perform operations like dependency resolution. This is because ebuild repositories do not usually contain a metadata cache.

Generate a local metadata cache by running after syncing the ebuild repositories:

Be careful, because takes a lot of time and it's not recommended for rsync users as rsync updates the cache using server-side caches (most of users of portage are rsync users). Rsync users should simply use emaint (or ) to regenerate the cache. It's probably only users of very large ebuild repositories should try.

Ein eingerichtetes aber unsicheres Repositorium maskieren
When using large ebuild repositories or those with unknown/low quality code, it is best practice to hard mask the whole ebuild repository and only accept specific ebuilds on a case-by-case basis. For example, for an overlay named "repository-foobar":

Then add the specific package(s) from the repository-foobar overlay so that they will be available visible to Portage for installation:

After the above unmask, the package named "foo-category/bar" should be available and none of the other packages from the repository-foobar overlay will be available.

Siehe auch

 * - Section in the Gentoo Handbook
 * - This document is kept only for historical purposes. The current guide is maintained as.
 * - A user guide written by the Overlay project.
 * - The official Gentoo project for ebuild repositories' support.

Externe Ressourcen

 * https://repos.gentoo.org
 * https://github.com/gentoo/
 * https://gpo.zugaina.org/Overlays