Package management system
Encyclopedia
In software, a package management system, also called package manager, is a collection of software tools to automate the process of installing, upgrading, configuring, and removing software packages
Software package (installation)
In package management systems, which are commonly used with Linux-based operating systems, a package is a specific piece of software which the system can install and uninstall....

 for a computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

's operating system in a consistent manner. It typically maintains a database of software dependencies and version information to prevent software mismatches and missing prerequisites.

Packages are distributions of software, applications and data. Packages also contain metadata
Metadata
The term metadata is an ambiguous term which is used for two fundamentally different concepts . Although the expression "data about data" is often used, it does not apply to both in the same way. Structural metadata, the design and specification of data structures, cannot be about data, because at...

, such as the software's name, description of its purpose, version number, vendor, checksum
Checksum
A checksum or hash sum is a fixed-size datum computed from an arbitrary block of digital data for the purpose of detecting accidental errors that may have been introduced during its transmission or storage. The integrity of the data can be checked at any later time by recomputing the checksum and...

, and a list of dependencies
Coupling (computer science)
In computer science, coupling or dependency is the degree to which each program module relies on each one of the other modules.Coupling is usually contrasted with cohesion. Low coupling often correlates with high cohesion, and vice versa...

 necessary for the software to run properly. Upon installation, metadata is stored in a local package database.

Operating systems based on Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 and other Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

 systems typically consist of hundreds or even thousands of distinct software packages; in the former case, a package management system is a convenience, in the latter case it becomes essential.

Impact

Ian Murdock
Ian Murdock
Ian Murdock is the founder of the Debian distribution and Progeny Linux Systems, a commercial Linux company.- Life and career :Murdock was born in Konstanz, Germany....

 has commented that package management is "the single biggest advancement Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 has brought to the industry", that it blurs the boundaries between operating system and applications, and that it makes it "easier to push new innovations [...] into the marketplace and [...] evolve the OS".

Terminology

A package management system is often called an "install manager". This can
lead to confusion between a package management system and an installer. The differences include:
A package, for package managers, denotes a specific set of files bundled with the appropriate metadata
for use by a package manager. This can be confusing, as some programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

s often use the word "package
Java package
A Java package is a mechanism for organizing Java classes into namespaces similar to the modules of Modula. Java packages can be stored in compressed files called JAR files, allowing classes to download faster as a group rather than one at a time...

" as a specific form of software library. Furthermore, that software library can be distributed in a package of files bundled for a package manager.

Functions

Package management systems are charged with the task of organizing all of the packages installed on a system. Typical functions of a package management system include:
  • Verifying file checksums to ensure correct and complete packages.
  • Verifying digital signatures to authenticate the origin of packages.
  • Applying file archivers to manage encapsulated files.
  • Upgrading software with latest versions, typically from a software repository
    Software repository
    A software repository is a storage location from which software packages may be retrieved and installed on a computer.- Discussion :Many software publishers and other organizations maintain servers on the Internet for this purpose, either free of charge or for a subscription fee...

    .
  • Grouping of packages by function to reduce user confusion.
  • Managing dependencies to ensure a package is installed with all packages it requires.


Some additional challenges are met by only a few package management systems.

Challenges with shared libraries

Computer systems which rely on dynamic library linking, instead of static library
Static library
In computer science, a static library or statically-linked library is a set of routines, external functions and variables which are resolved in a caller at compile-time and copied into a target application by a compiler, linker, or binder, producing an object file and a stand-alone executable...

 linking, share executable libraries of machine instructions across packages and applications. In these systems, complex relationships between different packages requiring different versions of libraries results in a challenge colloquially known as "dependency hell
Dependency hell
Dependency hell is a colloquial term for the frustration of some software users who have installed software packages which have dependencies on specific versions of other software packages. This was mainly attributable to old Linux package managers...

". On Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 systems, this is also called "DLL hell
DLL hell
In computing, DLL Hell is a term for the complications that arise when working with dynamic link libraries used with Microsoft Windows operating systems, particularly legacy 16-bit editions which all run in a single memory space....

" when working with dynamically linked libraries. Good package management systems become vital on these systems.

Front-ends for locally compiled packages

System administrator
System administrator
A system administrator, IT systems administrator, systems administrator, or sysadmin is a person employed to maintain and operate a computer system and/or network...

s may install and maintain software using tools other than package management software. For example, a local administrator may download unpackaged source code, compile it, and install it. This may cause the state of the local system to fall out of synchronization
Synchronization (computer science)
In computer science, synchronization refers to one of two distinct but related concepts: synchronization of processes, and synchronization of data. Process synchronization refers to the idea that multiple processes are to join up or handshake at a certain point, so as to reach an agreement or...

 with the state of the package manager's database
Database
A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...

. The local administrator will be required to take additional measures, such as manually managing some dependencies or integrating the changes into the package manager.

