Bug 772651 - /usr/lib64/perl5/vendor_perl/Encode/Makefile_PL.e2x detected as C source wrongly
Summary: /usr/lib64/perl5/vendor_perl/Encode/Makefile_PL.e2x detected as C source wrongly
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: 24
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2012-01-09 14:28 UTC by Petr Pisar
Modified: 2017-02-23 15:25 UTC (History)
3 users (show)

Fixed In Version: file-5.30-4.fc26
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2017-02-23 15:25:40 UTC
Type: ---

Attachments (Terms of Use)
reproducer (4.62 KB, text/plain)
2017-02-20 14:37 UTC, Kamil Dudka
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1424989 0 unspecified CLOSED file command misinterprets text as python excuteable code 2021-02-22 00:41:40 UTC

Internal Links: 1424989

Description Petr Pisar 2012-01-09 14:28:07 UTC
$ rpm -q file

$ file /usr/share/perl5/Encode/Makefile_PL.e2x
/usr/share/perl5/Encode/Makefile_PL.e2x: C source, ASCII text

But /usr/share/perl5/Encode/Makefile_PL.e2x is Perl code:

$ head  /usr/share/perl5/Encode/Makefile_PL.e2x
# This file is auto-generated by:
# enc2xs version $_Version_
# $_Now_
use 5.7.2;
use strict;
use ExtUtils::MakeMaker;
use Config;

This is regression against file-5.09-1.fc17.

Comment 1 Jan Kaluža 2012-01-10 07:56:10 UTC
Thanks for the report. It should be fixed in file-5.10-4.fc17.

Upstream bug report: http://bugs.gw.com/view.php?id=166

Comment 2 Petr Pisar 2012-01-10 09:24:44 UTC
Fix verified. Thank you.

Comment 3 Kamil Dudka 2017-02-20 13:44:29 UTC
The Fedora patch for this bug has never been applied upstream and it is known to cause problems (see bug #1424989).  Based on the info from the above ticket on the upstream bug tracker, this bug is already fixed upstream in a different way.

I am about to drop the downstream patch from Fedora now.  Petr, do you have any data I can use to verify if this bug is fixed upstream?

/usr/share/perl5/Encode/Makefile_PL.e2x does not exist on my Fedora 24 box...

Comment 4 Petr Pisar 2017-02-20 14:06:00 UTC
The bug report mentions Fedora 17. /usr/share/perl5/Encode/Makefile_PL.e2x is delivered by perl-devel-5.14.4-224.fc17.x86_64.rpm there and I can assure you that file-5.25-6.fc24.x86_64 still misinterprets the file:

$ wget -q -O - https://kojipkgs.fedoraproject.org//packages/perl/5.14.4/224.fc17/x86_64/perl-devel-5.14.4-224.fc17.x86_64.rpm | rpm2cpio | cpio -i --to-stdout ./usr/share/perl5/Encode/Makefile_PL.e2x | file -
3823 blocks
/dev/stdin: C source, ASCII text

$ rpm -qf /usr/bin/file

F24 provides the file in perl-Encode-devel under /usr/lib64/perl5/vendor_perl/Encode/Makefile_PL.e2x path and it also exhibits the same problem:

$ file /usr/lib64/perl5/vendor_perl/Encode/Makefile_PL.e2x
/usr/lib64/perl5/vendor_perl/Encode/Makefile_PL.e2x: C source, ASCII text

Comment 5 Petr Pisar 2017-02-20 14:07:05 UTC
So it looks like a regression in Fedora because Fedora 24 is broken again. Reopening this bug report.

Comment 6 Kamil Dudka 2017-02-20 14:23:52 UTC
Thanks!  So it does not work anyway...

The patch we have in Fedora is not the patch that was originally applied for this bug.  The contents of file-5.10-strength.patch was (by mistake?) rewritten two years later:


The patch for this bug patched Magdir/c-lang whereas the current patch (with the same file name) patches Magdir/python.  The commit message only says "update to version 5.19":


Comment 7 Kamil Dudka 2017-02-20 14:37:37 UTC
Created attachment 1255707 [details]

Comment 8 Kamil Dudka 2017-02-22 07:49:22 UTC
upstream commit:

Comment 9 Kamil Dudka 2017-02-23 15:25:40 UTC
downstream commit:

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