Package management system

A package management system is a collection of tools to automate the process of installing, upgrading, configuring, and removing software packages from a computer.


Alien is a computer program that converts between different Linux package formats. It supports conversion between Linux Standard Base, RPM, deb, Stampede (.slp), Solaris (.pkg) and Slackware (.tgz) packages. It is also capable of automatically installing the generated packages, and can try to convert the installation scripts included in the archive as well. The alien tool is specially written for Linux.

Sample usage:
  1. alien --to-rpm --scripts ./mypkg.deb

Advanced Packaging Tool

The Advanced Packaging Tool, or APT, is a free user interface that works with core libraries to handle the installation and removal of software on the Debian GNU/Linux computer operating system and its variants. The following shows the process:
(1). Editing Sources: # nano /etc/apt/sources.list
(2). Generate/ update source lines: # apt-setup, follow the wizard.
(3). Installing Packages: # aptitude install <package>
Reinstall packages: # aptitude reinstall <package>
(4). Removing a Package: # aptitude purge <package>
(5). Updating a package: # aptitude upgrade <package>
(6). Keeping your system up-to-date: # aptitude update; # aptitude dist-upgrade
(7). Search for packages: # apt-cache search <string>

Some common uses
To update the list of package known by your system, you can run: apt-get update
To upgrade all the packages on your system (without installing extra packages or removing packages), run: apt-get upgrade
To install the foo package and all its dependencies, run: apt-get install foo
To remove the foo package from your system, run: apt-get remove foo
To remove the foo package and its configuration files from your system, run: apt-get --purge remove foo
To upgrade all the packages on your system, and, if needed for a package upgrade, installing extra packages or removing packages, run: apt-get dist-upgrade
To find packages whose description contain word: apt-cache search word
To print the detailed information of a package: apt-cache show package
To print the packages a given package depends on: apt-cache depends package
To print detailed information of the versions available for a package and the packages that reverse-depends on it: apt-cache showpkg package

Cdr tools

Cdrtools is a set of command line programs that allows to record CD/DVD/BluRay media. The suite includes the following programs:
cdrecord A CD/DVD/BD recording program
readcd A program to read CD/DVD/BD media with CD-clone features
cdda2wav The most evolved CD-audio extraction program with paranoia support
mkisofs A program to create hybrid ISO9660/JOLIET/HFS filesystes with optional Rock Ridge attributes
isodebug A program to print mkisofs debug information from media
isodump A program to dump ISO-9660 media
isoinfo A program to analyse/verify ISO/9660/Joliet/Rock-Ridge Filesystems
isovfy A program to verify the ISO-9660 structures
rscsi A Remote SCSI enabling daemon

Conary Package Manager

Conary is a free software package management system created by rPath and distributed under the terms of the Common Public License.1 It focuses on installing packages through automated dependency resolution against distributed online repositories, and providing a concise and easy-to-use Python-based description language to specify how to build a package.



CPAN, the Comprehensive Perl Archive Network, is an archive of over 16,000 modules of software written in Perl, as well as documentation for it. CPAN can denote either the archive network itself, or the Perl program that acts as an interface to the network and as an automated software installer (somewhat like a package manager). The CPAN's main purpose is to help programmers locate modules and programs not included in the Perl standard distribution. It is also used to distribute new versions of Perl, as well as related projects.

dpkg tool

Used originally by Debian and now by other systems, uses the .deb format and was the first to have a widely known dependency resolution tool (APT).

dpkg is the software at the base of the Debian package management system. dpkg is used to install, remove, and provide information about .deb packages.
dpkg itself is a low level tool; higher level tools, such as APT, are used to fetch packages from remote locations or deal with complex package relations. Tools like aptitude or synaptic are more commonly used than dpkg as they have a more sophisticated way of dealing with package relationships and a friendlier interface.

The Debian package "dpkg" provides the dpkg program, as well as several others programs necessary for run-time functioning of the packaging system, including dpkg-statoverride, dpkg-divert and update-alternatives. It also includes the programs such as start-stop-daemon and install-info, and the latter is kept mostly due to backwards compatibility (it is developed and distributed separately nowadays).

