Bug 1165013

Summary: perl owns dirs and ships dirs it should own nor ship
Product: [Fedora] Fedora Reporter: Ralf Corsepius <rc040203>
Component: perlAssignee: Petr Pisar <ppisar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: cweyl, iarnell, jplesnik, kasal, perl-devel, ppisar, psabata, rc040203, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: perl-5.20.1-314.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-20 16:26:57 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 Ralf Corsepius 2014-11-18 06:30:33 UTC
Description of problem:

The "perl" package ships and owns several directories it should not ship:

E.g.
/usr/share/perl5/Locale
/usr/share/perl5/Log/Message
/usr/share/perl5/Archive
/usr/share/perl5/Perl
/usr/share/perl5/HTTP
/usr/share/perl5/App
/usr/share/perl5/JSON
/usr/share/perl5/Test

These are all empty and supposed to be owned by those packages, which actually put something into these dirs.

Version-Release number of selected component (if applicable):
perl-5.18.4-305.fc21

How reproducible:
Always.


Steps to Reproduce:
1. Have a look into the perl package and check it for empty dirs.
# rpm -qlv perl

Expected results:
perl not to ship nor own these directories.

Additional info:
* I'd guess these are missed %excludes, missed when splitting out dual-lifed modules.
* I haven't checked all details yet, but I would expect the list above to be incomplete.

Comment 1 Ralf Corsepius 2014-11-18 07:44:04 UTC
This is what I think is a complete list:

/usr/share/perl5/JSON
/usr/share/perl5/Perl
/usr/share/perl5/Locale
/usr/share/perl5/HTTP
/usr/share/perl5/IO
/usr/share/perl5/IO/Socket
/usr/share/perl5/IO/Compress
/usr/share/perl5/IO/Uncompress
/usr/share/perl5/Archive
/usr/share/perl5/Compress
/usr/share/perl5/App
/usr/share/perl5/Filter
/usr/share/perl5/Module
/usr/share/perl5/Test
/usr/lib64/perl5/auto/Filter
/usr/lib64/perl5/auto/Time
/usr/lib64/perl5/auto/Digest
/usr/lib64/perl5/CORE
/usr/lib64/perl5/machine
/usr/lib64/perl5/Filter
/usr/lib64/perl5/Time
/usr/lib64/perl5/Digest

Comment 2 Petr Pisar 2014-11-19 12:35:02 UTC
So instead of having empty directories, we are going to own them by multiple packages. At least it will be consistent with directories under the vendor paths.

Comment 3 Petr Pisar 2014-11-20 15:06:18 UTC
The /usr/lib64/perl5/machine has unknown purpose. It comes from upstream but I could find what creates the directory. I will keep it there.

Because the spec file change is quite large, I do not want to port it to Fedora 21 just to fix this aesthetic issue. I hope you will understand.

Comment 4 Petr Pisar 2014-11-20 15:07:48 UTC
s/I could find/I could not find/

Comment 5 Ralf Corsepius 2014-11-20 15:29:09 UTC
(In reply to Petr Pisar from comment #3)
> Because the spec file change is quite large, I do not want to port it to
> Fedora 21 just to fix this aesthetic issue. I hope you will understand.

I am unsure about what to do. Why? I tripped over this issue when cleaning up after having upgraded from fc20 to fc21, which - as usual with Fedora upgrades - exposed many issues on directory ownership. One of these was this.

That said, I feel this bug should be ported to f21 to avoid other users from tripping over this issue. However, I agree in sofar, this bug is mostly cosmetic and doesn't cause any mal-function. 

So, I'd propose, we should backport it from rawhide to fc21 (and may-be older releases), such that it gets inherited during the next update.

Comment 6 Petr Pisar 2014-11-20 16:26:57 UTC
petr@dhcp-0-146:~/fedora/perl $ git show --stat
commit 46308c06eb68b0ad6d11f6b7993983a9fde4cd9c
Author: Petr Písař <ppisar>
Date:   Thu Nov 20 15:40:01 2014 +0100

    Own upper directories by each package and remove empty directories
    
    Standard @INC directories are exceptions.
    "machine" directory has unknown origin but comes from upstream. Lets
    keep it there now.

 checkemptydirs |  11 +++
 perl.spec      | 271 +++++++++++++++++++++++++++++++++++++++++----------------
 2 files changed, 209 insertions(+), 73 deletions(-)

To exclude empty directories, one has to own them by all sub-packages which installs there. The set of sub-packages differs between Fedora 22 and 21. Reviewing them again is not worth for the few directories.