Package management

from Wikipedia, the free encyclopedia
YUM installs updates on a Fedora 16 system.
aptitude with command line commands on Debian
aptitude also offers a TUI
PackageKit is a graphical user interface for various package administrations, here on a RHEL 6 system.
The Ubuntu Software Center is a graphical user interface for dpkg / APT, is under the GPL and is not only available under Ubuntu

A package management ( english package management software ) allows convenient management of software in the form of program packages is present on a operating system . This includes installing, updating, and uninstalling .

Working method

The prerequisite for package management is that the software to be installed is available as a corresponding package. Typically this is created, offered and maintained centrally by the operating system provider , under Linux the distributions . This means that software is typically integrated directly into the system and its various function directories. Changes that the package management has to make to install the package on the system are read from the package and implemented by the system. If the package management recognizes that further software is required for the functioning of the system (so-called dependency , e.g. a program library ) but has not yet been installed, it either warns or tries to replace the missing software with the means available to it, e.g. . B. from a repository , reload and install in advance.

If an installed software is to be deleted, the package management then takes the information of the package again to change it based on its configuration and to delete files.

properties

A package manager simplifies the installation of a program considerably, since programs do not have to be downloaded, compiled and installed individually. In addition, most package managers monitor conflicts between packages with the same content and thus prevent system instability in this relationship.

The deletion of software is also significantly simplified: since the package management system remembers all software belonging to a package, all software that is no longer required can be removed when a package is deleted.

Overlapping definitions

Strictly speaking, there are two types of package management: on the one hand there are programs that can reload packages from other sources in order to resolve dependencies, and on the other hand those programs that install or delete the packages directly, but do not have dependency management and conflict resolution mechanisms know.

Two specific cases: the RPM program can install and delete packages of the type * .rpm , the program Dpkg can install and delete packages of the type * .deb . However, neither of them can resolve any dependencies, as they have no functions for reloading software. This can be done by higher layers of the package administration such as YUM , APT , pkg-get and others.

Structure of the packages

In addition to the pure program files, a package also contains information about where these program files are to be stored, which configurations must be made on the existing system, and usually also whether and if which software is also required for the program to work. During installation, the program files in the package are extracted into the current system or the system to be installed, after which the installation scripts are executed.

There are several competing package formats that are processed by different package administrators. The most important are:

  • pkgadd (and other programs) the package manager introduced by AT&T for Unix in 1984
  • RPM Package Manager (RPM), used by Red Hat , Fedora , Mandriva , OpenSUSE etc.
  • Debian Package Manager (dpkg) with .deb files, found in Debian and derivatives (e.g. Ubuntu )
  • Slackware uses packets that, like in the archiving format TGZ (tar.gz) and packaged (since Slackware 13) TXZ (tar.xz) as a tarball called
  • Portage at Gentoo
  • Package (.pkg) and Metapackage (.mpkg) for macOS
  • FreeBSD and OpenBSD use both BSD ports, i.e. makefiles that contain the entire build process from downloading the source code to installing it, as well as binary packages in tar.gz format.
  • iPKG is a format for computers with few resources (e.g. WLAN routers) and the like. a. of OpenWrt used
  • NuSpec (.nuspec) is a format for NuGet packages
  • Flatpak a cross-distribution package management with its own framework for sandboxing the applications.
  • Snappy a package management system in which packages have no dependencies on other packages.
  • Oneget a package manager that is integrated in Windows 10 and can be operated with PowerShell . So far, there are hardly any packages for this.

Package creation

Building packages is not a trivial matter. Even in small projects there is usually a packager that is responsible for ensuring that packages work.

The packager takes the program sources and enters in a file which programs are required for compilation. Then he creates rules for how the program can be automatically compiled. He also collects and writes patches , which are applied automatically, and writes a short description of the package.

The finished source package can now be automatically precompiled for the desired platform.

Special packages

It should be noted that many packages appear twice in some Linux distributions. The second entry is the actual package with a following dev or devel . This abbreviation stands for Development, which indicates that it contains files that are not important for the functioning of the program, but are needed if you want to develop further software based on them.

Advantages and disadvantages

