Bug 675684

Summary: RFE: file could recognize perl header files (.ph)
Product: Red Hat Enterprise Linux 6 Reporter: Milos Malik <mmalik>
Component: fileAssignee: Jan Kaluža <jkaluza>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: low    
Version: 6.1Keywords: FutureFeature
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-22 10:39:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Milos Malik 2011-02-07 10:30:53 UTC
Description of problem:


Version-Release number of selected component (if applicable):
file-5.04-6.el6

How reproducible:
always

Steps to Reproduce:
# rpm -ql perl | grep -F .ph | xargs file
/usr/lib64/perl5/_h2ph_pre.ph:               ASCII text
/usr/lib64/perl5/asm-generic/bitsperlong.ph: ASCII text
/usr/lib64/perl5/asm-generic/int-l64.ph:     ASCII text
/usr/lib64/perl5/asm-generic/int-ll64.ph:    ASCII text
/usr/lib64/perl5/asm-generic/ioctl.ph:       ASCII text
/usr/lib64/perl5/asm/auxvec.ph:              ASCII text
/usr/lib64/perl5/asm/bitsperlong.ph:         ASCII text
/usr/lib64/perl5/asm/cputable.ph:            ASCII text
/usr/lib64/perl5/asm/elf.ph:                 ASCII text, with very long lines
/usr/lib64/perl5/asm/ioctl.ph:               ASCII text
/usr/lib64/perl5/asm/ioctls.ph:              ASCII text
...

Actual results:


Expected results:

Comment 2 Jan Kaluža 2011-02-07 14:17:26 UTC
I'm not sure it will be possible to improve Perl recognition significantly, because Perl doesn't have so unique syntax in comparison with other languages.

The only thing I can probably do is to check if the file ends with "1;", because that's what usually perl headers do, but I don't believe it would be accepted by upstream.

I'll keep it open for a while and be thinking more about it.

Comment 3 Jan Kaluža 2011-03-22 10:39:04 UTC
After some discussions with people who know Perl better than me I think there's no way how to significantly improve File Perl patterns and don't break detection of other scripting languages. Closing this as WONTFIX.