Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Portage (software)

From Wikipedia, the free encyclopedia
Gentoo package management system
Portage
Portage in action
Original authorDaniel Robbins
DeveloperGentoo developers
Stable release
3.0.64[1] Edit this on Wikidata / 28 April 2024; 18 months ago (28 April 2024)
Repository
Written inPython,[2] shell script,[2] C[2] Edit this on Wikidata
Operating systemGentoo Linux andGentoo/FreeBSD,ChromiumOS,ChromeOS,Sabayon,Calculate Linux
PlatformPOSIX-compatible/Python-capable
Typepackage manager, free software Edit this on Wikidata
LicenseGNU General Public License Edit this on Wikidata
Websitewiki.gentoo.org/wiki/Project:Portage

Portage is apackage management system originally created for and used byGentoo Linux and also byChromeOS andCalculate among others. Portage is based on the concept ofports collections. Gentoo is sometimes referred to as ameta-distribution due to the extreme flexibility of Portage, which makes itoperating-system-independent.[3][4][5][6] TheGentoo/Alt project was concerned with using Portage to manage other operating systems, such asBSDs,macOS andSolaris. The most notable of these implementations is theGentoo/FreeBSD project.

There is an ongoing effort called the Package Manager Specification project (PMS),[7] which aims to standardise and document the behaviour of Portage, allowing theebuild tree and Gentoo system packages to be used with alternative 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

[edit]

Accessing Portage

[edit]
Porthole graphical frontend.

Portage is similar to theBSD-stylepackage management known asports, and was originally designed withFreeBSD's ports in mind.[8] Portage is written in thePython programming language, and is the main utility that defines Gentoo. Although the system itself is known as Portage, it consists of two main parts, theebuild system andemerge. 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 asrpm has withyum, ordpkg has withAPT.)

AGTK-based GUI,Porthole, is available for working with Portage.There is also theHimerge GUI, which stands for "Haskell Interface for eMerge".

Functions provided

[edit]

Portage is characterized by its main function:compiling fromsource 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-packagedependencies, 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 knownsecurity issues at time of release),keyword masked (mainly for packages that have not been sufficientlytested on the target system architecture to be considered stable) andhard masked (broken or very insecure) packages.

Features

[edit]

Emerge

[edit]
Unmerge ofSpaceFM file manager

Theemerge 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 thecommand line.

The program calculates and manages dependencies, executes ebuilds and maintains the local Portagetree and database of installed packages. The compilation settings used by ebuilds can be changed through theCFLAGSenvironment variable, based on the specifications of the individual computer and on the user's desire for optimization. The emerge utility executes ebuilds in asandbox 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

[edit]
Portage during system update

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 includeDVD support, where available, in packages compiled with the flag enabled. The USE flags affect whichdependencies are required, generally affecting which optional features will be built into a given program when it is compiled. For example, in packages which use aconfigure script, the USE flagfeature would translate to./configure --with-feature.

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 at the Gentoo website'sUSE Flag Index.

ebuild

[edit]

Gentoo does not, by default, use binary packages as otherpackage management systems do (likepacman or apt), employing instead a format known as the ebuild. WhereasRPM binaries are precompiledbinaries, ebuilds areshell scripts with variables and functions which contain a description of the software, and instructions on how to obtain, configure,compile, and install it, more closely akin to (but more powerful than) the.spec files distributed inSRPMs.[9] The official repository provides over 19,600 ebuilds, the majority of which are distributed by the Gentoomirrors. New and updated ebuilds can be obtained by synchronizing the local ebuild repositories with the mirrors. This is done by executing the commandemaint sync -a. Historically, Gentoo has provided pre-compiled binary packages for many common programs, especially those which are lengthy to compile, such asMozilla Firefox andOpenOffice.org. These are still installed with emerge, just by appending a "-bin" to the package name to instead install the binary version.

Example of ebuild forGNOME Terminator:

