Bug 1302297 - A perl script without "eval 'exec /usr/bin/perl" is mislabeled as Minix filesystem
A perl script without "eval 'exec /usr/bin/perl" is mislabeled as Minix file...
Product: Fedora
Classification: Fedora
Component: file (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Kaluža
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-01-27 07:40 EST by Petr Pisar
Modified: 2016-01-28 08:23 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-01-28 08:23:25 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Petr Pisar 2016-01-27 07:40:43 EST
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@cpan.org>

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 08:23:25 EST
According to Petr, fix for rawhide should be enough:


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.