Pagure Dist Git Interactions With COPR

Copr (“Community projects”) is a service that builds your open-source projects and creates your own RPM repositories.

Possible Interactions

The following are a set of documented interactions possible between Pagure Dist Git and COPR.

Builds logic

  • COPR is using API calls for flagging dist-git commits or pull requests in build_logic.py module. It is calling /api/0/<package_name>/pull-request/<pr_id>/flag and /api/0/<package_name>/c/<commit_id>/flag API endpoints.

CLI client

  • COPR is doing git clone from dist-git, which is wrapped in copr-distgit-client clone --dist-git fedora <pkgname>.

Fedora messaging

  • COPR is listening to following dist-git topics:

    • org.fedoraproject.prod.pagure.git.receive

    • org.fedoraproject.prod.pagure.pull-request.new

    • org.fedoraproject.prod.pagure.pull-request.rebased

    • org.fedoraproject.prod.pagure.pull-request.updated

    • org.fedoraproject.prod.pagure.pull-request.comment.added

  • These topics are configured in frontend messaging configuration.

Changes proposed

In order to switch out Pagure Dist Git for an alternative that provides a relatively compatible API pattern, the following changes must be made in the places mentioned below.

Necessary

  • There are few configuration files that points to current dist-git. If the URL should change we would need to update rpkg.conf and main.ini with the URL to new service.

  • In case the message schema of the new dist-git will change we need to update consumed topics in frontend messaging configuration.

Unnecessary

  • There isn’t much interactions between Fedora dist-git and COPR and no change is needed that would be unnecessary to do in case dist-git will change.