Bug 58509

Summary: find-*.perl inadvertently uses filename glob patterns
Product: [Retired] Red Hat Linux Reporter: Russell King <rmk>
Component: rpm-buildAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-01-18 12:31:41 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:

Description Russell King 2002-01-18 12:31:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.6) Gecko/20011120

Description of problem:
find-provides.perl and find-requires.perl both use:
      tr [:blank:] \\n
Unfortunately, the [:blank:] isn't quoted, so the shell treats it as a filename
globbing pattern.  If you happen to have a file called 'l' in the current
directory when you start a build of a perl package, the dependencies get
completely messed up.

Version-Release number of selected component (if applicable):
4.0.2-8

How reproducible:
Always

Steps to Reproduce:
1. obtain perl-DBD-MySQL source package.
2. create a file called 'l' in the current directory
3. rpm --rebuild perl-DBD-MySQL-1.2216-4.src.rpm
4. Check the build log for errors at the find-provides stage:
   /usr/lib/rpm/perl.prov: Could not open file: '/var/tmp/per' : No such file or
directory
5. rpm -q --requires -p perl-DBD-Mysql-1.2216-4.*.rpm

Actual Results:  Wrong dependency information generated.

Expected Results:  Correct dependency information. 8)

Additional info:

its a pain, because when it happens, the cause is very non-obvious, and isn't
easy to track down.

The fix is simple - just add single quotes around the two [:blank:] in
find-provides.perl and one [:blank:] in find-requires.perl

The perl package also has its own find-provides and find-requires which seems to
suffer the same problem.

Comment 1 Jeff Johnson 2002-01-26 18:40:57 UTC
Both find-{requires,provides}.perl are obsolete in rpm-4.0.4-0.19,
and now execute perl.{req,prov} used for all builds.