Linux Package Management Dr. Michael L. Collard www.sdml.info/collard www.sdml.info/collard/linux collard@cs.kent.edu 1 Package Management Features • Tools to install, update, remove, and manage the installed software • Install new and upgraded software across a network • Indicate what package a file is in, or the files a package contains, e.g., where is /bin/ls • Maintain a database of packages and their status • Dependency checking • Signature verification with GPG, PGP, MD5, etc. • Tools to build packages Major Linux Packaging Systems • RPM - Red Hat Package Manager – Used on Red Hat, SUSE, etc. systems – package-version-release.architecture.rpm – E.g., coreutils-6.10-18.fc9.i386.rpm • Debian GNU/Linux Package Manager – Used on Debian/Ubuntu, and many others – package_version-revision_architecture.deb – E.g., coreutils_6.10-3ubuntu2_i386.deb RPM File Format • Identification of the file as an RPM file • Signature - for integrity and/or authenticity • Header - Metadata including package name, version, architecture, file list, etc. • Archive - File archive typically cpio compressed with gzip • Source rpm: spec file with information on how to build the package RPM Tools • rpm, rpmbuild – original CLI for installing/managing and creating rpm packages – Does not do dependency resolution • up2date – Red Hat update agent, older graphical package manager for Red Hat systems • yum – Yellow dog Updater, Modified – open-source CLI for RPM-compatible systems – default installer for most Red Hat systems • yast2 – Part of SUSE installer Deb Tools • dpkg – Original Debian CLI packaging tool • dpkg-deb – Lower-level CLI packaging tool, mostly used by dpkg • apt-get – Most commonly used CLI packaging tool for deb systems • aptitude – Text-based interface to apt • synaptic – GUI front-end • Some of these tools converted to using RPM RPM Commands • rpm --install package_file – Install new version, leave existing versions • rpm –upgrade package_file – Replace current version, remove existing version – If not installed, installs new version • rpm –freshen package_file – Replace current version only if already installed • rpm –erase package_file – Removes the package from the system yum • Does dependency checking and a higher interface • • • • • • yum install packages yum info yum list yum remove package yum update yum upgrade apt-get • Big effect on other package-management tools • • • • • apt-get update apt-get install package apt-get upgrade apt-get remove package apt-get dist-upgrade