There are tools available to ensure that locally compiled packages are integrated with the package management. For distributions based on .deb and .rpm files as well as Slackware Linux, there is CheckInstall
CheckInstall
CheckInstall is a computer program for Unix-like operating systems which eases the installation and uninstallation of software compiled from source by making use of package management systems...

, and for recipe-based systems such as Gentoo Linux
Gentoo Linux
Gentoo Linux is a computer operating system built on top of the Linux kernel and based on the Portage package management system. It is distributed as free and open source software. Unlike a conventional software distribution, the user compiles the source code locally according to their chosen...

 and hybrid systems such as Arch Linux
Arch Linux
Arch Linux is an independently developed, Linux-based operating system for i686 and x86-64 computers. It is composed predominantly of free and open source software, and supports community involvement....

, it is possible to write a recipe first, which then ensures that the package fits into the local package database.

Maintenance of configuration

Particularly troublesome with software upgrade
Upgrade
The term upgrade refers to the replacement of a product with a newer version of the same product. It is most often used in computing and consumer electronics, generally meaning a replacement of hardware, software or firmware with a newer or better version, in order to bring the system up to date...

s are upgrades of configuration files. Since package management systems, at least on Unix systems, originated as extensions of file archiving utilities
File archiver
A file archiver is a computer program that combines a number of files together into one archive file, or a series of archive files, for easier transportation or storage...

, they can usually only either overwrite or retain configuration files, rather than applying rules to them. There are exceptions to this that usually apply to kernel configuration (which, if broken, will render the computer unusable after a restart). Problems can be caused if the format of configuration files changes. For instance, if the old configuration file does not explicitly disable new options that should be disabled. Some package management systems, such as Debian
Debian
Debian is a computer operating system composed of software packages released as free and open source software primarily under the GNU General Public License along with other free software licenses. Debian GNU/Linux, which includes the GNU OS tools and Linux kernel, is a popular and influential...

's dpkg
Dpkg
dpkg is the software at the base of the Debian package management system. dpkg is used to install, remove, and provide information about .deb packages....

, allow configuration during installation. In other situations, it is desirable to install packages with the default configuration and then overwrite this configuration, for instance, in headless
Headless system
A headless system is a computer system or device that has been configured to operate without a monitor , keyboard and mouse...

 installations to a large number of computers. (This kind of pre-configured installation is also supported by dpkg
Dpkg
dpkg is the software at the base of the Debian package management system. dpkg is used to install, remove, and provide information about .deb packages....

.)

Repositories

