19.8 Package version management ¶
The goals of a package maintainer,
when dealing with the version number of a package, are:
- Programs should identify themselves with that version number
when invoked as
program --version
.
- Every package tarball should contain the version number, in up to four ways:
- The tarball name should be
package-version.tar.gz
.
- The tarball should unpack into a directory
named
package-version
.
- Programs built from that tarball should identify themselves
when invoked as
program --version
.
- Documentation (especially in PDF format) and man pages
may contain the version number, as an important bit of meta information.
- The package maintainer should be able to
easily set the version number before making a release,
and doing so should be quick.
- When a contributor is
building from the git repository (as opposed to a tarball),
the version number should, by default, reflect the git commit,
in order to avoid confusion w.r.t. official releases.
Here’s how the GNU Build System and Gnulib achieve these goals.