Add markdown docs for FetchBuilder instead of manpage.

This commit is contained in:
Devan Goodwin 2014-02-27 12:26:17 -04:00
parent 49d7d20de9
commit 2ad5b03cc4
3 changed files with 25 additions and 7 deletions

23
doc/builders.mkd Normal file
View file

@ -0,0 +1,23 @@
= Tito Builders =
== tito.builder.FetchBuilder ==
An unorthodox builder which can build packages for a git repo which does not actually have any tito footprint. The location of sources, and the version/release to assume we're building, come from a configurable strategy.
One strategy is currently included which parses a CLI argument to the build command which points to the source to use.
Configuration for FetchBuilder in rel-eng/tito.props would look like:
[buildconfig]
builder = tito.builder.FetchBuilder
[builder]
fetch_strategy = tito.builder.fetch.ArgSourceStrategy
Once configured a build can be run with:
**tito build --rpm --arg=source=/home/username/extsrc-0.0.1.tar.gz**
Note that this does not require a tito tag to have been run, and technically the rel-eng/tito.props does not have to be committed to the git repo. This builder can be used on a repository you do not control or do not wish to push tito configuration into.
The ArgSourceStrategy has a simple mechanism where it will try to parse the version and release to build from the filename with a regular expression. If you need something more advanced, you can override any or all of this behaviour by implementing a custom strategy for the fetch builder. (see lib_dir in **man 5 tito.props**)

View file

@ -183,13 +183,7 @@ created from tag foo-1.2-1 and with
Patch1: foo-1.2-1-to-foo-1.2-3.patch
tito.builder.FetchBuilder::
A more unorthodox builder which does not require a git footprint, and can be
configured to use a strategy to pull sources rather than generate them from
git. The default strategy provided simply parses a
--arg=source=/path/to/tar.gz command line parameter to the build command.
Example configuration for FetchBuilder would include the following in
rel-eng/tito.props.
See doc/builders.mkd.
----
[builder]

View file

@ -64,6 +64,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README.mkd AUTHORS COPYING
%doc doc/*
%doc %{_mandir}/man5/titorc.5.gz
%doc %{_mandir}/man5/tito.props.5.gz
%doc %{_mandir}/man5/releasers.conf.5.gz