Bug 148847 - Packing fault with perl and FCGI
Summary: Packing fault with perl and FCGI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Chip Turner
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks: FC3Update
TreeView+ depends on / blocked
 
Reported: 2005-02-16 07:16 UTC by Rob Kearey
Modified: 2007-11-30 22:11 UTC (History)
4 users (show)

Fixed In Version: 5.8.5-12.FC3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-05-04 21:04:18 UTC
Type: ---
Embargoed:


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

Description Rob Kearey 2005-02-16 07:16:49 UTC
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 04:06:41 UTC
Still occurs in latest FC3 update, perl-5.8.5-11.FC3

Comment 2 Jose Pedro Oliveira 2005-04-13 17:16:58 UTC
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 18:00:27 UTC
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 07:05:14 UTC
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 09:50:49 UTC
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 15:24:32 UTC
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 20:06:37 UTC
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 20:53:07 UTC
"Dependency whiteout"?


Comment 9 Chip Turner 2005-04-20 15:51:38 UTC
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 23:52:28 UTC
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 23:54:30 UTC
Created attachment 113447 [details]
Filters the FCGI requirement

Comment 12 Jose Pedro Oliveira 2005-04-21 00:04:59 UTC
Warren,

Could you apply the above pages?

TIA,
jpo

Comment 13 Warren Togami 2005-04-21 01:09:20 UTC
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-29 01:52:57 UTC
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 06:12:05 UTC
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-03 00:04:49 UTC
Ah, that makes sense then. Sorry for the confusion, had my brain in backwards. 

Comment 17 Ville Skyttä 2005-05-04 21:04:18 UTC
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.