Bug 772651

Summary: /usr/lib64/perl5/vendor_perl/Encode/Makefile_PL.e2x detected as C source wrongly
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: fileAssignee: Kamil Dudka <kdudka>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: jkaluza, kdudka, ppisar
Target Milestone: ---Keywords: Patch, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: file-5.30-4.fc26 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-23 15:25:40 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
reproducer none

Description Petr Pisar 2012-01-09 14:28:07 UTC
$ rpm -q file
file-5.10-3.fc17.x86_64

$ 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
file-5.25-6.fc24.x86_64

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:

http://pkgs.fedoraproject.org/cgit/rpms/file.git/diff/file-5.10-strength.patch?id=3ddc6949

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":

http://pkgs.fedoraproject.org/cgit/rpms/file.git/commit/?id=3ddc6949

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

Comment 8 Kamil Dudka 2017-02-22 07:49:22 UTC
upstream commit:
https://github.com/file/file/commit/3c60e59a

Comment 9 Kamil Dudka 2017-02-23 15:25:40 UTC
downstream commit:
http://pkgs.fedoraproject.org/cgit/rpms/file.git/commit/?id=909293dc