From Mageia wiki
Jump to: navigation, search

Fedora COPR is a service provided by the Fedora Project to allow people to create and publish packages of free and open source software as RPM repositories using RPM MetaData (rpm-md) format.

Getting set up with COPR

A full in-web/graphical screenshot tutorial is available in the COPR documentation that walks you through getting set up. Please follow this guide for getting set up initially.

Afterward, if you'd like to also operate from the command line, you can do so.

First, install copr-cli package:

  # dnf install copr-cli # Using DNF
  # urpmi copr-cli # Using urpmi

Then, visit:

At the web page, log in and follow the instructions to set up your API key for the command line client.

Creating a project and building a package there

First, note the rules about what you can build in COPR. For all intents and purposes, you can only build software in COPR that would otherwise be suitable for the Mageia core repository. Encumbered or nonfree software cannot and should not be built there.

If you'd like to create a project for packages, perhaps targeting Mageia 6, Fedora 26, and RHEL/CentOS 7 for x86_64, you do so by running the following command:

 $ copr-cli create --chroot mageia-6-x86_64 --chroot fedora-26-x86_64 --chroot epel-7-x86_64 --description "<project description>" --instructions "<instructions on using software in project>" <username>/<prjname>

After creating the project, you can now push source packages to it to be built:

 $ copr-cli build <username>/<prjname> </path/to/package.src.rpm>

Using the built package on your computer

The DNF package manager has integration with the COPR service, so that it's very easy to enable and disable repositories from COPR.

To enable a repository from COPR, use the following command:

 # dnf copr enable <username>/<prjname>

Then, you can install the package like normal with DNF:

 # dnf install <package>

If you wish to disable the repository, use the following command:

 # dnf copr disable <username>/<prjname>


Return to the Packagers portal