ReleaseEngineering/RedHat

Release engineering: RedHat

The purpose of this page is to describe the steps which must be taken in the release engineering process to ensure painless creation of packages for RedHat-derived distributions (RedHat? Enterprise Linux, Fedora, CentOS etc.)

Package metadata

Package metadata and creation scripts for RedHat derivatives are in the redhat subdirectory in the distribution. The one file that always needs changing before a release is redhat/varnish.spec, which amongst other things contains the version and release numbers and a change log (which should only list changes made to the package, not changes made to Varnish).

  • Version and release, near the top of the file:
    Version: 1.0.4
    Release: 1%{?dist}
    
  • Change log, at the bottom:
    * Fri May 18 2007 Dag-Erling Smørgrav <des@des.no> - 1.0.4-1
    - Bump Version and Release for 1.0.4
    

Package generation

First, you must have your environment set up to build RPMs:

mkdir -p ~/rpm/SOURCES ~/rpm/BUILD  ~/rpm/SPECS ~/rpm/RPMS ~/rpm/SRPMS
echo "%_topdir $HOME/rpm
%_tmppath $HOME/rpm/BUILD
%_buildroot $HOME/rpm
" > ~/.rpmmacros

With that out of the way, it's just a matter of running rpmbuild on the release tarball to generate both binary and source packages:

rpmbuild -tb varnish-1.0.4.tar.gz
rpmbuild -ts varnish-1.0.4.tar.gz