#418 Should not complain about unowned directories when owning dependency is automatically Required
Opened 2 years ago by oturpe. Modified 2 years ago

Packaging guidelines, section File and directory ownership
says that directories owned by packages in the "natural dependency chain"
can be used and do not have to be explicitly owned.
Sometimes the chain is automatically generated,
rather than explictly listed in specfile Requires.
fedora-review is unable to process this case
and wrongly complains about unowned directories.

In particular, any Ruby gem specfile created with gem2rpm
will get the following complaint from fedora-review:

[ ]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/gems,
     /usr/share/gems/doc

which is wrong,
because the package has an automatically created Requires: ruby(rubygems),
satisfied by package rubygems
which owns the listed directories.


I'm pretty sure it's supposed to check the resulting install tree. Is it not doing that?

I'm pretty sure it's supposed to check the resulting install tree. Is it not doing that?

Ah, you are right, I checked. So the initial descrption of this bug is incorrect. A fresh start:

The bug:
Packages created by gem2rpm get incorrect nag about "Note: Directories without known owners: /usr/share/gems, /usr/share/gems/doc", when actually rubygems is in the dependency tree and owns those directories.

Example files:
rubygem-sync-0.5.0-1.fc34.src.rpm
rubygem-sync.spec

To reproduce:
1. Download the linked example rubygem-sync specfile and srpm
2. Run fedora-review -n rubygem-syncin that directory
3. In review-rubygem-sync/review.txt, check the result of Package must own all directories that it creates.
4. At the end of the same file, observe Requires for rubygem-sync

Observed behavior:
1. Complaint about unowned directories /usr/share/gems and /usr/share/gems/doc are logged
4. But Requires: ruby(rubygems) is present

Expected behavior:
1. No complaints about unowned directories, because
2. Requires: ruby(rubygems) is present

Reason:
The complaint is actually forrubygem-<name>-doc package. It has a transitive Require for rubygems through rubygem-<name>. Fedora-review fails to process this: It knows how to process transitive dependencies here, but that fails when the immediate dependency is another subpackage in the same specfile.

Relevant code starts here: plugins/generic.py line 1102

Login to comment on this ticket.

Metadata
Attachments 2