Bug 964126

Summary: RFE: filter out provides/requires from %_docdir
Product: [Fedora] Fedora Reporter: Kalev Lember <kalevlember>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: a.badger, bkabrda, ffesti, jzeleny, lkardos, mhroncok, mmaslano, novyjindrich, packaging-team-maint, ppisar, rvokal, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-31 08:12:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kalev Lember 2013-05-17 10:14:47 UTC
Please consider filtering out all provides/requires from %_docdir.

In Fedora packaging, %doc is often used to install example scripts. It's not uncommon for a package to ship examples for several major interpreted languages: python, perl, ruby, bash. In such cases, having a simple package pull in all the different interpreters to make the examples in %doc work seems a bit excessive.

http://fedoraproject.org/wiki/Packaging:Guidelines#Documentation states:
"Files marked as documentation must not cause the package to pull in more dependencies than it would without the documentation."

It would be great if we could do it by default, without needing packagers to carefully filter out %_docdir deps manually in each and every spec file.

I'm adding stakeholders for python/perl/ruby to CC. Can anyone come up with an example where an autogenerated requires/provides from %doc would be beneficial?

-----

Two real world examples with filtering:

perl ships a %perl_default_filter macro to make it easy to filter out requires from %_docdir: http://pkgs.fedoraproject.org/cgit/perl.git/tree/macros.perl?h=f19#n37

dovecot filters out requires/provides from %docdir to avoid pulling in extra interpreters, http://pkgs.fedoraproject.org/cgit/dovecot.git/tree/dovecot.spec?h=f19#n1

Comment 1 Vít Ondruch 2013-05-17 10:38:05 UTC
In Ruby packages, there is probably not much dependencies generated from, but there might be some due to shebangs.

Nevertheless, I am not aware of any autogenerated requires/provides which should be preserved.

Comment 3 Miro Hrončok 2020-07-01 11:29:43 UTC
> Nevertheless, I am not aware of any autogenerated requires/provides which should be preserved.

https://github.com/rpm-software-management/rpm/issues/1297