[PLUG] Package name and version conventions

Karl M. Hegbloom karlheg at pdxlinux.org
Sat Dec 7 20:15:57 UTC 2002


I don't know how Red Hat does it, or how RPM expects the names to work,
but I do know the Debian + dpkg way.

The file name of a deb package relates directly to the package name and
version number.  These are specified by the Debian Policy Manual:

 http://www.pdxlinux.org/doc/debian-policy/policy.html/

The package name must be at least two characters long, and start with a
letter.  It must be lower case letters, numbers, plus ".-" only.  In the
.deb file name, the version number is separated from the package name by
an "_" character.  Inside the .deb, it's stored in a separate field of
the "control" file.

So, to find the package name and version, you split on the "_"
character.  When a package name has a version number of some kind in it,
that's a good indication that it's possible to install more than one
version of that software at a time.  The package will be set up so that
it installs in a disjoint set of locations to the other versions.  This
is mostly for kernels, kernel modules, and shared libraries.

The version number part has two fields also, separated by a "-"
character. (Recall that the version number part is to the right of the
"_" and to the left of the ".ARCH.deb" part.)  The first part of a
version number is the upstream version.  The second part is the Debian
build or release number.  Often there is a need to rebuild and
re-release the same upstream release, to correct problems, make
improvements, or build against newer shared libraries.

Inside the .deb, in the "control" file, the source of the meta data read
by the "apt" system, often the "Version:" will contain an epoch number
also.  An epoch is a number prefix separated from the rest of the
version string by a ":".  This is used when the upstream numbering
system has changed in such a way that what is really a newer version
appears to the .deb version sorting code to be an older release.  In
that case, the maintainer will tack on an epoch number to make it sort
as a newer release.  Epoch's are explained in the Debian Policy Manual,
and in the packaging manuals.

I imagine that the policy and packaging manuals for Debian are worth
reading even if you don't use Debian and only create RPM packages.  The
general guidelines likely apply.






More information about the PLUG mailing list