Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Package manager

From Wikipedia, the free encyclopedia
(Redirected fromPackage management system)
Application for handling software
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Package manager" – news ·newspapers ·books ·scholar ·JSTOR
(December 2022) (Learn how and when to remove this message)

Synaptic, an example of aGUI for theAPT package manager

Apackage manager orpackage management system (PMS) is a collection ofsoftware tools that automates the process ofinstalling, upgrading, configuring, and removingcomputer programs for acomputer in a consistent manner.[1]

A package manager deals withpackages, distributions of software and data inarchive files. Packages containmetadata, such as the software's name, description of its purpose,version number, vendor,checksum (usually acryptographic hash function), and a list ofdependencies necessary for the software to run properly. Upon installation, metadata is stored in a local packagedatabase. Package managers typically maintain a database of software dependencies and version information to prevent software mismatches and missing prerequisites. They work closely withsoftware repositories,binary repository managers, andapp stores.

Package managers are designed to eliminate the need for manual installs and updates. This can be particularly useful for large enterprises whoseoperating systems (OSes) typically consist of hundreds or even tens of thousands of distinct packages.[2]

History

[edit]

An early package manager wasSMIT (and itsbackend install) fromIBM AIX. SMIT was introduced with AIX 3.0 in 1989.[citation needed] Package managers likedpkg have existed as early as 1994.[3] Early package managers, from around 1994, had no automaticdependency resolution[4] but could already simplify the process of adding and removing software from a running system.[5]

By around 1995, beginning withCPAN, package managers began handling package repository downloads, and dependency resolution and installation as needed, making it easier to install, uninstall and update software.[6]

Functions

[edit]
Illustration of a package manager being used todownload new software. Manual actions can include accepting asoftware license agreement or selecting package-specific configuration options.

A software package is anarchive file containing a computer program as well as necessary metadata for itsdeployment. The program may be insource code that has to becompiled and built first.[7] Package metadata include the software's description, version number, and dependencies.

Package managers are charged with the task of finding, installing, maintaining or uninstalling packages upon the user's command. Typical functions of a package management system include:

  • Usingfile archivers to extract package archives
  • Ensuring the integrity and authenticity of the package by verifying theirchecksums anddigital certificates, respectively
  • Looking up, downloading, installing, or updating existing software from asoftware repository orapp store
  • Grouping packages by function to reduce user confusion
  • Managing dependencies to ensure a package is installed with all the packages it requires, and avoidingdependency hell

Challenges with shared libraries

[edit]

Computer systems that rely ondynamic library linking, instead ofstatic library linking, share executable libraries of machine instructions across packages and applications. In these systems, conflicting relationships between different packages requiring different versions of libraries results in a situation calleddependency hell. OnMicrosoft Windows systems, this is also calledDLL hell when working with dynamically-linked libraries.[8]

