130 likes | 687 Views
RPMs by Clint Pate MCSE/CNA What Is RPM? RPM is short for Red Hat Package Manager. First used by the Red Hat Linux distribution, it now is the package format of choice for many major distributors: SuSE, Caldera, Turbolinux and - of course - Mandrakesoft, to name a few.
E N D
RPMs by Clint Pate MCSE/CNA
What Is RPM? • RPM is short for Red Hat Package Manager. First used by the Red Hat Linux distribution, it now is the package format of choice for many major distributors: SuSE, Caldera, Turbolinux and - of course - Mandrakesoft, to name a few. • A package consists of two major parts: the program and its associated files.
Package Maintainers • Packages are built by package maintainers using a so-called 'specfile' (specification file). • The 'specfile' which determines where the files of a package are going to be installed to, which other packages are needed by the package in order to work correctly, what programs to execute before or after installing or uninstalling a package, but also information on who built the package and when, a description of the purpose of the content of the package and much more.
What RPM Does For You? Among the things RPM and the package maintainer do for you are: • Compiling and patching the program's source code. • Handling dependencies. • Providing information on status. (Integrity check, etc.) • Security checks. (PGP or GPG signature) • Automation. (Scripts to automate maintenance tasks) • Clean removal. • Network capability.
What RPM Does Not Do For You! • Like every other tool, RPM has its limitations. • No automatic resolution of dependencies. RPM will tell you what's missing, but it won't fetch it. • No interactive configuration. It’s a one stop shot. • No protection from packaging errors. We all make mistakes, and package maintainers are no exception. • No compatibility guarantee. RPM is used by many Linux distributors and independent persons. • Optimizations. It is possible to optimize RPMs for a certain type of processor by compiling the program sources with the appropriate options. M does that.But these compiler options are just one part on a vast array of available compiling settings.
Basic Handling Of Packages And Programs • RPM discriminates between a not-installed and an installed package. • Operations on a not-installed package require the full package name, like: • rpm --install mc-4.5.51-7mdk.rpm • If you are doing something involving an installed package, however, the program name is required: • rpm --erase mc • The program name is the package name without the version numbers and the 'rpm' ending. • If you are trying to do something like • rpm --erase mc-4.5.51-7mdk.rpm • you will get • error: package mc-4.5.51-7mdk.rpm is not installed • even if the package is installed.
What’s In A Name • The package name of an RPM consists of three parts: • The program name, • The version number of the included program • The version number of the package. • Thus 'mc-4.5.51-7mdk' means: 'This package contains the program 'mc' in its version 4.5.51. It is the seventh revision of this particular package.' 'mdk' denotes the distribution (not mandatory). • Why an extra number for the package version? • Packaging is a complex process. • Sometimes the packager may overlook some detail and has to come up with a fixed package. Or maybe he or she just has discovered a way to make the package better. • So, in order to allow upgrading packages which contain the same version of a program, the package version number has been invented.
RPMing • RPM accepts a sackful of options. Thankfully it is pretty obvious from their names what they do. Most options come in two flavors: a long option and a short option. The long option features two hyphens and the full option name, the short one hyphen and - in most cases - the first character of the full option. Of course you only have to provide one option form (i.e. either rpm --install [name] or rpm -i [name]). • rpm --install (-i) [name] installs a package. • rpm --erase (-e) [name] erases it. • rpm --upgrade (-U ,notice it's a capital U!) [package name] upgrades an installed program with a newer package. • rpm --query (-q) [name] queries for package name and version of an installed program • rpm --query --package (-qp) [name] does the same on a package which isn't installed • rpm --query --package --info (-qpi) [name] tells you what the package is about, who packaged it etc. • rpm --verify (-K ,for some reason)[name] will tell you if all files of the packages are still (or at all) installed.
Ximian’s Red Carpet • Ximian™ Red Carpet™, delivered as part of Ximian Desktop, is a unique software management solution that simplifies and automates the most challenging tasks of Linux software management: version control, system updating and package conflict resolution (depend.), for all the leading Linux distributions. • When you add, update or remove applications on your Linux workstation, Red Carpet automatically analyzes and resolves all of the hundreds of potential software dependencies and shared-file conflicts that might affect your system. Red Carpet saves you hours of system administration effort by ensuring that your software is up-to-date and running smoothly.
Red Carpet Desktop Info Installed Packages