Mock is a simple program that will build source RPMs inside a chroot. It
doesn't do anything terribly fancy other than populate a chroot with the
contents specified by a configuration file, then build any input SRPM(s) in
The content of a chroot is specified by the configuration specified with the
-r option. The default configuration file is /etc/mock/default.cfg,
which is usually a symlink to one of the installed configurations.
There is a site-wide configuration file, /etc/mock/site-defaults.cfg, which can
be used to specify site-wide options. The shipped version of this file has no
active options, but does have a list of all of the configuration options,
examples of how to set them, and their default values.
For backwards compatibility, old-style commands, ("rebuild", "init", "clean",
etc.) without leading '--' are still accepted, but are deprecated. See
COMMANDS section, below, for detailed listing of all commands.
Purge the chroot tree
Initialize a chroot (clean, install chroot packages, etc.)
If no command is specified, rebuild is assumed. Rebuilds the specified SRPM(s). The buildroot is cleaned first, unless --no-clean is specified.
Run the specified command interactively within the chroot (which must already be initialized -- no 'clean' is performed). If no command specified, /bin/sh is run.
Run the specified command non-interactively within the chroot (which must already be initialized -- no 'clean' is performed). Command output will be sent to the log files.
Find out deps for SRPM or RPM, and do a yum install to put them in the buildroot. Buildroot must already be initialized -- no 'clean' is performed
Do a yum install PACKAGE inside the buildroot. Buildroot must already be initialized -- no 'clean' is performed
Do a yum update inside the buildroot. Buildroot must already be initialized -- no 'clean' is performed
No-op mode that simply checks that no stray processes are running in the chroot. Kills any processes that it finds using specified root.
Copies the source paths (files or directory trees) into the chroot at
the specified destination path.
Copies the source paths (files or directory trees) from the chroot to
the specified destination path.
Uses specified chroot configuration as defined in
/etc/mock/<chroot>.cfg. If none specified, uses the chroot linked
to by /etc/mock/default.cfg
Run in 'offline' mode where we tell 'yum' to run completely from local cache. Also disables cache expiry for the mock yum cache.
Do not clean chroot before building package.
Clean chroot after building. Use with --resultdir. Only active for '--rebuild'.
Don't clean chroot after building. If automatic cleanup is enabled, use this to disable.
This argument is passed to rpmbuild to specify the target arch to build. It defaults to whatever is specified for --arch, or whatever is specified in the config file as config_opts['target_arch'].
Calls the linux personality() syscall to tell the kernel to emulate a secondary architecture. For example, building i386 packages on an x86_64 buildhost.
-D "MACRO EXPR", --define="MACRO EXPR"
Specify macro definitions used for the build. This option may be used multiple times, just as the rpmbuild --define option can be. For example:
Select the query option, using product Fedora Hosted Projects
and component mock and press the Start Search
button. If there is a bug similar to the one you are seeing, add your
information to the comments. If not, go to the new bug page using the
same product and component and fill in the form.