.. _mockbuild:

mockbuild
=========

.. program:: mockbuild

Synopsis
--------

::

    sample-rpkg mockbuild [-h] [--root CONFIG] [--md5] [--no-clean] [--no-cleanup-after] [--no-clean-all] [--with BCOND_WITH] [--without BCOND_WITHOUT] [--shell]
                          [--enablerepo ENABLEREPO] [--disablerepo DISABLEREPO] [--enable-network] [--srpm-mock] [--use-koji-mock-config | --use-local-mock-config]
                          ...

Description
-----------

This will use the mock utility to build the package for the distribution detected from branch information. This can be overridden using the global --release option. Your user must be in the local "mock" group.

Arguments
---------

.. option:: extra_args

   Custom arguments that are passed to the 'mock'. Use '--' to separate them from other arguments.



Options
-------

.. option:: -h --help

   show this help message and exit

.. option:: --root --mock-config

   Override mock configuration (like mock -r)

.. option:: --md5

   Use md5 checksums (for older rpm hosts)

.. option:: --no-clean -n

   Do not clean chroot before building package

.. option:: --no-cleanup-after

   Do not clean chroot after building (if automatic cleanup is enabled

.. option:: --no-clean-all -N

   Alias for both ``--no-clean`` and ``--no-cleanup-after``

.. option:: --with

   Enable configure option (bcond) for the build

.. option:: --without

   Disable configure option (bcond) for the build

.. option:: --shell

   Run commands interactively within chroot. Before going into chroot, mockbuild needs to run with ``--no-cleanup-after`` in advanced.

.. option:: --enablerepo

   Pass enablerepo option to yum/dnf (may be used more than once)

.. option:: --disablerepo

   Pass disablerepo option to yum/dnf (may be used more than once)

.. option:: --enable-network

   Enable networking

.. option:: --srpm-mock

   Generate source rpm with 'mock' and then run 'mockbuild' using this source rpm

.. option:: --use-koji-mock-config

   Download Mock configuration from Kojihub, instead of using the local Mock configuration in mock-core-configs.rpm.

.. option:: --use-local-mock-config

   Enforce use of local Mock configuration.