Software:ZYpp

From HandWiki
Short description: Linux package management library
ZYpp
Zypper info libzypp screenshot.png
A zypper info command showing information of libzypp
Initial releaseJanuary 14, 2006; 18 years ago (2006-01-14)[1]
Written inC++
Operating systemLinux
TypePackage manager
LicenseGNU General Public License
Websiteen.opensuse.org/Portal:Libzypp

ZYpp (or libzypp; "Zen / YaST Packages Patches Patterns Products"[2]) is a package manager engine that powers Linux applications like YaST, Zypper and the implementation of PackageKit for openSUSE and SUSE Linux Enterprise.[3] Unlike some more basic package managers, it provides a satisfiability solver to compute package dependencies.[4] It is a free and open-source software project sponsored by SUSE and licensed under the terms of the GNU General Public License v2 or later. ZYpp is implemented mostly in the programming language C++.

Zypper is the native command-line interface of the ZYpp package manager to install, remove, update and query software packages of local or remote (networked) media. Its graphical equivalent is the YaST package manager module. It has been used in openSUSE since version 10.2 beta1. In openSUSE 11.1, Zypper reached version 1.0. On June 2, 2009, Ark Linux announced that it has completed its review of dependency solvers and has chosen ZYpp and its tools to replace the aging APT-RPM,[5] as the first distribution to do so. Zypper is also part of the mobile Linux distributions MeeGo, Sailfish OS, and Tizen.

History

Purpose

Following its consecutive acquisitions of Ximian and SuSE GmbH in 2003, Novell decided to merge both package management systems, YaST package manager and Red Carpet, in a best of breed approach, as the two solutions so far were used at Novell. Looking at the extant open source tools and their maturity available back in 2005, none fulfilled the requirements, and were able to work smoothly with the extant Linux management infrastructure software developed by Ximian and SUSE, so it was decided to get the best ideas from extant pieces and to work on a new implementation. Libzypp, the resulting library, was planned to be the software management engine of the SUSE distributions and the Linux Management component of the Novell ZENworks Management suite.

Early days

The Libzypp's solver was a port from the Red Carpet solver, which was written to update packages in installed systems. Using it for the full installing process brought it to its limits, and adding extensions such as support for weak dependencies and patches made it fragile and unpredictable.[6] Although this first version of ZYpp's solver worked satisfactorily, on the company enterprise products with the coupled ZMD daemon, it led to an openSUSE 10.1 release which came out in May 2006 with a system package not working as expected. In December 2006, the openSUSE 10.2 release corrected some defects of the prior release, using the revisited ZYpp v2. ZMD was subsequently removed from the 10.3 release and reserved for only the company Enterprise products. While ZYpp v3 provided openSUSE with a relatively good package manager, equivalent to other existing package managers, it suffered from some flaws in its implementation which greatly limited its speed performance.

SAT solver integration

An area where libzypp needed improvement was the speed of the dependency solver. libsolv is being written and released under the revised BSD license.[7]

Projects like Optimal Package Install/Uninstall Manager (OPIUM)[8][9] and MANCOOSI[10] were trying to fix dependency solving issues with a SAT solver. Traditional solvers like Advanced Packaging Tool (APT) sometimes show unacceptable deficiencies. It was decided to integrate SAT algorithms into the ZYpp stack; the solver algorithms used were based on the popular minisat solver.[11]

The SAT solver implementation as it appears in openSUSE 11.0 is based on two major, but independent, blocks:

  • Using a data dictionary approach to store and retrieve package and dependency information. A new solv format was created, which stores a repository as a string dictionary, a relation dictionary and then all package dependencies. Reading and merging multiple solv repositories takes only milliseconds.
  • Using satisfiability for computing package dependencies. The Boolean satisfiability problem is a well-researched problem with many exemplar solvers available. It is very fast, as package solving complexity is very low compared to other areas where SAT solvers are used. Also, it does not need complex algorithms and can provide understandable suggestions by calculating proof of why a problem is unsolvable.

After several months of work, the benchmark results of this fourth ZYpp version integrated with the SAT solver are more than encouraging, moving YaST and Zypper ahead of other RPM-based package managers in speed and size.[12][13]

See also

References

  1. Earliest known changelog
  2. "Acronyms - openSUSE Wiki". https://en.opensuse.org/Acronyms#Z. 
  3. "Libzypp documentation". https://doc.opensuse.org/projects/libzypp/HEAD/. 
  4. "Libzypp project homepage". https://en.opensuse.org/Portal:Libzypp. 
  5. "Another look at Linux packaging systems". June 2009. https://arklinux.wordpress.com/2009/06/02/another-look-at-linux-packaging-systems/. 
  6. "Michael Schroeder, History of satsolver". 26 November 2021. https://github.com/openSUSE/libsolv/blob/master/doc/libsolv-history.txt. 
  7. "libsolv on github". 26 November 2021. https://github.com/openSUSE/libsolv. 
  8. Tucker, Chris; Shuffelton, David; Jhala, Ranjit; Lerner, Sorin (2007), "OPIUM: OPtimal Package Install/Uninstall Manager", 29th International Conference on Software Engineering (ICSE'07), https://www.cs.ucsd.edu/~lerner/papers/opium.pdf. 
  9. EDOS Project Workpackage 2 Team (March 2006), "Report on formal management of software dependencies", EDOS Project Deliverable Work Package 2 (Deliverable 2), http://www.edos-project.org/xwiki/bin/Main/Deliverables, retrieved 2009-06-06. 
  10. Le Berre, Daniel; Parrain, Anne (2008), "On SAT Technologies for dependency management and beyond", ASPL 2008 (Limerick): Mancoosi.org, http://www.mancoosi.org/papers/leberre-sat-beyond.pdf. 
  11. "Minisat.se". http://minisat.se/. 
  12. "yum and ZYpp speed / memory usage". 16 May 2008. http://duncan.mac-vicar.com/2008/05/17/yum-and-zypp-speed-memory-usage.html. [yes|permanent dead link|dead link}}]
  13. "Sneak Peeks at openSUSE 11.0: Package Management, with Duncan Mac-Vicar". 6 June 2008. https://news.opensuse.org/2008/06/06/sneak-peeks-at-opensuse-110-package-management-with-duncan-mac-vicar/. 

External links