Revision 113528165 of "Benutzer:Ulm/Portage (Software)" on dewiki{{Importartikel}}
{{Infobox Software
| Name = Portage
| Logo =
| Screenshot = [[Datei:Portage-oppdatering.png|250px]]
| Beschreibung = Portage gleicht die lokalen Daten ab
| Maintainer =
| Hersteller =
| Erscheinungsjahr = 2000
| AktuelleVersion = 2.1.11.31
| AktuelleVersionFreigabeDatum = 26. Oktober 2012
| AktuelleVorabVersion = 2.2.0_alpha161
| AktuelleVorabVersionFreigabeDatum = 24. Januar 2013
| Betriebssystem = [[Gentoo Linux]] und [[Gentoo/FreeBSD]]
| Programmiersprache = [[Python (Programmiersprache)|Python]]
| Kategorie = [[Paketverwaltung]]
| Lizenz = [[GNU General Public License|GPL Version 2]]
| Deutsch =
| Website = http://www.gentoo.org/proj/en/portage/
}}
'''Portage''' is a [[package management system]] used by [[Gentoo Linux]], based on the concept of [[ports collection]]s. Gentoo is sometimes referred to as a ''meta-distribution'' due to the extreme flexibility of Portage, which makes it [[operating system|operating-system]]-independent.<ref>[http://www.gentoo.org/main/en/about.xml Gentoo Linux - About Gentoo<!-- Bot generated title -->]</ref><ref>[http://tom.acrewoods.net/writing/gentoo-workstation My Workstation OS: Gentoo | Tom Chance's website<!-- Bot generated title -->]</ref><ref>[http://www.linuxdevcenter.com/pub/a/linux/2002/10/10/intro_gentoo.html LinuxDevCenter.com - Gentoo Linux Reloaded<!-- Bot generated title -->]</ref><ref>[http://www.osnews.com/story.php/1080/Interview-with-Gentoos-Daniel-Robbins/ Interview with Gentoo's Daniel Robbins<!-- Bot generated title -->]</ref> The [[Gentoo/Alt]] project is concerned with using Portage to manage other operating systems, such as [[BSD]]s, [[Mac OS X]] and [[Solaris (operating system)|Solaris]]. The most notable of these implementations is the [[Gentoo/FreeBSD]] project.
There is an ongoing effort called the Package Manager Specification project (PMS)<ref>[http://www.gentoo.org/proj/en/qa/pms.xml Gentoo's official Package Manager Specification (PMS) project]</ref> to standardise and document the behaviour of Portage, allowing the ebuild tree and Gentoo system packages to be used with alternate package managers such as Paludis and pkgcore. Its goal is to specify the exact set of features and behaviour of package managers and ebuilds, serving as an authoritative reference for Portage.
==Overview==
===Accessing Portage===
[[Image:Porthole-screenshot.png|thumb|180px|right|Porthole graphical frontend.]]
Portage is similar to the [[Berkeley Software Distribution|BSD]]-style [[package management system|package management]] known as [[Ports collection|ports]], and was originally designed with [[FreeBSD]]'s ports in mind.<ref>[http://www.gentoo.org/doc/en/articles/making-the-distro-p3.xml Gentoo Linux Documentation - Making the distribution, Part 3<!-- Bot generated title -->]</ref> Portage is written in the [[Python (programming language)|Python programming language]], and is the main utility that defines Gentoo. Although the system itself is known as Portage, it consists of two main parts, the ''[[ebuild]]'' system and ''emerge''. The ebuild system takes care of the actual work of building and installing packages, while emerge provides an interface to ebuild: managing an ebuild repository, resolving dependencies and similar issues. (These two therefore have roughly the same relation as [[RPM Package Manager|rpm]] has with [[Yellow dog Updater, Modified|yum]], or [[dpkg]] has with [[Advanced Packaging Tool|APT]].)
A [[GTK+]]-based GUI, '''[http://porthole.sourceforge.net Porthole]''', is available for working with Portage.
There is also the '''Himerge''' GUI, which stands for "Haskell Interface for eMerge".
===Functions provided===
Portage is characterized by its main function: [[Compiler|compiling]] from [[source code]] the packages the user wishes to install. In doing so it allows customization of compiler and target-application options to fit the system's specifications and the user's own wishes. Functionalities related to system management include: allowing parallel package-version installation, tracking cross-package [[Coupling (computer science)|dependencies]], managing a database of installed packages, providing a local ebuild repository, and synchronizing of the local Portage tree with remote repositories. Functionalities related to individual package installation include: specifying compilation settings for the target machine and choosing package components.
Portage distinguishes between three levels of stability in ebuilds: ''stable'' (e.g., the software works as intended with no known [[Software security|security issues]] at time of release), ''keyword masked'' (mainly for packages that have not been sufficiently [[Software testing|tested]] on the target system architecture to be considered stable) and ''hard masked'' (broken or very insecure) packages.
==Features==
===Emerge===
The '''emerge''' command-line tool is the heart of Portage. The command is customizable with many options and modifiers. The emerge tool is the most important utility for accessing the features of Portage from the [[command line]].
The program calculates and manages dependencies, executes ebuilds and maintains the local Portage [[Tree structure|tree]] and database of installed packages. The compilation settings used by ebuilds can be changed through the [[CFLAGS]] [[environment variable]], based on the specifications of the individual computer and on the user's desire for optimization. The emerge utility executes ebuilds in a [[sandbox (security)|sandbox]] environment. This way the system is protected from software executed by the ebuild and resulting binaries are only merged after a successful build and sandboxed install.
What emerge installs as dependencies is affected by the USE flag-settings. They decide which optional features will be included when installing or upgrading an application. The emerge command can also be used to download and install precompiled binary files.
===USE flags===
The Portage system offers the use of "USE flags", which allows users to indicate which software features they would like to include (and exclude) while building packages. For example, there is a USE flag to include [[DVD]] support, where available, in packages compiled with the flag enabled. The USE flags affect which [[Coupling (computer science)|dependencies]] are required, generally affecting which optional features will be built into a given program when it is compiled. For example, in packages which use a [[configure script]], the USE flag <code>feature</code> would translate to <code>./configure --with-feature</code>.
The specification of USE flags is the usual way to configure programs on Gentoo. USE flags may be set manually, or via user-friendly tools such as 'ufed' (USE flag editor), which lists flags along with their description. A list of available USE flags is available in the [http://www.gentoo.org/dyn/use-index.xml "Gentoo Linux Use Variable Descriptions" page of the Gentoo website].
===ebuild===
{{Main|ebuild}}
Gentoo does not, by default, use binary packages as other [[package management system]]s do (like [[RPM Package Manager|RPM]]), employing instead a format known as the ebuild. Whereas RPMs are precompiled [[binaries]], ebuilds are [[shell script]]s with variables and functions which contain a description of the software, and instructions on how to obtain, configure, [[compiler|compile]], and install it, more closely akin to (but more powerful than) the [[RPM Package Manager#Spec file|.spec files]] distributed in [[SRPM]]s. There are over 27,000 ebuilds available, the majority of which are distributed by the Gentoo [[Mirror (computing)|mirrors]]. New and updated ebuilds can be obtained by synchronizing the local ebuild repository with the mirrors. This is done by executing the command <tt>emerge --sync</tt>. Historically, Gentoo has provided pre-compiled binary packages for many common programs, especially those which are lengthy to compile, such as [[Mozilla Firefox]] and [[OpenOffice.org]]. These are still installed with emerge, just by appending a "-bin" to the package name to instead install the binary version.
Ein '''Ebuild''' ist ein [[Skriptsprache|Skript]], das Informationen über ein Programmpaket enthält und dessen [[Installation (Computer)|Installation]] steuert. Das Ebuild-Format ist eine [[domänenspezifische Sprache]], die [[Bourne-again shell|bash]] als Grundlage hat. Es wird in [[Gentoo Linux]] für die [[Paketverwaltung]] verwendet, z. B. vom Paketmanager [[Gentoo Linux#Portage|Portage]].
==== Aufbau ====
Ebuilds definieren zunächst einen festgelegten Satz von [[Variable (Programmierung)|Variablen]]. Diese enthalten zum einen Informationen für den Benutzer, wie etwa eine Kurzbeschreibung des Pakets oder den [[Uniform Resource Identifier|URI]] der [[Homepage]]. Andere Variablen werden vom Paketmanager ausgewertet, beispielsweise die Information, von wo der [[Quelltext]] [[Download|heruntergeladen]] werden kann, die [[Lizenz]] des Pakets oder für welche [[Rechnerarchitektur]]en es unterstützt wird. Auch Abhängigkeiten von anderen Paketen wie [[Programmbibliothek]]en, die für das Programm benötigt werden, können durch Variablen spezifiziert werden.
Danach werden in der Regel mehrere [[Funktion (Programmierung)|Funktionen]] definiert, die Anweisungen zum [[Archiver|Auspacken]], [[Patch (Software)|Patchen]], [[Compiler|Kompilieren]] und [[Installation (Computer)|Installieren]] der Software enthalten. Für die meisten Funktionen gibt es einen vom Paketmanager vorgegebenen [[Voreinstellung|Default]], so dass nicht jedes Ebuild alle Funktionen definieren muss. Wenn ein Programmpaket beispielsweise nach dem Auspacken nur mit der Standard-Befehlssequenz ''./[[configure]], [[make]]'' und ''make install'' kompiliert und installiert werden kann, so käme das zugehörige Ebuild ganz ohne die Definition spezieller Funktionen aus.
==== Benennung ====
Die Benennung von ebuilds erfolgt nach einem strengen 4-teiligen Schema:
# Der Allgemeine Paketname, wie z. B. [[KDE|''kde'']] oder ''[[mod_php]]'' sollte nur aus Kleinbuchstaben, Ziffern und einer beliebigen Anzahl von einzelnen Bindestrichen ('-') oder Unterstrichen ('_') bestehen
# Die Version des Paketes sollte übereinstimmen mit der Version des Archives, das zur Installation genutzt wird. Heißt das Archiv also programm-2.5.9.tar.gz, so sollte die angegebene Version im ebuild auch 2.5.9 lauten.
# Der letzte Teil ist optional und beinhaltet [[Suffix]]e wie [[Alpha-Version|alpha]], [[Beta-Version|beta]], pre oder [[Release Candidate|rc]] und bestimmt somit die angegebene Version im 2. Teil näher.
# Die Revisionsnummer ist optional und wird nur verwendet, wenn das ebuild verbessert wurde (z. B. wenn zusätzliche [[Patch (Software)|Fehlerbereinigungen]] hinzugefügt werden, aber das Ebuild weiterhin dieselbe Software-Version installiert (sogenannter "revisionbump")).
# Zwar kein Teil des ebuilds, dennoch sehr wichtig ist die Dateiendung '.ebuild'.
Beispiel:
make-3.82-r4.ebuild
==== Eclass ====
Um das Schreiben von ebuilds für die Entwickler zu vereinfachen, gibt es sogenannte eclasses. In diesen werden Funktionen für immer wiederkehrende Aufgaben eingetragen, wie z.B. das Erstellen eines [[Concurrent Versions System|CVS]]-Ebuilds oder Funktionen zur Installation eines [[Linux (Kernel)|Linux-Kernels]].
===Binary packages===
Gentoo does have a binary packaging format, which is a ''.tbz2'' file ([[tar (file format)|tar]] with [[bzip2]] compression) with additional [[metadata]]. This feature enables the building of binary packages on one system (using Portage's <tt>buildpkg</tt> or <tt>quickpkg</tt>) followed by quick installation on other, identical systems (with Portage's <tt>getbinpkg</tt> or <tt>emerge -K</tt>). See [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=3#doc_chap4 Portage Features in the Gentoo Linux Handbook] for more information.
===Masking===
''Masking'' is how Gentoo determines which packages are suitable for a system. Ebuilds designed for different architectures or experimental software are usually masked in a manner which prevents a stable system from installing them without user intervention.
Packages that generally just require some testing but will often work fine are said to be ''keyword masked'' (i.e. they are available for systems with an ACCEPT_KEYWORDS make.conf entry starting with the character <tt>~</tt>, such as <tt>~x86</tt>, <tt>~amd64</tt>, <tt>~ppc</tt>). The standard way to unmask an individual ''keyword masked'' package is by adding a file with the full package name and keyword to <tt>/etc/portage/package.keywords/</tt>. Users can make subdirectories here as well, allowing for custom organization. For example, if a masked package had multiple masked dependencies, the user could make a directory with the name of the original masked package, and put all the mask files for the package and its dependencies in that directory. This scheme replaces the older scheme of having <tt>/etc/portage/package.keywords</tt> as a text file list.
Packages with known problems or not considered mature enough to be candidates for stable are ''hard masked'' by one of the various package.mask files in /usr/portage/profiles, and such entries are generally accompanied by a comment from developers explaining the reason for the mask.
==See also==
{{Portal|Free software}}
* [[pkgsrc]]
==References==
<references />
<pre>
==External links==
; Official documentation
* [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=3 Gentoo Portage Features]
* [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1 Gentoo Portage Introduction]
* [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3 Working with Portage]
* [http://packages.gentoo.org/ Gentoo Packages], information about currently available ebuilds
; Unofficial documentation
* [http://www.gentoo-portage.com/ Gentoo-Portage], alternate presentation of current ebuild information
* [http://wiki.kaspersandberg.com/doku.php?id=howtos:portage Using Portage]
* [http://forums.gentoo.org/viewtopic.php?t=125553 Installing portage on other Linux distros]
; Similar software
* [http://emerde.freaknet.org/ Emerde, portage-like project for Slackware]
* [https://code.google.com/p/pkgcore/ Pkgcore], bsd re-implementation of portage
* [http://paludis.exherbo.org/ Paludis], another package manager that uses ebuilds
* [https://wiki.archlinux.org/index.php/Arch_Build_System Arch Build System] a ports-like system for [http://www.archlinux.org/ Arch Linux]
[[Category:Gentoo Linux]]
[[Category:Free package management systems]]
[[Category:Linux package management-related software]]
[[Category:Free software programmed in Python]]
[[ar:بورتاج]]
[[cs:Portage]]
[[es:Portage (software)]]
[[eu:Portage]]
[[fr:Portage (Gentoo)]]
[[ko:포티지 (소프트웨어)]]
[[it:Portage (software)]]
[[mr:पोर्टेज (सॉफ्टवेअर)]]
[[nl:Portage (pakketbeheer)]]
[[ja:Portage]]
[[pl:Portage (program)]]
[[pt:Portage (software)]]
[[ru:Portage]]
[[fi:Portage]]
[[sv:Portage]]
[[uk:Portage]]
[[zh:Portage]]
[[fa:پورتج]]
</pre>
== Literatur ==
* Tobias Scherbaum: ''Gentoo Linux: Die Metadistribution.'' 2. Auflage. Mitp-Verlag, Heidelberg 2008, ISBN 978-3-8266-5941-6.
* Christoph Junghans, Andreas K. Hüttel, Ulrich Müller: ''Maßarbeit – Gentoo Linux: Quelltexte und Rolling Releases.'' In: ''[[c’t|c’t – Magazin für Computertechnik]].'' Jg. 2012, Nr. 16. [[Heise Zeitschriften Verlag]], {{ISSN|0724-8679}}, S. 162–164.
== Weblinks ==
* [http://devmanual.gentoo.org/ Gentoo Development Guide] (englisch), umfasst u. a. eine ausführliche Referenz zum Ebuild-Scripting.
* [http://distfiles.gentoo.org/distfiles/pms-5.pdf Package Manager Specification] (englisch), genaue Spezifikation des Ebuild-Formats.
<pre>
[[Kategorie:Linux-Software]]
[[Kategorie:Freie Installationssoftware]]
</pre>All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://de.wikipedia.org/w/index.php?oldid=113528165.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|