Bug 148847 - Packing fault with perl and FCGI
Packing fault with perl and FCGI
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: perl (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Chip Turner
David Lawrence
:
Depends On:
Blocks: FC3Update
  Show dependency treegraph
 
Reported: 2005-02-16 02:16 EST by Rob Kearey
Modified: 2007-11-30 17:11 EST (History)
4 users (show)

See Also:
Fixed In Version: 5.8.5-12.FC3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-04 17:04:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
perl specfile: removes the FCGI and Mac::Files provides; removes perl-suidperl suffix (1.38 KB, patch)
2005-04-20 19:52 EDT, Jose Pedro Oliveira
no flags Details | Diff
Filters the FCGI requirement (459 bytes, patch)
2005-04-20 19:54 EDT, Jose Pedro Oliveira
no flags Details | Diff

  None (edit)
Description Rob Kearey 2005-02-16 02:16:49 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0

Description of problem:
The perl RPM has provides FCGI in the specfile as shown:

[robk@custard ~]$ rpm -q perl --provides | grep FCGI
perl(FCGI)

but does not include FCGI anywhere:

[robk@custard ~]$ rpm -ql perl | grep FCGI
[robk@custard ~]$

Therefore things like this fail:

[robk@custard ~]$ perl -e "use CGI::Fast;"
Can't locate FCGI.pm in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/5.8.5/CGI/Fast.pm line 22.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.5/CGI/Fast.pm line 22.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

This should be fixed; Either the specfile for perl should reflect the actual provides, or the FCGI.pm should be packaged as usual.


Version-Release number of selected component (if applicable):
perl-5.8.5-9

How reproducible:
Always

Steps to Reproduce:
1. run perl -e "use Fast::CGI;"
2. Prang

  

Actual Results:  [robk@custard ~]$ perl -e "use CGI::Fast;"
Can't locate FCGI.pm in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/5.8.5/CGI/Fast.pm line 22.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.5/CGI/Fast.pm line 22.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.


Expected Results:  -bash-2.05b$ perl -e "use CGI::Fast;"
-bash-2.05b$


Additional info:

This also appears to affect RHEL4
Comment 1 Rob Kearey 2005-04-12 00:06:41 EDT
Still occurs in latest FC3 update, perl-5.8.5-11.FC3
Comment 2 Jose Pedro Oliveira 2005-04-13 13:16:58 EDT
This appears to be the method used to avoid the FCGI requirement of
CGI::Fast. This perl module uses FCGI.

I believe the correct method to handle this problem would be to delete
the following two lines from the perl specfile

   # XXX needed by perl-CGI
   Provides: perl(FCGI)

and filter the FCGI requirement (we just need to add "grep -v 'perl(FCGI)'"
 to the file filter-depends.sh).
Comment 3 Jose Pedro Oliveira 2005-04-13 14:00:27 EDT
Patches:

perl.spec
--------------------
--- perl.spec.orig      2005-03-17 18:07:17.000000000 +0000
+++ perl.spec   2005-04-13 19:53:57.000000000 +0100
@@ -124,9 +124,6 @@
 # XXX needed by perl-libnet
 Provides: perl(Mac::Files)

-# XXX needed by perl-CGI
-Provides: perl(FCGI)
-
 Provides: perl(abbrev.pl)
 Provides: perl(assert.pl)
 Provides: perl(bigfloat.pl)
--------------------


filter-depends.sh
--------------------
--- filter-depends.sh.orig      2004-09-09 11:07:13.000000000 +0100
+++ filter-depends.sh   2005-04-13 19:09:57.000000000 +0100
@@ -1,4 +1,4 @@
 #!/bin/sh

-/usr/lib/rpm/perl.req $* | grep -v NDBM | grep -v 'perl(v5.6.0)' | grep -v
'perl(Mac::' | grep -v 'perl(Tk' | grep -v 'perl(Tie::RangeHash)'
+/usr/lib/rpm/perl.req $* | grep -v NDBM | grep -v 'perl(v5.6.0)' | grep -v
'perl(Mac::' | grep -v 'perl(Tk' | grep -v 'perl(Tie::RangeHash)' | grep -v
'perl(FCGI)'

--------------------

Comment 4 Ville Skyttä 2005-04-14 03:05:14 EDT
Looks good to me.  And the perl(Mac::Files) provision visible in the first hunk
of Jose's patch seems to be a strong candidate for removal too. 
filter-depends.sh already matches it.
Comment 5 Warren Togami 2005-04-14 05:50:49 EDT
Ville, do you consider this serious enough to issue a perl update for FC3?  If
so let us identify other things we can fix or backport in order to make this
update more meaningful.
Comment 6 Chip Turner 2005-04-14 11:24:32 EDT
the change should be okay.  I would check the annotation from cvs on that line and see exactly why it 
was added; I imagine it was when perl-CGI was split out from the main rpm.  I believe around RHL8 or 9 
when RPM was given a much better dependency checker, a number of those provides were added so 
that perl itself could install.  you can either add them as Provides or filter them out.  given the 
annoyance of the filter scripts, I believe I used Provides for some of them, but if you want to change 
them over, it should be suitable; just do a diff on --requires and --provides before and after the 
change to make sure there are no surprises.

(periodically I pester jeff to give dependency whiteout, but for four years now he has refused; this is the 
kind of junk you have to do because of that refusal)
Comment 7 Ville Skyttä 2005-04-14 16:06:37 EDT
I don't think this warrants a FC3 perl update alone.  But in case FC3 perl ever
gets updated, it'd be nice to get this in, too.

Agreed with Chip, dep filtering is sucky and one is easily tempted to use more
or less fake Provides instead.  Those tend to bitrot though, and may cause
problems sooner or later.
Comment 8 Warren Togami 2005-04-14 16:53:07 EDT
"Dependency whiteout"?
Comment 9 Chip Turner 2005-04-20 11:51:38 EDT
yeah basically being able to say:

UnRequire: perl-Busted-Package

and having rpm remove the dependency, instead of having to filter with a script.
Comment 10 Jose Pedro Oliveira 2005-04-20 19:52:28 EDT
Created attachment 113446 [details]
perl specfile: removes the FCGI and Mac::Files provides; removes perl-suidperl suffix

This patches removes the following:
- Provides(Mac::Files)	- already being filtered
- Provides(FCGI)  - needs to filtered (see next comment/patch)
- drops the '.1' suffix from perl-suidperl
Comment 11 Jose Pedro Oliveira 2005-04-20 19:54:30 EDT
Created attachment 113447 [details]
Filters the FCGI requirement
Comment 12 Jose Pedro Oliveira 2005-04-20 20:04:59 EDT
Warren,

Could you apply the above pages?

TIA,
jpo
Comment 13 Warren Togami 2005-04-20 21:09:20 EDT
Thanks, added to FC4.  Keeping bug open in preparation for an eventual FC3 perl
update after we find more stuff worth fixing.
Comment 14 Rob Kearey 2005-04-28 21:52:57 EDT
Problem still occurs in perl-5.8.5-12.FC3

[robk@custard ~]$ perl -e "use CGI::Fast;"
Can't locate FCGI.pm in @INC (etc)
Comment 15 Ville Skyttä 2005-04-29 02:12:05 EDT
That's expected, FCGI was not added to the perl package, but the package was
fixed to reflect the actual state of affairs as suggested in the initial
comment: the fake "Provides: perl(FCGI)" was removed.

Even folding FCGI in the perl package wouldn't seemingly really suffice to make
CGI::Fast useful.  If I understand correctly, scripts using it beyond a simple
load of the module need a FastCGI enabled web server, such as Apache with the
mod_fastcgi module; and that module is not included in FC.
Comment 16 Rob Kearey 2005-05-02 20:04:49 EDT
Ah, that makes sense then. Sorry for the confusion, had my brain in backwards. 
Comment 17 Ville Skyttä 2005-05-04 17:04:18 EDT
Fixed in 5.8.5-12.FC3 and 5.8.6-6.

Note You need to log in before you can comment on or make changes to this bug.