# Copyright 1999-2020 Gentoo Authors# Distributed under the terms of the GNU General Public License v2EAPI=7PYTHON_COMPAT=(python3_{6,7,8})DISTUTILS_USE_SETUPTOOLS="no"inheritdistutils-r1virtualxxdg-utilsDESCRIPTION="Multiple GNOME terminals in one window"HOMEPAGE="https://github.com/gnome-terminator/terminator"SRC_URI="https://github.com/gnome-terminator/terminator/releases/download/v${PV}/${P}.tar.gz"LICENSE="GPL-2"SLOT="0"KEYWORDS="amd64 ~ppc x86"IUSE="dbus +libnotify"RDEPEND=">=dev-libs/glib-2.32:2dev-libs/keybinder:3[introspection]dev-python/configobj[${PYTHON_USEDEP}]dev-python/psutil[${PYTHON_USEDEP}]dev-python/pycairo[${PYTHON_USEDEP}]dev-python/pygobject:3[${PYTHON_USEDEP}]>=x11-libs/gtk+-3.16:3x11-libs/vte:2.91[introspection]dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )libnotify? ( x11-libs/libnotify[introspection] )"BDEPEND="dev-util/intltool"distutils_enable_testssetup.pyPATCHES=("${FILESDIR}"/terminator-1.91-without-icon-cache.patch"${FILESDIR}"/terminator-1.91-desktop.patch"${FILESDIR}"/terminator-1.92-make-tests-fail.patch"${FILESDIR}"/terminator-1.92-metainfo.patch)src_prepare(){xdg_environment_resetdistutils-r1_src_prepare}src_test(){virtxdistutils-r1_src_test}pkg_postinst(){xdg_desktop_database_updatexdg_icon_cache_update}pkg_postrm(){xdg_desktop_database_updatexdg_icon_cache_update}

Binary packages

[edit]

Gentoo does have a binary packaging format, which is a.tbz2 file (tar withbzip2 compression) with additionalmetadata. This feature enables the building of binary packages on one system (using Portage'sbuildpkg orquickpkg) followed by quick installation on compatible systems (with Portage'sgetbinpkg oremerge -K). SeePortage Features in the Gentoo Linux Handbook for more information.

Profiles

[edit]

Portage has a set of profiles for different use cases and host targets that tend to be versioned by upstream developers, which can change how Portage functions and deals with the system when it comes to its file system hierarchy, toolchain upgrades, libc and init systems. Profiles can also apply ebuild configurations, compiler flags, and masking in the world set.[10]

Masking

[edit]

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 bekeyword masked (i.e. they are available for systems with an ACCEPT_KEYWORDS make.conf entry starting with the character~, such as~x86,~amd64,~ppc). An individualkeyword masked package can be unmasked by adding a line with the full package name and keyword to some file within the/etc/portage/package.accept_keywords/ directory. 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/etc/portage/package.accept_keywords as one text file.

Packages with known problems or not considered mature enough to be candidates for stable arehard 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.

Gentoo/Alt

[edit]

Gentoo/Alt is a project created to manage porting the portage framework and other features to otheroperating systems, such asMac OS X and thefreeBSDs. Gentoo/Alt was set up byPieter Van den Abeele andDaniel Robbins after Pieter Van den Abeele founded Gentoo for Mac OS X.

Mac OS X

[edit]

Gentoo forMac OS X was the first non-Linux project of Gentoo and focused on making the Gentoo experience available onApple's operating system by introducing the Portage system as a separate entity. This was roughly similar toFink andMacPorts, but it used Portage instead of a Debian-like or Ports-like system. Later on, Gentoo for Mac OS X was made a subproject of Gentoo/Alt. The project is no longer active, because its prime assumption of using and not modifying the host OS appeared not to be realistic and eventually broke most packages or made them hardly maintainable. Gentoo for Mac OS X has been superseded byGentoo Prefix, which is currently what Gentoo offers to Mac OS X users.[11]

