Wednesday, December 2, 2026

F46 Change Proposal: Package Review Process via Fedora Forge Pull Requests (system-wide)

Wiki - https://fedoraproject.org/wiki/Changes/PackageReviewProcessForgePR Discourse poll - https://discussion.fedoraproject.org/t/f46-change-proposal-package-review-process-via-fedora-forge-pull-requests-system-wide/209952/2 This is a proposed Change for Fedora Linux. This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee. == Summary == The [https://docs.fedoraproject.org/en-US/package-maintainers/Package_Review_Process/ Package Review Process] will be extended to support reviewing packages via pull request to [https://forge.fedoraproject.org/packaging/package-review/ the packaging/package-review repository on Fedora Forge]. Instead of filing a new bug for the ''Package Review'' component in Bugzilla, the ''Contributor'' will be allowed to open a pull request with the spec file, patches, and other dist-git files to the packaging/package-review repository. The ''Reviewer'' will approve the package by approving the pull request in Fedora Forge. For the time being, the original Bugzilla-based Package Review Process remains a supported way of submitting new Fedora packages, until the new process is proven reliable and satisfactory replacement. == Owner == * Name: [[User:Churchyard|Miro Hrončok]], [[User:Frostyx|Jakub Kadlčík]] * Email: mhroncok@redhat.com, jkadlcik@redhat.com == Detailed Description == {{admon/important|Why is this a Fedora 46 change proposal|For process reasons, this is a Fedora 46 change proposal. However, it is not tied to the release of Fedora Linux 46 in any way. Once allowed, all new packages will be able to use this new process regardless of the Fedora and/or EPEL releases they target.}} The proposal owners believe that submitting new packages for review via Bugzilla is not an optimal way. Instead, they propose a new alternative way based on pull requests, because they believe that pull-request based contribution to the Fedora Project is more pleasant to both the [https://docs.fedoraproject.org/en-US/package-maintainers/Package_Review_Process/#_contributor ''Contributor''] (someone who wants to submit and maintain a new package in Fedora) and the [https://docs.fedoraproject.org/en-US/package-maintainers/Package_Review_Process/#_reviewer ''Reviewer''] (the person who chooses to review a package). === Backward-compatible change of the Package Review Process === Anything proposed here is going to be added to the process as an alternative path. Nothing is deprecated, removed or discontinued by this change proposal. Later, we (as the Fedora packagers) might decide to abandon the Bugzilla-based review process, however this is not proposed now. The ''Contributor'' is the one who ultimately chooses whether to submit a new Package Review Request via Bugzilla or Forge PR. === Minimal viable PR-based Package Review Process === # The ''Contributor'' opens a pull request (PR) to https://forge.fedoraproject.org/packaging/package-review/ with files to be imported to dist-git (the spec file, patches, small text sources, CI configuration, .gitignore) in a directory named after the package. Multiple packages can be added in one pull request, each at their own respective directory. The ''Contributor'' may indicate the request is not ready for review by marking it as WIP (''Work In Progress''). # The ''Reviewer'' should add themselves to the ''Reviewers'' list of the PR so others know this PR is being reviewed. # The ''Reviewer'' provides feedback, suggestions, etc. if necessary. # The ''Contributor'' responds to feedback (if any) e.g. by adding new commits or amending the ones in the pull request, or simply by having a conversation with the ''Reviewer''. # The previous 2 steps repeat as needed. # When satisfied, the ''Reviewer'' uses the ''Approve'' functionality of Forgejo to indicate formal approval of all packages added via the PR. At any point in the process, the ''Contributor'' may close the PR to indicate no further interest. Similarly, the ''Reviewer'' may remove themselves from the ''Reviewers'' list. The `fedpkg request-repo` command gains an ability to reference a PR number of https://forge.fedoraproject.org/packaging/package-review/ rather than a Bugzilla bug ID. When a repository is requested that way, the ticket created at https://forge.fedoraproject.org/releng/fedora-scm-requests/issues is then checked by automation for correctness -- e.g. both the ''Contributor'' and ''Reviewer'' need to be in the packager group for the repository to be actually created, the approval is not stale (out of sync with the PR content), the PR is not WIP... This already presents several advantages over the current Bugzilla-based Package Review Process: * The process gains the ability for reviewing multiple packages at once. * Files not present in the SRPM are reviewed together with the specfile (imagine `plan.fmf`, `<pkgname>.rpmlintrc` etc.). * Feedback can be provided inline (e.g. to point out something smelly at a particular line of the specfile). * Patches and other text sources can be easily observed (rather than needing to be downloaded via SRPM and extracted). * The ''Approval'' is paired with a specific state of the PR rather than with a hyperlink to a SRPM and specifle (which can change or be removed). * Changes (responding to feedback, etc.) are visible and traceable (no need to diff different versions of a spec file, or even reuploaded files overriding the previous versions). This also presents several challenges: * There is no lookaside cache, what to do with sources that are going to be uploaded there when the package is added to Fedora dist-git? Previously, such sources were included in the SRPM which was uploaded "somewhere". This is addressed in the [[#Additional sources]] section. * What to do with the PR after it was approved and the dist-git repository was created? If we keep merging them, the repository will have ever increasing amount of outdated Fedora spec files. If we close them rather than merging, they will be hard to distinguish from abandoned packaging efforts. This is resolved by the [[#Streamlined automation]] section. === Boosting the review process with CI === When designing this new PR-based process, we thought of CI. This is not necessary for adapting the minimal viable PR-based Package Review Process. However, it has potential for even more benefits. The CI (based on Forgejo Actions) of https://forge.fedoraproject.org/packaging/package-review/ can do several things: * It can build the proposed package(s) in Copr (respecting the commit order, which allows bootstrap loops etc.) * It can run https://forge.fedoraproject.org/ci/shared-tests (rpminspect, rpmlint, installability tests...) on the built packages * It can run https://forge.fedoraproject.org/packaging/FedoraReview on the built packages * It can leverage LLM to check the package against the [https://docs.fedoraproject.org/en-US/packaging-guidelines Fedora Packaging Guidelines] Theoretically, the CI jobs could even provide feedback inline in the PR. The change proposal owners are dedicated to improving the CI experience of the PR-based Package Review Process. However, they will need help by other packagers and CI folks as well. We also believe a fully functional CI pipeline is not a blocker to allowing the minimal viable PR-based Package Review Process defined earlier. In the future, a defined subset of passing CI jobs could be made mandatory for allowing the PR to be approved/merged. However, this is not part of this proposal. === Streamlined automation === There is a toddler that can handle the `fedpkg request-repo` part of this process automatically: https://forge.fedoraproject.org/apps/toddlers/pulls/450 This allows the following: # When a PR is formally approved by the ''Reviewer'', the toddler is triggered. # An issue is created at [https://forge.fedoraproject.org/releng/fedora-scm-requests/issues releng/fedora-scm-requests] (so the ''Contributor'' does not need to run `fedpkg request-repo`). Alternatively, the toddler ''could'' skip this step and handle the next step itself, but we want the issue as a track record. # A dist-git repository is created (as a result of the issue). # Based on config file added in the PR and/or PR labels, followup issues are created in [https://forge.fedoraproject.org/releng/fedora-scm-requests/issues releng/fedora-scm-requests] requesting additional branches (to avoid the need of manual `fedpkg request-branch)`. The ''Contributor'' can opt-out of this step by listing no branches. # The content of each package-folder from the approved PR is imported to the rawhide dist-git branch and fast-forwarded to other requested branches. # The PR is labeled with a special "this was imported to dist-git" label and closed. That way, approved PRs are easily recognizable but the git repository itself is not bloating over time. Note: The package is imported to dist-git with a single ''Initial commit''. A possibility of improvement is to rebase the git history of each folder in the approved PR (relocate to the root of the repository, filter commits not touching the folder, config files only used for the review). However, we assume only a very small subset of ''Contributors'' would want that, so this is left as an experiment for later. === Why a dedicated repository at Fedora Forge instead of direct dist-git PRs === Ideally, new packages would be submitted as pull requests to their dist-git repository. That would allow to merge them directly, and also would benefit from the exisitng dist-git CI. However, there is a chicken-and-egg problem: The dist-git repository to open the PR ''to'' does not exist before the package is approved (except for package unretirements) and we don't want to willy-nilly create them. An alternative would be to redesign dist-git to a giant ''monorepo'': have all the packages in one git repository. That would allow opening PRs with new packages to that single repository. That would be such a big paradigm shift that we do not even dare to suggest that (and if we wanted to, we would not want this new PR-based Package Review Process to be blocked on that). Having a one single dedicated repository for package reviews is not simply a ''least bad option''. It also has benefits: for example, it allows interested package ''Reviewers'' to subscribe to notifications about new PRs; it allows to tailor the repository CI, configuration, and labels to package reviews. And it allows reviewing multiple related packages together (even without switching all dist-git to a monorepo). === Additional sources === We assume that a majority of the source tarballs (and other files usually uploaded to the lookaside cache (with `fedpkg new-sources` or `fepdkg import`, later simply referenced to as "sources") have an URL where they can be fetched from. Both the human ''Reviewer'' or the CI automation can run `spectool -g` to get them. One could argue that then the ''Reviewer'' has no insight whether the sources are in fact downloaded verbatim or tempered with by the ''Contributor'', however that was always the case. A malicious and/or confused ''Contributor'' could present a SRPM link in the package review bug (with genuine upstream sources) and then import an entirely different source tarball to dist-git after approval. We also assume that the majority of the remaining sources could be generated by a Shell script. Such script should be included in the package review PR (at a known location) and both the human ''Reviewer'' or the CI automation can execute the script to get them. (This is already supported by the copr-building CI automation we have, see the [https://forge.fedoraproject.org/packaging/package-review/src/branch/main/README.md#additional-sources Additional sources section of the README] and could be improved later as needed.) This could also encourage packagers to create such scripts, instead of generating the tarballs by hand. Using the Bugzilla-based review, the ''Contributor'' needs to upload the SRPM somewhere to the internet. Hence, as a last restort when using a PR-based review, they can upload a tarball that cannot be fetched from upstream or generated and link it in the PR at a known place (via config file or PR description, or something like that). Both the human ''Reviewer'' or the CI automation can then download it from this location. In either case, the ''Contributor'' may include the `sources` file(s) in the PR, to indicate the checksums of the sources they used. === Other features of Bugzilla-based Package Review === Here we discuss some of the features of Bugzilla-based Package Review. When we say something is replaced, we mean "when using the PR-based workflow, do X instead of Y". * [https://docs.fedoraproject.org/en-US/package-maintainers/Package_Review_Process/#definitions_for_fedora_review_flag_settings fedora-review flag] is replaced by PR review (Approved, Request Changes) * [https://docs.fedoraproject.org/en-US/package-maintainers/Package_Review_Process/#special_blocker_tickets Special Bugzilla blockers] can be replaced by PR labels or even blockers on other Forge tickets if needed * [https://docs.fedoraproject.org/en-US/package-maintainers/Package_Review_Process/#the_whiteboard Whiteboard] can be replaced by PR labels as well == Feedback == See https://discussion.fedoraproject.org/t/fedora-package-review-process-reimagined/198109 -- we have already discussed this with other packagers and we consider the feedback as net positive. == Benefit to Fedora == * More human-friendly Package Review Process. * More CI-friendly Package Review Process. See specific benefits listed in [[#Minimal viable PR-based Package Review Process]]. == Scope == * Proposal owners: ** Make the [[#Minimal viable PR-based Package Review Process]] work. ** Improve the CI and automation. ** Provide help for early adopters and firefight issues. * Other developers: ** Start using this and expect things might not be smooth right away. ** Help us with documentation, CI, automation... * Release engineering: [https://forge.fedoraproject.org/releng/tickets/issues/13591 #13591] * Policies and guidelines: see [[#Documentation]] * Trademark approval: not needed for this Change * Alignment with the Fedora Strategy: Hopefully, this will double the number contributors who are active every week :) == Upgrade/compatibility impact == Anything that reads or watches Bugzilla for data or notifications about package reviews needs to be adjusted. This includes https://fedoraproject.org/PackageReviewStatus/ == https://forge.fedoraproject.org/apps/review_stats or the tool that handles stale package review requests (XXX which one?) == Early Testing (Optional) == Do you require 'QA Blueprint' support? No == How To Test == When adding a new package to Fedora, create a PR to https://forge.fedoraproject.org/packaging/package-review instead of creating a bug in Bugzilla. Review other PRs there. Report back to if something is broken -- to https://forge.fedoraproject.org/packaging/package-review/issues == User Experience == This does not affect the users of Fedora Linux at all. This is a change for Fedora packagers. The packagers are our users and we want their experience to be better. We hope it will be. But in case there are packagers who disagree, they can keep using Bugzilla for their new packages. == Dependencies == For the [[#Minimal viable PR-based Package Review Process]] all we need is: * The repository on Forge (done). * Changes to whatever processes fedora-scm-requests to be able to accept and check a PR reference instead of a Bugzilla reference. * Changes to `fedpkg request-repo` to create such requests. == Contingency Plan == * Contingency mechanism: If the process is severely broken, we disallow accepting new repo requests with a PR number reference * Contingency deadline: none * Blocks release? No, this is made as a Fedora 46 change only for process reasons, but it is in fact not tied to a specific release. == Documentation == We need to update at least: * https://docs.fedoraproject.org/en-US/package-maintainers/Package_Review_Process/ * https://docs.fedoraproject.org/en-US/packaging-guidelines/ReviewGuidelines/ * https://docs.fedoraproject.org/az/package-maintainers/New_Package_Process_for_Existing_Contributors/ * https://docs.fedoraproject.org/az/package-maintainers/New_Package_Process_for_New_Contributors/ * README in https://forge.fedoraproject.org/packaging/package-review/ * README in https://forge.fedoraproject.org/releng/fedora-scm-requests/ * possibly more... ? This will be a lot of writing, we appreciate some help. == Release Notes == -- Aoife Moloney Fedora Operations Architect Fedora Project Matrix: @amoloney:fedora.im IRC: amoloney -- _______________________________________________ devel-announce mailing list -- devel-announce@lists.fedoraproject.org To unsubscribe send an email to devel-announce-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org Do not reply to spam, report it: https://forge.fedoraproject.org/infra/tickets/issues/new

No comments:

Post a Comment