Portage Mac OS

Portage Mac OS

June 01 2021

Portage Mac OS

With package managers or third-party tools, you have plenty of optionsto install and manage Ruby.

You may already have Ruby installed on your computer. You can checkinside a terminal emulator by typing:

This should output some information on the installed Ruby version.

Choose Your Installation Method

Choose Install Package from the Command Palette (Ctrl+Shift+P on Windows & Linux, ⇧⌘P on Mac OS X). Select Portage and press Enter. Additionally, with autoupgrade enabled, Package Control will keep all installed packages up-to-date. SystemStarter is a system program in Mac OS X, started by Mac OS X's BSD-style init prior to Mac OS X v10.4 and by launchd in Mac OS X v10.4 and later releases, that starts system processes specified by a set of property lists. SystemStarter was originally written by Wilfredo Sanchez for Mac OS X.

There are several ways to install Ruby:

  • On a UNIX-like operating system, using your system’spackage manager is easiest.However, the packaged Ruby version may not be the newest one.
  • Installers can be used to install a specific or multipleRuby versions. There is also an installer for Windows.
  • Managers help you to switch between multiple Ruby versionson your system.
  • Finally, you can also build Ruby from source.

On Windows 10, you can also use the Windows Subsystem for Linuxto install one of the supported Linux distributions and use any of theinstallation methods available on that system.

Here are available installation methods:

Portage Mac OS
  • Package Management Systems
  • Installers
    • RubyInstaller (Windows)
  • Managers

Package Management Systems

If you cannot compile your own Ruby, and you do not want to use athird-party tool, you can use your system’s package manager to install Ruby.

Some members of the Ruby community feel that you should avoid packagemanagers to install Ruby and that you should use dedicated tools instead.

It is possible that major package managers will install older Rubyversions instead of the latest release. To use the latest Ruby release,check that the package name matches its version number. Or use adedicated installer.

apt (Debian or Ubuntu)

Debian GNU/Linux and Ubuntu use the apt package manager. You can use itlike this:

yum (CentOS, Fedora, or RHEL)

CentOS, Fedora, and RHEL use the yum package manager.You can use it like this:

The installed version is typically the latest version of Ruby availableat the release time of the specific distribution version.

snap (Ubuntu or other Linux distributions)

Snap is a package manager developed by Canonical.It is available out-of-the-box on Ubuntu, but snap also workson many other Linux distributions.You can use it like this:

We have several channels per Ruby minor series.For instance, the following commands switch to Ruby 2.3:

portage (Gentoo)

Gentoo uses the portage package manager.

To install a specific version, set RUBY_TARGETS in your make.conf.See the Gentoo Ruby Project website for details.

pacman (Arch Linux)

Arch Linux uses a package manager named pacman.To get Ruby, just do this:

This should install the latest stable Ruby version.

Homebrew (macOS)

Ruby versions 2.0 and above are included by default in macOS releasessince at least El Capitan (10.11).

Homebrew is a commonly used package manager on macOS.Installing Ruby using Homebrew is easy:

This should install the latest Ruby version.

FreeBSD

FreeBSD offers both pre-packaged and source-based methods to install Ruby.Prebuilt packages can be installed via the pkg tool:

A source-based method can be used to install Ruby using thePorts Collection. This is useful if you wantto customize the build configuration options.

More information about Ruby and its surrounding ecosystem on FreeBSDcan be found on the FreeBSD Ruby Project website.

OpenBSD

OpenBSD as well as its distribution adJ has packages for the threemajor versions of Ruby. The following command allows you to see theavailable versions and to install one: How to get terraria.

You can install multiple major versions side by side, because theirbinaries have different names (e.g. ruby27, ruby26).

The HEAD branch of the OpenBSD ports collection might have themost recent version of Ruby for this platform some days after itis released, seedirectory lang/ruby in the most recent ports collection.

Ruby on OpenIndiana

To install Ruby on OpenIndiana, please use theImage Packaging System (IPS) client.This will install the Ruby binaries and RubyGems directlyfrom the OpenIndiana repositories. It’s easy:

However, the third-party tools might be a good way to obtain thelatest version of Ruby.

Other Distributions

On other systems, you can search the package repository of your Linuxdistribution’s manager for Ruby. Alternatively, you can use athird-party installer.

Installers

If the version of Ruby provided by your system or package manager is outof date, a newer one can be installed using a third-party installer.

Some installers allow you to install multiple versions on the samesystem; associated managers can help to switch between the differentRubies.

If you are planning to use RVM as a version manager you don’tneed a separate installer, it comes with its own.

ruby-build

ruby-build is a plugin for rbenv that allows youto compile and install different versions of Ruby. ruby-build can alsobe used as a standalone program without rbenv. It is available for macOS,Linux, and other UNIX-like operating systems.

ruby-install

ruby-install allows you to compile and install differentversions of Ruby into arbitrary directories. chruby is acomplimentary tool used to switch between Ruby versions. It is availablefor macOS, Linux, and other UNIX-like operating systems.

RubyInstaller

On Windows, RubyInstaller gives you everything you needto set up a full Ruby development environment.

Just download it, run it, and you are done!

Ruby Stack

If you are installing Ruby in order to use Ruby on Rails,you can use the following installer:

  • Bitnami Ruby Stack provides a complete developmentenvironment for Rails. It supports macOS, Linux, Windows, virtualmachines, and cloud images.

Managers

