From Fedora Project Wiki
(fix the rustism that FESCO wants to focus on)
No edit summary
Line 42: Line 42:


== Scope ==
== Scope ==
* Proposal owners: Implement support for a feature in RPM and mock (if implemented properly, Koji should just work). Make use of it in interested ecosystem.
* Proposal owners: Implement support for a feature in RPM and mock (if implemented properly, Koji should just work). Make use of it in interested ecosystems.
* Other developers: Maintainers of language stacks are advised to use this feature.
* Other developers: Maintainers of language stacks are advised to use this feature.
* Release engineering: [https://pagure.io/releng/issue/8129 #8129]
* Release engineering: [https://pagure.io/releng/issue/8129 #8129]

Revision as of 12:56, 21 March 2019

BuildRequires Generators

Summary

Add possibility to generate build-time dependencies within RPM spec file and teach RPM and mock how to handle this.

Owner

Current status

  • Targeted release: Fedora 31
  • Last updated: 2019-03-21
  • Tracker bug: <will be assigned by the Wrangler>

Detailed Description

For many languages (Rust, Golang, Node.Js, Ruby, Python), BuildRequires can be automatically generated. All it takes, run some special tool which will output dependencies in RPM format.

Q: How will it work under the hood? A: When you build RPM, something like this will happen under the hood…

  1. rpm would perform %prep (which is supposed to abort if some dependencies missing and print them)
  2. mock would install those dependencies and resume build

Q: Will src.rpm contain all generated dependencies? A: This is not known yet, we'll update page once it is known.

Q: Does this mean that package builds won't be reproducible anymore? A: No, as long as you have same buildroot and tool which is generating BuildRequires is doing so in reproducible manner, it should not affect reproducibility.

Benefit to Fedora

Packagers won't have to pre-generate BuildRequires in the spec file which means it will be always updated (and correct) :

  • Packagers can focus of making their packages better instead of spending all their packaging time copying BuildRequires from documentation and third party tools.
  • BuildRequires are dropped as soon as they're no longer necessary
  • Packages can be easily bumped without requiring a manual BuildRequires refresh
  • BuildRequires and Requires generation can use similar utilities, making sure that the deps packages declare can also be used for second-level building. Packages no longer need to declare the deps of their second and n-th dependencies because someone forgot to declare them in the correct package.

Scope

  • Proposal owners: Implement support for a feature in RPM and mock (if implemented properly, Koji should just work). Make use of it in interested ecosystems.
  • Other developers: Maintainers of language stacks are advised to use this feature.
  • Release engineering: #8129
  • Policies and guidelines: Packaging Guidelines need to be updated with instructions how to use this feature.
  • Trademark approval: N/A (not needed for this Change)

Upgrade/compatibility impact

Packagers and users who use repoquery might be affected (src.rpm might not contain generated dependencies).

How To Test

TBD.

User Experience

Users won't notice differences.

Dependencies

Required feature needs to be implemented in RPM and mock.

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) Proposal Owners might still ship feature disabled for Fedora buildsystem but have it available for end-users, and move full completion to the next release.
  • Contingency deadline: Beta Freeze
  • Blocks release? No.
  • Blocks product? No.

Documentation

TBD.

Release Notes

TBD.