Bug 1279401 - Regression between 5.22 and 5.25: a perl script is mislabeled as module source
Regression between 5.22 and 5.25: a perl script is mislabeled as module source
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: file (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Jan Kaluža
Fedora Extras Quality Assurance
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-09 06:34 EST by Petr Pisar
Modified: 2015-11-26 06:21 EST (History)
3 users (show)

See Also:
Fixed In Version: file-5.25-3.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 11:40:07 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The 40_draw.pl sample (3.26 KB, text/plain)
2015-11-09 06:35 EST, Petr Pisar
no flags Details

  None (edit)
Description Petr Pisar 2015-11-09 06:34:45 EST
perl-Padre-0.90 delivers 40_draw.pl file in the documentation:

$ head share/examples/wx/40_draw.pl 
#!/usr/bin/perl 
use strict;
use warnings;


#############################################################################
## Name:        lib/Wx/DemoModules/wxPrinting.pm
## Based on the Printing demo by Mattia Barbon distribured in the Wx::Demo
## Copyright:   (c) 2001, 2003, 2005-2006 Mattia Barbon
## Licence:     This program is free software; you can redistribute it and/or


The old good behavior:

[test@fedora-24 Padre-0.90]$ rpm -qf /usr/bin/file
file-5.22-4.fc23.x86_64
[test@fedora-24 Padre-0.90]$ /usr/bin/file share/examples/wx/40_draw.pl
share/examples/wx/40_draw.pl: Perl script, ASCII text executable

The new bad behavior.

[test@fedora-24 Padre-0.90]$ rpm -qf /usr/bin/file
file-5.25-1.fc24.x86_64
[test@fedora-24 Padre-0.90]$ /usr/bin/file share/examples/wx/40_draw.pl 
share/examples/wx/40_draw.pl: Perl5 module source, ASCII text

The files contains both shell bang line and both "package" keyword. But I believe than any file with shell bang line should be recognized as "Perl script".
Comment 1 Petr Pisar 2015-11-09 06:35 EST
Created attachment 1091693 [details]
The 40_draw.pl sample
Comment 2 Petr Pisar 2015-11-18 14:47:43 EST
See <https://ppisar.fedorapeople.org/perl_rebuild/scratch/2015-11-18/index.xhtml#done> for Perl mass rebuild. It breaks generating Perl RPM dependencies on many RPM packages. For example, perl-App-find2perl is very simple package with the only Perl file /usr/bin/find2perl.
Comment 3 Jitka Plesnikova 2015-11-19 11:08:21 EST
I tried to solve the issue for Perl in attribute file perl.attr which is part of perl-generators. It helped, but it did not solve it completely. 

All perl(*) dependencies are back, but shebang command '/usr/bin/perl' is still missing.

It seems shebang is added by rpm only, if the file is detected as script.

For example:

The latest koji build
$ rpm -qpR perl-App-find2perl-1.003-6.fc23.noarch.rpm 
/usr/bin/perl
perl(:MODULE_COMPAT_5.22.0)
perl(Config)
perl(File::Spec::Functions)
perl(strict)
perl(vars)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1

Package build with updated perl-generators (not submitted yet)
$ rpm -qpR perl-App-find2perl-1.003-7.fc24.noarch.rpm 
perl(:MODULE_COMPAT_5.22.0)
perl(Config)
perl(File::Spec::Functions)
perl(strict)
perl(vars)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
Comment 4 Petr Pisar 2015-11-23 11:40:07 EST
I confirm file-5.25-3.fc24 fixes the regression.
Comment 5 Petr Pisar 2015-11-26 06:21:07 EST
I checked all perlish packages built with the broken file packages in the Koji (53) and the only affected package was postgrey, so I rebuild it.

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