Many Rubyists use Ruby managers to manage multiple Rubies. They alloweasy or even automatic switching between Ruby versions depending on theproject and other advantages but are not officially supported. You canhowever find support within their respective communities.

asdf-vm

asdf-vm is an extendable version manager that can manage multiplelanguage runtime versions on a per-project basis. You will need theasdf-ruby plugin (which in turn uses ruby-build)to install Ruby.

chruby

chruby allows you to switch between multiple Rubies. It canmanage Rubies installed by ruby-install or even builtfrom source.

rbenv

rbenv allows you to manage multiple installations of Ruby.While it can’t install Ruby by default, its ruby-buildplugin can. Both tools are available for macOS, Linux, or otherUNIX-like operating systems.

RVM (“Ruby Version Manager”)

RVM allows you to install and manage multiple installations ofRuby on your system. It can also manage different gemsets. It isavailable for macOS, Linux, or other UNIX-like operating systems.

uru

Uru is a lightweight, multi-platform command line tool that helps youto use multiple Rubies on macOS, Linux, or Windows systems.

Building from Source

Of course, you can install Ruby from source.Download and unpack a tarball, then just do this:

By default, this will install Ruby into /usr/local.To change, pass the --prefix=DIR option to the ./configure script.

You can find more information about building from source in theRuby README file.

Using the third-party tools or package managers might be a better idea,though, because the installed Ruby won’t be managed by any tools.

Mac
Portage
Stable release2.2.20 / 18 May 2015; 5 years ago[1]
Written inPython
Operating systemGentoo Linux and Gentoo/FreeBSD, Chromium OS, Sabayon, Funtoo Linux
PlatformPOSIX-compatible/Python-capable
TypePackage management system
License
Websitewiki.gentoo.org/wiki/Project:Portage

Portage is a package management system originally created for and used by Gentoo Linux and also by Chrome OS, Sabayon, and Funtoo Linux among others. Portage is based on the concept of ports collections. https://legit-free-bet-nfc-house-of-sp-fun.peatix.com. Gentoo is sometimes referred to as a meta-distribution due to the extreme flexibility of Portage, which makes it operating-system-independent.[2][3][4][5] The Gentoo/Alt project is concerned with using Portage to manage other operating systems, such as BSDs, Mac OS X and Solaris. The most notable of these implementations is the Gentoo/FreeBSD project.

There is an ongoing effort called the Package Manager Specification project (PMS)[6] 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.

  • 1Overview
  • 2Features

Overview

Accessing Portage

Porthole graphical frontend.

Portage is similar to the BSD-style package management known as ports, and was originally designed with FreeBSD's ports in mind.[7] Portage is written in the 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 has with yum, or dpkg has with APT.)

Atom editor python. A GTK+-based GUI, 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: 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 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 security issues at time of release), keyword masked (mainly for packages that have not been sufficiently 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 and database of installed packages. The compilation settings used by ebuilds can be changed through the CFLAGSenvironment 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 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 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 feature 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's USE Flag Index.

ebuild

Gentoo does not, by default, use binary packages as other package management systems do (like RPM), employing instead a format known as the ebuild. Whereas RPMs are precompiled binaries, ebuilds are shell 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 in SRPMs. There are over 27,000 ebuilds available, the majority of which are distributed by the Gentoo mirrors. New and updated ebuilds can be obtained by synchronizing the local ebuild repository with the mirrors. This is done by executing the command emerge --sync. 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.

Binary packages

Gentoo does have a binary packaging format, which is a .tbz2 file (tar with bzip2 compression) with additional metadata. This feature enables the building of binary packages on one system (using Portage's buildpkg or quickpkg) followed by quick installation on other, identical systems (with Portage's getbinpkg or emerge -K). See 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 ~, such as ~x86, ~amd64, ~ppc). The standard way to unmask an individual keyword masked package is by adding a file with the full package name and keyword to /etc/portage/package.keywords/. 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.keywords 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

References

  1. 'ChangeLog for sys-apps/portage'. Retrieved September 15, 2015.<templatestyles src='Module:Citation/CS1/styles.css'></templatestyles>
  2. 'About Gentoo'. Retrieved 27 May 2015.<templatestyles src='Module:Citation/CS1/styles.css'></templatestyles>
  3. My Workstation OS: Gentoo Tom Chance's website
  4. Daniel Robbins (10 October 2002). 'Gentoo Linux Reloaded - O'Reilly Media'. Retrieved 27 May 2015.<templatestyles src='Module:Citation/CS1/styles.css'></templatestyles>
  5. 'OSNews.com'. Retrieved 27 May 2015.<templatestyles src='Module:Citation/CS1/styles.css'></templatestyles>
  6. Gentoo's official Package Manager Specification (PMS) project
  7. Gentoo Linux Documentation - Making the distribution, Part 3

External links

Official documentation
  • Funtoo Portage Documentation[relevant?]
  • Gentoo Portage Features[dead link]
  • Gentoo Portage Introduction[dead link]
  • Gentoo Packages, information about currently available ebuilds
Unofficial documentation
  • Gentoo-Portage, alternate presentation of current ebuild information
Similar software

Portage Mac Os X

  • Pkgcore, bsd re-implementation of portage
  • Paludis, a package mangler which can be used with ebuilds and other formats
  • Arch Build System a ports-like system for Arch Linux

Portage Matc Portage Wi

Retrieved from 'https://infogalactic.com/w/index.php?title=Portage_(software)&oldid=214276'

Portage Mac OS

Leave a Reply

Cancel reply