Package management is described as one of the great advantages and successes of the Unix operating systems, e.g. B. by Ian Murdock as "the single biggest advancement Linux has brought to the industry". Another typical characteristic of this is the blurring of the boundaries between applications and operating system due to the integrated management by the distributions , i. H. the operating system does not act as a platform for applications, but contains them. On the one hand, a system-wide package management ensures conflict-free operation (without library conflicts ) between the operating system and the applications; on the other hand, direct distribution of application software by the developer to customers becomes more difficult, as does the creation of portable software . By incompatible packets between the distributions, the distribution of software is also difficult; here against the attempts LSB , standards to define and spread until now but only with limited success.

There can also be conflicts in software management (but these are recognized): If packages A and B contain partially identical files, both packages cannot be installed at the same time. On a system without a package manager, the files would be overwritten, which can lead to problems with the execution of the affected software. It can also happen that when package X is updated, package Y is also requested, but package Z demands that Y keep the version - an update is then not possible. Good package management distinguishes itself by correctly calculating conflicts and dependencies and arriving at the best possible solution, i.e. updating the correct packages, deleting outdated packages if necessary and resolving the conflict in the best possible way.

Source-based distributions such as Gentoo Linux counter these problems in this way: Here, the software packages are only compiled on the target computer . It is also possible to adapt the components and thus the dependencies of a package. If a package that has already been installed does not have the required libraries installed for a new package, it is quickly compiled and reinstalled.

Alternatives and related concepts

Nix is a new and alternative functional package manager system that aims to overcome some of the disadvantages of traditional package managers, such as the cross-distribution "Dependency Hell".

Application distribution via “containerization” or “app directories” is an alternative approach that has been tried out for unixode systems since the mid-2000s and which relies on consistent isolation from the basic system instead of well-defined integration into the basic system. One of the first examples of this was Autopackage 2005; others are Zero Install , PortableLinuxApps or Docker .

A concept that is closely related to package management has current app stores that are mainly used for smartphones , for example the Google Play Store, Mac App Store , Samsung Galaxy Store or the Microsoft Store . Although they are technically partly based on the same fundamentals as classic package management, there are also significant conceptual differences, for example app stores tend to map a decentralized “ binary platform provider-to- ISV ” architecture instead of a centralized distro structure.

Examples of package management

