Ports (package management)
With ports are software package management systems in the world of Unix derivatives , especially the BSD called operating systems. A port usually denotes a directory in which all files required for the installation and the Makefile (“recipe”) are located.
History and dissemination
The first ports framework was developed by Jordan K. Hubbard in 1994 for FreeBSD . The idea was later adopted by OpenBSD , NetBSD (under the name pkgsrc ) and Darwin . Ports also found their way into the Linux world. So have Gentoo , Crux and Arch Linux ports-like package management systems called Portage , pkgutils and Arch Build System .
Technical functionality
When installing via the port system, the software is (if possible) automatically downloaded from the Internet and installed. The port system only consists of information about where you get the software from, what adjustments are necessary for the respective system and how the software is to be installed. In addition, all files that a software package installs are recorded so that the package can also be uninstalled again. A package can definitely depend on several packages, all of which are compiled after downloading, possibly configured and then installed. This happens almost automatically, possibly with additional information required by the user. First, an archive containing the files of the current ports is loaded from a server and extracted. This automatically starts a process for installing the port and this can then be used.
Originally the ports were a collection of Makefiles with target formats ( targets ) for the automatic downloading , unpacking , patching , compiling and installing of software packages. Another target is used to generate a binary package. Other scripting languages such as Python for Gentoo Linux or Tcl for MacPorts can also be used.
FreeBSD ports
Under FreeBSD the so-called port tree is by default located in / usr / ports . The port tree consists of directories in which installation instructions can be found, divided into categories. Various Makefiles are located under / usr / ports / Mk , which are integrated by the individual ports. bsd.port.mk
is the main makefile, it contains the predefined targets, so that the portmakefiles usually only have to set individual variables. Information about installed ports can be found by default under / var / db / pkg .
A small ecosystem of tools has formed around the ports that greatly simplify the installation of ports. Noteworthy are portsnap , which automatically updates the port tree , portmaster , a program that is similar to a Linux package management tool and simplifies installing and updating ports even more than it already is, pkg_cutleaves , which can find and uninstall ports that are no longer required can (for example libraries on which an installed port no longer depends) or port upgrade , which takes on similar tasks as portmaster . The port tools themselves can be found in the port tree in the ports-mgmt / subtree .
OpenBSD ports
Like FreeBSD, OpenBSD provides a port system. Usually, the files required for this are stored under / usr / ports , as is the case with FreeBSD . As with the other port systems, ports are subdivided into subgroups to facilitate the search for suitable software. Should you still not find what you are looking for, OpenBSD helps by changing to the directory in which the ports are stored (in our example / usr / ports ) and entering "make search key = SEARCH TERM". The search term ranges from "http" to the precise names of the packages. If you already know the name of a software but no longer know where to find it, you can enter "make search name = NAME_DER_SOFTWARE" and get all possible variants ("FLAVORs") of this software.
Since certain software modules can contain, OpenBSD reacts to this with so-called FLAVORs. A FLAVOR is nothing more than a kind of compiler flag. For example, if you want to compile software with PostgreSQL support (e.g. PHP ), you can do this with the call "env FLAVOR = postgresql make install" (where "postgre" is usually abbreviated to psql) or the change permanently in adapt to the Makefile of the relevant port.
OpenBSD also knows a global makefile, whereby a distinction must be made between the makefile for the operating system ( /etc/mk.conf ) and that for the port system ( /usr/ports/infrastructure/mk/bsd.port.mk ).
In general, the OpenBSD port system ensures automatic installation, the subsequent installation of required software (so-called dependencies), the translation of the software from the source code, the subsequent creation of a binary package and the storage of this package in / usr / ports / packages / . Installed packages are either listed using pkg_info or, as with FreeBSD, are listed under / var / db / pkg .
One difference to the FreeBSD ports is that the ports are not installed directly. Instead, since OpenBSD is actually (binary) package-oriented, i.e. actually precompiled packages are used, packages are implicitly built when installing a port (with OpenBSD .tar.gz files) and these are then installed (also implicitly) pkg_add
. With make package only the package is built. In OpenBSD, the port tree is primarily used by developers or administrators of larger networks to build the binary packages commonly used under OpenBSD.
NetBSD pkgsrc
NetBSD uses the term “port” for porting NetBSD to a hardware platform, which is why NetBSD has named its fork of the FreeBSD ports “pkgsrc”. NetBSD's pkgsrc has now been ported to various other operating systems, including Linux , Solaris and Mac OS X .
MacPorts
MacPorts for OS X (formerly DarwinPorts) uses the Tcl script port instead of the program make .
Gentoo Linux ebuilds
Ebuild is a script that automatically compiles installation procedures for software packages. It was created by the Gentoo Linux project for use in the Portage software management system.
Web links
- FreeBSD ports on freebsd.org
- The FreeBSD Porter Handbook. on freebsd.org
- Installing Applications: Packages and Ports. on freebsd.org
- OpenBSD ports on openbsd.org
- OpenBSD Ports - Porting Guide on openbsd.org
- OpenBSD FAQ - Packages and Ports on openbsd.org
- Dan Langille's web frontend to the FreeBSD ports tree at freshports.org
- NetBSD pkgsrc on pkgsrc.org
- The MacPorts Project Official Homepage on macports.org
- OpenBSD ports on ports.su
Individual evidence
- ^ A Brief History of FreeBSD. docs.freebsd.org, accessed May 11, 2016 .
- ↑ Johannes Plötner, Steffen Wendzel: Linux - 14.2.6 BSD ports. Rheinwerk Computing, accessed on May 11, 2016 .
- ↑ Package management and ports. dozent.maruweb.de, accessed on May 11, 2016 .
- ↑ Johannes Plötner, Steffen Wendzel: Linux - 14.2.1 Package Management and Ports - Ports. Rheinwerk Computing, accessed on May 11, 2016 .
- ↑ PACKAGES (7). In: OpenBSD Reference Manual. mdocml.bsd.lv, accessed May 11, 2016 .