(I'm announcing this myself as per https://pagure.io/fesco/issue/3051.)

https://fedoraproject.org/wiki/Changes/Revitalize_Forge_Macros

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 ==
Up until now, the
[https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/7331757cf12ee645e895e7e6e91d73ff66106e12/f/macros.forge
 forge macros]
have been part of {{package|redhat-rpm-config}}.
We will split them out into a new `forge-srpm-macros` package.
We will add more test coverage and add a new `%forgeversion` macro to allow 
adding snapshot info to Version instead of Release.

== Owner ==
* Name: [[User:gotmax23| Maxwell G]]
* Email: maxw...@gtmx.me

== Detailed Description ==
The forge macros will be removed from
{{package|redhat-rpm-config}} in favor of a standalone `forge-srpm-macros`
package.
{{package|redhat-rpm-config}} will gain a dependency on `forge-srpm-macros`.
This will ease maintenance and allow the forge macros to develop independently
of redhat-rpm-config.
This split will also allow us to address longstanding issues such as
lack of test coverage and noncompliance with the new Versioning Guidelines that
mandate putting snapshot info in Version instead of Release.

Development is under way in https://git.sr.ht/~gotmax23/forge-srpm-macros.
Maintaining the macros in a separate upstream repository enables us to have
proper CI and proper versioning and frees us from having to sync macro files
across distgit branches.

The new forge-srpm-macros project
now has support for Codeberg, nested Gitlab groups, and a new
[https://git.sr.ht/~gotmax23/forge-srpm-macros/commit/145b7fc72a31b7e547bfdd114c6c68aa56374043
 `%forgeversion` macro].
There are also unit tests covering the core forge macros functionality to
prevent future regressions.
The tests have already uncovered a two year old bug in the Pagure forge
functionality!

For now, we will limit this Change to rawhide, but we may backport the
`forge-srpm-macros` package to stable Fedora releases depending on feedback
from the redhat-rpm-config maintainers and other stakeholders.
This is not a backwards incompatible Change,
so it should be safe to backport after proper testing in Rawhide.

== Feedback ==

The redhat-rpm-config maintainers have expressed that they'd prefer if the forge
macros were split into a separate project.
Other developers have expressed that the lack of regression tests makes them
hesitant to propose or accept changes to the forge macros; this Change fixes 
that.
The Go SIG who makes use of {{package|go-rpm-macros}} that relies on the forge
macros is happy to see more maintenance of these macros.
The inability to get changes into the forge macros have blocked us from fixing
bugs that affect the Go macros.

== Benefit to Fedora ==

This split out will ease maintenance and allow us to address longstanding
issues in the current codebase.

== Scope ==
* Proposal owners:
** ✅ Create an upstream repository for the forge-srpm-macros project
** ✅ Prepare a PR for {{package|redhat-rpm-config}} to remove the macros and 
associated forge.lua code and add a dependency on the new package: 
https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/260
** Submit the `forge-srpm-macros` package for review
** Build `forge-srpm-macros` and the updated {{package|redhat-rpm-config}} 
package in a side tag using provenpackager privileges
** Close existing PRs open against the forge macros and direct authors to the 
new project

* Other developers:
** Review the {{package|redhat-rpm-config}} PR
** Preform test builds of packages that use the forge macros

* Policies and guidelines:
** ✅ Adjust the 
[https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/ SourceURL 
Packaging Guidelines] to recommend the new `%forgeversion` macro: 
https://pagure.io/packaging-committee/pull-request/1295

* Trademark approval: N/A (not needed for this Change)

* Alignment with Community Initiatives: N/A

== Upgrade/compatibility impact ==

There shouldn't be any.
The forge macros will remain in the buildroot,
and {{package|redhat-rpm-config}} will Require the new package.

== How To Test ==
There is a test Copr available that contains builds of `forge-srpm-macros`'
`main` branch.
You can use it in mock like this:

<pre>
copr mock-config gotmax23/forge-srpm-macros-dev fedora-rawhide-x86_64 > 
~/.config/mock/forge.cfg
fedpkg sources
# To preform a full package build
mock --spec *.spec --source . -r forge
# To build a source package only
mock --buildsrpm --spec *.spec --source . -r forge
</pre>

== User Experience ==

This is a developer focussed Change.
This Change does not propose any drastic changes to the macros themselves and
does not mandate specfile changes,
so it shouldn't be too visible.

== Dependencies ==
This change requires coordination with the redhat-rpm-config developers to
split out the macros.

== Contingency Plan ==

* Contingency mechanism: Revert the {{package|redhat-rpm-config}} change and 
retire `forge-srpm-macros`
* Contingency deadline: N/A (not a System Wide Change)
* Blocks release? No

== Documentation ==

N/A (not a System Wide Change)

== Release Notes ==
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@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@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to