Modern[when?] package managers have mostly solved these problems by allowing parallel installation of multiple library versions (e.g.OPENSTEP'sFramework system), a dependency of any kind (e.g.slots in GentooPortage), and even packages compiled with different compiler versions (e.g. dynamic libraries built by theGlasgow Haskell Compiler, where a stableABI does not exist), in order to enable other packages to specify which version they are linked or installed against.

Front-ends for locally-compiled packages

[edit]

System administrators may install and maintain software using tools other than package managers. For example, a local administrator maydownload unpackaged source code, compile it, and install it. This may cause the local system to fall out ofsynchronization with the package manager'sdatabase. 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 to ensure that locally-compiled packages are integrated with the package management. For operating systems based on.deb and.rpm files as well asSlackware Linux, there isCheckInstall, and for recipe-based systems such asGentoo Linux and hybrid systems such asArch Linux, it is possible to write a recipe first, which then ensures that the package fits into the local package database.[citation needed]

Maintenance of configuration

[edit]

Upgrades ofconfiguration files may be particularly troublesome. Since package managers, at least onUnix systems, originated as extensions of file archivers, they can usually only overwrite or retain configuration files, rather than apply rules to them. There are exceptions to this that usually apply tokernel configuration (which, if broken, will render the computer unusable after a restart). Problems can be caused if the configuration file format changes; for instance, if the old file does not explicitly disable new options that should be disabled. Some package managers, such asDebian's dpkg, allow configuration during installation. In other situations, packages are installed with the default configuration, which is then overwritten, for example inheadless installations to a large number of computers. This kind of pre-configured installation is also supported by dpkg.

Repositories

[edit]

To give users more control over the software they allow to be installed on their systems, and sometimes due to legal or convenience reasons on the distributors' side, packages are often downloaded fromsoftware repositories.[9][better source needed]

Upgrade suppression

[edit]

When a user is upgrading a package with package management software, it is customary for them to be presented with the actions to be executed (usually the list of packages to be upgraded, and possibly the old and new version numbers), and allow them to either accept the upgrade in bulk, or select individual packages for upgrading. Many package managers can be configured to never upgrade certain packages, or to upgrade them only when criticalvulnerabilities or instabilities are found in the previous version, as defined by the packager of the software. This process is calledupgrade suppression, orversion pinning. For instance, to prevent upgrades to theOpenOffice program:

Cascading package removal

[edit]

Some of the more advanced package management features offercascading package removal,[11] in which all packages that depend on the target package and all packages that only it depends on are also removed.

Comparison of commands

[edit]
This sectionmay containexcessive orirrelevant examples. Please helpimprove it by removingless pertinent examples andelaborating on existing ones.(September 2025) (Learn how and when to remove this message)

Although commands are specific to each package manager, they are translatable to a large extent, as most package managers offer similar functions. The Arch Linux wiki offers an extensive overview of commands.[14]

${PKG} or%PKG% is the package name.
ActionHomebrewAPTPacmandnf (yum)portagezypper[15]NixXBPS[16]swupd[17]WinGet
Install packagebrewinstall${PKG}aptinstall${PKG}pacman-S${PKG}dnfinstall${PKG}emerge${PKG}zypperin${PKG}nix-env-i${PKG}xbps-install${PKG}swupdbundle-add${PKG}winget install%PKG%
Remove packagebrewuninstall${PKG}aptremove${PKG}pacman-R${PKG}dnfremove--nodeps${PKG}emerge-C${PKG} or
emerge--unmerge${PKG}
zypperrm-RU${PKG}nix-env-e${PKG}xbps-remove${PKG}swupdbundle-remove${PKG}winget uninstall%PKG%
Update software databasebrewupdateaptupdatepacman-Sydnfcheck-updateemerge--synczypperrefnix-channel--upgradexbps-install-Sswupdupdate--download or
swupdupdate--update-search-file-index
winget upgrade
Show updatable packagesbrewoutdatedaptlist--upgradablepacman-Qudnfcheck-updateemerge-avtuDN--with-bdeps=y@world or
emerge-u--pretend@world
(-D is shorthand for--deep and
-u is shorthand for--update.)
zypperlu
nix-channel--upgrade&&\nix-env-u&&\nix-collect-garbage
./xbps-srcupdate-check${PKG}(requires void-packages repository)swupdupdate-s or
swupdcheck-update
winget upgrade
Update allbrewupgradeaptupgradepacman-Syudnfupdateemerge-u-D--with-bdeps=y@worldzypperupnix-env-u&&nix-collect-garbagexbps-install-Suswupdupdatewinget upgrade --all
Delete orphans and configbrewautoremove&&brewcleanupaptautoremovepacman-Rsn$(pacman-Qdtq)emerge--depcleanzypperrm-unix-collect-garbage-dxbps-remove-of
swupdbundle-remove--orphans&&\swupdclean--all
Show orphansbrewautoremove--dry-runpacman-Qdtpackage-cleanup-q--leaves--exclude-bin
(-q is shorthand for--quiet.)
emerge-caD or
emerge--depclean--pretend
zypperpa--orphaned--unneededxbps-remove-oswupdbundle-list--orphans
Remove package (and orphans)
brewuninstall${PKG}&&brewautoremove
aptautoremove${PKG}pacman-Rs${PKG}dnfremove${PKG}emerge-c${PKG} or
emerge--depclean${PKG}
zypperrm-u--force-resolution${PKG}nix-env-e${PKG}&&nix-env-uxbps-remove-R${PKG}
swupdbundle-remove${PKG}&&\swupdbundle-remove--orphans
winget uninstall%PKG%

Prevalence

[edit]

Linux distributions oriented tobinary packages rely heavily on package management systems as their primary means of managing and maintaining software.Mobile operating systems such asAndroid (Linux-based) andiOS (Unix-based) rely almost exclusively on their respective vendors' app stores and thus use their own dedicated package management systems.

Similar programs and platforms

[edit]

Installers

[edit]

A package manager is often called aninstall manager, which can lead to a confusion between package managers andinstallers. The differences include:

This box:
CriterionPackage managerInstaller
Shipped withUsually, the operating systemEach computer program
Location of installation informationOne central installation databaseIt is entirely at the discretion of the installer. It could be a file within the app's folder, or among the operating system's files and folders. At best, they may register themselves with an uninstallers list without exposing installation information.
Scope of maintenancePotentially all packages on the systemOnly the product with which it was bundled
Developed byOne package manager vendorMultiple installer vendors
Package formatA handful of well-known formatsThere could be as many formats as the number of apps
Package format compatibilityCan be consumed as long as the package manager supports it. Either newer versions of the package manager keep supporting it or the user does not upgrade the package manager.The installer is always compatible with itsarchive format, if it uses any. However, installers, like all computer programs, may be affected bysoftware rot.

Build automation utilities

[edit]

Mostsoftware configuration management systems treat building software and deploying software as separate, independent steps. Abuild automation utility typically takes human-readablesource code files already on a computer, and automates the process of converting them into anexecutable package on the same or a remote computer. Later, a package manager typically running on another computer downloads the pre-built executable and installs it.

However, both kinds of tools have many commonalities:

  • Topological sorting of thedependency graph used in a package manager to handle dependencies between binary components is also used in a build manager to handle dependencies between source components.
  • Manymakefiles support not only building executables, but also installing them withmake install.
  • Every package manager for asource-based distribution – such asPortage,Sorcery, orHomebrew – supports converting source code to binary executables and installing it.

A few tools, such asMaak andA-A-P, are designed to handle both building and deployment, and can be used as either build automation utilities, package managers, or both.[18]

App stores

[edit]

App stores can also be considered application-level package managers (without the ability to install all levels of programs[19][20]). Unlike traditional package managers, app stores are designed to enable payment for the software itself (instead of for software development), and may only offermonolithic packages with no dependencies or dependency resolution.[21][20] They are usually limited in their management functionality, due to focusing on ease-of-use over power oremergence, and are common in commercial operating systems andsmart devices.

Package managers also often have only human-reviewed code. Many app stores, such as Google Play and Apple's App Store, mainly screen apps using automated tools only;malware can pass these tests by detecting when the app is being tested, and delaying malicious activity.[22][23][24] There are exceptions: thenpm package database, for instance, relies entirely onpostpublication review of its code,[25][26] while the Debian package database has an extensive human review process before any package goes into the main database. TheXZ Utils backdoor used years of trust-building to insert a backdoor, which was nonetheless caught while in thetesting database.

Common package managers and formats

[edit]

Universal package manager

[edit]

Also known asbinary repository manager, it is a software tool designed to optimize the download and storage of binary files, artifacts and packages used and produced in thesoftware development process.[27] These package managers aim to standardize the way enterprises treat all package types. They give users the ability to apply security and compliance metrics across all artifact types. Universal package managers have been referred to as being at the center of aDevOps toolchain.[28]

Package formats

[edit]
Main articles:Package format andFile archive

Each package manager relies on the format and metadata of the packages in its repository. That is, package managers need groups of files to be bundled 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 relies onrpm as abackend. Yum extends the functionality of rpm by adding features such as simple configuration for maintaining a network of systems. As another example, theSynaptic Package Manager provides a graphical user interface by using theAdvanced Packaging Tool (apt) library, which in turn relies ondpkg for core functionality.

Alien is a program that converts between differentLinux package formats, supporting conversion betweenLinux Standard Base (LSB) compliant.rpm packages,.deb, Stampede (.slp),Solaris (.pkg) andSlackware (.tgz,.txz, .tbz, .tlz) packages.

For mobile operating systems,Google Play uses theAndroid application package (APK) package format whileMicrosoft Store uses theAPPX andXAP formats. Both Google Play and Microsoft Store have eponymous package managers.

Free and open source software systems

[edit]

By the nature offree and open-source software (FOSS), packages under similar and compatible licenses are available on a number of operating systems. These packages can be combined and distributed using configurable packaging systems to handle many permutations of software and manage version-specific dependencies and conflicts. Some managers of FOSS packages are released as FOSS themselves. 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 managers 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 theURL of the corresponding repository to the package management's configuration file.

Application-level package managers

[edit]
See also:List of software package management systems § Application-level package managers

Besides system-level application managers, there are add-on package managers for operating systems with limited capabilities and forprogramming languages in which developers need the latestlibraries.

Unlike system-level package managers, application-level package managers focus on a small part of the software system. They typically reside within adirectory tree that is not maintained by the system-level manager, such asc:\cygwin or/opt/sw.[29] This may not be the case for managers that deal with programming libraries, leading to possible conflicts, as both managers may claim to own a file and may break upgrades.

Impact

[edit]

Ian Murdock commented that package management is "the single biggest advancementLinux has brought to the industry", that it blurs the boundaries between operating systems and applications, and that it makes it "easier to push new innovations [...] into the marketplace and [...] evolve the OS".[30][self-published source]

There is also a conference for package manager developers known as PackagingCon. It was established in 2021 with the aim to understand different approaches to package management.[31]

See also

[edit]

References

[edit]
  1. ^"What is a package manager?".debian.org. Archived fromthe original on 17 October 2017. Retrieved19 December 2018.
  2. ^"Software Distribution". Dell KACE. Archived fromthe original on 3 October 2015. Retrieved11 July 2012.
  3. ^"dpkg version 0.93.15 source code". Archived fromthe original on 2 April 2015. Retrieved19 December 2018.
  4. ^"The history of *nix package management". 14 August 2017.Archived from the original on 24 October 2021. Retrieved12 October 2021.
  5. ^"A review of InfoMagic's December 1994 Release".Archived from the original on 29 October 2021. Retrieved12 October 2021.
  6. ^"The Timeline of Perl and its Culture".Archived from the original on 11 January 2013. Retrieved29 October 2021.
  7. ^Ludovic Courtès,Functional Package Management with GuixArchived 15 May 2020 at theWayback Machine, June 2013, Madrid, European Lisp Symposium 2013
  8. ^Tucker, Chris (15 March 2007)."OPIUM: Optimal Package Install/Uninstall Manager"(PDF).29th International Conference on Software Engineering (ICSE'07). UC San Diego. p. 1.doi:10.1109/ICSE.2007.59.ISBN 978-0-7695-2828-1.S2CID 1279451.Archived(PDF) from the original on 14 June 2011. Retrieved14 September 2011.
  9. ^"Linux repository classification schemes". braintickle.blogspot.com. 13 January 2006.Archived from the original on 11 October 2007. Retrieved1 March 2008.
  10. ^"CentOS yum pinning rpms". centos.org. Archived from the original on 2 November 2007. Retrieved1 March 2008.
  11. ^ab"pacman(8) Manual Page".archlinux.org.Archived from the original on 31 August 2019. Retrieved1 March 2008.
  12. ^"How to keep specific versions of packages installed (complex)". debian.org. Archived fromthe original on 14 November 2019. Retrieved1 March 2008.
  13. ^"Apt pinning to blacklist a package". Archived fromthe original on 22 July 2011. Retrieved19 August 2010.
  14. ^"Pacman/Rosetta – ArchWiki".wiki.archlinux.org.Archived from the original on 20 November 2016. Retrieved17 September 2017.
  15. ^"documentation/sles11".en.opensuse.org.Archived from the original on 1 December 2022. Retrieved16 August 2017.
  16. ^"XBPS Package Manager - Void Linux Handbook".docs.voidlinux.org.Archived from the original on 23 January 2023. Retrieved19 December 2022.
  17. ^"swupd-client/swupd.1.rst at master: clearlinux/swupd-client".GitHub.com.Archived from the original on 7 December 2022. Retrieved22 June 2022.
  18. ^Eelco Dolstra,"Integrating Software Construction and Software Deployment".Archived 21 September 2019 at theWayback Machine.
  19. ^"Brew is the macOS app store replacement you didn't know you needed".www.msn.com. Retrieved25 May 2024.
  20. ^abKing, Bertel (17 March 2017)."Linux App Stores Compared: Which One Is Right for You?".MUO. Retrieved25 May 2024.
  21. ^"What is a package manager?".www.debian.org.
  22. ^Barrett, Brian."How 18 Malware Apps Snuck Into Apple's App Store".Wired.
  23. ^Whittaker, Zack (24 October 2019)."Millions downloaded dozens of Android apps from Google Play that were infected with adware".TechCrunch.
  24. ^Newman, Lily Hay."Never Ever (Ever) Download Android Apps Outside of Google Play".Wired.
  25. ^Ojamaa, Andres; Duuna, Karl (2012)."Assessing the Security of Node.js Platform".2012 International Conference for Internet Technology and Secured Transactions. IEEE.ISBN 978-1-4673-5325-0. Retrieved22 July 2016.
  26. ^"npm Code of Conduct: acceptable package content". Retrieved9 May 2017.
  27. ^Waters, John K. (8 September 2015)."JFrog Releases 'Universal' Artifact Repository".ADT Mag. Application Development Trends Magazine.Archived from the original on 2 March 2016. Retrieved19 February 2016.
  28. ^Decoster, Xavier (18 August 2013)."An Overview of the NuGet Ecosystem".CodeProject.com.Archived from the original on 5 July 2020. Retrieved6 February 2020.
  29. ^"Fink – Home".finkproject.org.Archived from the original on 18 August 2021. Retrieved2 September 2021.
  30. ^"How package management changed everything". ianmurdock.com. Archived fromthe original on 23 February 2009. Retrieved1 March 2008.
  31. ^"PackagingCon 2021 – a conference for package manager developers and packagers".packaging-con.org.Archived from the original on 2 September 2021. Retrieved2 September 2021.

External links

[edit]
Gaming console
Unix-like,
Linux
dpkg
Purely functional
RPM
tarball
Other
macOS
z/OS
Mobile
operating
systems
Multi-platform
Solaris,illumos
Web browsers
Windows
BSD
C++
Java
JavaScript
Kubernetes
Linux
macOS
.NET
Perl
PHP
Python
Ruby
Rust
Scala
Software digital distributionplatforms
Active
Personal
computers
Consoles
Mobile
devices
§
Arcade
Defunct
Retrieved from "https://en.wikipedia.org/w/index.php?title=Package_manager&oldid=1309204940"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp