wiki:BuildingRPMPackages

Version 10 (modified by https://www.google.com/accounts/o8/id?id=AItOawkqP8tgWB4n-zQS7ExlIs_3OoRpe13Buck, 11 years ago) (diff)

Add a note about checking for pre-requisites before doing the build.

Building RPM Packages

The Bcfg2 distribution contains two different spec files.

Building from a Release Tarball

  • Be sure to check the Prerequisites? page.
  • Download the release tarball that you want to install from the Downloads page.
  • Run rpmbuild -ta <name of tarball here>.
  • On CentOS/RHEL, the resulting RPMs will be in /usr/src/redhat/RPMS/noarch/ and the SRPMs in /usr/src/redhat/SRPMS/.
  • Example commands to build bcfg2-1.1.1 (on CentOS 5.5):
       $ cd /tmp
       $ wget ftp://ftp.mcs.anl.gov/pub/bcfg/bcfg2-1.1.1.tar.gz
       ...
       $ rpmbuild -ta bcfg2-1.1.1.tar.gz
       ...
       $ ls /usr/src/redhat/RPMS/noarch/
       bcfg2-1.1.1-0.1.noarch.rpm  bcfg2-server-1.1.1-0.1.noarch.rpm
    

Building from a git checkout

  • Enter the redhat/ directory in the working copy
  • Run make
  • The resulting RPMs will be in /usr/src/redhat/RPMS/, SRPMs in /usr/src/redhat/SRPMS, and will have the VCS tag appended