LinuxCommandLibrary

copr-cli

COPR build system client

TLDR

Create a new COPR project
$ copr-cli create [project_name] --chroot [fedora-39-x86_64]
copy
Build a package from SRPM
$ copr-cli build [project_name] [package.src.rpm]
copy
Build from a spec file URL
$ copr-cli build [project_name] --url [https://example.com/spec.src.rpm]
copy
List your COPR projects
$ copr-cli list
copy
Check build status
$ copr-cli status [build_id]
copy
Download built packages
$ copr-cli download-build [build_id]
copy
Delete a project
$ copr-cli delete [project_name]
copy

SYNOPSIS

copr-cli command [options] [arguments]

DESCRIPTION

copr-cli is the command-line client for Fedora's COPR build system. It allows developers to create projects, submit builds, manage repositories, and automate package distribution without using the web interface.
The tool handles the complete package lifecycle: creating projects with specified build targets (chroots), submitting source RPMs for building, monitoring build progress, and downloading the resulting packages. It supports building from local files, URLs, or SCM repositories.
copr-cli is essential for CI/CD pipelines that automatically build and publish packages to COPR. Authentication is handled via API tokens stored in a configuration file, enabling scripted operations.

PARAMETERS

create NAME

Create a new COPR project.
build PROJECT SRPM
Submit a build to a project.
list
List your COPR projects.
status BUILDID_
Check the status of a build.
download-build BUILDID_
Download the built RPMs.
delete PROJECT
Delete a project.
--chroot CHROOT
Specify build target (e.g., fedora-39-x8664, epel-9-x8664).
--url URL
Build from an SRPM URL instead of local file.
--nowait
Don't wait for build to complete.
--config FILE
Use alternate configuration file.

CONFIGURATION

~/.config/copr

API token configuration for authenticating with the COPR build system.

CAVEATS

Requires a Fedora Account System (FAS) account and API token configured in ~/.config/copr. Build chroots must be enabled for the project before building. Large builds may take significant time; use --nowait for async operation.

HISTORY

copr-cli was developed alongside the COPR build service by the Fedora Project. It provides programmatic access to the same functionality available through the COPR web interface at copr.fedorainfracloud.org, enabling automation and integration with development workflows.

SEE ALSO

copr(1), rpmbuild(1), mock(1), dnf(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard