Bug 825701

Summary: find2perl does not translate ? glob properly
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: perlAssignee: Jitka Plesnikova <jplesnik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: cweyl, iarnell, jplesnik, kasal, lkundrak, mmaslano, ppisar, psabata, rc040203, tcallawa
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://rt.perl.org/rt3/Public/Bug/Display.html?id=113054
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 825713 (view as bug list) Environment:
Last Closed: 2012-06-17 22:27:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Pisar 2012-05-28 09:01:57 UTC
$ find2perl -name 'a?b'
[...]
# Traverse desired filesystems
File::Find::find({wanted => \&wanted}, '.');
exit;
sub wanted {
    /^a.?b\z/s
    && print("$name\n");
}

The regular expression is wrong. Correct one is /^a.b\z/s.

Reported to upstream as <https://rt.perl.org/rt3/Public/Bug/Display.html?id=113054>. Patch is available there:

--- find2perl.orig 2012-03-06 19:36:39.000000000 +0000
+++ find2perl 2012-05-23 12:21:04.976166972 +0100
@@ -648,7 +648,8 @@
sub fileglob_to_re ($) {
my $x = shift;
$x =~ s#([./^\$()+])#\\$1#g;
- $x =~ s#([?*])#.$1#g;
+ $x =~ s#\*#.*#g;
+ $x =~ s#\?#.#g;
"^$x\\z";
}

All Fedoras are affected.

Comment 1 Fedora Update System 2012-05-30 15:51:43 UTC
perl-5.14.2-212.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/perl-5.14.2-212.fc17

Comment 2 Fedora Update System 2012-05-31 06:17:16 UTC
perl-5.14.2-198.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/perl-5.14.2-198.fc16

Comment 3 Fedora Update System 2012-06-01 17:13:25 UTC
Package perl-5.14.2-212.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-5.14.2-212.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-8739/perl-5.14.2-212.fc17
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-06-17 22:27:49 UTC
perl-5.14.2-212.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2012-06-30 08:33:54 UTC
perl-5.14.2-198.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.