Adopt new R Packaging Guidelines
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 [R Packaging Guidelines :: Fedora Docs 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 [Simplify R spec management by Enchufa2 Ā· Pull Request #2 Ā· rpm-software-management/R-rpm-macros Ā· GitHub 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-macroswith [Simplify R spec management by Enchufa2 Ā· Pull Request #2 Ā· rpm-software-management/R-rpm-macros Ā· GitHub new macros]. - Adding
R-srpm-macrosto the default buildroot via Requires inredhat-rpm-config. - Getting [PackagingDrafts/R - Fedora Project Wiki new R Packaging Guidelines] based on these macros approved by the FPC.
- Updating the [Making sure you're not a bot! 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 [Making sure you're not a bot! 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
%foometaapproach).
Jelle van der Waa noted that [Making sure you're not a bot! current builds are not reproducible], and proposed a fix. That fix has been incorporated to the `%R_install` macro.
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.
- Reproducibility of R package builds.
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.
Early Testing (Optional)
N/A
How To Test
The [iucar/R Copr iucar/R] Copr repo can be used to test the new macros on rawhide. A sample spec file is available in the [PackagingDrafts/R - Fedora Project Wiki guidelines proposal].
User Experience
See the [PackagingDrafts/R - Fedora Project Wiki 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
Last edited by @iucar 2025-10-24T08:34:31Z
Last edited by @iucar 2025-10-24T08:34:31Z