Candlepin uses tito to build the rpms.
Tito is configured by
rel-eng/tito.props with user defined settings in
The default Candlepin Tito config is as follows:
[globalconfig] default_builder = spacewalk.releng.builder.Builder default_tagger = spacewalk.releng.tagger.VersionTagger
You can change the default build location in
For example, you can change the RPMBUILD directory here.
$ cat ~/.titorc RPMBUILD_BASEDIR=$HOME/mytitobuilddir
Candlepin has a new set of build requirements solely for rpm building. Candlepin now uses ant to build the rpm. This is primarily because buildr isn’t yet packaged as an rpm and it expects to have access to a external maven repo which isn’t true in a build environment like koji.
Before you can build the Candlepin rpm using tito, you’ll need to install the above packages:
$ sudo yum install -y tito java java-devel gettext ant $ sudo rpm -Uvh https://github.com/downloads/jmrodri/candlepin-deps/candlepin-deps-0.0.18-1.fc13.noarch.rpm
Once you have resolved the build requirements you can build the Candlepin rpm locally using
Want to build the latest tagged build? Simply run:
$ tito build --rpm
Tito will then spew out the rpm output to the screen, no need to be alarmed this is normal.
Checking for tag [candlepin-0.0.40-1] in git repo [ssh://git.fedorahosted.org/git/candlepin.git/] Building package [candlepin-0.0.40-1] Wrote: /tmp/candlepin-build/candlepin-0.0.40.tar.gz Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.0C7UrZ ... Successfully built: /tmp/tito/candlepin-0.0.40-1.src.rpm \ /tmp/tito/noarch/candlepin-0.0.40-1.noarch.rpm \ /tmp/tito/noarch/candlepin-tomcat5-0.0.40-1.noarch.rpm \ /tmp/tito/noarch/candlepin-tomcat6-0.0.40-1.noarch.rpm \ /tmp/tito/noarch/candlepin-jboss-0.0.40-1.noarch.rpm
Sometimes you want to test your code changes in the rpm without pushing your changes to the public repo.
This is easy with
tito. Simply commit your changes to your local git checkout, then build a test rpm.
$ tito build --test --rpm
Tito will use the current git commit SHA1 and calculate the number of commits since the last tagged build. This results in test rpms which are upgradable removing the need to uninstall a test rpm before installing a new version. Also, it allows upgrading to official releases since they will have a version number higher than your test builds.
Here is an example of a test rpm:
The latest git commit is f05b8a5 which is 11 commits since the last tag: