Fedora’s dist-git on Forgejo: what a proof of concept found
communityblog.fedoraproject.org
Key points
Fedora contributors have published findings from a proof of concept (PoC) for hosting the distribution's dist-git on Forgejo instead of Pagure. No migration has been announced. The work shows that the main difficulty is reproducing Pagure's permission system, and that the result depends on a new maintainer role and workflow-based ACL changes.
Status
- The PoC is a set of artifacts plus one running script, not a deployed service.
- Done so far: a repeatable read-only extraction of the production Pagure database, documentation of Pagure's access semantics, and the repository import script.
- Design only: OIDC group mapping, team layout, branch protection rules, ACL migration and the
maintainerpatch. - No staging run has exercised a real ACL workflow yet; building that is the next step.
- The authors conclude that the data maps cleanly and that a mechanism for FAS group sync already exists.
Repositories and owners
- All figures come from the production Pagure database as of 2026-09-16.
- It holds 43,425 projects: 42,274 in
rpms, 614 flatpaks, 247 tests, 209 modules and 79 containers. - 26,434 projects have an owner; 16,991 (39.1%) are orphaned or retired.
- Orphan rates are 39.9% in
rpms, 34.4% inmodules, 22.8% incontainer, 2.8% intestsand 2.3% in flatpaks. - A single SIG manages the flatpak namespace, which is fully covered by group permissions.
Permissions and pull requests
- 1,328 users and 58 groups hold access, averaging about 1.5 users per active package.
- Individual entries: 26,432 owner, 10,320 admin, 3,612 commit, 686 collaborator and 51 ticket.
- Groups hold 10,858 commit and 2,217 admin grants across 12,951 packages, nearly 30% of the archive.
- The three largest maintainers hold 2,381, 1,504 and 1,387 packages, so a mapping error on one account could have wide effects.
- There are 93,471 pull requests, but only 14,756 repositories (34%) have any; 89 have more than 100, led by packit with 1,813.
- The
testsnamespace is the most engaged: 49% of its repositories have pull requests, averaging 17.5 each.
Proposed Forgejo design
- Each namespace becomes an organization with teams for SIG groups.
provenpackagergets write access to everything andscm-admingets admin access to everything;packagersgets no repository access and only validates eligibility to maintain packages.- Team membership syncs from FAS over OIDC, so joining
rust-sigin FAS adds a user to therpms/rust-sigteam. - Forgejo has no main admin concept, so a patch without database changes adds a
maintainerrole: one per repository, equivalent towritefor code, visible in the UI and API, and checked by ACL workflows. - Individual users never receive
admin, which keeps maintainers away from branch protection and webhooks. - ACL changes, including adding a co-maintainer, run through Actions in
dist-git-admin/acl-workflows; each operation opens an issue and closes it when done. - Active branches (
rawhide, current Fedora releases and supported EPEL) stay open; all others become read-only, even for admins. - Active branches also become repository topics, allowing queries for packages live in a branch and supporting tasks such as mass rebuilds.
Impact on tooling
- Bodhi, Packit, Koji and the Toddlers scripts use Pagure's APIs and would all need updating before Pagure could be retired, as no compatibility shim is planned.
hascommitmaps to the collaborators endpoint,modifyaclsto a workflow dispatch andwatchers/updateto Forgejo's native subscription API.- FTBFS filing, Koschei links and release monitoring depend on Bugzilla and are left to the Bugzilla initiative.
Open questions
- Orphans: whether to move them to archive organizations, keep them in place with a marker or choose something in between; also what happens to their co-maintainers and how a package is reclaimed.
- There is no create-repository workflow, no agreed way for SIGs to update package lists and no policy on which settings maintainers may change.
- It is undecided whether teams should be duplicated per organization or managed centrally.
Where to follow
- The post links a PoC instance at forgejo-src.stg.fedoraproject.org and the Matrix channel #fedora-forgejo:fedoraproject.org.
Summary by DistroNews, based on the original post.
We have been building a proof of concept for running Fedora’s dist-git on Forgejo instead of Pagure. On paper, that is a change of repository hosting. In practice, the PoC turned into an exercise in reproducing a permission system that has accumulated for years, on a platform with different primitives. Nothing here is an announced cutover; it is an attempt to find out what one would take.
The work is based on the production Pagure database as of 2026-09-16, the same snapshot the design notes are written against. Every figure below comes from that dataset, so repository, permission, and pull request counts all describe the same day.
What is in there
The snapshot covers 43,425 projects in five namespaces: 42,274 in 614 flatpaks, 247 tests, 209 modules, and 79 containers. Only 26,434 of those have an owner. The rest, 16,991 projects or 39.1%, are orphaned or retired.
The orphan rate is not spread evenly. It is 39.9% in rpms, 34.4% in modules and 22.8% in container, but only 2.8% in tests and 2.3% in flatpaks. The flatpak namespace is also 100% covered by group permissions, managed by a single SIG. Whatever a cutover would do about orphans, it is mostly a decision about the RPM namespace.
Access is held by 1,328 users and 58 groups. Individual permissions break down into 26,432 owner entries, 10,320 admin, 3,612 commit, 686 collaborator, and 51 ticket. That averages about 1.5 users per active package, which is another way of saying most packages are maintained by one person.
Group permissions are larger than they first appear: 10,858 commit grants and 2,217 admin grants, attached to 12,951 packages. Nearly 30% of the archive is maintained by a team rather than an individual.
Ownership is also heavily concentrated. The top maintainer holds 2,381 packages, the next two hold 1,504 and 1,387, and the top hundred account for thousands more. A mistake in the permission mapping on the wrong account is not a small mistake.
Pull requests tell a similar story of a thin, busy edge. There are 93,471 PRs, but only 14,756 repositories, 34%, have any at all. Two-thirds have never seen one. Meanwhile, 89 repositories have more than 100: packit with 1,813, python-ogr with 1,048, python-specfile with 878, linux-system-roles with 850, and the tests/selinux repo with 761. The tests namespace has the highest engagement of any namespace, with 49% of repos carrying PRs and an average of 17.5 PRs on those that do.
So PR import tooling matters for a minority of repositories, but it is the minority that does the most work.
The permission models do not line up.
Pagure has three access levels (admin, commit, ticket), a per-package main admin or point of contact, co-maintainers, watchers, and cross-package groups: packager, provenpackager and scm-admin.
Forgejo has three roles (admin, write, read), organizations, teams, and branch protection. It has no concept of a main admin.
The PoC design maps namespaces to organizations: rpms, modules, flatpaks, container, tests. Each organization gets teams for SIG groups, plus provenpackager with write access to everything, scm-admin with admin access to everything, and packagers with no repo access at all, existing only to validate that someone is allowed to maintain a package. Membership syncs from FAS over OIDC, so joining rust-sig in FAS adds you to the rpms/rust-sig team automatically.
The more consequential piece is a proposed maintainer role, implemented as a patch to Forgejo with no database changes. It behaves like write for code, but it is visible in the UI and API; there is exactly one per repository, and it is what the ACL workflows check before doing anything. Individual users never get admin. That keeps maintainers away from branch protection and webhooks, and sends every ACL change through Actions in dist-git-admin/acl-workflows, where each operation files an issue and closes it when done. Adding a co-maintainer stops being an API call and becomes a workflow dispatch.
That choice has a cost beyond the extra click. Pagure’s APIs are used by Bodhi, Packit, Koji, and the Toddlers scripts. The PoC replaces them rather than building a compatibility shim: hascommit maps to the collaborators endpoint, modifyacls to a workflow dispatch, watchers/update to the native subscription API. All of those services would have to be updated before Pagure could be retired.
Branch protection is simpler. In the design, active branches (rawhide current Fedora releases, supported EPEL branches) are left open. Everything else becomes read-only, enforced on admins too, so nobody commits to an EOL release by accident. Active branches also become repository topics, which gives a way to query for packages live in rawhide or epel9 and to drive things like mass rebuilds.
What we actually built
The PoC is not a deployed service. It is a set of artifacts and one running script.
The numbers in this post come from a read-only extraction of the production Pagure database, so the analysis can be regenerated rather than hand-counted. Alongside it, we documented Pagure’s access semantics end to end: the three access levels, the main admin and co-maintainer roles, the three cross-package groups, SIG package sets, and the hascommit, modifyacls, and watchers/update APIs that Bodhi, Packit and the automation scripts depend on.
The repository import script is implemented. The OIDC group mapping, team layout, and branch protection rules exist as designs, as do the ACL migration and the maintainer patch. No staging run has exercised a real ACL workflow yet, and that is the next thing to build.
What the work proved is narrower than a cutover plan: the data maps cleanly, the FAS group sync has a mechanism that already exists, and the missing piece is the maintainer role plus workflow-based ACL changes. Those are the two things that decide whether the rest is straightforward.
What is still open
Several things are deliberately unfinished. The biggest is what happens to the 16,991 orphans: move them to archive organizations, keep them in place with a marker, or something in between. Related questions are what happens to their co-maintainers and how someone takes a package back. There is also no create-repository workflow yet, no agreed way for SIGs to update their package lists, no policy for letting maintainers change any repository settings, and an open question about whether teams should be duplicated per organization or managed centrally.
Automation outside the forge is the other loose end. Bodhi, Packit, and Koji all read Pagure’s permission APIs today, and none can move until replacement endpoints and workflows exist. FTBFS filing, Koschei links and release monitoring depend on Bugzilla, so they will be handled by the Bugzilla initiative.
None of this is unusual for a change of this size. What makes it worth watching is the shape of the data. Most of the archive is quiet; a small number of repositories and people carry most of the activity, and roughly 40% of packages have no owner at all. Get the maintainer role and the FAS group sync right, and the quiet majority would move without anyone noticing. Get them wrong, and the failures would land on the packages everybody depends on.
Links:
- PoC instance: https://forgejo-src.stg.fedoraproject.org/
- Matrix channel: https://matrix.to/#/#fedora-forgejo:fedoraproject.org
The post Fedora’s dist-git on Forgejo: what a proof of concept found appeared first on Fedora Community Blog.
By Tomáš Hrčka, from Fedora Community Blog, reproduced under CC BY 4.0. Formatting is simplified and images in the text are omitted.
Read the original at communityblog.fedoraproject.org