68 lines
2.5 KiB
ReStructuredText
68 lines
2.5 KiB
ReStructuredText
.. _copr:
|
|
|
|
Pagure Dist Git Interactions With COPR
|
|
======================================
|
|
|
|
`Copr <https://copr.fedorainfracloud.org/>`__ ("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
|
|
<https://github.com/fedora-copr/copr/blob/2789f06b36be5c13eae83c8695eb36de03a7728f/frontend/coprs_frontend/coprs/logic/builds_logic.py#L1101-L1109>`_.
|
|
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
|
|
<https://pagure.io/fedora-infra/ansible/blob/main/f/roles/copr/frontend/templates/fedora-messaging/copr_messaging.toml>`_.
|
|
|
|
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
|
|
<https://pagure.io/fedora-infra/ansible/blob/main/f/roles/copr/backend/templates/provision/rpkg.conf.j2>`_
|
|
and `main.ini
|
|
<https://pagure.io/fedora-infra/ansible/blob/main/f/roles/copr/backend/templates/provision/copr-rpmbuild/main.ini.j2>`_
|
|
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
|
|
<https://pagure.io/fedora-infra/ansible/blob/main/f/roles/copr/frontend/templates/fedora-messaging/copr_messaging.toml>`_.
|
|
|
|
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.
|