Thursday, October 23, 2025

F44 Change Proposal: Adopt_new_R_Packaging_Guidelines [SelfContained]

Wiki: https://fedoraproject.org/wiki/Changes/Adopt_new_R_Packaging_Guidelines

Discussion Thread: https://discussion.fedoraproject.org/t/169773

**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 ==
There are currently over 400 R packages in Fedora's repositories, many of them with slightly different interpretations of the [https://docs.fedoraproject.org/en-US/packaging-guidelines/R/ R Packaging Guidelines], which contain almost no automations. As a result, different packages implement different techniques for dealing with the various quirks derived from such guidelines. With this proposal, we aim at automation, reliability and simplicity via [https://github.com/rpm-software-management/R-rpm-macros/pull/2 newly developed RPM macros], placing R packaging on the same level as other software stacks.

== Owner ==
* Name: [[User:iucar| Iñaki Úcar]]
* Email: r-maint-sig@lists.fedoraproject.org

== Detailed Description ==
This proposal consists of:
* Updating `R-rpm-macros` with [https://github.com/rpm-software-management/R-rpm-macros/pull/2 new macros].
* Adding `R-srpm-macros` to the default buildroot via Requires in `redhat-rpm-config`.
* Getting [https://fedoraproject.org/wiki/PackagingDrafts/R new R Packaging Guidelines] based on these macros approved by the FPC.
* Updating the [https://pagure.io/r2spec R2spec] tool to follow the new guidelines.
* Updating all R packages with the new guidelines.
* Mass-rebuilding all R packages in a side tag.

== Feedback ==
Some early feedback was gathered from [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/KD4NAZZZ73GK4SLOT7EHNA63JHHBEKPR/ this devel thread], and then implemented in the current proposal:

* Avoid requiring packagers to set global variables.
* Try to keep name and version static.
* Avoid ''automagic''-type macros that add lines to the preamble and calculates other macros for later use (i.e. the `%foometa` approach).

== Benefit to Fedora ==
* Simplicity: with a drastic reduction of boilerplate, spec files are simpler, less error-prone.
* Automation: the new macros
** take care of version normalization, and compute project and source URLs;
** have provisions for [[Changes/DynamicBuildRequires]];
** automate installation, checks and file generation.
* Standardization of spec files across the R library.

== Scope ==
* Proposal owners: see detailed description above.
* Other developers: N/A (not a System Wide Change)
* Release engineering: N/A (not a System Wide Change)
* Policies and guidelines: update R Packaging Guidelines and get them approved by the FPC.
* Trademark approval: N/A (not needed for this Change)
* Alignment with the Fedora Strategy:

== Upgrade/compatibility impact ==
No compatibility impact is expected.

== How To Test ==
The [https://copr.fedorainfracloud.org/coprs/iucar/R/ iucar/R] Copr repo can be used to test the new macros on rawhide. A sample spec file is available in the [https://fedoraproject.org/wiki/PackagingDrafts/R guidelines proposal].

== User Experience ==
See the [https://fedoraproject.org/wiki/PackagingDrafts/R proposed R Packaging Guidelines]. As a result of the simplification of spec files, we may ship updated libraries more quickly, and it may be easier for new contributors to package R packages.

== Dependencies ==
N/A (not a System Wide Change)

== Contingency Plan ==
* Contingency mechanism: N/A (not a System Wide Change)
* Contingency deadline: N/A (not a System Wide Change)
* Blocks release? No

== Documentation ==
N/A (not a System Wide Change)

== Release Notes ==
N/A

No comments:

Post a Comment