Gentoo Linux uses Portage for package management and software installation. Portage allows for compiling packages from source code with customizable build options. It features USE flags to selectively include features, parallel builds, binary package support, and tools that make maintenance and upgrades easy. Ebuilds define how to build and install packages and have evolved through several EAPI stages to support new features.
5. Gentoo PM goals
• Beautiful and colorful despite
CLI
• Fully automated software
installation
• Extremely easy maintenance
• Available in most architectures
and OS's
6. Gentoo PM goals(con't)
• Configuration file protection
and automerge
• Advantages of compiling from
source
• Multiple
versions/implementations
handling
• Binary package support
7. Portage features
• Customization of CFLAGS, LDFLAGS
• USE flags (more on that later)
• Various optional FEATURES
• Protection for live system
• FEATURES sandbox, collision-
protect, protect-owned
• Compilation acceleration
• FEATURES ccache, distcc
• System trimming
• FEATURES nodoc, noman, noinfo
• INSTALL_MASK
8. Portage features
(con't)
• Parallelization support
• --jobs=JOBS --load-average=LOAD
• MAKEOPTS='-jN'
• FEATURES parallel-fetch
• Auto resuming after failure
• --keep-going
• Blocker automatic solving
• com_err and ss V.S. e2fsprogs-libs
• Debugging support
• CFLAGS "-g3 -ggdb3 -gdwarf-2"
• FEATURES keepwork, nostrip,
splitdebug, installsources
9. Portage features
(con't)
• Embedded system support
• Features in portage 2.2
• License filtering
• Generic package sets
• FEATURES preserve-libs
12. USE flags
• Map onto ./configure options
• Defaults defined by profile
• Define your own in addition
to defaults
• Install only what you want
• Example:
• USE="-gnome kde qt -arts -nls"
13. EAPI: Ebuild API
• EAPI 0: Forever...
• EAPI 1: Nov 2007
• EAPI 2: Sept 2008
• EAPI 3: Jan 2010
• EAPI 4: Jan 2011
• EAPI 5: Sept 2012
17. EAPI 2
• Blocker syntax
• !dev-libs/foo
• !!dev-libs/foo
• Granular builds
• src_configure() from compile
• src_prepare() from unpack
• Defaults for phase functions
• e.g. default_src_unpack()
• Also default()
• x11-libs/cairo/cairo-
1.8.10.ebuild
18. EAPI 3
• Prefix support
• Unpacking of .xz archives
• media-gfx/graphviz/graphviz-
2.26.3-r3.ebuild
19. EAPI 4
• pkg_pretend()
• src_install() not empty by
default
• pkg_info() on uninstalled pkgs
• USE dependency defaults
• flag+ flag-
• For flags not in IUSE
• nonfatal prefix for commands
• PROPERTIES (=interactive)
• dev-vcs/git/git-1.8.1.ebuild
24. Package management and
creation in Gentoo Linux
Donnie Berkholz
Council Member & Sr. Developer
Gentoo Linux
dberkholz@gentoo.org
@dberkholz
25. <http://dev.gentoo.org/~dberkholz/IntroToGentoo.odp>
Copyright 2006–2013 Rajiv Manglani, Zhang Le, Donnie
Berkholz. Some rights reserved.
The Gentoo Linux logo is Copyright 2002 Gentoo Foundation,
used with permission.
This work is licensed under the Creative Commons Attribution-
NonCommercial-ShareAlike License. To view a copy of this
license, visit <
http://creativecommons.org/licenses/by-nc-sa/2.0> or send a
letter to Creative Commons, 559 Nathan Abbott Way, Stanford,
California 94305, USA.