Prerequisites#

$ dnf install dnf-plugin-copr

or

$ yum install yum-plugin-copr

Enabling COPR Repository#

$ dnf copr enable <repository>

or

$ yum copr enable <repository>

‘’

Managing COPR Repository#

Installation#

On Fedora:

$ dnf install copr-cli

On RHEL:

$ yum install copr-cli

Authentication#

Generate an API Token and save it into ~/.config/copr, for example:

[copr-cli]
login = P497sg==##ekcpg3ysdfkgprswvoxp
username = <username>
token = ldavxiszflvejqxegszqdbbgzvaxbr
copr_url = https://copr.fedorainfracloud.org
# expiration date: 2018-03-23

If necessary, the CA cert can be specified as follows:

$ export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-bundle.crt

Verify with the following command:

$ copr whoami
<username>

Listing COPR Repositories#

$ copr list

Creating COPR Repository#

To create a new repository:

$ copr create \
    --chroot fedora-34-x86_64 \
    --chroot fedora-35-x86_64 \
    --chroot fedora-36-x86_64 \
    --chroot fedora-rawhide-x86_64 \
    test

To fork an existing repository:

$ copr fork pki pki-11.2

Modifying COPR Repository#

$ copr modify \
    --chroot fedora-34-x86_64 \
    --chroot fedora-35-x86_64 \
    --chroot fedora-36-x86_64 \
    --chroot fedora-rawhide-x86_64 \
    test

Creating COPR Build#

Generate the SPRM files as described in PKI Fedora Development, then upload with the following command:

$ copr build <COPR repo> <SRPM file> [-r <target>]

For example, to build PKI for all platforms supported by the repository:

$ copr build pki-10.6 pki-core-10.6.0-0.1.fc29.src.rpm

To build PKI for certain platforms only:

$ copr build pki-10.6 \
    pki-core-10.6.0-0.1.fc29.src.rpm \
    -r fedora-27-x86_64 \
    -r fedora-28-x86_64 \
    -r fedora-rawhide-x86_64

To build in someone else’s COPR repo, go to Settings -> Permissions in that repo and request a permission.

COPR API#

To obtain project info:

See COPR API.

References#