Bug 520530 - cpanspec adds /usr/local/bin/perl as dependency to created rpms?
Summary: cpanspec adds /usr/local/bin/perl as dependency to created rpms?
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: cpanspec
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Steven Pritchard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-31 22:58 UTC by Penelope Fudd
Modified: 2010-12-07 20:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-28 14:25:23 UTC


Attachments (Terms of Use)
cpan2spec -b HTML::Tree > /tmp/a (8.03 KB, text/plain)
2009-08-31 22:58 UTC, Penelope Fudd
no flags Details
perl-HTML-Tree.spec file from cpanspec (1.54 KB, text/plain)
2009-08-31 23:05 UTC, Penelope Fudd
no flags Details

Description Penelope Fudd 2009-08-31 22:58:39 UTC
Created attachment 359330 [details]
cpan2spec -b HTML::Tree > /tmp/a

Description of problem:
I can't install HTML::Tree using the rpm generated by cpanspec, because it has /usr/local/bin/perl as a dependency.

Version-Release number of selected component (if applicable):
cpanspec-1.78-2.fc11.noarch
rpm-build-4.7.1-1.fc11.i586

How reproducible:
Always

Steps to Reproduce:
1. cpanspec -b HTML::Tree
2. rpm -Uvh /home/kernel/rpmbuild/SOURCES/noarch/perl-HTML-Tree-3.23-1.fc11.noarch.rpm
3. 
  
Actual results:
error: Failed dependencies:
	/usr/local/bin/perl is needed by perl-HTML-Tree-3.23-1.fc11.noarch

Expected results:
Painless install

Additional info:
The produced spec file doesn't have any reference to /usr/local/bin/perl, so it may be rpmbuild causing the problem...?

Comment 1 Penelope Fudd 2009-08-31 23:05:11 UTC
Created attachment 359331 [details]
perl-HTML-Tree.spec file from cpanspec

Comment 2 Jason Tibbitts 2009-08-31 23:12:34 UTC
Cpanspec doesn't do that.  More likely one of the scripts the package installs calls /usr/local/bin/perl and RPM's automatic dependency generation sees that and adds a dependency for it.

Grep through the installed files, see which one needs fixing, and add code to the spec file to change /usr/local/bin/perl to /usr/bin/perl.  This is a normal thing for you to have to do when creating an RPM.

Comment 3 Paul Howarth 2009-08-31 23:13:06 UTC
It comes from here:

http://cpansearch.perl.org/src/PETEK/HTML-Tree-3.23/htmltree

This script has a /usr/local/bin/perl shellbang and rpm adds a dependency for it. Normal practice would be to edit this in %prep of the spec file and change it to a %{__perl} shellbang.

Comment 4 Penelope Fudd 2009-09-01 16:58:43 UTC
As this is a normal practice, could it be added to cpanspec?

Comment 5 Paul Howarth 2009-09-01 17:49:11 UTC
It's normal practice to look at the generated RPM and fix problems manually; cpanspec is intended to provide a sane starting point rather than a tool that can generate correct packages for all perl modules. It does such a good job that many modules don't need any manual tweaking but sometimes, as in this case, such tweaks need to be made.

Now some of these tweaks could potentially be automated but there are potentially lots of such cases. Another type of tweak commonly needed is a manual dependency that needs adding, and it would be much more difficult to automatically determine the need for these.

Is there some particular reason why you're trying to generate a perl-HTML-Tree package rather than use the one in Fedora anyway?

Comment 6 Penelope Fudd 2009-09-01 18:14:06 UTC
Ok, now that I know about the requirement for tweaks I can cope with it.

The goal wasn't actually HTML::Tree, it was some other package (I forget which at this point, but I'll probably trip over it later today) that wasn't in Fedora.  I tried cpanspec on it, but it had dependencies.  So, in the haze of perl-module-install fever, I just kept on doing cpanspec on the dependencies, and on their dependencies, and so on and so forth.  Sometimes I'm alert enough to try yum, but I'm also administering some Macs with fink, and rewriting Some::Random::Module to perl-Some-Random-Module or some-random-module-pm588 or some-random-module-pm586 is sometimes more than I can handle after the hundredth time.

And then there's CPAN, which takes care of all dependencies, if I abandon rpm package management.  I saw there's a CPANPLUS::Dist::RPM module that would supposedly generate RPMs, but I couldn't get it to work last time I tried it.

I tell ya, this death-of-a-thousand-paper-cuts makes me want to quit and take up a job running a laundromat.

Comment 7 Bug Zapper 2010-04-28 10:06:36 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Bug Zapper 2010-06-28 14:25:23 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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