Some common uses
Find out all the options: dpkg --help.
Print out the control file (and other information) for a specified package: dpkg --info foo_VVV-RRR.deb
Install a package (including unpacking and configuring) onto the file system of the hard disk: dpkg --install foo_VVV-RRR.deb.
Unpack (but do not configure) a Debian archive into the file system of the hard disk: dpkg --unpack foo_VVV-RRR.deb.
Configure a package that already has been unpacked: dpkg --configure foo.
Extract a single file named "blurf" (or a group of files named "blurf" from a Debian archive: dpkg --fsys-tarfile foo_VVV-RRR.deb | tar -xf - blurf
Remove a package (but not its configuration files): dpkg --remove foo.
Remove a package (including its configuration files): dpkg --purge foo.
List the installation status of packages containing the string (or regular expression) "foo": dpkg --list 'foo'.

image packaging system

pkg(5), the image packaging system, is an attempt to design and implement a software delivery system with interaction with a network repository as its primary design goal. Other key ideas are: safe execution for zones and other installation contexts, use of ZFS for efficiency and rollback, preventing the introduction of incorrect or incomplete packages, and efficient use of bandwidth.
  • Command*
pkg(1), the retrieval and installation client,
pkgsend(1), the publication client,
pkgrecv(1), the raw contents retrieval utility,
pkg.depotd(1M), the depot server, and

RPM Package Manager

Ever stands for "Red Hat Package Manager", now "RPM Package Manager," a recursive acronym. The RPM Package Manager (RPM) is a powerful command line driven package management system capable of installing, uninstalling, verifying, querying, and updating computer software packages.

Preparing to Build RPMs
The main tasks in building RPMs are:
1.Planning what you want to build
2.Gathering the software to package
3.Patching the software as needed
4.Creating a reproducible build of the software
5.Planning for upgrades
6.Outlining any dependencies
7.Building the RPMs
8.Testing the RPMs

Building RPMs
When building RPMs, go through the following steps:
1.Set up the directory structure.
2.Place the sources in the right directory.
3.Create a spec file that tells the rpmbuild command what to do.
4.Build the source and binary RPMs.

RPM directories
Directory Usage
BUILD The rpmbuild command builds software in this directory.
RPMS The rpmbuild command stores binary RPMs it creates in this directory.
SOURCES You should put the sources for the application in this directory.
SPECS You should place the spec file for each RPM you plan to make in this directory.
SRPMS The rpmbuild command places source RPMs in this directory.

the spec file
The spec file, short for specification file, defines all the actions the rpmbuild command should take to build your application, as well as all the actions necessary for the rpm command to install and remove the application. Each source RPM should have the necessary spec file for building a binary RPM.

prep section
%setup -q

Build section
./configure CXXFLAGS=-O3 --prefix=$RPMBUILDROOT/usr

install section
make install

clean section

files section: lists the files to go into the binary RPM, along with the defined file attributes
%doc /usr/doc/jikes-%{version}/license.htm
%doc /usr/man/man1/jikes.1*

rpmbuild command
Option Usage
-ba Build all, both a binary and source RPM
-bb Build a binary RPM
-bc Build (compile) the program but do not make the full RPM, stopping just after the %build section
-bp Prepare for building a binary RPM, and stop just after the %prep section
-bi Create a binary RPM and stop just after the %install section
-bl Check the listing of files for the RPM and generate errors if the buildroot is missing any of the files to be installed
-bs Build a source RPM only

Yellowdog Updater, Modified

Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm. Yum has a plugin interface for adding simple features. Yum can also be used from other python programs via its module inteface.

Manage Repositories
repomanage -k2 --old /some/dir | xargs rm -f: create lists of newer or older packages to pass to other commands
reposync --repoid=updates: ets you download an entire remote yum repository or a set of remote repositories
$ verifytree /home/skvidal/tmp/empty-repoverifytree /home/skvidal/tmp/empty-repo/: verify that everything in that repo is accurate and functional

setup package repository
1. Collect the packages together in one directory.
yum install createrepo
createrepo /srv/my/repo
You should see a lot of things fly by but it should finish without an error. In the end you should have a directory named /srv/my/repo/repodata with at least 4 files in it.
2. Add a .repo file to yum configuration. Let's call this one 'myrepo.repo':
name = This is my repo
baseurl = url://to/get/to/srv/my/repo/: The 'baseurl' line is the path that machine uses to get to the repository.

If the machine has direct access to it or mounts it as a filesystem you can use a baseurl line like:
baseurl = file:///srv/my/repo/

If you access the file via an http or https server you would use something like:
baseurl = http://servername/my/repo
3. Now, every time you modify, remove or add a new RPM package to /srv/my/repo you need to recreate the repository metadata. You do that by running createrepo the same way you did in step 2.

Last edited Aug 28, 2009 at 12:22 PM by webexpert21, version 10


No comments yet.