Bug 470811

Summary: Spurious perl auto-requires
Product: [Fedora] Fedora Reporter: Adam Tkac <atkac>
Component: fileAssignee: Daniel Novotny <dnovotny>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dnovotny, ffesti, jnovy, ovasik, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-04 09:01:59 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:
Attachments:
Description Flags
test file
none
patch for perl5 module recognition none

Description Adam Tkac 2008-11-10 13:09:42 UTC
Description of problem:
when I try build swig package for F11 output rpm is unusable due spurious perl dependencies:

$ rpm -i swig-1.3.36-1.fc11.x86_64.rpm 
error: Failed dependencies:
        perl(argv) is needed by swig-1.3.36-1.fc11.x86_64
        perl(example) is needed by swig-1.3.36-1.fc11.x86_64
        perl(it) is needed by swig-1.3.36-1.fc11.x86_64
        perl(the) is needed by swig-1.3.36-1.fc11.x86_64

Version-Release number of selected component (if applicable):
$ rpm -q rpm-build
rpm-build-4.6.0-0.rc1.7.x86_64

How reproducible:
always

Steps to Reproduce:
1. download test srpm from http://atkac.fedorapeople.org/swig-1.3.36-1.fc11.src.rpm
2. build it
3. try install output rpm
  
Actual results:
installation fails due bad dependencies

Expected results:
no spurious perl deps

Additional info:
when I uncommented line 45 (rm -f Doc/Manual/Perl5.html) output rpm seems fine

Comment 1 Bug Zapper 2008-11-26 05:07:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Panu Matilainen 2008-11-29 16:29:15 UTC
This is the problem:
[pmatilai@turre Manual]$ file Perl5.html 
Perl5.html: Perl5 module source text

Current file/libmagic thinks it's perl so rpm runs perl dependency extractor on it. The fun of automatic file classification...

Comment 3 Adam Tkac 2008-12-01 11:22:40 UTC
Reassigning to proper component

Comment 4 Adam Tkac 2008-12-01 11:25:15 UTC
Created attachment 325218 [details]
test file

file says it is "Perl5 module source text" but it is not true.

Comment 5 Daniel Novotny 2008-12-01 15:35:58 UTC
found the magic file entry which causes the problem.

# by Dmitry V. Levin and Alexey Tourbin
# check the first line
0	search/1	package
0	regex		\^package[\ \t]+[A-Za-z_]
>0	regex		\^package[\ \t]+[0-9A-Za-z_:]+\ *;	Perl5 module source text
# not 'p', check other lines
0	search/1	!p
>0	regex		\^package[\ \t]+[0-9A-Za-z_:]+\ *;
>>0	regex		\^1\ *;|\^(use|sub|my)\ .*[(;{=]	Perl5 module source text


consulted upstream.

Comment 6 Daniel Novotny 2008-12-04 09:01:03 UTC
Created attachment 325653 [details]
patch for perl5 module recognition

one line in the magic entry was wrong

Comment 7 Daniel Novotny 2008-12-04 09:01:59 UTC
fixed in file-4.26-5.fc11