Bug 738421

Summary: Perl bzip2 modules missing from IO::Compress modules provided by perl
Product: Red Hat Enterprise Linux 6 Reporter: Steve Snodgrass <ssnodgra>
Component: perlAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: high Docs Contact:
Priority: high    
Version: 6.1CC: Colin.Simpson, ktdreyer, lzachar, ppisar, psabata
Target Milestone: rcKeywords: EasyFix, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: perl-5.10.1-122.el6 Doc Type: Bug Fix
Doc Text:
Cause Using bzip2 compression or decompression in Perl code (e.g. using IO::Compress::Bzip2 Perl module). Consequence Perl interpreter complains about missing bzip2 module. Fix Support for bzip2 compressions and decompression has been added and corresponding Perl modules has been packaged as perl-Compress-Raw-Bzip2 and perl-IO-Compress-Bzip2 . Result Bzip2 algorithm can be used in Perl programs now.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 13:47:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 765934    
Attachments:
Description Flags
Patches perl spec file to properly include bzip2 modules
none
Package bzip2 modules none

Description Steve Snodgrass 2011-09-14 18:24:06 UTC
Description of problem: All the bzip-related modules from IO::Compress, which is built from the main perl source RPM, are missing.  They appear to be intentionally deleted by the perl spec file, with no explanation other than a vague reference to bug #544582.  Normally I would not complain about software that isn't included, but the actual deletion of files from software that is included makes it extremely difficult to properly roll your own package.

Version-Release number of selected component (if applicable): 5.10.1-119


How reproducible: Always


Steps to Reproduce:
1. Install perl and related perl-IO-Compress RPMs
2. See that there is no IO::Compress:Bzip2 or IO::Uncompress::Bunzip2 module
3.
  
Actual results: No bzip2 modules are available


Expected results: These modules are included with IO::Compress and should be available, even if the RPM is split out like the Zlib one.


Additional info:

The perl spec file contains the following bits:

# for now, remove Bzip2:
find $RPM_BUILD_ROOT -name Bzip2 | xargs rm -r
find $RPM_BUILD_ROOT -name '*B*zip2*'| xargs rm

* Mon Dec  7 2009 Stepan Kasal <skasal> - 4:5.10.1-104
- do not pack Bzip2 manpages either (#544582)

* Mon Dec  7 2009 Stepan Kasal <skasal> - 4:5.10.1-103
- do not pack Bzip2 modules (#544582)

Comment 2 RHEL Program Management 2011-09-14 18:48:32 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 3 Steve Snodgrass 2011-09-15 02:43:58 UTC
Created attachment 523293 [details]
Patches perl spec file to properly include bzip2 modules

A canned rejection with little rationale is not very helpful.  The component doesn't even need to be "updated", beyond fixing the broken spec file.  I've included a patch for the spec file which 100% fixes this problem.  Rebuilding the perl package with this patched spec will give you 2 new RPMs:

perl-Compress-Raw-Bzip2
perl-IO-Compress-Bzip2

Existing RPMs and sources are not modified in any way, other than an additional dependency in the main package on these new RPMs.  The bzip2 package is even fixed to use the system bzlib library, so there's no concern about bundling.  I don't see why this useful, 100% compatible fix couldn't be added to a future maintenance release (i.e. RHEL 6.2).  Note that I did nothing to the RPM revision number; I'll leave that to Red Hat.

Even if this doesn't make it upstream, hopefully it will help someone else who finds this bug.

Comment 4 Marcela Mašláňová 2011-09-15 07:51:12 UTC
Ou, it was probably removed because of conflicts with dual life packages, which provided the same functionality.
Thank you for report.

Comment 5 Steve Snodgrass 2011-09-15 13:30:39 UTC
Sorry, I'm not sure what packages you are referring to?  Are there other packages that implement this bzip2 functionality?  I haven't seen any.  Perhaps Stepan should be added to the CC list, he should know more about the rationale for removing this.

Comment 6 Marcela Mašláňová 2011-09-15 15:07:46 UTC
These packages are not in RHEL. It must be fixed in main package. Stepan doesn't have account anymore.

Comment 7 Steve Snodgrass 2011-09-15 15:36:26 UTC
OK.  I should add that the reason I needed these modules in the first place is cpanspec.  Fedora's own cpanspec utility for packaging perl modules will not run on RHEL6 without these modules.

Comment 8 Ken Dreyer 2011-10-30 00:40:00 UTC
perl-IO-Compress-Bzip2 is in EPEL (and cpanspec would presumably go into EPEL also). Does this work for you?

Comment 10 Steve Snodgrass 2011-11-10 17:53:09 UTC
Ken, I see no evidence of a perl-IO-Compress-Bzip2 package in my EPEL6 mirror or on the EPEL6 site.  Regardless, it wouldn't make sense there anyway.  I'm still not certain if anyone is understanding what I'm trying to get across in this bug report.  You CANNOT download these modules separately on CPAN; they are bundled into the IO-Compress distribution which is included with the main perl package on RHEL, which then splits it up into a bunch of different RPMs.  The only reason these RPMs aren't present in the first place is that the existing perl spec file actually deletes code from the IO-Compress distribution to suppress them (for reasons I do not understand).  My patch to the perl spec file fixes this and restores the missing RPMs.

Comment 11 Ken Dreyer 2011-11-10 21:06:25 UTC
(In reply to comment #10)
> Ken, I see no evidence of a perl-IO-Compress-Bzip2 package in my EPEL6 mirror
> or on the EPEL6 site.

Good point. The package is branched but no Koji builds were initiated for el6. https://admin.fedoraproject.org/pkgdb/acls/name/perl-IO-Compress-Bzip2

Sounds like mmaslano will have to weigh in on the best direction forward: fix the perl package in RHEL, or create a new sub-package in EPEL.

Comment 12 Marcela Mašláňová 2011-11-11 08:22:35 UTC
The correct solution is fix perl package. 

I was looking into EPEL for hotfix solution, but it's not possible to build perl-IO-Compress-Bzip2 there. The tests are failing in EPEL-6. And that's not the only problem. Since ~2.017 were all IO::Compress merged into one package and you need all IO::Compress::* in the same version for correct functionality. Update in EPEL-6 won't be wise.

Comment 15 RHEL Program Management 2012-02-14 22:09:56 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 16 Colin.Simpson 2012-03-02 19:21:06 UTC
I have this problem too. I have opened a support call directed at this bug.

Comment 18 Petr Pisar 2012-03-06 09:53:29 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
    Using bzip2 compression or decompression in Perl code
    (e.g. using IO::Compress::Bzip2 Perl module).
Consequence
    Perl interpreter complains about missing bzip2 module.
Fix
    Support for bzip2 compressions and decompression has
    been added and corresponding Perl modules has been
    packaged as perl-Compress-Raw-Bzip2 and
    perl-IO-Compress-Bzip2 .
Result
    Bzip2 algorithm can be used in Perl programs now.

Comment 19 Petr Pisar 2012-03-06 10:55:00 UTC
Created attachment 567912 [details]
Package bzip2 modules

This patch package bzip2 modules with files owned correctly.

Comment 24 errata-xmlrpc 2012-06-20 13:47:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0843.html