Individual evidence

  1. Nuspec Reference. Retrieved August 7, 2013 (NuGet documentation for NuSpec packages).
  2. ^ Ian Murdock : How package management changed everything ( English ) ianmurdock.com. July 21, 2007. Archived from the original on February 23, 2009. Info: The archive link was automatically inserted and not yet checked. Please check the original and archive link according to the instructions and then remove this notice. Retrieved March 1, 2008. @1@ 2Template: Webachiv / IABot / ianmurdock.com
  3. Tony Mobily: 2009: software installation in GNU / Linux still broken and a path to fixing it ( English ) www.freesoftwaremagazine.com. June 23, 2009. Archived from the original on June 26, 2009. Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. Retrieved March 23, 2010: "Every GNU / Linux distribution at the moment (including Ubuntu) confuses system software with end user software, whereas they are two very different beasts which should be treated very, very differently." @1@ 2Template: Webachiv / IABot / www.freesoftwaremagazine.com
  4. Benjamin Smedberg: Is Ubuntu an Operating System? ( English ) October 4, 2006. Retrieved January 20, 2012: “Ubuntu isn't trying to be a platform for mass-market application software: it is trying to be the primary provider of both the operating system and all the application software that a typical user would want to run on his machine. Most Linux distributions are like this, and I think it is a dangerous trend that will stifle innovation and usability, or even worse make the desktop irrelevant. "
  5. Joe Brockmeier: Autopackage 1.0 ( English ) lwn.net. March 30, 2005. Retrieved January 24, 2012: “Overall, Autopackage is a very promising project. It makes it possible for third-parties to distribute software for Linux users […] It's too bad that such a system is still necessary at this time, but it fills a necessary gap until the day that Linux distributions can settle on a standard base system and packaging format. "
  6. ^ Nicholas Vining: Dear Linux Community: We Need To Talk. ( English ) gaslamp Games. October 13, 2010. Retrieved January 30, 2011.
  7. Simon Peter: AppImageKit Documentation 1.0 ( English , PDF; 38 kB) PortableLinuxApps.org. Pp. 2-3. 2010. Archived from the original on November 29, 2010. Info: The archive link has been inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. Retrieved on July 29, 2011: "Not easy to move an app from one machine to another: If you've used an app on one machine and decide that you would like to use the same app either under a different base operating system (say , you want to use OpenOffice on Fedora after having used it on Ubuntu) or if you would simply take the app from one machine to another (say from the desktop computer to the netbook), you have to download and install the app again (if you did not keep around the installation files and if the two operating systems don't share the exact same package format - both of which is rather unlikely). " @1@ 2Template: Webachiv / IABot / portablelinuxapps.org
  8. ^ Eskild Hustvedt: Playing well with distros ( English ) Linux Game Publishing . November 24, 2009. Archived from the original on September 21, 2011. Retrieved January 15, 2012.
  9. Eric Brown: LSB 4.0 certifications aim to heal Linux fragmentation ( en ) linuxfordevices.com. December 8, 2010. Archived from the original on December 24, 2013. Info: The archive link was automatically inserted and not yet checked. Please check the original and archive link according to the instructions and then remove this notice. Retrieved November 16, 2011: "The LSB spec outlines interoperability between applications and the Linux operating system," allowing application developers to target multiple versions of Linux with just one software package, "says the LF. Launched in the late '90s, the LSB working group released its first major LSB 1.1 specification in 2001. [...] " @1@ 2Template: Webachiv / IABot / archive.linuxgizmos.com
  10. Dolstra, E., de Jonge, M. and Visser, E. "Nix: A Safe and Policy-Free System for Software Deployment." ( Memento of the original from March 5, 2012 in the Internet Archive ) Info: The archive link became automatic used and not yet tested. Please check the original and archive link according to the instructions and then remove this notice. In Damon, L. (Ed.), 18th Large Installation System Administration Conference (LISA '04) , pages 79-92, Atlanta, Georgia, USA. USENIX, November 2004. @1@ 2Template: Webachiv / IABot / www.st.ewi.tudelft.nl
  11. Dolstra, E. The Purely Functional Software Deployment Model. ( Memento of the original from March 5, 2012 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. PhD thesis, Faculty of Science, Utrecht, The Netherlands. January 2006. ISBN 90-393-4130-3 . @1@ 2Template: Webachiv / IABot / www.st.ewi.tudelft.nl
  12. Pjotr ​​Prins, Jeeva Suresh, and Eelco Dolstra: Nix fixes dependency hell on all Linux distributions ( English ) linux.com. December 22, 2008. Retrieved May 2, 2015: “ The problems: destructive upgrades, software versioning, heterogenous environments. All popular package managers, including APT, RPM and the FreeBSD Ports Collection, suffer from the problem of destructive upgrades. When you perform an upgrade - whether for a single application or your entire operating system - the package manager will overwrite the files that are currently on your system with newer versions. As long as packages are always perfectly backward-compatible, this is not a problem, but in the real world, packages are anything but perfectly backward-compatible. "
  13. ^ Ingo Molnar: Technology: What ails the Linux desktop? I. Part . plus.google.com. March 17, 2012. Retrieved on June 16, 2012: " Desktop Linux distributions are trying to" own "20 thousand application packages consisting of over a billion lines of code and have created parallel, mostly closed ecosystems around them. The typical update latency for an app is weeks for security fixes (sometimes months) and months (sometimes years) for major features. They are centrally planned, hierarchical organizations instead of distributed, democratic free societies. […] The exact opposite direction: Apple / iOS and Google / Android consist of around a hundred tightly integrated core packages only, managed as a single well-focused project. Those are developed and QA-ed with 10 times the intensity of the 10,000 packages that Linux distributions control. It is a lot easier to QA 10 million lines of code than to QA 1000 million lines of code. "
  14. Ian Murdock : Software installation on Linux: Today, it sucks (part 1) ( English ) ianmurdock.com. July 21, 2007. Archived from the original on April 3, 2015. Info: The archive link was automatically inserted and not yet checked. Please check the original and archive link according to the instructions and then remove this notice. Retrieved on May 1, 2015: " If it's in your distro of choice, you're only an apt-get or a yum install away from running it. But if not, you'd better know what you're doing, have a lot of patience, and understand how to construct effective Google search terms. (And, no, moving everything into the distribution is not a very good option. Remember that one of the key tenets of open source is decentralization, so if the only solution is to centralize everything, there's something fundamentally wrong with this picture.) " @1@ 2Template: Webachiv / IABot / ianmurdock.com
  15. Bruce Byfield: Autopackage: Toward a universal package manager for the desktop ( en ) linux.com. December 1, 2005. Archived from the original on January 13, 2008. Retrieved on February 12, 2012.
  16. Package launcher