Copr Build Service

Copr is a service that builds your application as an RPM and provides you with your own Dnf/Yum repository.

Copr command line interface

Copr features a command line interface that can help you with managing projects, submitting builds, etc.


Install the copr-cli package:

$ sudo dnf install copr-cli

Log into the Copr web interface and get your API token at the Copr API Page

  1. Save the token to your system:
$ vim ~/.config/copr

Creating a new project

To create a new project called test-project, which would provide packages for Fedora 39, type:

$ copr-cli create --chroot fedora-39-i386 --chroot fedora-39-x86_64 test-project

Submitting a build

There are curently two ways of getting your SRPM(s) into Copr:

A. Building from URL:

$ copr-cli build test-project

B. Uploading them into Copr directly:

$ copr-cli build test-project ~/packages/package-1.6-1.fc39.src.rpm

The command line tool will now monitor your build and keeps you updated about any changes and results. You can safely interrupt it with ctrl+c at any time. The build will continue running.

Adding a repository and installing the package

Now, when your build has been finished, you can add the repository and install your package:

First, make sure you have installed dnf core plugins:

$ sudo dnf install dnf-plugins-core

Enable your repository:

$ sudo dnf copr enable your_name/test-project

And install the package:

$ sudo dnf install package

To uninstall your package:

$ sudo dnf remove package

And to disable your repository:

$ sudo dnf copr disable your_name/test-project

Authors: Antonín Mrkvica, Gavin Romig-Koch, Jarek Prokop, Nick Dirschel, galoget