Bug 1302297 - A perl script without "eval 'exec /usr/bin/perl" is mislabeled as Minix filesystem
Summary: A perl script without "eval 'exec /usr/bin/perl" is mislabeled as Minix file...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact: Fedora Extras Quality Assurance
URL: https://ppisar.fedorapeople.org/perl_...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-27 12:40 UTC by Petr Pisar
Modified: 2016-01-28 13:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-28 13:23:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Affected file (7.10 KB, text/plain)
2016-01-27 12:40 UTC, Petr Pisar
no flags Details

Description Petr Pisar 2016-01-27 12:40:43 UTC
Created attachment 1118761 [details]
Affected file

Attached Perl script is misrecognized as Minix filesystem:

$ file affected 
affected: Minix filesystem, V2 (big endian), 27749 zones

The script is a new form of a script that was stripped of unneeded "eval 'exec /usr/bin/perl" lines:

--- good        2016-01-27 13:17:41.534000000 +0100
+++ affected    2016-01-27 13:19:44.374000000 +0100
@@ -1,8 +1,5 @@
 #!/usr/bin/perl -w
 
-eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
-    if 0; # not running under some shell
-
 # ----------------------------------------------------------------------
 # urifind - find URIs in a document and dump them to STDOUT.
 # Copyright (C) 2003 darren chamberlain <darren>

The longer script is recognized properly:

$ file good affected 
good:     Perl script, ASCII text
affected: Minix filesystem, V2 (big endian)

I have installed file-5.22-6.fc23.x86_64.

Please note that this issue will become a problem because the new form is an output of perl-URI-Find rebuilt in rawhide.

Comment 1 Jan Kaluža 2016-01-28 13:23:25 UTC
According to Petr, fix for rawhide should be enough:

http://koji.fedoraproject.org/koji/taskinfo?taskID=12711649

Feel free to reopen if you find out you need a fix in other Fedora versions too.


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