In order to give users more control over the kinds of software that they are allowing to be installed on their system (and sometimes due to legal or convenience reasons on the distributors' side), software is often downloaded from a number of software repositories
Software repository
A software repository is a storage location from which software packages may be retrieved and installed on a computer.- Discussion :Many software publishers and other organizations maintain servers on the Internet for this purpose, either free of charge or for a subscription fee...

.

Upgrade suppression

When a user interacts with the package management software to bring about an upgrade, it is customary to present the user with the list of things to be done (usually the list of packages to be upgraded, and possibly giving the old and new version numbers), and allow the user to either accept the upgrade in bulk, or select individual packages for upgrades. Many package management systems can be configured to never upgrade certain packages, or to upgrade them only when critical vulnerabilities or instabilities are found in the previous version, as defined by the packager of the software. This process is sometimes called version pinning.

For instance:
  • yum
    Yellow dog Updater, Modified
    The Yellowdog Updater, Modified is an open-source command-line package-management utility for RPM-compatible Linux operating systems and has been released under the GNU General Public License. It was developed by Seth Vidal and a group of volunteer programmers...

     supports this with the syntax exclude=openoffice*,
  • pacman with IgnorePkg = openoffice (to suppress upgrading openoffice in both cases)
  • dpkg
    Dpkg
    dpkg is the software at the base of the Debian package management system. dpkg is used to install, remove, and provide information about .deb packages....

     and dselect
    Dselect
    dselect is a computer program used to manage software packages in the Debian operating system.dselect is one of the oldest front-ends to dpkg, and the bulk of its development happened when it was originally written by Ian Jackson, who wrote it alongside dpkg....

     support this partially through the hold flag in package selections
  • APT
    Advanced Packaging Tool
    The Advanced Packaging Tool, or APT, is a free user interface that works with core libraries to handle the installation and removal of software on the Debian GNU/Linux distribution and its variants...

     extends the hold flag through the complex "pinning" mechanism
    • Users can also blacklist a package
  • aptitude
    Aptitude (program)
    aptitude is a front-end to the Advanced Packaging Tool . It displays a list of software packages and allows the user to interactively pick packages to install or remove. It has an especially powerful search system utilizing flexible search patterns...

     has "hold" and "forbid" flags
  • portage
    Portage (software)
    Portage is a package management system used by Gentoo Linux, based on the concept of ports collections. Gentoo is sometimes referred to as a meta-distribution due to the extreme flexibility of Portage, which makes it operating-system-independent. The Gentoo/Alt project is concerned with using...

     supports this through the package.mask configuration file
  • DotPet from .PET packages in Puppy Linux
    Puppy Linux
    Puppy Linux is a lightweight Linux distribution that focuses on ease of use. The entire system can be run from RAM, allowing the boot medium to be removed after the operating system has started...

    , but is efficient in console and lightweight

Cascading package removal

Some of the more advanced package management features offer "cascading package removal", in which all packages that depend on the target package and all packages that only the target package depends on, are also removed.

Package formats

Each package manager relies on the format and metadata of the packages it can manage. That is, package managers need groups of files to be bundled for the specific package manager along with appropriate metadata, such as dependencies. Often, a core set of utilities manages the basic installation from these packages and multiple package managers use these utilities to provide additional functionality.

For example, yum
Yellow dog Updater, Modified
The Yellowdog Updater, Modified is an open-source command-line package-management utility for RPM-compatible Linux operating systems and has been released under the GNU General Public License. It was developed by Seth Vidal and a group of volunteer programmers...

 relies on rpm
RPM Package Manager
RPM Package Manager is a package management system. The name RPM variously refers to the .rpm file format, files in this format, software packaged in such files, and the package manager itself...

 as a backend. Yum extends the functionality of the backend by adding features such as simple configuration for maintaining a network of systems. As another example, the Synaptic Package Manager
Synaptic Package Manager
Synaptic is a computer program which is a GTK+ graphical user interface front-end to the Advanced Packaging Tool for the Debian package management system. Synaptic is usually used on systems based on deb packages but can also be used on systems based on RPM packages...

 provides a graphical user interface by using the Advanced Packaging Tool (apt)
Advanced Packaging Tool
The Advanced Packaging Tool, or APT, is a free user interface that works with core libraries to handle the installation and removal of software on the Debian GNU/Linux distribution and its variants...

 library, which, in turn, relies on dpkg
Dpkg
dpkg is the software at the base of the Debian package management system. dpkg is used to install, remove, and provide information about .deb packages....

 for core functionality.

Alien
Alien (software)
Alien is a computer program that converts between different Linux package formats, written by Joey Hess.-Features:Alien supports conversion between Linux Standard Base, RPM, deb, Stampede , Solaris and Slackware packages...

 is a program that converts between different Linux package formats
Linux package formats
Linux package formats are the different file formats used to package software for various Linux distributions. These are the principal kinds of package:* Binary packages* Source packages-Examples:* deb — Debian package, originally from Debian...

. It supports conversion between Linux Standard Base
Linux Standard Base
The Linux Standard Base is a joint project by several Linux distributions under the organizational structure of the Linux Foundation to standardize the software system structure, including the filesystem hierarchy, used with Linux operating system...

 conform RPM
RPM Package Manager
RPM Package Manager is a package management system. The name RPM variously refers to the .rpm file format, files in this format, software packaged in such files, and the package manager itself...

, deb
Deb (file format)
deb is the extension of the Debian software package format and the most often used name for such binary packages. Like the "Deb" part of the term Debian, it originates from the name of Debra, erstwhile girlfriend and now ex-wife of Debian's founder Ian Murdock.Debian packages are also used in...

, Stampede (.slp) and Slackware
Slackware
Slackware is a free and open source Linux-based operating system. It was one of the earliest operating systems to be built on top of the Linux kernel and is the oldest currently being maintained. Slackware was created by Patrick Volkerding of Slackware Linux, Inc. in 1993...

 (tgz) packages.

Free and open source software systems

By the nature of free and open source software
Free and open source software
Free and open-source software or free/libre/open-source software is software that is liberally licensed to grant users the right to use, study, change, and improve its design through the availability of its source code...

, packages under similar and compatible licenses are available for use on a number of operating systems. These packages can be combined and distributed using configurable and internally complex packaging systems to handle many permutations of software and manage version-specific dependencies and conflicts. Some packaging systems of free and open source software are also themselves released as free and open source software. One typical difference between package management in proprietary operating systems, such as Mac OS X and Windows, and those in free and open source software, such as Linux, is that free and open source software systems permit third-party packages to also be installed and upgraded through the same mechanism, whereas the package management systems of Mac OS X and Windows will only upgrade software provided by Apple and Microsoft, respectively (with the exception of some third party drivers in Windows). The ability to continuously upgrade third party software is typically added by adding the URL
Uniform Resource Locator
In computing, a uniform resource locator or universal resource locator is a specific character string that constitutes a reference to an Internet resource....

of the corresponding repository to the package management's configuration file.

Application-level package managers

Besides the systems-level application managers, there are some add-on package managers for operating systems with limited capabilities and for programming languages where developers need the latest libraries.

In contrast to systems-level application managers, application-level package managers focus on a small part of the software system. They typically reside within a directory tree that is not maintained by the systems-level package manager (like c:\cygwin or /usr/local/fink). However, this is not the case for the package managers that deal with programming libraries. This leads to a conflict as both package managers claim to "own" a file and might break upgrades.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK