diff --git a/doc/builders.md b/doc/builders.md index 6cd0cf0..db23288 100644 --- a/doc/builders.md +++ b/doc/builders.md @@ -1,5 +1,24 @@ # Tito Builders +## tito.builder.MockBuilder + +By default, Tito internally uses `rpmbuild` for building SRPM and RPM +packages. This imposes some requirements on the host system - all the +build dependencies need to be installed. Also, building RPM packages +can potentially be dangerous and a badly written spec file can cause +damage to the host system. If you prefer to use `mock` instead, +configure `.tito/tito.props` like this: + + [buildconfig] + builder = tito.builder.MockBuilder + + [builder] + mock = fedora-rawhide-x86_64 + +Alternatively, you can specify a mock chroot in the command line: + + tito build --rpm --arg=mock=fedora-rawhide-x86_64 + ## 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. diff --git a/tito.props.5.asciidoc b/tito.props.5.asciidoc index 607bc2c..e5c8625 100644 --- a/tito.props.5.asciidoc +++ b/tito.props.5.asciidoc @@ -154,6 +154,10 @@ tito.builder.Builder:: Basic package builder. It create tar.gz of whole directory and create src.rpm and build rpm using some supported method. +tito.builder.MockBuilder:: +Use `mock` instead of `rpmbuild` for building an RPM package. +See doc/builders.md. + tito.builder.NoTgzBuilder:: Builder for packages that do not require the creation of tarball. Usually these package have source files checked directly into git.