LinuxCommandLibrary

koji-download-build

Download a Koji build

TLDR

Download all RPMs from a specific build

$ koji download-build [BuildID|RPM|NVR]
copy

Download RPMs signed with the given key
$ koji download-build [BuildID|RPM|NVR] --key [key]
copy

Only download RPMs for given arch
$ koji download-build [BuildID|RPM|NVR] --arch [x86_64,aarch64,noarch,...]
copy

Download the given RPM
$ koji download-build [RPM] --rpm
copy

Display help
$ koji download-build [[-h|--help]]
copy

SYNOPSIS

koji download-build [options] <build> [<directory>]

PARAMETERS

-h, --help
    Show help and exit

--all
    Download RPMs, SRPM, and logs

--logs
    Download buildroot logs only

--rpms
    Download binary RPMs (default)

--srpm
    Download source RPM only

--debug
    Enable debug output

--profile <profile>
    Use named config profile

--config <file>
    Specify config file

--server <server>
    Override hub server URL

<build>
    Build ID (int) or NVR string (mandatory)

<directory>
    Target download dir (optional, defaults to cwd)

DESCRIPTION

The koji download-build command is a key utility in the Koji CLI client, part of the Koji build system used by Fedora and other RPM-based distributions for managing distributed builds. Koji tracks RPM builds with unique identifiers: build IDs (numbers) or NVR strings (Name-Version-Release).

This command fetches build outputs, primarily binary RPMs by default, placing them in the current directory or a specified target. It supports downloading source RPMs, buildroot logs, or all artifacts via options. Essential for developers reproducing builds, QA teams verifying packages, or users grabbing specific RPMs without repo mirrors.

Invoked with a build reference, it queries the Koji hub (server) over XML-RPC or HTTP, authenticating if needed for private content. Public builds work anonymously. Files organize into subdirs by architecture. Integrates with tools like dnf for local installs post-download.

Leverages Koji's web interface data but pulls full files directly. Efficient for targeted retrieval vs. full repo syncs.

CAVEATS

May overwrite files in target dir without warning. Requires Koji hub access; private builds need auth. Large builds consume significant bandwidth/disk.

USAGE EXAMPLE

koji download-build 1234567 (RPMs to cwd)
koji download-build fedora-40 kernel-6.1.0 --all /tmp/builds (all artifacts to /tmp/builds)

BUILD LOOKUP

Find build ID/NVR first via koji list-builds --package <name> or Koji web UI.

HISTORY

Developed by Fedora Project circa 2007 as successor to Plague/Mash. CLI client with download-build added early for artifact retrieval. Evolved through Koji 1.x releases; now at 1.40+, supports modern hubs like Koji 2.0.

SEE ALSO

koji(1), koji-list(1), dnf(8), mock(1)

Copied to clipboard