The Prefix project on Mac OS X is tested and supported on Mac OS X Tiger, Leopard and Snow Leopard onPowerPC,IA-32, andx86-64 architectures.[12]

FreeBSD

[edit]
Operating system
Gentoo/FreeBSD
Gentoo/FreeBSD logo
DeveloperLinux
OS familyUnix-like (BSD)
Working stateDiscontinued[13]
Source modelOpen source
Repository
Package managerPortage
Kernel typeMonolithic (kFreeBSD)[13]
UserlandFreeBSD[13]
LicenseVarious
Official websiteGentoo/FreeBSD

Gentoo/FreeBSD brings the Gentoo Linux design, structure, and tools such as Portage and the Gentoo Linux base layout to theFreeBSD operating system. Gentoo'sGNU toolchain is used instead of the original FreeBSD one.

Although the project is no longer maintained by any active Gentoo developers, there are instructions that allow installation of a full Gentoo/FreeBSD system.[13] FreeBSD system ebuilds are integrated into the main portage tree, but this port is far from being complete due to the amount of packages needing to be ported and the lack of a proper Live CD (FreeSBIE's Live CD or FreeBSD setup CD is used during installation).

The current (semi) official logo for Gentoo/FreeBSD is a daemonized "g", derived from originalGentoo Linux logo and inspired by theBSD Daemon. It was designed by Marius Morawski, responding to an unofficial contest launched by Diego Elio Pettenò on his blog.[15]

NetBSD

[edit]

Gentoo/NetBSD is a project to provide aGNUuserland managed by Portage with a NetBSD kernel. The project was started by Damian Florczyk. Only thex86 architecture is targeted and the system as a whole is in an incomplete state.

OpenBSD

[edit]
Operating system
Gentoo/OpenBSD
Gentoo/OpenBSD logo
OS familyUnix-like (BSD)
Working stateDiscontinued[16]
Source modelOpen source
Latest releaseGentoo Prefix on OpenBSD / April 4, 2011 (2011-04-04)
Repository
Package managerPortage
Kernel typeMonolithic (kOpenBSD)
UserlandOpenBSD
LicenseVarious
Official websiteGentoo/OpenBSD

Gentoo/OpenBSD was a Gentoo/*BSD subproject to port Gentoo features such as Portage to theOpenBSD operating system. It was originally started by Grant Goodyear and is deprecated.[17] An install guide is provided on the project page but is also marked as deprecated.

DragonFlyBSD

[edit]

Gentoo/DragonFlyBSD is a currently[when?] unofficial port to theDragonFlyBSD kernel. The project is developed by Robert Sebastian Gerus.[18]

GNU Hurd

[edit]

An unofficial port toGNU Hurd was also being developed,[19] but was abandoned in late 2006.

Android

[edit]

Led by Benda Xu, "Gentoo RAP forAndroid Devices" installs a variant of Gentoo called Gentoo RAP in a directory prefix alongside Android.[20] The Linux kernel is used by both Android and Gentoo RAP.[20]

Interix

[edit]

Gentoo/Interix (eprefix) is a port of Gentoo that runs atop theInterix Subsystem for Windows which is also known asMicrosoft Windows Services for UNIX (SFU) or Subsystem for Unix-based Applications (SUA). A result of the Gentoo/Interix project is the ability to install and use the Portage system to emerge native Windows applications (requires Visual Studio, 2008 Express Edition will do too). However, this feature does not support the wide variety of packages supported by other platforms (including Interix).

Portaris

[edit]

An unofficial port to theSolaris operating system, "Portaris", was announced around 2006, but never got into a public state. It was superseded by the Gentoo Prefix project.

Plan 9

[edit]

Started in 2011 as aGoogle Summer of Code project, Plan 9 For Gentoo takes the Gentoo base and overlays auserspace inspired byPlan 9.[21] The stated objectives of the project are to have betterhardware support, bettersoftware support and to create a "culture shock" for people that have previously usedLinux systems.[21] The project is maintained by Robert Seaton.[21]

See also

[edit]

References

[edit]
  1. ^"proj/portage.git". 28 April 2024. Retrieved17 May 2024.
  2. ^abc"The Gentoo Portage Open Source Project on Open Hub: Languages Page".Open Hub. Retrieved18 May 2024.
  3. ^"About Gentoo".gentoo.org.Archived from the original on December 21, 2018. RetrievedAugust 23, 2019.
  4. ^My Workstation OS: Gentoo | Tom Chance's websiteArchived 2009-07-08 at theWayback Machine
  5. ^Daniel Robbins (10 October 2002)."Gentoo Linux Reloaded - O'Reilly Media".Archived from the original on 14 October 2017. Retrieved27 May 2015.
  6. ^"OSNews.com".Archived from the original on 29 September 2007. Retrieved27 May 2015.
  7. ^"Project:Package Manager Specification".wiki.gentoo.org.Archived from the original on July 8, 2019. RetrievedAugust 23, 2019.
  8. ^Gentoo Linux Documentation - Making the distribution, Part 3Archived 2014-12-22 at theWayback Machine
  9. ^"ebuild - Gentoo Wiki".wiki.gentoo.org.Archived from the original on 2019-12-17. Retrieved2019-12-17.
  10. ^"Profile (Portage) - Gentoo wiki".
  11. ^Groffen, Fabian (2005-12-15)."Gentoo for Mac OS X project targets". Archived fromthe original on 2008-05-21. Retrieved2017-07-20.
  12. ^Groffen, Fabian (2009-06-01)."Gentoo Prefix Bootstrap Process for Mac OS X". Archived fromthe original on 2009-07-19. Retrieved2017-07-20.
  13. ^abcd"Gentoo FreeBSD".Gentoo Wiki. 2018-08-20.Archived from the original on 2014-01-06. Retrieved2019-03-06.
  14. ^"Index of /experimental/bsd/freebsd/stages/amd64-fbsd-9.1".Distfiles.gentoo.org. 2013-07-07.Archived from the original on 2016-09-27. Retrieved2016-09-24.
  15. ^Pettenò, Diego Elio (2005-07-16)."Not-so-official Gentoo/FreeBSD artwork contest".Flameeyes's Weblog.Archived from the original on 2019-04-19. Retrieved2017-07-20.
  16. ^"Gentoo OpenBSD - Gentoo wiki".
  17. ^"Gentoo OpenBSD - Gentoo wiki".wiki.gentoo.org. Retrieved2024-11-25.
  18. ^Goodyear, Grant; Pettenò, Diego Elio (2006-10-19)."Gentoo/*BSD". Archived fromthe original on 2007-12-28. Retrieved2017-07-20.
  19. ^"Gentoo GNU HURD". Archived fromthe original on 2010-01-09. Retrieved2017-07-20.
  20. ^ab"Project:Android - Gentoo Wiki".Wiki.gentoo.org. 2016-01-13.Archived from the original on 2016-10-24. Retrieved2016-09-24.
  21. ^abcSeaton, Robert (2011-08-01)."Plan 9 From Gentoo: Plan 9 Meets Gentoo". Archived fromthe original on 2012-04-26. Retrieved2017-07-20.

External links

[edit]
Wikidata has the property:
Official documentation
Unofficial documentation
Similar software
dpkg
RPM
Embedded systems
  • ipkg
Distribution-agnostic
Others (binary)
Others (source)
Front-ends
Related topics
Gaming console
Unix-like,
Linux
dpkg
Purely functional
RPM
tarball
Other
macOS
z/OS
Mobile
operating
systems
Multi-platform
Solaris,illumos
Web browsers
Windows
BSD
C++
Java
JavaScript
Kubernetes
Linux
macOS
.NET
Perl
PHP
Python
Ruby
Rust
Scala
Retrieved from "https://en.wikipedia.org/w/index.php?title=Portage_(software)&oldid=1322980598"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp