Blame doc/builddep.rst

Packit 3a9065
===================
Packit 3a9065
DNF builddep Plugin
Packit 3a9065
===================
Packit 3a9065
Packit 3a9065
Install whatever is needed to build the given .src.rpm, .nosrc.rpm or .spec file.
Packit 3a9065
Packit 3a9065
.. warning:: Build dependencies in a package (i.e. src.rpm) might be different
Packit 3a9065
             than you would expect because they were evaluated according macros
Packit 3a9065
             set on the package build host.
Packit 3a9065
Packit 3a9065
--------
Packit 3a9065
Synopsis
Packit 3a9065
--------
Packit 3a9065
Packit 3a9065
``dnf builddep <package>...``
Packit 3a9065
Packit 3a9065
---------
Packit 3a9065
Arguments
Packit 3a9065
---------
Packit 3a9065
Packit 3a9065
``<package>``
Packit 3a9065
    Either path to .src.rpm, .nosrc.rpm or .spec file or package available in a repository.
Packit 3a9065
Packit 3a9065
-------
Packit 3a9065
Options
Packit 3a9065
-------
Packit 3a9065
Packit 3a9065
All general DNF options are accepted, see `Options` in :manpage:`dnf(8)` for details.
Packit 3a9065
Packit 3a9065
``--help-cmd``
Packit 3a9065
    Show this help.
Packit 3a9065
Packit 3a9065
``-D <macro expr>, --define <macro expr>``
Packit 3a9065
    Define the RPM macro named `macro` to the value `expr` when parsing spec files.
Packit 3a9065
Packit 3a9065
``--spec``
Packit 3a9065
    Treat arguments as .spec files.
Packit 3a9065
Packit 3a9065
``--srpm``
Packit 3a9065
    Treat arguments as source rpm files.
Packit 3a9065
Packit 3a9065
``--skip-unavailable``
Packit 3a9065
    Skip build dependencies not available in repositories. All available build dependencies will be installed.
Packit 3a9065
Packit 3a9065
Note that `builddep` command does not honor the `--skip-broken` option, so there is no way to skip uninstallable packages (e.g. with broken dependencies).
Packit 3a9065
Packit 3a9065
--------
Packit 3a9065
Examples
Packit 3a9065
--------
Packit 3a9065
Packit 3a9065
``dnf builddep foobar.spec``
Packit 3a9065
    Install the needed build requirements, defined in the foobar.spec file.
Packit 3a9065
Packit 3a9065
``dnf builddep --spec foobar.spec.in``
Packit 3a9065
    Install the needed build requirements, defined in the spec file when filename ends
Packit 3a9065
    with something different than ``.spec``.
Packit 3a9065
Packit 3a9065
``dnf builddep foobar-1.0-1.src.rpm``
Packit 3a9065
    Install the needed build requirements, defined in the foobar-1.0-1.src.rpm file.
Packit 3a9065
Packit 3a9065
``dnf builddep foobar-1.0-1``
Packit 3a9065
    Look up foobar-1.0-1 in enabled repositories and install build requirements
Packit 3a9065
    for its source rpm.
Packit 3a9065
Packit 3a9065
``dnf builddep -D 'scl python27' python-foobar.spec``
Packit 3a9065
    Install the needed build requirements for the python27 SCL version of python-foobar.